Overview
One gateway, multiple providers
LLM Router exposes OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages endpoints. Each request resolves a virtual model alias, filters active provider models by capability and health, and tries eligible providers according to your routing policy.
https://your-router-domain.com/v1Step 1
Create a router and add providers
- 1
Open the dashboard and sign in with Clerk.
- 2
Create a private router key and store the complete key immediately.
- 3
Add one or more provider API keys.
- 4
Open each provider’s model catalog, save the exact model slug, test it, and activate one model.
- 5
Choose a router-wide policy or configure a model alias with its own provider order.
openrouter, while qwen/qwen3-coder:free belongs to its model catalog.Step 2
Send the first request
curl https://llmrouter.dpdns.org/v1/chat/completions \
-H "Authorization: Bearer YOUR_ROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "free-router",
"messages": [
{ "role": "user", "content": "Explain provider failover." }
]
}'
Successful responses include routing headers such as the request ID, selected provider, attempt count, and timing breakdown.
API surface
OpenAI Chat Completions
Use the standard OpenAI SDK and replace only the base URL and API key.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://llmrouter.dpdns.org/v1",
apiKey: "flm_YOUR_KEY_HERE",
});
const result = await client.chat.completions.create({
model: "free-router", // Your Model alias
messages: [{ role: "user", content: "Hello" }],
stream: true,
});
API surface
OpenAI Responses and Codex
The router translates Responses API requests into compatible upstream chat requests, then converts the result back into the expected Responses format.
POST /v1/responsesexport OPENAI_BASE_URL="https://llmrouter.dpdns.org/v1"
export OPENAI_API_KEY="flm_YOUR_KEY_HERE"
codex
API surface
Anthropic Messages and Claude Code
Claude Code can call the router’s /v1/messages endpoint while the router selects an eligible
active provider model.
POST /v1/messagesexport ANTHROPIC_BASE_URL="https://llmrouter.dpdns.org/v1"
export ANTHROPIC_AUTH_TOKEN="flm_YOUR_KEY_HERE"
claude
Routing
Model aliases
A model alias is the stable model name your applications use. It can define its own routing strategy, provider allowlist, capability requirements, and reliability overrides.
| Alias | Purpose | Typical requirement |
|---|---|---|
free-router |
General chat and coding | Streaming |
vision-router |
Image-aware requests | Vision |
tool-router |
Agent and function calls | Tools |
Routing
Reliability controls
The gateway combines retries, total request deadlines, provider-specific timeouts, persistent rate-limit cooldowns, circuit breakers, quotas, and request deduplication.
- Retries: transient status codes and network failures can move to another provider.
- Cooldowns: provider rate-limit windows persist across requests and instances.
- Circuits: repeated failures temporarily remove unhealthy providers from routing.
- Quotas: daily and monthly request or token limits protect free tiers.
- Capabilities: incompatible active models are skipped before an upstream call.
Security
Keep secrets on your deployment
Clerk protects dashboard access. Router keys authenticate API traffic, and provider keys are stored against the router account and never returned in dashboard responses after saving.
Detailed Docs are available inside the dashboard
for micro adjustment with examples.
Ready to route?