메인 콘텐츠로 건너뛰기
POST
/
messages
메시지 생성
curl --request POST \
  --url https://api.orcarouter.ai/v1/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "anthropic/claude-sonnet-4.6",
  "messages": [
    {
      "content": "<string>"
    }
  ],
  "max_tokens": 123,
  "system": "<string>",
  "stop_sequences": [
    "<string>"
  ],
  "stream": true,
  "temperature": 123,
  "top_p": 123,
  "top_k": 123,
  "tools": [
    {}
  ],
  "tool_choice": {},
  "thinking": {
    "budget_tokens": 123
  },
  "mcp_servers": "<unknown>",
  "metadata": {}
}
'
{
  "id": "<string>",
  "content": [
    {
      "text": "<string>"
    }
  ],
  "model": "<string>",
  "stop_sequence": "<string>",
  "usage": {
    "input_tokens": 123,
    "output_tokens": 123,
    "cache_creation_input_tokens": 123,
    "cache_read_input_tokens": 123,
    "server_tool_use": {}
  }
}

인증

Authorization
string
header
필수

OrcaRouter API 키는 sk-orca-...처럼 보입니다. Authorization: Bearer sk-orca-... 헤더로 전달하세요.

본문

application/json
model
string
필수
예시:

"anthropic/claude-sonnet-4.6"

messages
object[]
필수
max_tokens
integer
필수
system
stop_sequences
string[]
stream
boolean
temperature
number
top_p
number
top_k
integer
tools
object[]
tool_choice
object
thinking
object

Anthropic extended thinking. thinking을 지원하는 Claude 4 / Claude Opus 모델에서 설정. 모델은 최종 답변 전에 숨겨진 추론 패스를 발행.

mcp_servers
any

Anthropic으로 그대로 전달되는 자유 형식 MCP 서버 구성.

metadata
object

응답

200 - application/json

OK

id
string
type
enum<string>
사용 가능한 옵션:
message
role
enum<string>
사용 가능한 옵션:
assistant
content
object[]
model
string
stop_reason
enum<string>
사용 가능한 옵션:
end_turn,
max_tokens,
stop_sequence,
tool_use
stop_sequence
string | null
usage
object