Every request to Anthropic's Messages API must include an `anthropic-version` header, such as `anthropic-version: 2023-06-01`. According to Anthropic's documentation, what does this header actually do?
- the header is purely optional and informational; omitting it, or sending an arbitrary unrecognized string, has no effect on how the request is processed
- the header selects which specific model snapshot answers the request, serving as an alternative to setting the `model` field in the request body
- the header is required on every request and pins that request to a documented API version; Anthropic's versioning policy preserves a given version's existing input and output parameters while allowing additive changes, such as new optional inputs or new output values, so pinning a version protects an integration from breaking changes introduced by later versions
- the header's value must change to a new date every single day, since each calendar day's API responses use an incompatible request and response format from the previous day
Why C? And why not the others?
Correct answer: C. the header is required on every request and pins that request to a documented API version; Anthropic's versioning policy preserves a given version's existing input and output parameters while allowing additive changes, such as new optional inputs or new output values, so pinning a version protects an integration from breaking changes introduced by later versions
Anthropic's documentation states that the `anthropic-version` header is required on requests and that, for a given version, Anthropic preserves existing input and output parameters while reserving the right to make additive changes such as new optional inputs, new output values, or new enum-like variants -- so an integration that pins a specific version string is protected from having its existing request and response handling broken by later additive changes. Describing the header as optional and inert is wrong because it is a required header with defined semantics, not a no-op. Describing it as a model-selection mechanism confuses it with the separate `model` field, which is what actually determines which model answers the request. Claiming the version string must change daily invents a versioning cadence that contradicts the documented version history, where a single version string like `2023-06-01` remains valid and stable over long periods.
Source: Anthropic, API versioning documentation, https://platform.claude.com/docs/en/api/versioning