Skip to main content
POST
/
chat
/
completions
curl --request POST \ --url https://api.orcarouter.ai/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "openai/gpt-4o-mini", "messages": [ { "role": "user", "content": "Say hi in one word." } ], "max_tokens": 10 } '
{
  "id": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "content": "<string>",
        "name": "<string>",
        "tool_calls": [
          {
            "id": "<string>",
            "function": {
              "name": "<string>",
              "arguments": "<string>"
            }
          }
        ],
        "tool_call_id": "<string>"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

OrcaRouter API keys look like sk-orca-.... Pass them in the Authorization: Bearer sk-orca-... header.

Body

application/json
model
string
required

Model ID. Supports three forms:

  • Provider-prefixed (default): openai/gpt-4o-mini, anthropic/claude-sonnet-4.6, google/gemini-2.5-flash
  • Plain alias: gpt-4o-mini (when a bare-name alias is available)
  • Named router: orcarouter/{name} (resolves to a model at request time; orcarouter/auto is seeded on signup for every account and picks the cheapest live chat model)
Examples:

"gpt-4o"

"openai/gpt-4o"

"orcarouter/auto"

messages
object[]
required
stream
boolean

When true, response is streamed as server-sent events.

stream_options
object

Only applies when stream: true.

tools
object[]
tool_choice
Available options:
auto,
none,
required
parallel_tool_calls
boolean
default:true
response_format
Text (default) · object
temperature
number
Required range: 0 <= x <= 2
top_p
number
Required range: 0 <= x <= 1
max_tokens
integer
Required range: x >= 1
max_completion_tokens
integer

Preferred over max_tokens for reasoning models.

n
integer
default:1
Required range: x >= 1
stop
seed
integer

For deterministic sampling.

logprobs
boolean
top_logprobs
integer
Required range: 0 <= x <= 20
presence_penalty
number
Required range: -2 <= x <= 2
frequency_penalty
number
Required range: -2 <= x <= 2
logit_bias
object
user
string
reasoning_effort
enum<string>

For OpenAI reasoning models (o1, o3*, o4*, gpt-5*-pro, etc.). Anthropic Claude uses the thinking field instead; Gemini uses provider-specific configuration.

Available options:
low,
medium,
high
web_search_options
object

Enable web search on a Chat Completions request. The Responses API uses tools: [{"type": "web_search"}] instead. Honored by OpenAI search-preview models, OpenAI models that accept the modern web_search tool, and Anthropic models (translated to Anthropic's native web_search server-tool).

Free-form raw payload forwarded to the upstream's web-search tool when web_search_options is not expressive enough. Most users should prefer web_search_options.

extra_body
object

OrcaRouter-specific request extensions. Place these under the extra_body top-level key of your chat completion request.

Response

Successful completion. Streaming responses use SSE (text/event-stream).

id
string
object
enum<string>
Available options:
chat.completion
created
integer
model
string
choices
object[]
usage
object