Quick-start documentation

From deployment to first routed request.

Connect provider keys, create a private router, and point an existing OpenAI or Anthropic-compatible client at one stable endpoint. Detailed documentation available withing the app.

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.

Base URLhttps://your-router-domain.com/v1

Create a router and add providers

  1. 1

    Open the dashboard and sign in with Clerk.

  2. 2

    Create a private router key and store the complete key immediately.

  3. 3

    Add one or more provider API keys.

  4. 4

    Open each provider’s model catalog, save the exact model slug, test it, and activate one model.

  5. 5

    Choose a router-wide policy or configure a model alias with its own provider order.

Provider identity and model are separate. For example, the provider ID is openrouter, while qwen/qwen3-coder:free belongs to its model catalog.

Send the first request

curl
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.

OpenAI Chat Completions

Use the standard OpenAI SDK and replace only the base URL and API key.

JavaScript
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,
});

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.

EndpointPOST /v1/responses
Terminal
export OPENAI_BASE_URL="https://llmrouter.dpdns.org/v1"
export OPENAI_API_KEY="flm_YOUR_KEY_HERE"

codex

Anthropic Messages and Claude Code

Claude Code can call the router’s /v1/messages endpoint while the router selects an eligible active provider model.

EndpointPOST /v1/messages
Terminal
export ANTHROPIC_BASE_URL="https://llmrouter.dpdns.org/v1"
export ANTHROPIC_AUTH_TOKEN="flm_YOUR_KEY_HERE"

claude

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

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.

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.

NOTE: Detailed Docs are available inside the dashboard for micro adjustment with examples.

Configure your first provider.

Open dashboard →