ERROR CODES / ENGLISH

422 Invalid parameters: the request failed validation

How to fix 422 parameter validation errors, including field-name mismatches and missing required fields, by starting from a minimal request.

Reviewed 2026-11-13 · ERROR CODES / 422 · Chinese detail: 完整中文页

What it means

The request parameters did not pass validation. This is not an authentication or quota problem: the server could parse the request but rejected its fields. Chinese model providers tend to be strict about field names and often require messages rather than prompt.

{"error":{"message":"Invalid parameters","type":"invalid_request_error"}}

Common causes

ShareCause
40%Configuration problem (key, base URL, variable name)
30%Provider status (rate limiting, overload, outage)
20%Request content (parameters, structure, length)
10%Network path (DNS, proxy, certificate)

The page's generic ranking puts configuration first, while the 422 status itself points at the request body. Use both: fix the fields, and if that does not help, check the surrounding configuration.

How to confirm

Reduce the request to a minimal body that contains only the model and a single user message. Send that first. If it succeeds, add your optional parameters back one at a time until the failing field is identified. Compare each field name against the provider's current documentation, and check that required fields are present and of the expected type.

Fix

  1. Check field names against the official documentation.
  2. Remove parameters you do not recognize.
  3. Get a minimal request working first.

If it still fails

SymptomResponsible party
Still fails after changing the request contentConfiguration or provider
Switching site or network fixes itThat side
Only triggered under specific conditionsYour request

If the minimal request also fails, the problem is not an unknown optional parameter. Move to the configuration and provider rows before rewriting the payload again.

General guidance, not a statement about any specific provider. For measured data, see the relay directory and method.