Skip to content

Transcribe an audio recording

Upload a recording and get its text back, with timed segments.

How it works

  1. 01

    Attach the recording as the file field of a multipart/form-data request.

  2. 02

    Set language to the language spoken, and send the request to POST /api/v1/stt/transcribe.

  3. 03

    Read the text from data.text, and the timed segments from data.segments.

Authentication

Send your key as Authorization: Bearer. Transcription needs stt:write.

Example

You pay for the recording's length at the per-second rate, charged after the transcription. Send an Idempotency-Key, so a retry of the same file is never charged twice.

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 reference

Request fields, responses, prices and code samples for every endpoint, with a form that sends a real request.

Stored locally in your browser only.

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
Parameters
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.
Request body
multipart/form-data
FieldDescription
fileRequiredstring

At most 25 MB.

format: binary

languageRequiredstring

Allowed values: "auto""uz""kaa""ru""en""kk""tk""tg""tr""az""ja""de""ko"

Responses
200
The transcription under `data`.
application/json
HeaderDescription
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.
FieldDescription
dataRequiredTranscription
request_idRequiredstring

format: uuid

400
The `Idempotency-Key` is over 191 characters: `invalid_request`.
application/json
HeaderDescription
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.
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderX-Request-Id: string
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderDescription
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.
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderX-Request-Id: string
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderDescription
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.
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderDescription
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.
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderDescription
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`.
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderDescription
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.
FieldDescription
errorRequiredobject
request_idRequiredstring

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
HeaderDescription
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.
FieldDescription
errorRequiredobject
request_idRequiredstring

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

format: uuid

Examples
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"

Try it

Set your API key in the bar above to send authenticated requests.

multipart/form-data
file*
language*