Quick Start

Get your API key and start routing AI model requests in under 5 minutes.

Create an API key

Sign in to Yolo Router, go to API Keys, and click Create API Key. Copy the key — it's shown only once.

export YOLO_ROUTER_API_KEY="sk-..."

Point your SDK to Yolo Router

Replace the OpenAI base URL with Yolo Router's endpoint. Your existing API key and code stay the same — only the base URL and the auth key change.

from openai import OpenAI

client = OpenAI(
    api_key="sk-...",        # your Yolo Router key
    base_url="https://api.yolorouter.com/v1",
)
import OpenAI from 'openai'

const client = new OpenAI({
  apiKey: 'sk-...',          // your Yolo Router key
  baseURL: 'https://api.yolorouter.com/v1',
})
export YOLO_ROUTER_API_KEY="sk-..."

Make your first request

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello!' }],
})
console.log(response.choices[0].message.content)
curl https://api.yolorouter.com/v1/chat/completions \
  -H "Authorization: Bearer $YOLO_ROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

List available models

curl https://api.yolorouter.com/v1/models \
  -H "Authorization: Bearer $YOLO_ROUTER_API_KEY"

On this page