{"openapi":"3.1.0","info":{"title":"Ana-Yurt CRH API","description":"Transliteration runs on the gateway. Speech recognition (`POST /v1/audio/transcriptions`) and speech synthesis (`POST /v1/audio/speech`) run on one GPU machine with no SLA; `GET /v1/status` says whether they are offered (`coming_soon` until then) and up.\n\n`POST /v1/translit` accepts up to 10,000 characters of text in any script (Cyrillic and Latin alike). Over-length text and oversized request bodies get 413 `payload_too_large`. Errors use `{\"error\": {\"message\", \"type\", \"code\"}}`. Under overload the API answers 503 `service_unavailable` with `Retry-After`.","version":"0.1.0"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/status":{"get":{"summary":"Status","description":"Service states, no key needed. `translit` runs on the gateway. `asr` and `tts` run on one GPU machine: `operational`, `degraded`, `down`, or `coming_soon` while the endpoint is not offered yet. `available` is false when calls cannot succeed now: `down`, `coming_soon`, or `degraded` with `reason` `model_loading` / `model_not_loaded` (the TTS model is not in GPU memory; calls get 503 `service_unavailable`). Box states are probed at most every 30 seconds. Browsers: `GET /status` redirects to the human status page.","operationId":"status_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/openapi.json":{"get":{"summary":"Openapi Route","operationId":"openapi_route_v1_openapi_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/translit":{"post":{"summary":"Translit","description":"Transliterate up to 10,000 characters of Crimean Tatar text between Cyrillic and Latin. The limit counts characters (Unicode code points) in any script, not bytes. Longer text, or a request body over 131,072 bytes, is rejected with 413 `payload_too_large`. Invalid input (including an unknown `direction`) is rejected with 400 `invalid_request` before any quota is counted.\n\nEach account may have a fixed number of requests in flight at once: Free 2, Pro 4, Business 8. A request over that limit gets 429 `concurrent_request` with `Retry-After: 1`; it spends no per-minute token and no daily quota. Retry it after a short delay, or cap the client's parallelism at the plan's limit.","operationId":"translit_v1_translit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslitIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"`invalid_request`: missing or empty text, unknown `direction`, malformed JSON."},"401":{"description":"`invalid_api_key`."},"403":{"description":"`account_suspended` or `scope_not_allowed`."},"413":{"description":"`payload_too_large`: text over 10,000 characters or a body over the byte cap."},"429":{"description":"`rate_limited` (per-minute limit), `quota_exceeded` (daily quota), `concurrent_request` (too many requests in flight for the account: Free 2, Pro 4, Business 8; retry after `Retry-After`, 1 s), or `global_capacity`. Carries `Retry-After` and `RateLimit-*` headers."},"503":{"description":"`service_unavailable`: the gateway is shedding load; retry after `Retry-After`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/transcriptions":{"post":{"summary":"Transcriptions","description":"Transcribe Crimean Tatar speech (OpenAI-compatible). Scope `asr`. Multipart field `file`: up to 25 MB and 5 minutes. WAV, MP3, FLAC, OGG/Opus and M4A are measured before the call; WebM and other formats without a length header are accepted up to 1024 KB. Fields: `response_format` (`json` default, `text`, `verbose_json`, `srt`, `vtt`), `language` (`crh`, `auto`, or empty; all mean Crimean Tatar). `verbose_json` always reports `language: crh`. Quota is seconds of audio per plan window; one transcription per account at a time (a speech synthesis call may run alongside). The model runs on one GPU machine with no SLA: when it is offline or training the API answers 503 with `Retry-After`. Input and output are stored and may be used to improve Ana-Yurt models, as the API Terms say.","operationId":"transcriptions_v1_audio_transcriptions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary"},"response_format":{"type":"string","enum":["json","text","verbose_json","srt","vtt"]},"language":{"type":"string","enum":["","crh","auto"],"description":"Optional. Every value transcribes Crimean Tatar."},"model":{"type":"string","description":"Ignored."}},"type":"object","required":["file"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"`invalid_request` (no file, bad field) or `invalid_audio` (cannot decode)."},"401":{"description":"`invalid_api_key`."},"403":{"description":"`account_suspended` or `scope_not_allowed`."},"413":{"description":"`payload_too_large` or `audio_too_long`."},"429":{"description":"`rate_limited`, `quota_exceeded`, or `concurrent_request`."},"503":{"description":"`not_available`, `service_unavailable` (box offline), or `service_busy`."},"504":{"description":"`timeout`."}}}},"/v1/audio/voices":{"get":{"summary":"Voices","description":"Voices `POST /v1/audio/speech` accepts. No key needed.","operationId":"voices_v1_audio_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/audio/speech":{"post":{"summary":"Speech","description":"Synthesise Crimean Tatar speech (OpenAI-compatible). Scope `tts`. JSON body: `input` (text, Cyrillic or Latin, up to 500 characters), `voice` (see `GET /v1/audio/voices`), `response_format` (`mp3` default, `wav`, `opus`). The response is the audio file. Quota is seconds of generated audio per plan window; one synthesis per account at a time (a transcription may run alongside). Runs on one GPU machine with no SLA. When the synthesis slot or the GPU is busy the request waits up to 20 s before 503 `service_busy`; 503 `service_unavailable` with `Retry-After` when the machine is offline or the model is not loaded (see `GET /v1/status`). Input and output are stored and may be used to improve Ana-Yurt models, as the API Terms say.","operationId":"speech_v1_audio_speech_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"input":{"type":"string","maxLength":500},"voice":{"type":"string"},"response_format":{"type":"string","enum":["mp3","wav","opus"]},"model":{"type":"string","description":"Ignored."}},"type":"object","required":["input","voice"]}}},"required":true},"responses":{"200":{"description":"The audio.","content":{"application/json":{"schema":{}},"audio/mpeg":{},"audio/wav":{},"audio/ogg; codecs=opus":{}}},"400":{"description":"`invalid_request`: empty input, unknown voice or format."},"401":{"description":"`invalid_api_key`."},"403":{"description":"`account_suspended`, `scope_not_allowed`, or `voice_not_allowed`."},"413":{"description":"`payload_too_large`: input over 500 characters."},"429":{"description":"`rate_limited`, `quota_exceeded`, or `concurrent_request`."},"503":{"description":"`not_available`, `service_unavailable` (box offline), or `service_busy`."},"504":{"description":"`timeout`."}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TranslitIn":{"properties":{"text":{"type":"string","maxLength":10000,"title":"Text","description":"Text to convert, at most 10,000 characters (code points) in any script. Longer text is rejected with 413 `payload_too_large`."},"direction":{"type":"string","enum":["auto","cyr2lat","lat2cyr",""],"title":"Direction","description":"`cyr2lat`, `lat2cyr`, or `auto` (lowercase, exact). An empty string means `auto`. Any other value is a 400 `invalid_request` and spends no quota.","default":"auto"}},"type":"object","required":["text"],"title":"TranslitIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}