Claude API 400 (invalid_request_error)
Is there an outage right now?
Claude API official status is operational. If this error persists, it is likely an implementation or environment issue on your side.
View Claude API status →What this error means
400 means the request was malformed or invalid: bad JSON, a missing or invalid parameter, an unsupported model name, or a value out of range (for example max_tokens set higher than the model allows).
Common causes
- •Malformed JSON or wrong Content-Type
- •Missing or misnamed required field (model, messages, max_tokens)
- •Invalid model name, or a model your key cannot access
- •max_tokens exceeds the model maximum, or another out-of-range value
- •Bad message structure (empty messages, wrong role order, oversized image)
How to fix
- 1.Read the error message—it names the exact field at fault
- 2.Validate the JSON and set Content-Type: application/json
- 3.Check the model name against the current model list
- 4.Lower max_tokens to within the model limit
- 5.Fix the messages array (non-empty, alternating user/assistant, valid base64 images)
When waiting helps (and when it won't)
This is a request-side error—waiting will not help. Fix the request body according to the field named in the error detail.
Alternatives when Claude API is down
Related errors
FAQ
What is 400 invalid_request_error?
400 means the request was malformed or invalid: bad JSON, a missing or invalid parameter, an unsupported model name, or a value out of range (for example max_tokens set higher than the model allows).
How do I fix 400 invalid_request_error?
Read the error message—it names the exact field at fault / Validate the JSON and set Content-Type: application/json / Check the model name against the current model list / Lower max_tokens to within the model limit / Fix the messages array (non-empty, alternating user/assistant, valid base64 images)