Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Set model to openrouter/auto to let OpenRouter choose a model for each request. To influence which host serves the selected model, add a separate provider object. Model selection answers “which model?”; provider routing answers “which provider serves it?” These controls work at different layers, and a provider must offer a compatible endpoint for the model Auto Router selects.

Let OpenRouter choose the model

Send openrouter/auto as the request’s model value. Auto Router evaluates the prompt and selects from its current candidate models. The response’s model field identifies the model that answered. Because the candidate pool can change, check the current catalog rather than treating any example list as permanent. OpenRouter’s Auto Router documentation describes this behavior.

Auto Router is useful when a workload varies and different prompts may be better served by different models. A fixed model slug is more predictable when you need a known model for a particular task, output style, or application requirement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose or constrain the provider separately

Add a provider object in the request body to express provider preferences or restrictions. This structural example prefers one provider but permits fallback routing:

{
  "model": "openrouter/auto",
  "messages": [{"role": "user", "content": "..."}],
  "provider": {
    "order": ["preferred-provider"],
    "allow_fallbacks": true
  }
}

The example does not guarantee that the named provider hosts every model Auto Router might select. The chosen model needs a compatible endpoint there. OpenRouter’s Provider Routing documentation describes the available controls.

  • order sets an explicit provider sequence to try.
  • only restricts routing to an allowlist.
  • ignore excludes specified providers.
  • allow_fallbacks controls whether other providers may be tried if the preferred route fails.

If you disable fallbacks, the request may have no route when the selected provider is unavailable or lacks a compatible endpoint. For strict provider control, make both the eligible providers and fallback policy explicit.

Know what provider routing does by default

When provider sorting and ordering are unset, OpenRouter documents a price-oriented balancing strategy that also accounts for recent instability. Providers with significant outages in the previous 30 seconds are moved behind stable endpoints. Among low-cost stable providers, the documented example uses inverse-square price weighting: a provider priced at $1 per million tokens is nine times as likely to be tried first as one priced at $3, all else equal. Remaining providers can serve as fallbacks. This is an explanation of the documented strategy, not a promise about the route for any particular live request.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Setting provider.sort or provider.order disables that default load balancing and makes routing follow the specified sort or order.

Choose a routing preference that fits the request

Goal Setting What to expect
Lower price sort: "price" Prioritizes lower-priced providers. A max_price ceiling can leave no eligible endpoint and cause the request to fail.
Higher throughput sort: "throughput" Prioritizes throughput.
Lower latency sort: "latency" Prioritizes lower latency.
Specific provider sequence order: [...] Tries providers in the stated order rather than using default load balancing.
Restricted provider set only or ignore Limits eligible providers by allowing or excluding them.

Performance preferences such as minimum throughput or maximum latency are soft: endpoints outside the preferred range are moved later, not ruled out, so the setting does not guarantee a threshold. Other eligibility and policy filters include data_collection, zdr, and require_parameters. For privacy- or compatibility-sensitive use, confirm current endpoint metadata and account-level policies before relying on a route.

OpenRouter also documents the :nitro and :floor model suffixes as shortcuts: :nitro sorts for throughput and permits priority-tier endpoints, while :floor sorts for price and permits flex-tier endpoints. These variants affect service-tier eligibility as well as sorting, so they do more than set provider.sort.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use model fallbacks when the model itself may need to change

Provider fallback keeps the requested model and tries another host for it. Model fallback changes the model: supply a models array in priority order, and OpenRouter can try the next model after documented errors such as context-length validation, moderation flags, rate limits, or downtime. The final model used is returned in the response and determines the request’s model pricing. Do not confuse this array with provider.order, which specifies providers rather than models. See OpenRouter’s model fallback documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For the Anthropic Messages API, the documented fallbacks field is a separate option: it cannot be combined with models, accepts at most three entries, and is handled by OpenRouter’s routing.

Check available models and verify the route

Use the live Models API to find current choices. Its filters cover query or name, category, parameter support, modality, context, price, author, hosting provider, ZDR, and region; it also supports sorting by price, context length, throughput, latency, popularity, weekly activity, recency, and benchmark indices. Model slugs, pricing, capabilities, and endpoint availability can change, so verify them when implementing and whenever requirements change.

  1. Send the request with model: "openrouter/auto" and the provider preferences or restrictions your application needs.
  2. Inspect the response’s model field to identify which model answered.
  3. For provider-sensitive behavior, consult current endpoint documentation and the request/response metadata available to your integration; do not infer a provider solely from the selected model.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.