Skip to main content
ARouter routes each request to the optimal upstream provider based on model availability, provider health, and cost efficiency. This happens automatically on the server side. For most applications, you control routing with the model field, optional models candidate lists, route, and model suffixes such as :nitro or :floor. You do not need a separate provider configuration block in the request body for standard ARouter routing.

How Provider Selection Works

When you send a request with a model like openai/gpt-5.4, ARouter:
  1. Identifies the target provider from the model prefix
  2. Checks API key health and availability (circuit-breaker)
  3. Selects the best available key from the provider’s key pool
  4. Forwards the request, injecting the provider key transparently
If no healthy keys are available for the specified provider, ARouter returns an error with status 503 Service Unavailable.

Default Strategy: Cost-Based Load Balancing

By default, ARouter balances load across healthy provider keys using a cost-aware strategy. Providers with better cost-per-token ratios are preferred. This runs entirely server-side — no configuration required.

Specifying a Provider via Model Prefix

The primary way to control which provider handles your request is via the provider/model format in the model field:
{
  "model": "openai/gpt-5.4",
  "messages": [{ "role": "user", "content": "Hello!" }]
}
See Model Routing for the full list of supported formats.

Ordered Model Lists

When you want ARouter to try multiple candidate models in a specific order, send an ordered models array together with a route mode:
{
  "models": [
    "anthropic/claude-opus-4.5",
    "openai/gpt-5.4",
    "google/gemini-2.5-flash"
  ],
  "route": "fallback",
  "messages": [{ "role": "user", "content": "Hello!" }]
}
ARouter evaluates the candidates in order and returns the first successful result. See Model Routing for the full request shape.

Provider Variants via :nitro and :floor

Some models are offered in multiple variants. Use model suffixes to select performance tiers:

:nitro — Maximum Throughput

Append :nitro to route to the fastest available instance of a model, optimized for throughput over cost:
{
  "model": "openai/gpt-5.4:nitro",
  "messages": [{ "role": "user", "content": "Hello!" }]
}
:nitro variants are suitable for real-time applications where latency matters most.

:floor — Minimum Cost

Append :floor to route to the lowest-cost available instance:
{
  "model": "openai/gpt-5.4:floor",
  "messages": [{ "role": "user", "content": "Hello!" }]
}
:floor variants are ideal for batch processing and offline workloads.

Provider Health and Availability

ARouter continuously tracks the health of each provider’s API keys using a circuit-breaker mechanism:
  • Healthy: The provider is accepting requests normally
  • Degraded: The provider has recent failures; requests may be retried with a different key
  • Unavailable: All keys for this provider are circuit-broken; ARouter returns an error
This health tracking is transparent — your application does not need to implement retry logic for provider-level failures.

Using the Native Provider Proxy

For complete control, use the provider proxy endpoint /{provider}/{path} to send requests directly to a specific provider, bypassing ARouter’s model-routing layer:
# Direct to OpenAI
curl https://api.arouter.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -d '{"model": "gpt-5.4", "messages": [...]}'

# Direct to Anthropic
curl https://api.arouter.ai/anthropic/v1/messages \
  -H "Authorization: Bearer lr_live_xxxx" \
  -d '{"model": "claude-sonnet-4.6", "messages": [...]}'
See Provider Proxy for the full reference.

Supported Providers

ProviderPrefixExample Model
OpenAIopenaiopenai/gpt-5.4
Anthropicanthropicanthropic/claude-sonnet-4.6
Googlegooglegoogle/gemini-2.5-flash
DeepSeekdeepseekdeepseek/deepseek-v3.2
xAIx-aix-ai/grok-4.20
Mistralmistralaimistralai/mistral-large-2512
Metameta-llamameta-llama/llama-4-maverick
Qwenqwenqwen/qwen3-235b
MiniMaxminimaxminimax/minimax-m2.7
Groqgroqgroq/llama-3.3-70b-versatile
Kimikimikimi/moonshot-v2
Dashscopedashscopedashscope/qwen-max
See Providers for the full list with capabilities.