Xenodia Docs

Quickstart

最初の Xenodia API call を実行し、本番ロジックでは先にモデルを発見する。

このページは API key から動作するリクエストまでの最短経路を示します。

前提条件

  • Xenodia account。
  • 長期 Xenodia API key。
  • secret をブラウザ外に置ける server environment。

key を設定します:

export XENODIA_API_KEY="YOUR_LONG_TERM_KEY"

Chat request を送る

curl -X POST "https://api.xenodia.xyz/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XENODIA_API_KEY" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      { "role": "system", "content": "You are a precise test assistant." },
      { "role": "user", "content": "Reply with OK only." }
    ],
    "temperature": 0
  }'

期待される shape:

{
  "id": "chatcmpl-xxx",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "OK"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 1,
    "total_tokens": 19
  }
}

先にモデルを発見する

本番で固定モデルを使う前に model catalog を問い合わせます:

curl "https://api.xenodia.xyz/v1/models"

/v1/models は public endpoint です。認証が必要な runtime call を送る前に、model ID、modality、async support、pricing mode、reference input rule、available channel を確認します。

Agent runtime quickstart

HTTP を直接書くのではなく agent 環境をセットアップする場合:

npx xenodia@latest init

このフローは wallet readiness を確認し、Xenodia skill instructions をインストールし、API key の検出または設定を助け、完全な endpoint 情報としてこの docs に戻します。

Mode使う場面
Agent AutopilotAgent が owner 定義の spend / channel boundary 内でモデルやツールを呼び出せる。
Human Owner Controlledウォレットバインド、top-up、channel access、高リスク操作を人間の owner が承認する。

ウォレット連動 agent では、先に owner を bind し、その後 agent identity を作成または割り当てます。Owner boundary が支払い元と利用可能なモデル・channel を決めます。

次のステップ

このページ