AnyRouter

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 model field 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.

AliasFamily
google/gemini-flash-latestGemini Flash
google/gemini-flash-lite-latestGemini Flash-Lite
google/gemini-pro-latestGemini Pro
google/gemma-latestGemma
deepseek/deepseek-latestDeepSeek (flagship)
deepseek/deepseek-flash-latestDeepSeek Flash
anthropic/claude-opus-latestClaude Opus
anthropic/claude-sonnet-latestClaude Sonnet
anthropic/claude-haiku-latestClaude Haiku
openai/gpt-latestGPT (flagship)
openai/gpt-mini-latestGPT mini
openai/gpt-nano-latestGPT nano
qwen/qwen-max-latestQwen Max
qwen/qwen-plus-latestQwen Plus
qwen/qwen-flash-latestQwen Flash
z-ai/glm-latestGLM
z-ai/glm-flash-latestGLM Flash
moonshotai/kimi-latestKimi
x-ai/grok-latestGrok

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.