HTTP 400Client-side — change the request

Invalid request

invalid_request

Something in the request is wrong, and VoiceLabs refused it rather than guessing. Most of the time the shape was refused before any work happened: 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. The other case is a request that is well-formed but that the generator cannot serve as asked — those reach the generator and come back refused, and detail says what the workable combinations are.

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. The generator's own refusals are a short list: a voice that does not resolve to a profile on this account, an engine that cannot voice the profile it was paired with, and a temperature asked of an engine that does not take one — only chatterbox and chatterbox_turbo do, and every other engine refuses rather than generating at a setting it discarded.

How to fix it

Read detail: it identifies the offending field, or the combination that cannot be served. 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