Anthropic Common Errors Overview Quick reference for all Claude API error types with exact HTTP codes, error bodies, and fixes. The API returns errors as JSON: . Error Reference 400 — Common causes and fixes: | Message Pattern | Cause | Fix | |----------------|-------|-----| | | Consecutive same-role messages | Merge adjacent user/assistant messages | | | Missing or zero | Always set (required param) | | | Typo in model name | Use exact ID: | | | Empty message content | Ensure content is non-empty string or array | | | Mismatched tool ID | Copy from the block exactly | 401 — 403 — API key lac…