Overview
One API key for many model providers.
RouterPlus is an LLM gateway. One API key and one prepaid balance give you models from many providers, over an OpenAI-compatible API and an Anthropic-compatible API.
Every chat model works on both APIs. RouterPlus translates requests, streams and errors between them. You pay the listed per-token prices, and each billed response states its cost in usage.cost.
Get a key
- 01Open Sign up. Complete Clerk authentication and email verification.
- 02Save the first API key shown after sign-in.
- 03Buy credits in Billing. Signup does not add free credit.
If you have an account, sign in and create another key at API keys.
We match your first $100 in credit purchases, dollar for dollar. Maximum $100 in matching credit per account. The offer applies to eligible accounts; Billing shows your remaining match.
Make a call
export TM_API_KEY=tm_vk_...
curl -N https://api.routerplus.com/v1/chat/completions \
-H "Authorization: Bearer $TM_API_KEY" \
-H "content-type: application/json" \
-d '{"model":"claude-haiku-4-5","stream":true,"max_tokens":60,"messages":[{"role":"user","content":"hello"}]}'The last usage chunk of the stream has the token counts and cost: the USD amount this request debited.
With an SDK, change only the base URL and the key:
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.routerplus.com/v1", api_key=os.environ["TM_API_KEY"])
r = client.chat.completions.create(
model="claude-haiku-4-5", # a Claude model over the OpenAI format
max_tokens=60,
messages=[{"role": "user", "content": "hello"}],
)
print(r.model_dump()["usage"]["cost"]) # USD debit for this requestimport os
import anthropic
client = anthropic.Anthropic(base_url="https://api.routerplus.com", api_key=os.environ["TM_API_KEY"])
msg = client.messages.create(
model="gpt-4o-mini", # a GPT model over the Anthropic format
max_tokens=60,
messages=[{"role": "user", "content": "hello"}],
)Two APIs, one key
| API | Base URL | Endpoint | Works with |
|---|---|---|---|
| OpenAI-compatible | https://api.routerplus.com/v1 | POST /v1/chat/completions, and POST /v1/responses for OpenAI's models | OpenAI SDKs, Codex, Cursor, Cline, Kilo Code, OpenCode, any OpenAI-format client |
| Anthropic-compatible | https://api.routerplus.com | POST /v1/messages | Anthropic SDKs, Claude Code |
The key works on both APIs, as Authorization: Bearer or x-api-key. The API you use does not limit the model: OpenAI-format code can call Claude models, and Anthropic-format code can call GPT models. See Authentication.
How requests behave
- Cost. Every billed response has
usage.costin USD. It covers the full debit, including attempts that failed over before your answer started. Money math rounds in your favor: holds round up, settlement rounds down. See Pricing. - Failover. Before any output reaches you, RouterPlus fails over to another provider. The
x-tm-attemptsheader counts the attempts. After output starts, the request stays with that provider. A failure then ends the stream with one error event. A content-policy refusal is never sent to another provider. See Failover. - Keep-alives. During a silence, the stream sends a keep-alive every 15 seconds. See Streaming.
- No substitution. An unknown model id returns a 404 that names the id you sent. RouterPlus does not pick another model. When every provider of a model is cooling down, you get a 503 with
retry-after, not a 404. - Strict requests.
n>1returns a 400. Content or a parameter that cannot be translated returns a typed 400 that names the field. RouterPlus drops unknown top-level parameters and names each one in thex-tm-dropped-paramsheader. See Wire compatibility. - Server tools. Add
tako:searchor aparallel:*tool totools, and RouterPlus runs the searches for the model and returns one finished answer. They work for any chat model on all three chat endpoints. Coding agents turn them on with thex-tm-toolsheader. See Server tools. - What is stored. Metering, usage and telemetry record metadata only: token counts, timings, outcomes and cost. The request log keeps the content of requests to non-dedicated endpoints for up to 30 days, for debugging. See Data policy.
- Honest uptime. A model's page shows a provider's uptime over the last 24 hours only after 100 counted requests. Before that it shows a dash. Your own 400s and cancelled streams never count against a provider. See Models.
Gateway endpoints
All gateway endpoints at https://api.routerplus.com take your API key.
| Endpoint | What it does |
|---|---|
POST /v1/chat/completions | OpenAI-compatible completions, streamed or not |
POST /v1/messages | Anthropic-compatible messages, streamed or not |
POST /v1/messages/count_tokens | Anthropic token counting, not billed. Only models with an Anthropic-format deployment |
POST /v1/responses | OpenAI Responses API. See Responses |
POST /v1/images/generations | OpenAI Images API, base64 in the body. See Images |
POST /v1/videos, GET /v1/videos/<id>, GET /v1/videos/<id>/content | Video from a text prompt: a job, then the file. See Videos |
POST /v1/decisions | Typed answers from a decision model. See Decisions |
POST /v1/parallel/tasks/runs | A Parallel Task run: deep research as a job. See Parallel Task runs |
POST /v1/parallel/findall/runs, POST /v1/parallel/findall/entity-search | Parallel FindAll: a verified list of the companies or people that match your conditions; Entity Search, a quick ranked list. See Parallel FindAll |
/v1/parallel/monitors | Parallel Monitors: a query watched on a schedule, with events when something changes. See Parallel Monitors |
GET /v1/models | Models your key can call. OpenAI list shape by default, Anthropic shape when you send an anthropic-version header |
GET /v1/usage | Balance, credited and spent totals, recent requests with cost |
GET /v1/generation?id=<request id> | Audit of each attempt for one request: tokens, provenance, cost, outcome |
POST /v1/route | Shows how a request would route, without sending it. See Routing policies |
GET /v1/limits?model=<id> | The rate limits that apply to your key. See Capacity |
Site
| Page | What it does |
|---|---|
/api/models.json | Public catalog: ids, prices, context windows, who serves each model. No auth. See Models |
/models/<id> | Each model's providers, prices, latency and uptime over the last 24 hours |
/playground | Chat with any catalog model, compare up to three side by side, judge with a decision model, and make images. See Playground |
/tools, /api/tools.json | The server tools and tool routes, by provider, with their prices. No auth. See Server tools |
/model-search | Optimize: find a cheaper model or mix that scores as well as yours on your Braintrust evals, then deploy it. See Optimize |
/endpoints | Your dedicated endpoints and the models you deployed from Optimize. Each has a tm/... model id that your keys can call |
/console | Usage, logs, API keys, provider connections, integrations, credits, spend caps and rate limits. See Console |
/signup, /login | Browser signup and sign-in through Clerk |
/llms.txt, /llms-full.txt | The docs index for agents, and every docs page as raw markdown in one file |
Where next
error_type, what it means and what to do →If a coding agent does the work, point it at https://app.routerplus.com/docs/agent-integration.md to build RouterPlus into a product, or at Coding agents to set up a coding tool. https://app.routerplus.com/llms.txt is the index it reads first.
For agents: /docs/overview.md and /llms.txt