Audio transcription API

Turn speech into text with the Pendra API. Upload a WAV, MP3 or FLAC file and get back text or SRT and WebVTT subtitles.

POST /api/v1/audio/transcriptions
New to transcription? Start with the Audio transcription guide. This page is the field-by-field reference.

Upload an audio file as a multipart form. The endpoint also answers at /v1/audio/transcriptions.

  • Files can be up to 25 MB. A bigger one gets a 413.
  • Send wav, mp3 or flac. The format is read from the file itself, not its name, and any other format gets a 400.
Body multipart/form-data
file file Required
The audio file, in wav, mp3 or flac.
model string Required
A transcription model, such as whisper-large-v3-turbo.
language string
The spoken language as an ISO 639-1 code, such as en or cy. Setting it improves accuracy.
prompt string
Words to expect, such as names and acronyms, so they're spelled right throughout the recording. Keep it to a short list. Only the last 150 English words or so are used.
temperature number default: 0
Leave at 0 for the most accurate transcript. Raise it only if a transcript gets stuck repeating itself. Above 0, beam_size has no effect. At 0.5 or above, prompt is ignored.
beam_size integer default: 5
From 1 to 8. Higher is more accurate but slower. 1 is the fastest.
response_format string default: json
json, text, srt, vtt or verbose_json. See Response.
timestamp_granularities string[]
["segment"], ["word"] or both. Only with verbose_json.

Response

The shape depends on response_format:

FormatReturns
jsonThe default. { "text": "..." }
textThe transcript as plain text.
srtSubtitles in SRT format.
vttSubtitles in WebVTT format.
verbose_jsonThe text plus language, duration and timed segments.

A verbose_json reply looks like this:

{
  "task": "transcribe",
  "language": "en",
  "duration": 12.48,
  "text": "We're starting the meeting now. First item on the agenda is the Q3 forecast.",
  "segments": [
    { "id": 0, "start": 0.0, "end": 4.2, "text": "We're starting the meeting now.", "avg_logprob": -0.21, "no_speech_prob": 0.01 },
    { "id": 1, "start": 4.2, "end": 12.48, "text": "First item on the agenda is the Q3 forecast.", "avg_logprob": -0.18, "no_speech_prob": 0.02 }
  ]
}

The JSON formats also have a pendra field naming the worker that ran the request. Every format sends it in the X-Worker-Id and X-Worker-Name headers. See Which worker served a request.

Subtitles

Set response_format to srt or vtt and the reply is the subtitle file itself:

1
00:00:00,000 --> 00:00:04,200
We're starting the meeting now.

2
00:00:04,200 --> 00:00:12,480
First item on the agenda is the Q3 forecast.
curl https://api.pendra.ai/api/v1/audio/transcriptions \
  -H "Authorization: Bearer pdr_sk_..." \
  -F file=@meeting.mp3 \
  -F model=whisper-large-v3-turbo \
  -F response_format=srt

Models

Every worker can run transcription. whisper-large-v3-turbo is fast and a good default. whisper-large-v3 is the most accurate. To see every transcription model, call /models?type=transcription.