Docs / Quickstart

First call in one minute.

RedRouter speaks the OpenAI chat-completions protocol. Create a key, point your existing client at our base URL, and choose an open model.

1. Create an API key

Sign in and open your dashboard. Create a key, copy it immediately — it is shown once and only its hash is stored.

2. Call the API

Base URL: https://redrouter.ai/api/public/v1

cURL
curl https://redrouter.ai/api/public/v1/chat/completions \
  -H "Authorization: Bearer $REDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama-3.3-70b",
    "messages": [{ "role": "user", "content": "Hello, RedRouter." }]
  }'
Python (openai SDK)
from openai import OpenAI

client = OpenAI(
    api_key="rr_live_...",
    base_url="https://redrouter.ai/api/public/v1",
)

resp = client.chat.completions.create(
    model="llama-3.3-70b",
    messages=[{"role": "user", "content": "Hello, RedRouter."}],
)
print(resp.choices[0].message.content)
JavaScript (openai SDK)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "rr_live_...",
  baseURL: "https://redrouter.ai/api/public/v1",
});

const resp = await client.chat.completions.create({
  model: "llama-3.3-70b",
  messages: [{ role: "user", content: "Hello, RedRouter." }],
});
console.log(resp.choices[0].message.content);

3. Stream responses

Pass "stream": true and the response arrives as server-sent events, exactly like the OpenAI streaming format.