How errors look
Speech-to-Text (REST) errors use this envelope: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 thesuccess / 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:
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 sameerror.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.error message:
Batch
Batch errors useerror 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
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
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 theerror.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:
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 and429 / 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.
Reporting a problem
Send therequest_id from the response (or the one you set in X-API-Request-ID) to support.