HTTP 400Client-side — change the request

Invalid request

invalid_request

The request never reached the part of VoiceLabs that does work — its shape was refused first. A query parameter, a path parameter, or the JSON body failed the schema the endpoint validates against, and detail names the first field that failed.

Why it happens

A field that is missing, misspelled, or the wrong type: text sent as a number, a limit above the maximum, a body posted as form data instead of JSON, or an empty body on an endpoint that requires one. Sending both voice_id and voice_name to POST /v1/speech lands here too — they are mutually exclusive.

How to fix it

Read detail: it identifies the offending field by name. Compare the request against that operation's schema in the reference, fix the payload, and send it again. Nothing was created and no allowance was spent.

Safe to retry?

No. The identical request fails identically — change the request first.

What it looks like on the wire

{
  "type": "https://voicelabs.now/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "A human-readable explanation of this particular occurrence.",
  "instance": "/v1/speech",
  "code": "invalid_request"
}

Branch on code, never on status or on the prose in detail: two different problems can share a status, and detail is written for humans and may be reworded. Problems a settings page can resolve also carry settings_url, and a scope failure carries required_scope.

Every VoiceLabs API error is an RFC 9457 problem document with a stable code.

See every error code