Skip to main content

Claude API Model IDs and Versioning: Aliases, Pinned Snapshots, and Migration

What goes in the Claude API model parameter? The difference between a pinned ID like claude-opus-5 and an alias like opus, why 4.6-generation dateless IDs are pinned too, pinning for production, planning for deprecation, and the Models API — all from the official docs.

ByUpdated

When you call the Claude API, what goes in the model parameter? And how does an ID like claude-opus-5 differ from an alias like claude-haiku-4-5? This guide covers model IDs and versioning on the API. (For performance/use comparison by model family, see the model comparison; for SDK install and first call, the SDK guide. This sits in between: how to choose and manage the string.) As of September 2026 (re-checked against the model-ids-and-versions and models overview docs), source: Claude official docs.

🟢 Model references match the current lineup · model notice · Fable subscription
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.

Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (

🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
0/M input, $50/M output tokens). The one-time
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
00 credit applied only to the Fable 5 transition and is not offered for 5.1. Some coding and debugging requests may be answered by an Opus model due to a security classifier (both models). See the Fable 5.1 guide and the Fable 5 availability guide for details.

Update (September 27, 2026): Claude Opus 5.5 was released on September 22, 2026 and is now the current Opus model (API claude-opus-5-5, $4 per million input tokens and $20 per million output tokens, down from Opus 5's $5/$25). Anthropic says it performs at the level of Fable 5.1 on most work and costs 40% less to run than Opus 5 on typical workloads. Opus 5 remains available but is marked legacy in the official model docs. Opus 5 prices and comparisons below reflect the pre-launch state and will be updated. Details: Claude Opus 5.5 complete guide.

alias vs pinned model ID alias (convenience pointer) opus → recommended version what it points to can change over time → dev / testing pinned ID (snapshot) claude-opus-5 always the same snapshot → pin this for production

Every model ID is a "pinned snapshot"

Per the official docs, every Claude model ID is a pinned snapshot. IDs with a date (e.g. ...20250929) are fixed to that specific release. As long as you use the same ID, you get the same model weights.

Dateless IDs are pinned too (a common misconception)

From the Claude 4.6 generation, model IDs use a dateless format (e.g. claude-opus-5, claude-sonnet-4-6). A common misconception is that a dateless ID like claude-sonnet-4-6 always routes to the latest/best version. It does not. From 4.6 on, the dateless ID is the canonical ID for that release and a single fixed snapshot. Anthropic does not change the weights or config of an existing ID; updated versions always ship under a new ID.

Model weights are fixed for an ID, but the serving infrastructure around it (request router, safety classifiers, sampling logic) can change over time, and occasionally observable behavior shifts slightly even when the ID and weights are unchanged (official docs).

Aliases are "convenience pointers" (they can change)

Aliases are different. Per the official docs, Claude API aliases exist only for models before the 4.6 generation: a dateless name such as claude-sonnet-4-5 or claude-haiku-4-5 is a convenience pointer that resolves to the most recent dated snapshot for that minor version (e.g. claude-haiku-4-5-20251001). From the 4.6 generation on, the dateless ID (claude-opus-5, etc.) is the snapshot, so there is no separate alias. (One-word names like opus or sonnet are Claude Code /model shortcuts, not valid API model values.) What an alias points to changes when a new dated snapshot ships. Convenient — but in production it means the model can change under you with no code change, shifting behavior.

Pin the version in production

When to use which Use an alias · dev, testing, one-off scripts · when you want the latest pick Use a pinned ID · production, reproducibility · when silent shifts would hurt

So the recommended pattern is clear: aliases are handy for dev, testing, and one-off scripts; for production and reproducibility, pin the full model ID.

# Pin: full model ID — always the same snapshot
message = client.messages.create(
    model="claude-opus-5",   # pinned snapshot
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hi"}],
)

# alias: convenience pointer — resolves to the recommended version (can change over time)
message = client.messages.create(
    model="claude-haiku-4-5",  # alias (pre-4.6 generation) — dev / testing
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hi"}],
)

Plan for updates and deprecation

Every model ID (dated or dateless) has its own distinct deprecation and retirement schedule. A pinned ID keeps behavior stable, but when that model is slated for retirement you'll need to migrate to a new ID. For teams, record the switch date, model version, and any prompt adjustments so you can diagnose behavior changes later. Check schedules in the official models overview and deprecation docs.

Query the Models API

Which models are available, and their context/output limits, can be queried in code via the Models API. Instead of maintaining a hardcoded table, query at runtime and it's always current.

# Query available models, capabilities, and token limits in code
models = client.models.list()          # the list
m = client.models.retrieve("claude-opus-5")
m.id                 # "claude-opus-5"
m.display_name       # "Claude Opus 5"
m.max_input_tokens   # context window (int)
m.max_tokens         # max output tokens (int)

Summary

Key points: (1) every model ID is a pinned snapshot; (2) from 4.6 on, dateless IDs are pinned too (not auto-latest); (3) aliases (claude-haiku-4-5 etc., pre-4.6 generation only) are convenience pointers that can change; (4) pin the full ID in production; (5) updates ship as new IDs, so plan for deprecation/migration; (6) use the Models API to query available models and limits in code.

Learn more: for how much one request can handle and how to manage tokens, see the context windows and tokens guide.

Model ID lists, alias mappings, and availability can differ by date and deployment (Claude API, AWS, Vertex, Foundry). Always confirm the latest IDs and deprecation schedules in the official model docs before shipping to production.

See also: Claude Model Comparison Guide

Was this helpful?

Keep reading