passdrill
AI & LLM Engineering · Building with LLM APIs · Card 021/024 easy

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?

  1. the header is purely optional and informational; omitting it, or sending an arbitrary unrecognized string, has no effect on how the request is processed
  2. the header selects which specific model snapshot answers the request, serving as an alternative to setting the `model` field in the request body
  3. 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
  4. 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
Next card → Shuffle