문서

한 번 연결하고 모든 모델로 라우팅하세요.

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

model

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

일반 오류

첫 실패는 인증, 모델 이름, 쿼터 또는 요청 형식 때문인 경우가 많습니다.