Docs / Quickstart
RedRouter speaks the OpenAI chat-completions protocol. Create a key, point your existing client at our base URL, and choose an open model.
Sign in and open your dashboard. Create a key, copy it immediately — it is shown once and only its hash is stored.
Base URL: https://redrouter.ai/api/public/v1
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." }]
}'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)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);Pass "stream": true and the response arrives as server-sent events, exactly like the OpenAI streaming format.