invalid_params

A parameter is missing, unknown or has the wrong type.

Response

Every failure uses this envelope. credits_charged is 0. The message below is the default text for this code. Live messages can change, so branch on error.code.

HTTP 400Sample
{
  "ok": false,
  "error": {
    "code": "invalid_params",
    "message": "A parameter is missing, unknown or has the wrong type.",
    "retryable": false
  },
  "credits_charged": 0,
  "request_id": "req_0123456789abcdef01234567"
}

error.retryable is false. The same request fails the same way.

When it happens

  • The message names the parameter.

What to do

  • Check that name against the parameters on the endpoint page, then send the request again.
  • Do not retry the same body. It fails the same way.

The response header x-request-id matches request_id. The full list is on errors.