Router API reference
Sapiom Router accepts LLM requests from your application using a Sapiom API key. Choose a model, then use the request format your application already understands.
Base URL: https://router.sapiom.ai
Open Router in the dashboard to inspect Router activity. For LLM calls inside a deployed Sapiom agent, see Choose a call surface.
Authentication
Section titled “Authentication”Set SAPIOM_API_KEY to your Sapiom API key in the environment where you run the examples. Send it in either Authorization: Bearer or x-api-key. Router authenticates your Sapiom account; you do not supply a provider API key.
Request formats
Section titled “Request formats”| Format | Endpoint |
|---|---|
| Anthropic Messages | POST /v1/messages |
| OpenAI Chat Completions | POST /v1/chat/completions |
| OpenAI Responses | POST /v1/responses |
Each endpoint accepts its named request format and returns that format’s response. Router translates between formats when the selected provider uses a different one.
For Responses requests translated to another format, previous_response_id is not supported. Include the conversation in input instead. Responses requests do not fall back to a different model class.
Models
Section titled “Models”Use a request ID or alias in the JSON model field.
All listed models support the request formats above, including streaming.
| Request ID | Aliases |
|---|---|
claude-haiku-4-5 | anthropic/claude-haiku-4-5, claude-haiku-4-5-20251001, haiku |
claude-opus-4-7 | anthropic/claude-opus, anthropic/claude-opus-4-7, claude-opus, opus |
claude-opus-5-5 | anthropic/claude-opus-5-5 |
claude-sonnet | anthropic/claude-sonnet, claude-sonnet-4-6, sonnet-4.6-anthropic |
claude-sonnet-5 | anthropic/claude-sonnet-5, sonnet |
deepseek_4_1_flash | fireworks-serverless-deepseek-4-1-flash |
glm-priority | glm-5p3-fireworks-serverless-priority |
gpt-6-luna | gpt_6_luna, luna, openai-luna |
gpt-luna | gpt-5.6-luna |
m3 | fireworks-m3-serverless, minimax-m3, minimax/minimax-m3, minimaxai/minimax-m3 |
A lane selects the latency and capacity policy for your request.
Set x-sapiom-lane in any request format. The default is run_now.
| Available lane |
|---|
flex |
run_now |
standard |
run_now prioritizes latency for interactive work. When available, standard balances latency and serving cost, and flex accepts slower performance for delay-tolerant work. Lanes influence routing, capacity admission, and fallback budgets.
flex uses the same request and streaming APIs. It does not submit an asynchronous job. A request can return HTTP 429 if capacity admission fails; a rejected request is not queued for later execution.
Example requests
Section titled “Example requests”Anthropic Messages
Section titled “Anthropic Messages”curl -sS -X POST 'https://router.sapiom.ai/v1/messages' \ -H "Authorization: Bearer $SAPIOM_API_KEY" \ -H 'Content-Type: application/json' \ -H 'x-sapiom-lane: run_now' \ -H 'anthropic-version: 2023-06-01' \ -d '{ "model": "claude-haiku-4-5", "max_tokens": 256, "messages": [ { "role": "user", "content": "Say hello." } ]}'For streaming with this model and format, add "stream": true to the JSON body and -N to curl.
OpenAI Chat Completions
Section titled “OpenAI Chat Completions”curl -sS -X POST 'https://router.sapiom.ai/v1/chat/completions' \ -H "Authorization: Bearer $SAPIOM_API_KEY" \ -H 'Content-Type: application/json' \ -H 'x-sapiom-lane: run_now' \ -d '{ "model": "claude-haiku-4-5", "max_tokens": 256, "messages": [ { "role": "user", "content": "Say hello." } ]}'For streaming with this model and format, add "stream": true to the JSON body and -N to curl.
OpenAI Responses
Section titled “OpenAI Responses”curl -sS -X POST 'https://router.sapiom.ai/v1/responses' \ -H "Authorization: Bearer $SAPIOM_API_KEY" \ -H 'Content-Type: application/json' \ -H 'x-sapiom-lane: run_now' \ -d '{ "model": "claude-haiku-4-5", "max_output_tokens": 256, "input": "Say hello."}'For streaming with this model and format, add "stream": true to the JSON body and -N to curl.
© 2026 Sapiom, Inc.