Docs

Overview and quickstart

RouterLane is an LLM API where you pick a tier instead of a model. Send fast, normal, smart or smart-plus as the model name, and the router picks the model and reasoning effort for each task.

It speaks three API formats, so the SDK or agent you already use works by changing its base URL and key.

FormatEndpointBase URL for SDKs
Anthropic MessagesPOST /v1/messageshttps://api.routerlane.com
OpenAI Chat CompletionsPOST /v1/chat/completionshttps://api.routerlane.com/v1
OpenAI ResponsesPOST /v1/responseshttps://api.routerlane.com/v1

1. Store your key

Keys are issued on request: request access and the key arrives by email. It starts with rl_. Put it in an environment variable named ROUTERLANE_API_KEY; every example in these docs reads it from there.

2. Call it in the OpenAI format

shell
curl https://api.routerlane.com/v1/chat/completions \
  -H "Authorization: Bearer $ROUTERLANE_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "normal",
    "messages": [{"role": "user", "content": "Write a regex that matches dates like 2026-10-06."}]
  }'

3. Or in the Anthropic format

shell
curl https://api.routerlane.com/v1/messages \
  -H "x-api-key: $ROUTERLANE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "smart",
    "max_tokens": 4096,
    "messages": [{"role": "user", "content": "Review this function for race conditions."}]
  }'

4. Read the decision

Every response says what the router did. The model field in the body holds the tier you called; the headers name the model and effort behind it.

response headers
HTTP/2 200
content-type: application/json
x-router-tier: smart
x-router-model: glm-5.3
x-router-effort: high
x-router-source: rule
x-router-request-id: 4f1c9a07d2e86b13

x-router-source tells you how the decision was made: rule or default for a new task, continuation for a tool result inside a running task, sticky when the conversation kept its model, and smartplus for a Smart+ job turn. See response headers.

Next