Transcribe an audio recording
Upload a recording and get its text back, with timed segments.
How it works
- 01
Attach the recording as the
filefield of amultipart/form-datarequest. - 02
Set
languageto the language spoken, and send the request toPOST /api/v1/stt/transcribe. - 03
Read the text from
data.text, and the timed segments fromdata.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.
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
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-Keyheader 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
| Field | Description |
|---|---|
fileRequiredstring | At most 25 MB. format: binary |
languageRequiredstring | Allowed values: |
Responses
| Header | Description |
|---|---|
Idempotency-Replayedstring | `1` when the answer is a replay of an earlier request with the same `Idempotency-Key`. |
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
| Field | Description |
|---|---|
dataRequiredTranscription | |
request_idRequiredstring | format: uuid |
| Header | Description |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
| Header | Description |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
| Header | Description |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
| Header | Description |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
| Header | Description |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
| Header | Description |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
| Header | Description |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The 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-Remaininginteger | How many of them are left this minute. |
| Field | Description |
|---|---|
errorRequiredobject | |
request_idRequiredstring | The same ID as the `X-Request-Id` header. format: uuid |
Examples
Try it
Set your API key in the bar above to send authenticated requests.
file*language*