Latest Model Aliases
Use a "-latest" model id such as google/gemini-flash-latest to always call the newest available model in a family, with automatic fallback when a model is retired or unavailable.
Latest Model Aliases
Models get new versions often, and older ones get retired. If your code pins google/gemini-3.5-flash, you have to edit it every time a newer Flash ships or the old one goes away. A latest alias does that for you: send google/gemini-flash-latest and AnyRouter calls the newest Gemini Flash model that is currently available.
How it works
- Each alias points at a model family, for example Gemini Flash or Claude Sonnet.
- AnyRouter picks the newest model in that family that can serve your request right now.
- If that model is unavailable (retired, rate limited, or not reachable with your keys), AnyRouter automatically tries the next newest model in the family.
- The response
modelfield tells you which concrete model answered, and you are billed at that model's price.
Available aliases
Aliases appear in the models catalog alongside other models, marked latest → with the model each one currently points to, and each has its own page (for example /model/google/gemini-flash-latest) showing the current model and the family's fallback order. GET /api/v1/models also lists them: each alias entry has alias: true, resolves_to (the current model id), and family, and carries that model's context length and pricing. GET /api/v1/models/<alias> returns the same entry.
| Alias | Family |
|---|---|
google/gemini-flash-latest | Gemini Flash |
google/gemini-flash-lite-latest | Gemini Flash-Lite |
google/gemini-pro-latest | Gemini Pro |
google/gemma-latest | Gemma |
deepseek/deepseek-latest | DeepSeek (flagship) |
deepseek/deepseek-flash-latest | DeepSeek Flash |
anthropic/claude-opus-latest | Claude Opus |
anthropic/claude-sonnet-latest | Claude Sonnet |
anthropic/claude-haiku-latest | Claude Haiku |
openai/gpt-latest | GPT (flagship) |
openai/gpt-mini-latest | GPT mini |
openai/gpt-nano-latest | GPT nano |
qwen/qwen-max-latest | Qwen Max |
qwen/qwen-plus-latest | Qwen Plus |
qwen/qwen-flash-latest | Qwen Flash |
z-ai/glm-latest | GLM |
z-ai/glm-flash-latest | GLM Flash |
moonshotai/kimi-latest | Kimi |
x-ai/grok-latest | Grok |
Example
curl https://anyrouter.dev/api/v1/chat/completions \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-flash-latest",
"messages": [{ "role": "user", "content": "Hello" }]
}'
The response includes the model that served it, for example "model": "google/gemini-3.8-flash".
When to pin instead
Latest aliases can move to a new model without notice, which may change output style, pricing, or supported parameters. For production workloads that need stable behavior, pin a concrete model id and upgrade on your own schedule. If you send your own models fallback list, AnyRouter uses yours instead of the family list.