Skip to main content
OrcaRouter lets you save a routing strategy as a named router. Call it from your code as orcarouter/{name} and OrcaRouter resolves it to a concrete model at request time, based on the rules you configured. This is useful when you want to:
  • Swap routing behavior without redeploying your app (change the router in the dashboard; your code stays the same).
  • Let different teams or services choose their own routing policy independently of the application that calls the API.
  • Reference routing logic that’s too complex to inline in extra_body.

Using a router

response = client.chat.completions.create(
    model="orcarouter/production-chat",
    messages=[...],
)
The model field in the response echoes the concrete model that served the request, and X-Orca-Router / X-Orca-Resolved-Model response headers tell you which router and which resolved model were used. See Response Headers.

Creating a router

Routers are created in the dashboard under Routing. Each router has:
  • Name — the {name} in orcarouter/{name}. Must be unique per user.
  • Pattern — which models this router can dispatch to (e.g. ["gpt-*", "claude-*"]).
  • Strategy — how to pick among matching models. Built-in strategies include cheapest, priority, and weighted.
  • Default model — a safety-net model used if the pattern resolves to nothing or if the strategy can’t pick.
  • Enabled — disable the router without deleting it.

Seeded router: orcarouter/auto

Every OrcaRouter account is seeded with a default router called auto on signup — see Auto Router. You can use it immediately without any configuration.