Skip to main content

Getting Started

ARouter is a unified API gateway that gives you access to the world’s leading AI models — from OpenAI, Anthropic, Google, DeepSeek, xAI, and more — through a single, OpenAI-compatible API.You manage one API key, one billing account, and one integration. ARouter handles routing, authentication, failover, and usage tracking transparently.
  1. Create an account at https://api.arouter.ai
  2. Generate an API key in the Dashboard
  3. Set your base URL to https://api.arouter.ai/v1 in any OpenAI-compatible client
  4. Send your first request
See the Quickstart for a step-by-step guide.
  • GitHub Issues: github.com/arouter-ai
  • Email: Check the Dashboard for contact information
  • Documentation: You’re here!

Billing

ARouter uses a credit-based system. You pre-purchase credits and they are consumed per request based on token usage.You can view your balance and transaction history in the Dashboard or via the API.
ARouter passes through the upstream provider’s published inference rates. A platform fee is charged when you purchase credits.Token counts are exactly as reported by the upstream provider and reflected in the usage field of every response.
Unused credits may expire one year after purchase in accordance with the billing terms.
Refunds for unused credits can be requested within 24 hours of purchase. After that window, unused credits become non-refundable.Platform fees are non-refundable, and crypto payments are not refundable.
Yes. There is a free monthly allowance first, and usage beyond that allowance incurs a small ARouter platform fee while inference is billed through your own provider key.
Via API:
curl https://api.arouter.ai/api/v1/balance \
  -H "Authorization: Bearer lr_live_xxxx"
Or in the Dashboard at https://arouter.ai/billing.
If you completed a purchase and the balance did not update immediately, allow some time for payment settlement.If the charge succeeded and the credits still do not appear, contact support through the Dashboard with the purchase details so the payment can be traced.
ARouter supports card-based credit purchases in the Dashboard and crypto-native top-ups for supported payment flows such as x402.
If your account includes free credits or promotional usage, those requests are best treated as testing capacity rather than production capacity. Account-level and plan-level limits still apply.

Models

ARouter supports models from OpenAI, Anthropic, Google, DeepSeek, xAI, Mistral, Meta, Qwen, MiniMax, Groq, Kimi, Cohere, NVIDIA, and Dashscope.Use GET /v1/models to see the full list available to your account:
curl https://api.arouter.ai/v1/models \
  -H "Authorization: Bearer lr_live_xxxx"
See Models and Providers for details.
Use the provider/model format in the model field:
  • openai/gpt-5.4
  • anthropic/claude-sonnet-4.6
  • google/gemini-2.5-flash
  • deepseek/deepseek-v3.2
See Model Routing for the full reference.
Yes. Set model to "auto" and ARouter’s routing service will pick the best available model for your request:
{
  "model": "auto",
  "messages": [{ "role": "user", "content": "Hello!" }]
}
The response always includes a model field showing which model was actually used. See Model Routing — Auto Routing for details.
Yes. Use the models array together with route:
{
  "models": ["anthropic/claude-opus-4.5", "openai/gpt-5.4"],
  "route": "fallback",
  "messages": [...]
}
ARouter evaluates the models in order and returns the first successful result. See Model Routing for details.

API Technical

ARouter supports three authentication methods:
  • Bearer token: Authorization: Bearer lr_live_xxxx (OpenAI SDK, fetch)
  • API Key header: X-Api-Key: lr_live_xxxx (Anthropic SDK)
  • Query parameter: ?key=lr_live_xxxx (Gemini SDK)
See the Authentication Guide for detailed setup with each SDK.
Rate limits are applied per API key and can be configured in the Dashboard. Default limits depend on your plan.Rate limit headers are included in every response:
  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset
See the API Reference for details.
ARouter exposes:
  • /v1/chat/completions — OpenAI-compatible chat
  • /v1/embeddings — OpenAI-compatible embeddings
  • /v1/models — List available models
  • /v1/messages — Anthropic native
  • /v1beta/models/{model}:generateContent — Gemini native
  • /api/v1/balance — Account balance
  • /api/v1/transactions — Transaction history
  • /api/v1/keys — API key management
  • /{provider}/{path} — Provider proxy
See the API Reference for the full list.
ARouter supports:
  • Text: All models
  • Images: Vision-capable models (URL or base64)
  • PDFs: Anthropic Claude and Google Gemini
See Multimodal for details.
Yes. Set stream: true in your request. ARouter supports Server-Sent Events (SSE) streaming for all providers.See Streaming for the full guide including SSE format, error handling, and cancellation.
ARouter is compatible with:
  • Python: OpenAI SDK (pip install openai)
  • Node.js / TypeScript: OpenAI SDK (npm install openai)
  • Go: ARouter Go SDK (go get github.com/arouter-ai/arouter-go)
  • Anthropic SDK: Python and Node.js
  • Google Gemini SDK: Python
  • Any HTTP client: via cURL, fetch, etc.
See the SDKs section for setup guides.

Privacy & Data

ARouter does not store prompt content by default. Request bodies are forwarded to the upstream provider and not retained by ARouter.Usage metadata (token counts, model, timestamp, cost) is stored for billing and analytics purposes.See Data Collection for the full policy.
Only the upstream provider handling your specific request sees your prompt content. The provider you select via the model field processes your request. ARouter acts as a transparent proxy.See Provider Logging for details on upstream provider data policies.
Use provider.data_collection: "deny" to restrict routing to providers that do not use request data for model training:
{
  "model": "anthropic/claude-sonnet-4.6",
  "provider": {"data_collection": "deny"}
}
Or use provider.zdr: true for Zero Data Retention enforcement. See Provider Routing — Data Collection Policy.
Yes. Set provider.zdr: true in your request to restrict routing to providers with Zero Data Retention agreements. See Provider Routing.

Models & Providers

You can append suffixes to any model ID to change routing behavior:
  • :nitro — route to the highest-throughput instance
  • :floor — route to the lowest-cost instance
  • :free — use the free-tier instance (rate limits apply)
  • :thinking — enable extended chain-of-thought reasoning
  • :extended — use the version with a larger context window
{"model": "openai/gpt-5.4:nitro"}
See Model Variants for the full reference.
Yes. Pass image URLs or base64-encoded images in the content array alongside text. PDFs are supported by Anthropic Claude and Google Gemini.
{
  "model": "openai/gpt-5.4",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "What's in this image?"},
      {"type": "image_url", "image_url": {"url": "https://..."}}
    ]
  }]
}
See Multimodal for examples.
Yes. ARouter supports tool/function calling for all major providers using the OpenAI tool calling standard. Pass tools and tool_choice in your request.See Tool Calling for the full guide.
Yes. Use response_format: {"type": "json_object"} for valid JSON output, or response_format: {"type": "json_schema", "json_schema": {...}} for schema-enforced output.See Structured Outputs for details.
Yes. Prompt caching is supported automatically for OpenAI, DeepSeek, xAI, and Groq models. For Anthropic, use cache_control blocks for explicit caching. Google Gemini supports both automatic and explicit caching.See Prompt Caching for the full guide.

Account Management

Yes. When creating or updating an API key, set a spending_limit to cap how much that key can spend:
curl -X POST https://api.arouter.ai/v1/keys \
  -H "Authorization: Bearer lr_live_xxxx" \
  -d '{"name": "production", "spending_limit": 100.00}'
See Key Management for details.
Set allowed_providers when creating a key:
{
  "name": "openai-only-key",
  "allowed_providers": ["openai", "anthropic"]
}
See Key Management for details.
Yes. You can create multiple API keys for different environments, services, or use cases. Each key has independent spending limits, provider restrictions, and usage tracking.Manage keys in the Dashboard or via the Key Management API.
Yes. Pass a user field in each request with an opaque identifier for your end user. Usage is then available per user in the Activity Export.
{"model": "openai/gpt-5.4", "user": "user_12345", "messages": [...]}
See User Tracking for details.
Yes. Use Organization Management to create a shared organization, invite team members, manage shared credits, and control permissions.