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).

POSThttps://api.ana-yurt.dev/v1/audio/transcriptions

Bearer key with the asr scope. Runs on the GPU machine.

#Request body

multipart/form-data. A JSON body is refused with 400 invalid_request.

Form fields
NameTypeDescription
filerequiredfile

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_formatoptionalstring

json, text, verbose_json, srt or vtt.

Default: json

languageoptionalstring

crh, auto or empty. The API transcribes Crimean Tatar only, so every value gives the same result.

Default: ""

modeloptionalstring

Ignored. Accepted so OpenAI clients that always send it keep working.

Other fields, such as prompt or temperature, are ignored.

#Response

response_formatContent-TypeBody
jsonapplication/jsonText, duration and billed seconds.
verbose_jsonapplication/jsonAs json, plus language and timed segments.
texttext/plainOnly the transcript.
srttext/plainSubRip subtitles, one cue per segment.
vtttext/vttWebVTT subtitles, one cue per segment.
JSON response fields
FieldTypeDescription
textstringThe transcript, in the Latin alphabet.
durationnumberLength of the audio in seconds, as decoded by the model.
billed_secondsintegerSeconds charged to your quota: the duration rounded up.
modelstringThe recognition model, such as whisper-large-v3-crh-r5.
model_versionstring | nullModel checkpoint, such as r5-ck1898.
api_versionstringAlways v1.
taskstringverbose_json only. Always transcribe.
languagestringverbose_json only. Always crh: the API transcribes Crimean Tatar only and does not detect the language.
segments[]arrayverbose_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

StatusCodeWhen
400invalid_requestNot multipart, no file, an empty file, or an unknown response_format or language.
400invalid_audioThe model could not decode the audio.
401invalid_api_keyMissing, unknown, revoked or expired key.
403scope_not_allowedThe key has no asr scope. Also account_suspended.
413payload_too_largeFile over 25 MB, or a format without a length header over 1 MB.
413audio_too_longAudio longer than 5 minutes.
429concurrent_requestA recognition request of this account is already running, or the account is at its in-flight limit.
429rate_limitedThe per-minute limit is reached.
429quota_exceededNot enough recognition seconds left for this file.
502upstream_errorThe speech server failed. Retry.
503service_busyBoth recognition slots are in use. Retry after Retry-After.
503service_unavailableThe GPU machine is offline. Retry-After is 300 s.
504timeoutThe 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.

Request
curl https://api.ana-yurt.dev/v1/audio/transcriptions \
  -H "Authorization: Bearer $AY_API_KEY" \
  -F [email protected] \
  -F response_format=json
Response 200
{
  "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
}