Skip to main content
This page lists the errors returned by the Gnani Speech APIs: Speech-to-Text (REST, Realtime and Batch), Text-to-Speech and Voice Cloning. The Agent Builder Platform API has its own codes; see the Platform API error reference.

How errors look

Speech-to-Text (REST) errors use this envelope:
The HTTP status is the reliable signal; branch on error.type. These responses use a different shape: validation errors such as a missing language_code or audio_file (422 with {"detail": [...]}), the 504 on Prisma v3.0, authentication and rate-limit errors, Batch errors, Text-to-Speech and Voice Cloning errors and streaming error messages.

Authentication and rate limits

Authentication and rate-limit errors do not use the success / error envelope. They look like this:
The same shapes are returned by REST, Batch, Text-to-Speech, Voice Cloning and the Realtime handshake (as an HTTP response before the WebSocket opens).

Speech-to-Text

Prisma v3.0

The 504 body is not the envelope:
The 504 bounds the transcription step only, so a request can take longer end to end and still succeed.

Prisma v2.5

Prisma v2.5 returns the same error.type values as Prisma v3.0 where they apply (see the Prisma v3.0 table for the audio errors EMPTY_AUDIO, UNSUPPORTED_AUDIO_FORMAT, AUDIO_CONVERSION_ERROR and MAX_AUDIO_DURATION_EXCEEDED, and for INTERNAL_SERVER_ERROR). These are the ones specific to v2.5: Invalid bias_list input, or a numeric bias_score that is not an allowed value, is skipped and the request succeeds.

Streaming (Realtime)

Sent when the server encounters a recoverable or fatal error. The connection may remain open after a recoverable error.
When the connection closes after an error message:

Batch

Batch errors use error and message fields (and the authentication shape above for 401). Each endpoint returns only the errors that apply to it. A job_id that is not a valid UUID returns 422 with a {"detail": [...]} body. A status filter that is not a known status, on the list and files endpoints, is ignored and returns an empty list. Create Job 401 Missing API key
400 Unsupported language
400 Invalid config (Prisma v3.0 options)
The text after Value error, says what is wrong: An unsupported language code, or auto mixed with other codes, is rejected the same way on every model. Other 400 errors on this endpoint: A config part that is not valid JSON currently returns 500 Internal Server Error. Send valid JSON. Start Job 409 Already started / finished
404 Job not found
409 Cancelled before starting
Get Job Status 404 Job not found
Cancel Job 409 Already cancelled
404 Job not found
409 Already finished
File errors A file that ends in FAILED can carry an error_code. All other file errors are unchanged.

Text-to-Speech

REST and SSE requests return a flat error body: Text-to-Speech and Voice Cloning (REST and SSE) return errors in a flat body, not the error.type envelope used by Speech-to-Text:
Authentication and rate-limit errors use the shape shown below. Some validation failures on the embeddings endpoint can also return 422 with a {"detail": [...]} body. Streaming errors: Text-to-Speech (WebSocket error message, and the error event on SSE) uses type and message:
The connection remains open after recoverable errors. Voice Cloning (WebSocket) adds an error code:

Voice Cloning

Voice Cloning (inference, SSE and embeddings) returns the same flat error body as Text-to-Speech (see above).

Retrying

Transcription has no side effects, so retrying is safe. Retry connection errors and 429 / 500 / 503 / 504 with exponential backoff (for example 0.5 s, 1 s, 2 s; three attempts). For 429, wait a moment before retrying (the response has no Retry-After header today, but honour it if one appears). Do not retry other 4xx errors; they fail the same way. A TRANSCRIPTION_FAILED error means the request was already retried once internally.
Try an invalid request to see the envelope:

Reporting a problem

Send the request_id from the response (or the one you set in X-API-Request-ID) to support.