Quickstart
From zero to first token in under five minutes.
1. Get a key
- Sign up with an email address.
- In the console, open API Keys → create a key.
- Add credits in Wallet (prepaid, pay-as-you-go; standard international cards).
2. Make your first call
curl
curl https://routerra.ai/v1/chat/completions \
-H "Authorization: Bearer $ROUTERRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role": "user", "content": "Say hello"}]
}' Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="YOUR_ROUTERRA_KEY",
base_url="https://routerra.ai/v1",
)
resp = client.chat.completions.create(
model="deepseek-chat",
messages=[{"role": "user", "content": "Say hello"}],
)
print(resp.choices[0].message.content) Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ROUTERRA_API_KEY,
baseURL: "https://routerra.ai/v1",
});
const resp = await client.chat.completions.create({
model: "deepseek-chat",
messages: [{ role: "user", content: "Say hello" }],
});
console.log(resp.choices[0].message.content); 3. Know it worked
A successful call returns a JSON body with choices[0].message.content. If you see it, you're live — usage appears in the console dashboard within a minute.
Using a client app instead of code?
Anything with an "OpenAI-compatible" or "custom endpoint" option works. Set:
| Field | Value |
|---|---|
| Base URL / API host | https://routerra.ai/v1 |
| API key | your Routerra key |
| Model | deepseek-chat |
Tested with Cline, Continue, Aider, Cherry Studio, DeepChat, LangChain and LlamaIndex.
Troubleshooting
- 401 — key missing or wrong; check the
Authorization: Bearer header. - Insufficient balance — add credits in the console Wallet.
- Timeouts under load — keep retries with exponential backoff; our full guide has copy-paste retry code.