Endpoints
Speech recognition
Transcribe Crimean Tatar speech into Latin-script text. The request and response follow OpenAI’s audio/transcriptions, so the OpenAI SDKs work unchanged (see OpenAI SDK compatibility).
https://api.ana-yurt.dev/v1/audio/transcriptionsBearer key with the asr scope. Runs on the GPU machine.
#Request body
multipart/form-data. A JSON body is refused with 400 invalid_request.
| Name | Type | Description |
|---|---|---|
filerequired | file | The audio. Up to 25 MB and 5 minutes. WAV, MP3, FLAC, OGG/Opus and M4A are measured from the file header before the call. WebM and other formats without a length header are accepted up to 1 MB. |
response_formatoptional | string |
Default: |
languageoptional | string |
Default: |
modeloptional | string | Ignored. Accepted so OpenAI clients that always send it keep working. |
Other fields, such as prompt or temperature, are ignored.
#Response
| response_format | Content-Type | Body |
|---|---|---|
json | application/json | Text, duration and billed seconds. |
verbose_json | application/json | As json, plus language and timed segments. |
text | text/plain | Only the transcript. |
srt | text/plain | SubRip subtitles, one cue per segment. |
vtt | text/vtt | WebVTT subtitles, one cue per segment. |
| Field | Type | Description |
|---|---|---|
text | string | The transcript, in the Latin alphabet. |
duration | number | Length of the audio in seconds, as decoded by the model. |
billed_seconds | integer | Seconds charged to your quota: the duration rounded up. |
model | string | The recognition model, such as whisper-large-v3-crh-r5. |
model_version | string | null | Model checkpoint, such as r5-ck1898. |
api_version | string | Always v1. |
task | string | verbose_json only. Always transcribe. |
language | string | verbose_json only. Always crh: the API transcribes Crimean Tatar only and does not detect the language. |
segments[] | array | verbose_json only. Each item has id, start and end (seconds), and text. |
#Response headers
X-AY-Audio-Seconds (seconds billed), X-Quota-Remaining-seconds, X-AY-Model, X-AY-Model-Version, and the rate limit headers.
#Limits and billing
- Billed in seconds of input audio, rounded up, against the plan’s recognition quota.
- One recognition request per account at a time; a second one gets
429 concurrent_request. - The call is synchronous. The API waits up to 90 seconds for the model, then answers
504 timeout(not charged). - Typical latency for a short clip is 1 to 4 seconds.
#Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Not multipart, no file, an empty file, or an unknown response_format or language. |
| 400 | invalid_audio | The model could not decode the audio. |
| 401 | invalid_api_key | Missing, unknown, revoked or expired key. |
| 403 | scope_not_allowed | The key has no asr scope. Also account_suspended. |
| 413 | payload_too_large | File over 25 MB, or a format without a length header over 1 MB. |
| 413 | audio_too_long | Audio longer than 5 minutes. |
| 429 | concurrent_request | A recognition request of this account is already running, or the account is at its in-flight limit. |
| 429 | rate_limited | The per-minute limit is reached. |
| 429 | quota_exceeded | Not enough recognition seconds left for this file. |
| 502 | upstream_error | The speech server failed. Retry. |
| 503 | service_busy | Both recognition slots are in use. Retry after Retry-After. |
| 503 | service_unavailable | The GPU machine is offline. Retry-After is 300 s. |
| 504 | timeout | The model did not finish within 90 seconds. |
Long recordings
Cut recordings longer than 5 minutes into parts, ideally at pauses, and send them one after the other. Shift each part’s segment times by its offset to build one subtitle file.
curl https://api.ana-yurt.dev/v1/audio/transcriptions \
-H "Authorization: Bearer $AY_API_KEY" \
-F [email protected] \
-F response_format=json{
"api_version": "v1",
"model": "whisper-large-v3-crh-r5",
"model_version": "r5-ck1898",
"text": "Selâm! Bugün hava pek güzel.",
"duration": 2.424,
"billed_seconds": 3
}