OrcaRouter is an AI router that sits between your application and every model provider, and the “how to use OpenRouter” question has an answer that is not proprietary to any single hub: it is four steps. Create an API key. Point your OpenAI-compatible client at the hub endpoint. Pick a model for the task. Handle rate limits with retries. We walk the identical flow, step by step — and the model you pick in step three comes from a catalog priced at the provider’s own rate — the 0% markup principle an openrouter alternative is built on — because the same request body works unchanged against any OpenAI-compatible endpoint.
If you have only ever called one provider’s API directly, a model hub can look like an extra moving part. It is the opposite: a hub collapses N API keys, N pricing sheets, and N rate-limit policies into one key, one endpoint, and one retry strategy. That is the entire value proposition of the category, and it is why most teams add a hub early — right after their first model works — and never remove it.
Everything else a hub does — model switching, cost controls, request logging — hangs off the same four primitives. Get those right and you have effectively “used” any hub in the category, whatever name is on the box.
Step 1: Create an API key
The first step is also the only one that happens outside your code. Sign up for the hub, open the API-keys page in your dashboard, and generate a key scoped to the job: a read-only key for development, a locked-down key for production, one key per service if the hub supports it. Store it in an environment variable — never in source control, never pasted into a README — and load it into your client at runtime.
The key is scoped to the hub, not to any single provider. That is the point: one credential, and billing flows through the hub’s account, so a single invoice and a single usage page replace one key per vendor.
Step 2: Point your OpenAI-compatible client at the hub endpoint
Virtually every hub in the category exposes the OpenAI chat-completions surface, which means you do not need a new SDK. You keep the openai package you already use and change two lines: the base_url and the key.
“`python
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ[“HUB_API_KEY”],
base_url=”https://hub.example.com/api/v1″,
)
resp = client.chat.completions.create(
model=”provider/model-id”,
messages=[
{“role”: “user”, “content”: “Summarize the trade-offs of using an AI gateway.”}
],
)
print(resp.choices[0].message.content)
“`
The request body is the standard shape: model, messages, optional temperature and max_tokens. The only convention worth learning is the model namespace — most hubs use a provider/model-id format, which is what lets one endpoint reach dozens of vendors without a per-provider config change.
Step 3: Pick a model per task
Once the client is connected, the model field becomes a dial rather than a commitment. The cheapest small model for casual chat, a fast one for interactive features, a frontier reasoning model for offline jobs where quality matters more than latency. Choosing per request — not per deployment — is where hubs earn their keep, because swapping the model string is a one-line change.
That is also where the catalog comes in. A good hub page reads like a price book: model IDs grouped by provider, list price per million tokens, status. Skim it the way you would skim a menu — the model you reach for in production is rarely the same one you reach for in a notebook.
Step 4: Handle rate limits and failures
The last step is the one most tutorials skip, and it is the one that decides whether your integration survives production. A hub fronts many providers with different quotas, so the rate-limit surface you need to handle is wider than with a single vendor. The pattern that works:
- Treat 429 and 5xx responses as retryable, with exponential backoff and jitter.
- Stream long responses so a slow model does not trip your client timeout.
- Set timeouts above the p95 time-to-first-token of the slowest model you route to.
A single retry policy shared across all models is the payoff of the category: you write the backoff logic once, against one endpoint, instead of once per provider.
The same four steps, with failover and request logs
Nothing changes in your client when the layer behind the endpoint is a router platform. OrcaRouter is one such platform, and the four steps above are exactly its setup: the same OpenAI-compatible endpoint, the same request body, the same provider/model ID you already picked in step 3. What changes is what sits behind the endpoint:
- One key for 200+ models across OpenAI, Anthropic, Google, Meta, Mistral, xAI, DeepSeek, Qwen, GLM, and MiniMax — the catalog from step 3 becomes a single list.
- Automatic failover. If a provider errors or a model goes down, the request is rerouted to a model that meets the same criteria instead of failing.
- Adaptive routing. Each prompt is graded in under a millisecond and routed to the cheapest model that satisfies your standard, with an orcarouter/auto mode when you would rather not choose at all.
- 0% markup. The provider’s list price is passed through with nothing added; receipts are transparent rather than a black box.
- Request logs. Every request is recorded and auditable, so “which model answered this and what did it cost” is a lookup instead of a mystery.
| Direct provider API | Model hub | Router platform | |
| API keys | one per provider | one | one |
| Models reachable | one provider | many | 200+, all major vendors |
| Failover | you build it | varies | automatic |
| Request audit | provider dashboard | hub dashboard | per-request logs |
| Markup | — | varies | 0%, list price passed through |
None of this is a reason to rip out a working hub. The steps you already learned still apply — the request body is identical, the model IDs are identical, and the endpoint is the same shape. A router platform is simply the same pattern with failover, per-request logs, and transparent pricing attached, which is why teams usually run one rather than replacing anything. The migration, when it happens, is a base_url change, not a rewrite.
The takeaway
The four steps of using a model hub are small enough to learn in an afternoon: create a key, set your base_url, pick a model per task, and retry through rate limits. They are identical whether you integrate a global hub or a routing platform, which is why “how to use OpenRouter” and “how to use any OpenAI-compatible endpoint” are effectively the same search. OrcaRouter fits the teams that want that same pattern plus automatic failover, adaptive routing, per-request logs, and 0% markup — 200+ models behind a single key, with no second integration to learn. If the steps above took you five minutes, you are already fluent in both.
Sourcing note: Product facts — one key for 200+ models, 0% markup, adaptive routing with sub-millisecond grading, automatic failover, and per-request logs — are OrcaRouter’s own claims from its homepage and product pages (/models, /compare), verified August 22, 2026. The four-step walkthrough describes the standard OpenAI-compatible chat-completions pattern as documented by the OpenAI SDK. No competitor-specific numbers are cited.


