Contents
Speech to text (transcription) guide
Speech to text (transcription) guide
POST /v1/audio/transcriptions is OpenAI-compatible: upload audio as multipart/form-data (or send base64 input_audio as JSON) and get text back. Transcription models include elevenlabs/scribe-v2 and elevenlabs/scribe-v2-medical. The live list is GET /v1/models?output_modalities=transcription. GET /v1/models returns text models only by default, so add ?output_modalities=transcription (or all) to list them.
/v1/audio/transcriptionsParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Transcription model id, e.g. elevenlabs/scribe-v2. |
| file | file | Yes | Audio file (multipart). Supported: wav, mp3, mp4, m4a, ogg, flac, webm, aac. Up to 25 MiB. JSON clients can send input_audio: {data: base64, format} instead. |
| response_format | string | No | json (default) returns {text}; verbose_json adds language, duration and segments/words. |
| language | string | No | Optional language hint such as en or zh. Leave empty to auto-detect. |
| prompt | string | No | Optional context text to help with names and terms. Not every model applies it. |
| timestamp_granularities[] | string[] | No | word and/or segment. Only applied with response_format=verbose_json; ignored otherwise. Word-level timestamps are not returned yet; segments are. |
Output formats
response_format accepts json or verbose_json only (text, srt and vtt are not supported). stream is not supported. The per-model audio limit is 60 seconds by default; longer audio returns 413 audio_too_long before processing and is not charged. Split longer recordings into segments.
Pricing
Transcription is billed per second of audio. The per-second price is on each model page under /models and in GET /v1/models as pricing.second (USD per second); the per-minute price is 60 × that value. The response usage shows the billed seconds and usage.cost the amount charged in USD.
Examples
curl https://api.bazaarlink.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $BAZAARLINK_API_KEY" \
-F model="elevenlabs/scribe-v2" \
-F file=@audio.mp3 \
-F response_format=verbose_json \
-F "timestamp_granularities[]=word"Common errors
| Status | Cause and fix |
|---|---|
| 400 | Invalid request: model or file missing, empty audio, response_format other than json/verbose_json, stream=true sent (unsupported_parameter), or a timestamp_granularities value other than word/segment. |
| 401 | Missing or invalid API key. |
| 402 | Insufficient credits. Top up and retry. |
| 413 | audio_too_large: decoded audio is over 25 MiB. audio_too_long: audio exceeds the per-model limit (60 seconds by default), is rejected before processing, and is not charged. Compress or split the audio. |
| 429 | Rate limit reached. Wait for the Retry-After header and retry. |
| 502 | The model service is temporarily unavailable or the audio transfer was interrupted. Retry; failed requests are not charged. |
Audio transcription
Use multipart/form-data model and file, or JSON model and input_audio:{data,format} (raw base64). Formats: wav, mp3, mp4, m4a, ogg, flac, webm, aac. Decoded audio: maximum 25 MiB; request body: 50 MiB for base64. audio.transcription_max_seconds_by_model sets the per-model limit, falling back to audio.transcription_max_seconds and then 60 seconds. Longer audio returns 413 audio_too_long before processing and is not charged. response_format: json or verbose_json only; timestamp_granularities word or segment requires verbose_json. stream is unsupported (400 unsupported_parameter); oversized audio: 413 audio_too_large. provider is ignored. Billing uses database model prices per usage.seconds or input/output token; per-minute price = 60 × per-second price. usage.cost is the customer charge in USD.
/v1/audio/transcriptions