LLM gateway: one key and one base URL for every model
An LLM gateway on one prepaid key. 343 chat models from 46 developers answer on one base URL, in the OpenAI and Anthropic formats. Routing, fallbacks, a response cache, guardrails and session logs run on the same request. There is no proxy to host.
One request through the LLM gateway · one base URL, one key, either SDK
curl https://api.uplinkswitch.com/v1/chat/completions \
-H "Authorization: Bearer $UPLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"messages": [{"role": "user", "content": "Summarize this thread."}]
}'from openai import OpenAI
client = OpenAI(base_url="https://api.uplinkswitch.com/v1", api_key="sk-uplink-live-...")
res = client.chat.completions.create(
model="claude-sonnet-5-5",
messages=[{"role": "user", "content": "Summarize this thread."}],
)
print(res.choices[0].message.content)import anthropic
client = anthropic.Anthropic(base_url="https://api.uplinkswitch.com/v1", api_key="sk-uplink-live-...")
msg = client.messages.create(
model="gpt-6.1-sol", # any chat model id, not only Claude
max_tokens=400,
messages=[{"role": "user", "content": "Summarize this thread."}],
)
print(msg.content[0].text)curl https://api.uplinkswitch.com/v1/chat/completions \
-H "Authorization: Bearer $UPLINK_API_KEY" \
-H "x-uplink-cache: on" \
-H "x-session-id: ticket-8812" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"models": ["gpt-6.1-sol","gemini-4-argon"],
"messages": [{"role": "user", "content": "Summarize this thread."}]
}'The answer's model field and the x-uplink-model header name the model that answered. x-uplink-cache reads HIT or MISS. Every response, errors included, carries x-uplink-request-id. The SDK guide shows the base URL and key in Python, TypeScript, Go and Rust.
What the gateway does · 8 feature groups on every key
| Feature | What it does | In the request |
|---|---|---|
| Agent tools | Web search, web fetch, remote MCP and a code sandbox inside one chat request, on any chat model, priced per call from the catalog. | "tools": [{"type": "uplink:web_search"}] |
| Files and redaction | PDF, Office and HTML files for every chat model, converted to text where the model takes none; secrets and PII replaced per key and restored in the answer. | "type": "input_file" · x-uplink-redact: secrets_pii |
| Routing | model "auto" across fast, balanced and frontier tiers, a models list of up to 5 fallbacks, saved presets as @preset/name, and route order by price, latency or throughput. | "model": "auto" · "models": [...] |
| Caching and context | An opt-in response cache, a hit billed at 10% of the original charge, and middle-out compression when a chat outgrows the context window. | x-uplink-cache: on · "transforms": ["middle-out"] |
| Guardrails and app sign-in | Blocked patterns, a prompt-injection check and tool allow and deny lists on every key, a blocked request free; OAuth PKCE sign-in that gives your app’s users their own key. | "prompt_injection": "block" · GET /auth |
| MCP gateway | Up to 20 MCP servers behind one /mcp/org endpoint, headers sealed, tool allowlists, the key’s tool policy and a call log. | POST /mcp/org |
| Endpoints | Embeddings, moderation, rerank, Whisper and Parakeet transcription, image edits and an OpenAI-compatible Batch API on the same key, at catalog prices. | POST /v1/embeddings · /v1/rerank · /v1/batches |
| Observability | Session timelines, a 92-day usage CSV, log export to a webhook, Langfuse or OTLP (Datadog, Honeycomb, Grafana), per-session request and spend caps and a loop guard. | x-session-id: ticket-8812 |
Each group has its own page with the request and its price. A web search run by the gateway bills $0.01 per search today. The features page lists every tool, document and endpoint price from the live catalog.
Formats the gateway speaks · from the live catalog, read 2026-11-16
| Format | Path | Called by | Chat models |
|---|---|---|---|
| OpenAI Chat Completions | /v1/chat/completions | The OpenAI SDK and any app with an OpenAI-compatible base URL | 343 of 343 |
| OpenAI Responses | /v1/responses | The OpenAI SDK’s Responses client | 343 of 343 |
| Anthropic Messages | /v1/messages | The Anthropic SDK and Claude Code | 343 of 343 |
| Gemini generateContent | /v1beta/models/{model}:generateContent | The Gemini SDK | 343 of 343 |
A model costs the same in every format. GET /v1/models lists the ids a key can call. Embeddings, rerank, transcription, image edits and batches have their own paths on the endpoints page, and image, video and speech models are on the media list.
What the gateway charges · the model's price per million tokens, USD, read 2026-11-16
| Model | Input | Output | Developer list, output |
|---|---|---|---|
| Claude Fable 5.2 | $4.00 | $20.00 | $40.00 |
| Claude Fable 5.1 | $6.00 | $30.00 | $50.00 |
| Claude Opus 5.5 | $2.716 | $9.70 | $20.00 |
| Claude Sonnet 5.5 | $1.20 | $3.00 | $10.00 |
| GPT-6.1 Sol | $0.582 | $2.91 | $10.00 |
| GPT-6 Sol | $0.60 | $3.00 | $10.00 |
| GPT-5.5 | $1.80 | $9.00 | $30.00 |
| Gemini 4 Argon | $0.60 | $3.00 | $10.00 |
65 of the 87 chat models with a published list price sell under it on input and output. No subscription is needed, top-ups carry no fee, and each top-up locks your prices for 30 days. Every price is on the model list and in the price index. The daily real-model check shows which models answered as themselves today.
What a key carries · set in the console or on /v1/keys
| Environment | Live or test, in the prefix: sk-uplink-live- or sk-uplink-test-. |
| Rate limits | Requests per minute and concurrency on every key, tokens per minute when you set it. A 429 carries retry-after. |
| Spend limit | A cap per day, week or month. |
| Model allowlist and expiry | A key narrowed to a list of models, or given an end date. A request for another model returns 403 scope_denied. |
| Routing | Route order by price, latency or throughput, or an auto router setting that routes every chat request on the key. |
| Cache, redaction and guardrails | A response cache time to live, secret and PII redaction, blocked patterns, a prompt-injection check and a tool policy, applied to every request the key sends. |
| Session caps | A request cap and a spend cap per session, and a loop guard. |
What an LLM gateway replaces · and how to compare one with another
Without a gateway, every model developer is a separate account, key, SDK shape, rate limit and invoice, and your code owns the retries. An LLM gateway puts one endpoint in front of all of them. The app sends every request to one base URL with one key, and the model is a string in the request.
This one is hosted. A model costs the same in every format and on every route, so a failover never moves the price. The model that answers is yours to set: a fixed id, a fallback list, model: "auto" on the auto router, or a custom model id that holds a base model, a system prompt and its own fallbacks.
Three questions separate one gateway from another: who holds the provider keys, what is added to the model price, and who runs the server. The OpenRouter alternatives page compares hosted gateways by the fee on top, with the date each price page was read. The hosted LiteLLM alternative page covers the move from a proxy you run to an endpoint you call, and OpenRouter vs LiteLLM sets the two side by side.
The bill is checkable. Every non-streamed answer carries a signed receipt naming the model and the charge, and a monthly statement can be checked in the browser on the verifier.
LLM gateway questions
- One key, every model
- The SDK you already use
- Prepaid, or a monthly plan
- 30-day price lock on every top-up
- Signed receipts for every call