Kova returns JSON error bodies. The HTTP status code is the primary signal; the JSON body contains anDocumentation Index
Fetch the complete documentation index at: https://docs.kova.ai/llms.txt
Use this file to discover all available pages before exploring further.
error field and, in some cases, additional context.
401 Unauthorized
There are two distinct 401 shapes depending on where the request was rejected. Missing or malformed API key (rejected at the gateway middleware):x-api-key header is missing, doesn’t start with kova_sk_, or no longer exists in the platform’s key store.
Fix: Verify the header is present, check for typos, regenerate the key on Dashboard → API keys.
402 Payment Required
422 Unprocessable Entity
- Missing required field (
text,voice). - Invalid
response_format.encoding(must be one ofmp3,pcm,wav,linear16,opus,mulaw,alaw). - Invalid
response_format.sample_ratefor the chosen encoding (e.g.opusrequires one of 8000, 12000, 16000, 24000, 48000). - Invalid
response_format.bitrate(must be in the encoding’s accepted range; see Text to speech).
loc and msg to find the offending field. The detail array can contain multiple validation errors.
429 Too Many Requests
MAX_CONCURRENT_TTS=15 by default) — under heavy load this can surface as well.
Fix: Wait for an in-flight request to complete, or queue requests client-side. See Rate limits for the full policy.
5xx Server Errors
Transient. The SDK retries 5xx responses automatically with exponential backoff. If you see persistent 500s, contact support with the request id from thex-request-id response header.
How errors surface in the SDKs
The SDKs also exportKovaTTSAuthError(401),KovaTTSRateLimitError(429),KovaTTSValidationError(422),KovaTTSServerError(5xx),KovaTTSConnectionError, andKovaTTSProtocolError. Catch the baseKovaTTSErrorto handle everything; catch the specific subclasses when you need to react differently per code.