Skip to content

Transcribe a recording

POST
/ai/audio/transcribe
curl --request POST \
--url https://ai.work.optidata.cloud/api/ai/audio/transcribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file \
--form language=en

Uploads a short audio recording and returns its transcription in the same response. Common audio formats are accepted (for example mp3, m4a, wav, webm); the file extension must match the content.

The spoken language defaults to Portuguese (pt); pass language for anything else.

Media typemultipart/form-data
object
file
required

The audio recording.

string format: binary
language

Spoken language as an ISO-639-1 code. Defaults to pt.

string

The transcription.

Media typeapplication/json
object
id
required

Id of this transcription response.

string
text
required

The full text.

string | null
status
required

State of a transcription.

string
Allowed values: queued processing completed failed
language

Detected or requested language code, when known.

string | null
duration_seconds

Length of the recording, when known.

integer | null
words

Each word with its timing (milliseconds) and confidence, when available.

Array<object> | null
object
key
additional properties
any
utterances

Speaker turns, when available.

Array<object> | null
object
key
additional properties
any
Examples
Exampletranscribed
{
"id": "a305087d-5130-48b3-907c-098439fa7c1a",
"text": "Good morning, team. Today we review the release plan.",
"status": "completed",
"language": null,
"duration_seconds": null,
"words": [],
"utterances": []
}

No authentication key was sent.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Exampleexpired
{
"error": "JWT passport expired: Passport expired"
}

No file was sent.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
ExamplemissingFile
{
"message": "The file field is required.",
"errors": {
"file": [
"The file field is required."
]
}
}