Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.routing.run/llms.txt

Use this file to discover all available pages before exploring further.

Get your API key

1

Create an account

Sign in with GitHub at app.routing.run.
2

Create an API key

Open API KeysCreate Key, name it, then copy the value. It always starts with rk_ and is shown only once.
3

Put the key in your environment

export ROUTING_RUN_API_KEY='rk_…'
Use a secrets manager or your shell profile in real projects — never commit this value.

Sanity check

GET /v1/models returns a small public catalog and does not require authentication:
curl -sS https://api.routing.run/v1/models
Inference and most other routes require a key.
Use https://api.routing.run by default. If it is slow or returning errors, switch to https://ai.routing.sh. It is a secondary endpoint hosted by the routing.run team and uses the same /v1 paths and API keys.

First chat completion

Use /v1/chat/completions as your default integration path. It is the most reliable endpoint for apps, SDKs, and coding agents. Recommended starting models:
  • route/glm-5.1-precision for strongest reasoning-first workflows
  • route/qwen3.6-plus for the smoothest general coding-agent behavior
  • route/kimi-k2.5 for larger-context agent workflows
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ROUTING_RUN_API_KEY"],
    base_url="https://api.routing.run/v1",
)

response = client.chat.completions.create(
    model="route/deepseek-v3.2",
    messages=[
        {"role": "user", "content": "Refactor this to use early returns."},
    ],
)

print(response.choices[0].message.content)
/v1/messages accepts Anthropic-style request bodies, but the current response shape is not fully Anthropic SDK-compatible. Use direct HTTP for now if you need predictable parsing.
Live checks also showed that some reasoning-oriented models can return an empty content string on /v1/messages. For coding agents and editor integrations, prefer /v1/chat/completions unless you specifically need Anthropic-style requests.
See Authentication for headers, dashboard key management, and error shapes. If you are wiring up an editor or CLI agent, skip the Anthropic-style path and go straight to the OpenAI-compatible reference.

Next steps

https://mintcdn.com/routing/Bdepg-ZiTHSkFbP-/images/ai-tools/openai.svg?fit=max&auto=format&n=Bdepg-ZiTHSkFbP-&q=85&s=20abb0f26a0ce48b6bff9705347b8d49

OpenAI compatibility

Full reference for the recommended default endpoint.
https://mintcdn.com/routing/X1FNfaLkHxe6r1oe/images/ai-tools/claude-code.svg?fit=max&auto=format&n=X1FNfaLkHxe6r1oe&q=85&s=7b981276e38639a34ef8dee48c587259

Anthropic compatibility

Compatibility reference for Anthropic-style requests.

Available models

Browse all models, tiers, and pricing.

Coding agents

Configure your AI coding tool to use routing.run.