Asosiy mazmunga oʻtish

Audio yozuvni matnga aylantiring

Yozuvni yuklang va uning matnini vaqt belgilangan segmentlar bilan oling.

Qanday ishlaydi

  1. 01

    Yozuvni multipart/form-data soʻrovining file maydoniga biriktiring.

  2. 02

    language ga yozuvdagi tilni koʻrsating va soʻrovni POST /api/v1/stt/transcribe ga yuboring.

  3. 03

    Matnni data.text dan, vaqtli segmentlarni esa data.segments dan oʻqing.

Autentifikatsiya

Kalitingizni Authorization: Bearer sifatida yuboring. Transkripsiya uchun stt:write ruxsati kerak.

Namuna

Toʻlov yozuv davomiyligi uchun soniyalik tarif boʻyicha, transkripsiyadan keyin yechiladi. Xuddi shu faylni qayta yuborish ikki marta hisoblanmasligi uchun Idempotency-Key yuboring.

cURL
curl -X POST "https://my.neuronai.uz/api/v1/stt/transcribe" \
  -H "Authorization: Bearer <your-api-key>" \
  -F "file=@/path/to/recording.mp3" \
  -F "language=uz"

API maʼlumotnomasi

Har bir endpoint uchun soʻrov maydonlari, javoblar, narxlar va kod namunalari hamda haqiqiy soʻrov yuboradigan shakl.

Faqat brauzeringizda saqlanadi.

STT

Speech-to-Text transcription.

POST
/v1/stt/transcribe

Bearer

Transcribe audio

Transcribes an audio file (`multipart/form-data`): `file` is MP3, WAV, OGG, FLAC, M4A or WebM, up to 25 MB, and `language` is one of the supported codes, or `auto` to have the language detected. Answers the text, the language (the detected one for `auto`), the duration, timestamped segments, the cost and your balance after the charge. Billed by the second of audio, settled on the actual duration after the transcription; the request is refused up front only when nothing is left of the balance or the key's spend limit. Pass an `Idempotency-Key` (at most 191 characters) to make retries safe. A transcription's key is remembered indefinitely, so reuse a key only for the same file.

Pricing
per second
Standard
1 credit
Parametrlar
Field Description
Idempotency-Key
header
string
Makes a retry safe: the same key again returns the original transcription instead of transcribing and charging again. At most 191 characters, scoped to your organization and kept indefinitely, so reuse a key only for the same file.
Soʻrov tanasi
multipart/form-data
MaydonTavsif
fileMajburiystring

At most 25 MB.

format: binary

languageMajburiystring

Ruxsat etilgan qiymatlar: "auto""uz""kaa""ru""en""kk""tk""tg""tr""az""ja""de""ko"

Javoblar
200
The transcription under `data`.
application/json
SarlavhaTavsif
Idempotency-Replayedstring`1` when the answer is a replay of an earlier request with the same `Idempotency-Key`.
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
MaydonTavsif
dataMajburiyTranscription
request_idMajburiystring

format: uuid

400
The `Idempotency-Key` is over 191 characters: `invalid_request`.
application/json
SarlavhaTavsif
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

401
The API key is missing or not recognized (`invalid_api_key`), revoked (`api_key_revoked`), disabled (`api_key_disabled`) or expired (`api_key_expired`).
application/json
SarlavhaX-Request-Id: string
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

402
Not enough balance (`insufficient_balance`), or the charge would pass this key's monthly spend limit (`spend_limit_exceeded`).
application/json
SarlavhaTavsif
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

403
The key lacks the permission this endpoint needs (`insufficient_permissions`), or the client IP is not in its allowlist (`ip_not_allowed`).
application/json
SarlavhaX-Request-Id: string
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

409
The `Idempotency-Key` was already used with a different body: `idempotency_conflict`.
application/json
SarlavhaTavsif
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

422
The request failed validation: `invalid_request`. `error.param` names the first invalid field and `error.message` gives its message; `error.fields` maps every invalid field, a nested one by its dotted path, to its first message.
application/json
SarlavhaTavsif
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

429
Too many requests: the per-minute rate limit is used up (`rate_limit_exceeded`), or this key or its organization already has as many requests in flight as it may (`concurrency_limit_exceeded`). Wait `Retry-After` seconds, then retry.
application/json
SarlavhaTavsif
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
X-RateLimit-ResetintegerWhen the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`.
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

500
Transcription failed: `transcription_failed`. Nothing is charged. Anything else that fails unexpectedly: `server_error`.
application/json
SarlavhaTavsif
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

default
Any other error, in the same envelope. For example `service_unavailable` (503) while the API is down for maintenance, or `input_too_large` (413) when the request body is larger than the server accepts.
application/json
SarlavhaTavsif
X-Request-IdstringIdentifies this request. A JSON body carries it as `request_id` too; quote it to support.
Retry-AfterintegerSeconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set.
X-RateLimit-LimitintegerThe requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.
X-RateLimit-RemainingintegerHow many of them are left this minute.
MaydonTavsif
errorMajburiyobject
request_idMajburiystring

The same ID as the `X-Request-Id` header.

format: uuid

Namunalar
cURL
curl -X POST "https://my.neuronai.uz/api/v1/stt/transcribe" \
  -H "Authorization: Bearer <your-api-key>" \
  -F "file=@/path/to/recording.mp3" \
  -F "language=uz"

Sinab koʻrish

Kalit bilan soʻrov yuborish uchun API kalitingizni yuqoridagi panelga kiriting.

multipart/form-data
file*
language*