citations on a user text block return a 400 in API version 2026-10-21
Returns 400
Applies to claude-* on the Anthropic Messages API with anthropic-version: 2026-10-21.
Anthropic's docs describe this error but don't quote the exact message, so we don't either.
How to fix it
Remove the citations array from text blocks in user messages, including blocks inside search_result.
Before
{
"max_tokens": 1024,
"messages": [
{
"content": [
{
"citations": [
{
"cited_text": "x",
"document_index": 0,
"end_char_index": 1,
"start_char_index": 0,
"type": "char_location"
}
],
"text": "As noted earlier.",
"type": "text"
}
],
"role": "user"
}
],
"model": "claude-opus-4-8"
}After (Claude Opus 4.8 (API version rules only))
{
"max_tokens": 1024,
"messages": [
{
"content": [
{
"text": "As noted earlier.",
"type": "text"
}
],
"role": "user"
}
],
"model": "claude-opus-4-8"
}Official source
In2026-10-21, a request that sends atextblock with a non-emptycitationsarray in ausermessage returns a 400 error.
https://platform.claude.com/docs/en/api/migration-2026-10-21 (last checked 2026-11-02)
Other changes for the same models
FAQ
How do I fix this when moving to claude-*?
Remove the citations array from text blocks in user messages, including blocks inside search_result.
Where is this documented?
In Anthropic’s official docs: https://platform.claude.com/docs/en/api/migration-2026-10-21, last checked 2026-11-02.