API Formats
The router accepts three entry points for chat/completion model invocation. All three are routed through the same pipeline — backend selection, failover, and model fallback apply equally to each.
| Format | Endpoint | Use it when… |
|---|---|---|
| OpenAI Chat Completions | POST /v1/chat/completions |
You use the OpenAI SDK, LangChain, LiteLLM, or any OpenAI-compatible tool. |
| OpenAI Responses | POST /v1/responses |
You target the OpenAI Responses API. |
| Anthropic Messages | POST /v1/messages |
You use the Anthropic SDK (@anthropic-ai/sdk / anthropic) or Claude-native tooling. |
You can call any model through any of these formats — the choice is about which
request/response shape your code already speaks, not which model you can reach. The router
translates between formats and the model's native interface, preserving format-specific
semantics (for example, Anthropic content blocks, thinking, and tool_use).
Non-chat endpoints use the OpenAI format
All other endpoints — embeddings, images, audio, video, and rerank — follow the OpenAI API format exclusively.
Which format should I choose?
- Already using the OpenAI SDK? Use Chat Completions — point the base URL at
https://llm.siraya.ai/v1and keep your code. - Already using the Anthropic SDK or Claude Code? Use Messages — same idea, no rewrite.
- No existing code? Chat Completions is the most broadly supported starting point.
See the API Reference for the full request and response shape of each endpoint, and Parameter Support by Model for which parameters take effect on which model families.