ModelRefs / API Versioning — AI Glossary
API Versioning — AI Glossary
The practice of releasing backward-compatible and breaking-change API versions, enabling callers to upgrade on their own timeline.
Overview
LLM APIs handle versioning differently: OpenAI uses model string versioning (the API endpoint is stable); Anthropic uses anthropic-version header (2023-06-01 current). Breaking changes include: message format changes, tool call schema updates, or deprecated endpoints. API version pinning is critical for production stability.
Reference details
| Topic | ecosystem |
|---|---|
| Last reviewed | 2026-06-24 |
Related terms
How it works
- Providers pin behaviour differently: some version the model string while keeping the endpoint stable, others version the API itself via a header or path.
- Model-string versioning means a dated snapshot is addressable, so behaviour is stable until the caller changes the string.
- API versioning pins the request and response shape, which is a separate axis — the same model can be reached through two API versions.
- An unpinned alias moves when the provider retires or updates a snapshot, so behaviour changes with no deploy on the caller's side.
- Deprecation notices are the operative signal, and a pinned snapshot has a retirement date rather than lasting indefinitely.
Example: Two things to pin, and what each protects
Pinning the API version protects the request and response shape: a new field or a changed tool-call structure will not break parsing. Pinning the model snapshot protects behaviour: the same prompt keeps producing comparable output. Pin only the first and a model update changes answers while the code keeps working. Pin only the second and a shape change breaks parsing while answers stay stable. They fail independently, which is why both need pinning and why 'we pinned the version' is an ambiguous claim.
Commonly confused with
Collapsed into one concept when it is two independent axes. The API version governs the contract — fields, shapes, headers; the model version governs behaviour. A provider can hold the first stable for years while the second moves monthly. It is also distinct from a deployment, which some clouds add as a third layer: a named deployment pins a model version inside a resource, so the pin lives in infrastructure rather than in the request. Knowing which layer you pinned determines which class of surprise you are still exposed to.
When to use it
Reach for it when:
- Behaviour must be reproducible across time, which requires pinning the model snapshot.
- Parsing must survive provider changes, which requires pinning the API version.
- Planning for deprecation, since pinned snapshots have retirement dates.
Reach for something else when:
- Assuming one pin covers both axes, which leaves one class of change unprotected.
- Pinning indefinitely without tracking deprecation, which converts a stable pin into a future outage.
- Prototyping, where tracking the latest alias is usually what you want.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to API Versioning — AI Glossary.
Frequently asked questions
What is API Versioning?
The practice of releasing backward-compatible and breaking-change API versions, enabling callers to upgrade on their own timeline.
What concepts are related to API Versioning?
Closely related concepts include model version, openai api, anthropic api.