Migrate from OpenRouter to TeamoRouter

Moving from OpenRouter takes three changes: the base URL, the API key, and the model ID (drop the vendor/ prefix). The rest of your OpenAI SDK setup stays the same.

New accounts start with a $0 balance — top up before your first request. Top up from $5. If a request returns 402 (400 on the OpenAI format) with "wallet balance is insufficient", your balance is empty — your base URL and key are fine. Top up and retry.

1. What to change

OpenRouter TeamoRouter
Base URL (OpenAI format) https://openrouter.ai/api/v1 https://api.teamorouter.cn/v1
API key sk-or-v1-... sk-teamo-..., created in the dashboard
Auth header Authorization: Bearer <key> OpenAI format: Authorization: Bearer <key>
Model ID vendor/model, e.g. deepseek/deepseek-v4-pro No vendor prefix, e.g. deepseek-v4-pro

2. Model ID mapping

Drop the vendor/ prefix. A vendor-prefixed ID returns 400 model_not_available.

OpenRouter model ID TeamoRouter model ID
deepseek/deepseek-v4.1-flash-1017 deepseek-flash-1017
deepseek/deepseek-v4.1-flash deepseek-flash
deepseek/deepseek-v4-flash-vision-exp deepseek-v4-flash-vision-exp
deepseek/deepseek-v4-pro deepseek-v4-pro
deepseek/deepseek-v4-flash deepseek-v4-flash
moonshotai/kimi-k3.1-pro kimi-k3.1-pro
moonshotai/kimi-k3 kimi-k3
qwen/qwen3.8-flash qwen3.8-flash
qwen/qwen3.7-max qwen3.7-max
qwen/qwen3.7-flash qwen3.7-flash
z-ai/glm-5.3-flash glm-5.3-flash
z-ai/glm-5.3 glm-5.3
z-ai/glm-5.2 glm-5.2

The table lists the main models both services offer, generated from both public model lists on 2026-11-04. For everything else and for live prices, see the model directory or GET /v1/models.

  • openrouter/auto and ~vendor/...-latest aliases have no equivalent. Pick a model ID from the table.
  • Variant suffixes such as :nitro, :floor, :online and :batch aren't supported. Remove the suffix. Free models are separate IDs ending in -free; they're marked in the model directory.

3. Headers you can delete

OpenRouter reads HTTP-Referer, X-OpenRouter-Title (formerly X-Title), X-OpenRouter-Categories and X-OpenRouter-App-Visibility only to list your app in its public rankings. TeamoRouter doesn't use them. Delete them when you switch.

4. Code changes

Python (OpenAI SDK)

Before:

python
from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="sk-or-v1-xxxxxx",
)

resp = client.chat.completions.create(
    model="deepseek/deepseek-v4-pro",
    messages=[{"role": "user", "content": "Hello"}],
    extra_headers={"HTTP-Referer": "https://example.com", "X-OpenRouter-Title": "My App"},
    extra_body={"provider": {"order": ["deepseek"]}},
)
print(resp.choices[0].message.content)

After:

python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.teamorouter.cn/v1",
    api_key="sk-teamo-xxxxxx",
)

resp = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

JavaScript / TypeScript (OpenAI SDK)

Before:

javascript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
  defaultHeaders: { "HTTP-Referer": "https://example.com", "X-OpenRouter-Title": "My App" },
});

const resp = await client.chat.completions.create({
  model: "deepseek/deepseek-v4-pro",
  messages: [{ role: "user", content: "Hello" }],
});

After:

javascript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.teamorouter.cn/v1",
  apiKey: process.env.TEAMOROUTER_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "deepseek-v4-pro",
  messages: [{ role: "user", content: "Hello" }],
});

5. What TeamoRouter doesn't have

OpenRouter feature On TeamoRouter
Auto Router (openrouter/auto) and ~...-latest aliases Not available. Set a specific model ID.
models fallback list Not available. Catch the error in your code and retry with another model. For a given model, TeamoRouter switches between its upstream lines on its own; you can't pick one.
provider preferences (order, only, ignore, sort, allow_fallbacks, data_collection, zdr, max_price, quantizations) Not available. Delete the provider field.
Variant suffixes (:nitro, :floor, :online, :batch) Not available. Remove the suffix.
plugins (web search, file parsing) and transforms Not available. Delete these fields.
Cost in the response (usage.cost) Responses carry token counts in usage. Per-request charges are in the dashboard.
/api/v1/credits, /api/v1/key, /api/v1/generation No public equivalent. Check balance and usage in the dashboard.
Bring your own provider key (BYOK) Not available.

6. Check the switch

bash
curl https://api.teamorouter.cn/v1/chat/completions \
  -H "Authorization: Bearer sk-teamo-xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello"}]}'
  • 401: the key is wrong. It should start with sk-teamo-, not sk-or-.
  • 402 (400 on the OpenAI format) with "wallet balance is insufficient": the balance is $0. Top up and retry.
  • 400 model_not_available: the model ID still has a vendor/ prefix or isn't in our catalog. Check the table above.

More error codes and limits: API integration guide and Rate limits.

Ready? Three steps to startLog in to the console · top up · create an API key
DiscordDapatkan bantuan komunitas secara instan