Documentation
LLMRouteHub gives you one OpenAI-compatible API for hundreds of models across dozens of providers. Point your existing SDK at our base URL, pick a model id, and we route each request to the cheapest healthy provider — with automatic failover.
Quickstart
Set your base URL to https://llmroutehub.com/api/v1 and use a LLMRouteHub API key. Any OpenAI-compatible client works without code changes beyond the base URL and key.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://llmroutehub.com/api/v1",
apiKey: process.env.LLMROUTEHUB_API_KEY,
});
const res = await client.chat.completions.create({
model: "openai/gpt-oss-20b",
messages: [{ role: "user", content: "Categorize this email: ..." }],
});Authentication
Create a key in your dashboard and send it as a bearer token. Keys are scoped to your account and can be capped with per-key spend limits.
Authorization: Bearer $LLMROUTEHUB_API_KEYMaking a request
The model field takes a fully-qualified id in the form author/model-name — for example openai/gpt-oss-20b or anthropic/claude-haiku-4.5. Find ids on each model's page in the model catalog.
curl https://llmroutehub.com/api/v1/chat/completions \
-H "Authorization: Bearer $LLMROUTEHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-20b",
"messages": [{ "role": "user", "content": "Hello" }]
}'Model routing
Most models are served by more than one provider. By default LLMRouteHub balances price and reliability, weighting toward cheaper, stable providers and failing over automatically. You can override the behavior with a suffix on the model id:
| Suffix | Behavior |
|---|---|
:floor | Always route to the cheapest available provider. |
:nitro | Optimize for throughput over price. |
:free | Use a free community endpoint where one exists (rate limited). |
You can also pin a single provider or set a hard max_price in the request body. See a model's Providers tab for the live per-provider price, throughput and uptime.
Pricing & billing
Pricing is pass-through: you pay the provider's per-token rate (shown on each model page as input / output per 1M tokens) plus a small platform fee. Prompt caching, when a provider supports it, can cut effective input cost on repeated context. There are no minimums and no monthly seat fees — you're billed for what you use.
Rate limits
Paid usage scales with your account's credit balance. :free endpoints are limited to roughly 20 requests per minute and are best-effort — fine for testing, not for production or batch jobs. For steady high-volume workloads, use a paid model id.