API compatibility and selection
Connect through OpenAI-compatible endpoints and native client APIs
XiuRouter supports Responses, Chat Completions, Anthropic Messages, and Gemini GenerateContent. Choose the API format your client uses, then follow the matching setup guide.
When to use an OpenAI-compatible endpoint
Use it when your application lets you set the Base URL and API key.
- Your OpenAI SDK or compatible client lets you set its Base URL and API key.
- You want to choose models and service tiers from the current XiuRouter catalog.
- You can test one request and check it in Usage before production use.
Choose the API format your client uses
XiuRouter supports several request formats. The Base URL and path must match the client or SDK.
responses
OpenAI Responses
- Base URL
- https://router-api.xiu.ai/v1
- Request path
- /responses
Use with Codex, agents that send OpenAI Responses requests, and new applications built on Responses.
Use it for stateless model requests. Stored conversations, background mode, web search, and file search still require a service that provides those features.
messages
Anthropic Messages
- Base URL
- https://router-api.xiu.ai
- Request path
- /v1/messages
Use with Claude Code, Anthropic SDKs, and Claude-native clients that send Messages requests.
Use it for Messages model requests. Hosted server tools, Message Batches, and Files remain Anthropic platform features.
chat
OpenAI Chat Completions
- Base URL
- https://router-api.xiu.ai/v1
- Request path
- /chat/completions
Use with clients limited to Chat Completions, existing OpenAI-compatible tools, and supported custom-model integrations.
Tool calling, streaming, and client-specific agent behavior depend on the client and selected model. Confirm them with the target task.
gemini
Gemini GenerateContent
- Base URL
- https://router-api.xiu.ai
- Request path
- /v1beta/models/YOUR_MODEL_ID:generateContent
Use with Gemini SDKs and clients that require the native Gemini GenerateContent request format.
The model ID is part of the request path, and the Base URL differs from OpenAI SDKs. Do not add /v1 unless the matching guide shows it.
Choose in three steps
Start with the API format used by the client, then confirm the model and test one request.
- 1
Identify the client protocol
Check whether the client sends Responses, Chat Completions, Anthropic Messages, or Gemini GenerateContent.
- 2
Confirm the model and service tier
Use the current Models and pricing page for the exact model ID, declared endpoint types, tier, and unit rates.
- 3
Verify one real request
Create a scoped key, send a small request, and confirm the model, tier, tokens, status, and recorded cost in Usage.