Zeligate VoiceDeveloper docs
v1.3.0Sign in

API reference / Errors

Errors

Errors use the ZeliSpeech error envelopes, so client error handling works unchanged. There are two shapes: a logical-error object for API errors and the pydantic detail array for request-validation errors.

Logical errors

Auth, format, voice, and engine errors return a detail object:

{ "detail": { "status": "invalid_output_format", "message": "..." } }
Status codestatusMeaning
401missing_api_keyAuth required but no key was sent
401invalid_api_keyThe key sent isn't recognized
400invalid_output_formatUnknown output_format value
404voice_not_foundUnknown voice with ZELI_EL_STRICT_VOICES=1
503model_loadingEngine is still warming up — retry shortly

Validation errors

A malformed request body (for example a missing required text) returns the pydantic detail array with 422:

{
  "detail": [
    { "loc": ["body", "text"], "msg": "field required", "type": "value_error.missing" }
  ]
}
Two shapes, on purpose

detail uses two distinct shapes: an object for logical errors, an array for validation errors. Branch on Array.isArray(detail) if you handle both.

Tolerant request bodies

Most "unexpected field" cases are not errors here. Fields the engine doesn't use (pronunciation_dictionary_locators, apply_text_normalization, optimize_streaming_latency, unknown model_id, …) are accepted and ignored rather than rejected, so an existing request body won't 422. See Create speech.

Handling errors

import httpx
 
r = httpx.post(
    "https://voice.your-domain.com/v1/text-to-speech/zeli-voice-1",
    params={"output_format": "mp3_44100_128"},
    headers={"Authorization": "Bearer sk-zeli-..."},
    json={"text": "Hello."},
)
if r.status_code >= 400:
    detail = r.json().get("detail")
    if isinstance(detail, list):
        print("validation error:", detail)
    else:
        print(detail["status"], detail["message"])
else:
    open("out.mp3", "wb").write(r.content)
Internals stay internal

Unexpected server errors return a generic 500 without leaking stack traces or internal detail.

Zeligate Voice API · self-hosted · secure data sovereignty · source