Skip to content

Reference

Errors and limits

Errors follow the OpenAI shape: error.message, error.type, error.code. Temporary errors come with a Retry-After header.

HTTP
HTTP/1.1 400 Bad Request
content-type: application/json

{
  "error": {
    "message": "`voice_description` designs a new voice; it cannot be combined with `reference_audio`.",
    "type": "invalid_request_error",
    "code": "conflicting_fields"
  }
}

Branch on code in your program; message is written for people and may change. On WebSockets the same information arrives in an error message.

Common codes

StatuscodeMeaning
400invalid_request · invalid_jsonThe body could not be parsed or a field is invalid; the message names the field.
401missing_api_key · invalid_api_keyNo key, or an invalid or revoked key.
401invalid_token · token_expiredThe session token is invalid or has expired.
401auth_unavailableAuthentication is temporarily unavailable; retry.
429quota_exceededThe monthly quota is used up.
429rate_limit_exceededThe per-minute request limit or the concurrency limit was reached. Retry-After is in seconds.
503model_loading · server_busy · high_demandTemporary; retry after Retry-After.

Alania

StatuscodeMeaning
400input_too_longinput is over 5,000 characters.
400unknown_modelmodel is not recognised. Valid: alania-v2, alania-v1.
400unknown_voiceThe voice does not exist on this model; the message lists the valid ones.
400conflicting_fieldsFields that cannot be combined: voice_description with instructions or reference_audio; instructions with a leading (…).
400consent_requiredA recording was sent (reference_audio, or POST /v1/voices) without consent: true.
400unsupported_fieldAn Alania-2 field was sent with alania-v1.
400invalid_instructions · invalid_voice_descriptionOver 200 characters, not a string, or contains parentheses.
400invalid_reference · reference_too_short · reference_too_long · reference_too_largeThe cloning recording (in a request or to POST /v1/voices) could not be decoded, is outside 3–30 seconds, or is over 10 MB.
403account_requiredSaving a voice or a pronunciation needs an account API key; a demo session cannot save them.
404unknown_voiceNo saved voice has the id in voice or /v1/voices/{id}: it was deleted or belongs to another account.
409voice_limit_reachedThe account already holds 50 saved voices. Delete one to add another.
400invalid_pronunciationsThe pronunciations field or the POST /v1/pronunciations body is invalid. See Pronunciation dictionary.
404unknown_pronunciationNo entry has the id in /v1/pronunciations/{id}.
409pronunciation_limit_reachedThe account already holds 500 pronunciations. Delete one to add another.
503pronunciation_store_unavailableThe pronunciation dictionary is temporarily unavailable; retry.
502engine_errorThe audio could not be generated. Retry; if it persists, write to us with the x-request-id.
503model_loadingThe model is starting (Retry-After: 10). The other model may keep answering meanwhile.

Duyu

StatuscodeMeaning
400missing_file · empty_audioNo file field, or the audio is empty.
400undecodable_audioThe file could not be decoded as audio.
400bad_response_format · bad_temperatureresponse_format or temperature is invalid.
404model_not_foundmodel is not duyu-1 or whisper-1.
413file_too_large · audio_too_longThe 100 MB or 2 hour limit was exceeded.

Limits

These are the default limits. Talk to us if you need higher ones.

LimitValue
Requests per minute (per key, each product)600
Alania · text length5,000 characters
Alania · instructions, voice_description200 characters
Alania · cloning recording3–30 seconds, 10 MB
Alania · saved voices (per account)50
Alania · concurrent requests / WebSockets (per key)8 / 4
Duyu · file size / length100 MB / 2 hours
Duyu · concurrent requests / streams (per key)3 / 2
Session token lifetime10 minutes

Service status

Live status, 90-day uptime and incident history are at status.patientdesk.ai. The checks run every minute from outside our infrastructure, and every two minutes they transcribe a real Turkish clip and synthesize a sentence. To wire our status into your own monitoring, use the Statuspage-compatible JSON endpoint.

curl
curl https://status.patientdesk.ai/api/v2/status.json

Alania's own health endpoint reports each model separately. While one model is starting, status is degraded and requests for that model get model_loading.

GEThttps://voice.patientdesk.ai/health/alania
JSON
{
  "status": "ok",
  "service": "tts",
  "model": "alania-v2",
  "models": {
    "alania-v1": { "status": "ok", "sample_rate": 24000, "default": false },
    "alania-v2": { "status": "ok", "sample_rate": 48000, "default": true }
  },
  "limits_degraded": false
}