←Back to Blog
Getting StartedTutorial

Getting Started with routing.run

•4 min read•routing.run Team

Getting started with routing.run takes just a few minutes. This guide will walk you through creating your account, getting your API key, and making your first request.

Step 1: Get Your API Key

Create your account, then open API keys in the dashboard and generate a key. Treat it like a password: keep it on your server and never expose it in browser code or a public repository.

Step 2: Add Routing Credit

New accounts do not include guaranteed usage credit. Before sending a paid model request, open Billing to activate Basic — $10 per month with $10 in monthly Routing credit — or add prepaid balance. Your balance is charged at the current per-token price shown in the catalog.

Step 3: Make Your First Request

routing.run uses an OpenAI-compatible API, so if you're already using OpenAI, switching is as simple as changing the base URL and API key.

curl https://api.routing.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "deepseek-v4-pro",
"messages": [{
"role": "user",
"content": "Hello, world!"
}]
}'

Step 4: Use with Your Existing Code

If you're using the OpenAI SDK, just update the base URL:

Python

from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.routing.run/v1"
)
response = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello!"}]
)

JavaScript/TypeScript

import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'YOUR_API_KEY',
baseURL: 'https://api.routing.run/v1'
});
const response = await client.chat.completions.create({
model: 'deepseek-v4-pro',
messages: [{ role: 'user', content: 'Hello!' }]
});

Available Models

Pass a model ID from the live catalog exactly as shown—there is no route/ prefix:

  • •deepseek-v4-pro — DeepSeek V4 Pro
  • •gpt-5.6-luna — OpenAI GPT-5.6 Luna
  • •kimi-k2.7-code — Kimi K2.7 Code
  • •qwen3.5-9b — Qwen3.5 9B

Check the models page for the complete catalog and current pricing.

How Provider Failover Works

You choose the model ID. routing.run maintains ordered upstream provider chains and circuit breakers behind that route. If an eligible upstream fails before a safe response is exposed, the router can retry against another healthy provider automatically.

Keep normal application-level timeout and retry handling too. For streaming requests, routing.run only switches providers before any response content has been sent to your client; it never splices two model responses together.

1.Your request selects a model ID
2.The router picks a healthy configured upstream
3.Safe pre-response failures can move to the next upstream

Monitor Your Usage

The dashboard shows request, token, and cost usage so you can understand your balance and model mix. The live model catalog remains the source of truth for current token prices.

Next Steps

Ready when you are

One endpoint. Your next model.

Keep your OpenAI-compatible client. Swap the base URL, choose a model, and route your first request in minutes.