Use cases

Use Claude, GPT and more through one API

Use Responses, Chat Completions, Anthropic Messages, or Gemini GenerateContent for agents, existing applications, and multi-model workloads. Pay for actual usage.

What XiuRouter gives you

Use one account and API key system for major model families, choose the client-native API format, and pay for recorded usage.

Models
Currently available model IDs listed on the Models and pricing page.
API formats
Responses, Chat Completions, Anthropic Messages, and Gemini GenerateContent.
Base URL
OpenAI-style clients use https://router-api.xiu.ai/v1; Messages and Gemini clients use https://router-api.xiu.ai.
Billing
Requests are billed by model, service tier, and actual input, output, and cache usage. Per-request models are marked separately.

What do you need to do

Use the protocol, Base URL, and checks in the matching card. Open the linked guide only when you need the full setup.

01

Use models in Codex, Claude Code, or Cursor

Codex uses Responses, Claude Code uses Anthropic Messages, and Cursor custom models typically use Chat Completions. OpenAI-style clients use https://router-api.xiu.ai/v1; Claude Code uses https://router-api.xiu.ai.

  • Create an API key that allows the target model and service tier
  • Set the Base URL, API key, and model ID, then complete one real task
View client setup
02

Migrate an existing OpenAI application

Set the Base URL to https://router-api.xiu.ai/v1, replace the credential with a XiuRouter API key, and use a model ID from the current catalog. Existing OpenAI SDK and Chat Completions flows usually need no business-logic rewrite.

  • Send one short request to confirm authentication, model selection, and response shape
  • Test tool calling, streaming, and structured output separately when your app depends on them
View protocols and request paths
03

Choose models by task and control cost

One key can call multiple authorized models. Each request is billed by the model, service tier, and actual input, output, and cache usage; per-request models are marked separately.

  • Set separate model, credit, and expiry limits for each application
  • Inspect tokens, tier, and cost for every request in Usage
Compare current models and rates
04

Investigate failed requests or unexpected cost

For 401 or 403, check the authentication header, key scope, balance, and service tier. For 404, check whether /v1 was added twice. After a timeout or interrupted stream, inspect Usage before retrying.

  • Keep the time, request ID, model ID, service tier, and redacted error details
  • Do not retry repeatedly or rotate keys before confirming the previous result
Troubleshoot by error type

Make the first request in four steps

Add funds, create a scoped key, send a small request, and inspect the recorded result.

1. Add funds
Add USD balance using an available payment method.
2. Create a key
Choose a service tier, model scope, credit limit, and expiry.
3. Send a request
Use the matching Base URL, API key, and exact model ID.
4. Check Usage
Confirm the model, tier, tokens, status, latency, and recorded cost.