What this error means
VALIDATION_ERROR is returned with HTTP status 422 when the request payload
fails schema validation: a required field is missing, a value has the wrong
type or an unknown enum member, or a cross-field rule is violated. The request
is not queued or partially processed; nothing is sent and no credits are
deducted.
Every response for this error carries this page’s address in meta.docs_url:
Cause
Thedetails.issues array names each offending field and what went wrong;
schema-level rejections carry the same information in details.validation.
The most common causes are:
How to fix it
- Read
details.issues. Each entry pairs afieldpath with amessage; fix every listed field, not just the first, so the next attempt does not round-trip one issue at a time. - Do not retry unchanged. This is a deterministic rejection: the request will fail identically until the payload changes. Retrying without a fix only burns rate-limit budget.
- Validate early on your side. Checking required fields, types, and enum values before sending catches most issues before they reach the API.
- Check the endpoint’s reference page. Field names, accepted formats, and cross-field rules are documented per endpoint in the API reference.
Related
- Error Code Reference — validation codes sit in the deterministic reject class: never retry until the payload changes.
- Validation gates runbook — decoding
detailsand fixing the payload field by field. - Error Handling Examples — response-envelope handling patterns in code.