How model selection works
There are three ways to specify a model in your request:- Provider-prefixed name — explicitly targets a specific model from a specific provider:
openai/gpt-4o,anthropic/claude-3-5-sonnet,google/gemini-1.5-pro - Inferoute alias — a stable identifier like
premium,balanced, oreconomythat maps to the best available model in that tier at request time - Auto-routing — omit the
modelfield entirely and setX-Inferoute-Strategy: costorX-Inferoute-Strategy: latencyto let Inferoute decide
Model categories
Premium
Highest quality for complex reasoning, long-form writing, and multi-step tasks. Best when output quality directly affects user experience.
openai/gpt-4oanthropic/claude-3-5-sonnet- Alias:
premium
Balanced
Strong capability at moderate cost. A good default for most production workloads where you want solid quality without paying for top-tier.
openai/gpt-4o-minianthropic/claude-3-haiku- Alias:
balanced
Economy
Fastest and cheapest. Ideal for classification, extraction, summarization, and any task where throughput matters more than nuance.
openai/gpt-4o-minianthropic/claude-3-haikugoogle/gemini-flash- Alias:
economy
Long context
For documents, codebases, and conversation histories that exceed standard context windows.
anthropic/claude-3-5-sonnet(200k tokens)google/gemini-1.5-pro(1M tokens)- Alias:
long-context
Recommended models by use case
Model tier comparison
- Balanced
- Economy
Provider-agnostic code with aliases
When you hardcode a provider-prefixed model name likeopenai/gpt-4o, swapping providers requires a code change. Inferoute aliases let you decouple your application from any specific provider.
python
Embeddings
For embeddings, specify the model directly. Inferoute passes the request to the provider without modification.python