ドキュメント

一度接続して、すべてのモデルへルーティング。

OpenAI、Anthropic、Gemini、Qwen、DeepSeek、Grok、MiniMax などの互換形式で Route Key を利用できます。

デモモード5 モデルをインデックス済み更新 00:00:00
30モデル API エンドポイント
8プロバイダー分類
API キー認証
Integration guideConnect apps and coding agentsOne API key and compatible gateway for SDKs, Codex, Claude Code, Gemini CLI, and Cursor.Open guide
POSTOpenAI/chat/completions

Create Chat Completion

Creates a model response from conversation history with streaming, tools, and usage accounting.

Authorization
Add this value to the HTTP request headers.
Authorization: Bearer sk-your-key
Content-Type

application/json

モデル

gpt-4o, gpt-4.1, gpt-5, o3, o4-mini

リクエスト例
curl -X POST https://api.routekey.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "user",
      "content": "Hello from Route Key"
    }
  ],
  "stream": false
}'
レスポンス例
{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "created": 0,
  "model": "gpt-4o",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello!"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 8,
    "completion_tokens": 3,
    "total_tokens": 11
  }
}
cURL 例
curl -X POST 'https://api.routekey.ai/v1/chat/completions' \
  -H 'Authorization: Bearer sk-your-key'
  -H 'Content-Type: application/json'
  -d '{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "user",
      "content": "Hello from Route Key"
    }
  ],
  "stream": false
}'
パラメータ
Name必須Description
modelstringはいモデル名
messagesarray<object>はいチャット
temperaturenumberいいえTemperature
top_pnumberいいえTop P
streambooleanいいえリアルタイム
max_tokensintegerいいえMax tokens
toolsarray<object>いいえTools
response_formatobjectいいえResponse format
レスポンス
Name必須Description
idstring-ID
objectstring-Object
createdinteger-Created
modelstring-モデル名
choicesarray<object>-Choices
usageobject-Usage
注記
  • OpenAI Chat Completions
  • Use the same request shape as the matching provider API when the backend channel is enabled.

基本概念

基本概念

API キー: API キー

Base URL: Route Key は OpenAI 形式を保ち、SDK の送信先だけを変更します。

モデル名: モデル名は payload に保持され、バックエンドがルーティングを解決します。

利用量と請求: コスト、トークン数、レイテンシは使用ログに表示されます。

モデル選択

モデル選択

一般チャット: 一般チャット

推論またはコード: 推論またはコード

推論またはコード

利用量と請求

よくあるエラー

初回の失敗は認証、モデル名、クォータ、リクエスト形式が原因であることが多いです。

401

認証

認証

403

利用量と請求

モデル名は payload に保持され、バックエンドがルーティングを解決します。

429

利用量と請求

コスト、トークン数、レイテンシは使用ログに表示されます。

5xx

よくあるエラー

初回の失敗は認証、モデル名、クォータ、リクエスト形式が原因であることが多いです。