本文へ移動
メイン ドキュメント
ドキュメント

エンドポイント一覧

すべて https://api.kotoba.cloud 配下。auth の pat は接続トークンの Bearer、cookie はブラウザのセッション(同一 origin の POST)、public は認証なし。提供していない wire(/v1/messages, /v1/responses, Gemini)は 405 です。

method path auth 本文と応答
GET /v1/models public モデルカタログ(team, route, availability)。
POST /v1/chat/completions pat / cookie OpenAI 互換の補完。tools, stream(emulated), max_tokens ≤ 32768。応答に billing / receiptId (+ usage, chargedMicroUSD)。
GET /v1/research/status pat / cookie {status: eligible|pending, reason, freeTier, trust, scopes}。
POST /v1/research/jobs pat / cookie ジョブ作成。ヘッダ idempotency-key (uuid v4)。本文は strict shape {model, task, scopeId, max_tokens, messages}。202 queued。
GET /v1/research/job?jobId= pat / cookie {jobId, status, billing, model, receiptId, pollAfterMs, content?, toolCalls?, finishReason?}。202 while queued/running。
POST /v1/research/applications pat / cookie 研究者登録の申請 {verificationMode, policyVersion, consent, authorizedResearch, purpose, scope}。202。
POST /v1/research/ekyc/start pat / cookie 本人確認の開始 {scopeId, tasks} → Stripe の URL。
GET /v1/research/ekyc/status pat / cookie 本人確認の状態。
GET /v1/billing/catalog public プラン・単価・checkoutEnabled・purchasable。
GET /v1/billing/status pat / cookie {status, plan, balances[{scope, grantedMicroUSD, spentMicroUSD, reservedMicroUSD, availableMicroUSD}]}。
POST /v1/billing/checkout cookie {sku, requestId} → Stripe Checkout の URL。PAT では 403。
POST /v1/billing/portal cookie 請求・解約の Customer Portal URL。
GET /v1/secure public guardrails / firewall / compliance の版と規則。
GET /v1/session cookie {valid, username, principalId}。
POST /v1/account/api-token cookie 接続トークンの発行(一度だけ表示)。
GET /v1/account/api-tokens cookie 発行済みトークンの一覧(id, label)。
POST /v1/account/api-token/revoke cookie トークンを 1 つ取り消す。
GET /v1/security/services public セキュリティサービスの公開カタログ。
GET /v1/control-plane public サービス発見のプロファイル。

共通: エラーは {"error":{"code":…}}(Errors)。POST の本文上限は 2 MiB、content-type は application/json 必須。