BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
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.

POST/v1/audio/transcriptions

Parameters

ParameterTypeRequiredDescription
modelstringYesTranscription model id, e.g. elevenlabs/scribe-v2.
filefileYesAudio 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_formatstringNojson (default) returns {text}; verbose_json adds language, duration and segments/words.
languagestringNoOptional language hint such as en or zh. Leave empty to auto-detect.
promptstringNoOptional context text to help with names and terms. Not every model applies it.
timestamp_granularities[]string[]Noword 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

StatusCause and fix
400Invalid 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.
401Missing or invalid API key.
402Insufficient credits. Top up and retry.
413audio_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.
429Rate limit reached. Wait for the Retry-After header and retry.
502The model service is temporarily unavailable or the audio transfer was interrupted. Retry; failed requests are not charged.

Full parameter reference: Audio transcription

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.

POST/v1/audio/transcriptions
curl https://api.bazaarlink.ai/v1/audio/transcriptions \
  -H "$BAZAARLINK_AUTH_HEADER" \
  -F model="<transcription-model-id>" \
  -F file=@audio.wav \
  -F response_format=json

curl https://api.bazaarlink.ai/v1/audio/transcriptions \
  -H "$BAZAARLINK_AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"model":"<transcription-model-id>","input_audio":{"data":"<raw-base64-audio>","format":"wav"},"response_format":"verbose_json","timestamp_granularities":["word","segment"]}'
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
Speech to text (transcription) guide | BazaarLink