Console
Get started

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

  1. 01
    Open Sign up. Complete Clerk authentication and email verification.
  2. 02
    Save the first API key shown after sign-in.
  3. 03
    Buy 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

bash
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:

python
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 request
python
import 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

APIBase URLEndpointWorks with
OpenAI-compatiblehttps://api.routerplus.com/v1POST /v1/chat/completions, and POST /v1/responses for OpenAI's modelsOpenAI SDKs, Codex, Cursor, Cline, Kilo Code, OpenCode, any OpenAI-format client
Anthropic-compatiblehttps://api.routerplus.comPOST /v1/messagesAnthropic 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.cost in 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-attempts header 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>1 returns 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 the x-tm-dropped-params header. See Wire compatibility.
  • Server tools. Add tako:search or a parallel:* tool to tools, 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 the x-tm-tools header. 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.

EndpointWhat it does
POST /v1/chat/completionsOpenAI-compatible completions, streamed or not
POST /v1/messagesAnthropic-compatible messages, streamed or not
POST /v1/messages/count_tokensAnthropic token counting, not billed. Only models with an Anthropic-format deployment
POST /v1/responsesOpenAI Responses API. See Responses
POST /v1/images/generationsOpenAI Images API, base64 in the body. See Images
POST /v1/videos, GET /v1/videos/<id>, GET /v1/videos/<id>/contentVideo from a text prompt: a job, then the file. See Videos
POST /v1/decisionsTyped answers from a decision model. See Decisions
POST /v1/parallel/tasks/runsA Parallel Task run: deep research as a job. See Parallel Task runs
POST /v1/parallel/findall/runs, POST /v1/parallel/findall/entity-searchParallel FindAll: a verified list of the companies or people that match your conditions; Entity Search, a quick ranked list. See Parallel FindAll
/v1/parallel/monitorsParallel Monitors: a query watched on a schedule, with events when something changes. See Parallel Monitors
GET /v1/modelsModels your key can call. OpenAI list shape by default, Anthropic shape when you send an anthropic-version header
GET /v1/usageBalance, 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/routeShows 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

PageWhat it does
/api/models.jsonPublic 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
/playgroundChat with any catalog model, compare up to three side by side, judge with a decision model, and make images. See Playground
/tools, /api/tools.jsonThe server tools and tool routes, by provider, with their prices. No auth. See Server tools
/model-searchOptimize: find a cheaper model or mix that scores as well as yours on your Braintrust evals, then deploy it. See Optimize
/endpointsYour dedicated endpoints and the models you deployed from Optimize. Each has a tm/... model id that your keys can call
/consoleUsage, logs, API keys, provider connections, integrations, credits, spend caps and rate limits. See Console
/signup, /loginBrowser signup and sign-in through Clerk
/llms.txt, /llms-full.txtThe docs index for agents, and every docs page as raw markdown in one file

Where next

Tip

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