Latest Model Aliases
Send a "-latest" model id such as google/gemini-flash-latest to call the newest available model in a family, with automatic fallback.
A latest alias such as google/gemini-flash-latest always calls the newest available model in a family, so you do not edit code when a new version ships or an old one is retired.
How it works
- AnyRouter picks the newest model in the family that can serve your request now.
- If it is unavailable (retired, rate limited, or not reachable with your keys), it tries the next newest.
- The response
modelfield names the concrete model that answered, and you are billed at that model's price. - If you send your own
modelsfallback list, yours replaces the family list.
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"}]}'Available aliases
Aliases appear in the models catalog marked latest → , each with its own page (for example /model/google/gemini-flash-latest). GET /api/v1/models and GET /api/v1/models/<alias> return them with alias: true, resolves_to (the current model id) and family, plus that model's context length and pricing.
| 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 |
An alias can move to a new model without notice, which may change output style, pricing or supported parameters. Pin a concrete model id for stable production behavior.
AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer