Introduction
One base URL and one API key for every model — OpenAI, Anthropic, and Responses API dialects in one place.
What is Tera Router?
Tera Router is an LLM gateway you run yourself. Point your SDK, curl, or favorite coding agent at a single base URL, and the router forwards each request to the providers you have connected — complete with fallbacks, cooldowns, spending limits, and usage tracking.
- Three dialects, fully compatible —
POST /v1/chat/completions(OpenAI),POST /v1/messages(Anthropic), andPOST /v1/responses(OpenAI Responses). Existing clients need no changes. - Routing you control — provider chains with
priority,round-robin, orload-balancedstrategies, plus automatic failover when an account fails or gets rate limited. - Cost control — plans and budgets per key, per account, or global, with alerts and hard cutoffs.
- Guardrails — PII, prompt injection, topic, toxicity, and bias detection before requests leave.
- Dashboard — manage everything above from a UI: API keys, provider accounts, chains, guardrails, usage, down to the console log.
Three steps to your first request
- Start the server —
make runinapps/server, gateway ready athttp://localhost:8080. - Create an API key — sign in to the dashboard at
http://localhost:5173, open API Keys, create a key prefixed withsk_tr_. - Call it — use that key in the
Authorizationheader:
curl http://localhost:8080/v1/chat/completions \
-H "Authorization: Bearer sk_tr_..." \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini",
"messages": [
{ "role": "user", "content": "Hello, world!" }
]
}'Call it from code
Any SDK that speaks the OpenAI format only needs its base URL swapped:
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: 'sk_tr_...',
baseURL: 'http://localhost:8080/v1',
})
const res = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-4',
messages: [{ role: 'user', content: 'Hello, world!' }],
})import Anthropic from '@anthropic-ai/sdk'
const client = new Anthropic({
apiKey: 'sk_tr_...',
baseURL: 'http://localhost:8080',
})
const res = await client.messages.create({
model: 'openai/gpt-4o-mini',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, world!' }],
})Note: with Tera Router, an Anthropic model can be called through the OpenAI SDK and vice versa — the router translates the dialects.
Next steps
Installation
Set up the server and dashboard from scratch.
Gateway API
Authentication, endpoints, and request formats.
Models & routing
provider/model, alias pools, and chain:.
Guardrails
PII, injection, and forbidden topic filters.
API Reference
Every dashboard REST endpoint.
Configuration
Environment variables and make targets.