A transcription API is useful when you have too many recordings to transcribe by hand, such as team calls, interviews, webinars and customer voice messages. Send a file to receive the text, the recording language and timestamped words, optionally with speaker labels. This guide covers speech recognition through the API with the Scribe v2 model: a curl request, a Python script, video processing and converting a transcript into meeting minutes.
An overview of the whole audio API, including text to speech, voice changing, sound effects and music, is in the news post Audio API. This article is only about transcription.
What Scribe v2 is good for
Speech recognition supports several related tasks, each with different priorities:
- Calls and meetings. You need a readable dialogue split by participant, and then minutes: decisions, tasks, deadlines.
- Interviews and podcasts. Accurate text and timestamps matter, so you can quickly find a quote in the recording.
- Video. The transcript becomes the basis for subtitles, a video description or an article based on it.
- Voice messages. A bot or a support team receives audio, transcribes it and then works with the text.
- Recording archives. Transcribed files can be indexed and searched like ordinary documents.
For all of these scenarios, the catalog offers Scribe v2, ElevenLabs' speech recognition model for batch transcription of prerecorded material. According to ElevenLabs documentation, it recognizes more than 90 languages, distinguishes up to 32 speakers, timestamps every word and marks sound events such as laughter, applause and other non-speech sounds. ElevenLabs groups supported languages by recognition accuracy, so results depend on the recording language. All audio models in the catalog are listed in the audio model collection.
How to prepare the key and the file
Create an llmbox key in the cabinet's Keys section. The same key works with text models, so one script can handle both transcription and processing. Save the key in an environment variable:
export LLMBOX_API_KEY="sk-your-key"
Upload the recording as a file no larger than 90 MiB. Both audio and video are accepted, such as an MP3 from a voice recorder or an MP4 from a conferencing app. The video section below explains how to handle larger files.
How to send your first request with curl
The llmbox speech to text API uses the POST /v1/speech-to-text endpoint in the ElevenLabs format. Send the request as multipart/form-data, with the file and parameters in separate form fields. The model_id field is required; without it, the request fails.
curl -X POST https://llmbox.cc/v1/speech-to-text \
-H "xi-api-key: $LLMBOX_API_KEY" \
-F model_id=scribe_v2 \
-F file=@interview.mp3 \
-F language_code=en \
-F diarize=true
The key goes in the xi-api-key header, as it does on ElevenLabs; the Authorization: Bearer header also works. The other fields are optional:
language_code: the language of the recording. Without it, the model detects the language itself.diarize: speaker labeling. With it, every word in the response gets a speaker label.num_speakers: a hint about how many people are in the conversation.timestamps_granularity: the level of detail of the timestamps.tag_audio_events: marks for sound events such as laughter and applause.
What the response contains
The JSON response contains these main fields:
text: the whole transcript as one string;language_code: the language of the recording, either the one you set or the one the model detected;words: a list of words with start and end timestamps and, withdiarize, a speaker label as well;audio_duration_secs: the duration of the recording in seconds.
Use the text field when you only need plain text, such as a note, archive search or draft article. The words list supports everything else: dialogue grouped by speaker, precisely timed subtitles and links to specific moments in the recording. The audio_duration_secs field helps calculate the cost because transcription is billed by duration.
How to transcribe a recording in Python
In Python, you can use the official ElevenLabs SDK. Install it with pip install elevenlabs and set the llmbox base URL. Specify the URL without /v1; the SDK adds the path itself.
The script below sends a recording with speaker labeling and builds a readable dialogue from the word list. Each line starts with a timestamp, and speakers are numbered in order of appearance.
import os
from elevenlabs.client import ElevenLabs
client = ElevenLabs(base_url="https://llmbox.cc", api_key=os.environ["LLMBOX_API_KEY"])
with open("interview.mp3", "rb") as f:
result = client.speech_to_text.convert(
model_id="scribe_v2",
file=f,
language_code="en",
diarize=True,
)
names, lines, speaker, start, words = {}, [], None, 0.0, []
for w in result.words:
if w.type != "word":
continue
if w.speaker_id != speaker and words:
lines.append((start, speaker, " ".join(words)))
words = []
if not words:
speaker, start = w.speaker_id, w.start or 0.0
words.append(w.text)
if words:
lines.append((start, speaker, " ".join(words)))
for start, speaker, text in lines:
name = names.setdefault(speaker, f"Speaker {len(names) + 1}")
m, s = divmod(int(start), 60)
print(f"[{m:02d}:{s:02d}] {name}: {text}")
The script prints dialogue in the form "00:04 Speaker 2: ...". You can replace "Speaker 1" and "Speaker 2" with real names once you know who speaks first.
If your project already has speech recognition code in the OpenAI format, you do not need to change SDKs. Scribe v2 is also available at the /v1/audio/transcriptions path through the official openai SDK:
import os
from openai import OpenAI
client = OpenAI(base_url="https://llmbox.cc/v1", api_key=os.environ["LLMBOX_API_KEY"])
with open("interview.mp3", "rb") as f:
text = client.audio.transcriptions.create(model="scribe_v2", file=f, language="en")
print(text.text)
In this format, the response is returned as json, text or verbose_json; verbose_json includes timestamped words and segments. The full list of parameters for both formats is in the ElevenLabs-compatible API documentation page.
How to process video
You can send a video file with the same request used for audio because the endpoint accepts both types. The file must be no larger than 90 MiB. A long call recording often exceeds this limit, so extracting the audio track is usually easier. You can use ffmpeg:
ffmpeg -i meeting.mp4 -vn -ac 1 -c:a libmp3lame -b:a 64k meeting.mp3
The -vn flag drops the video track, -ac 1 mixes the sound down to mono, and -b:a 64k sets the MP3 bitrate. The resulting file is smaller than the original video. Compression does not affect the cost: transcription is billed by recording duration, not file size.
If the audio track still exceeds 90 MiB, split it into parts, for example 30 minutes each:
ffmpeg -i meeting.mp3 -f segment -segment_time 1800 -c copy part_%03d.mp3
Send each part in a separate request and join the text in order. Response timestamps are relative to the start of each part, so add an offset: 1800 seconds for the second part and 3600 for the third. Each part gets its own speaker labels, so verify the assignments where the parts meet.
Voice messages from messaging apps are sent the same way: the bot downloads the file and passes it in file. The guide An AI Telegram bot in 15 minutes: Python and one API key shows how to build a bot in Python. If a request with a file in an unusual container returns a 400 invalid_content error, convert the file to MP3 with the first ffmpeg command in this section.
How to process the transcript
Few people will read the raw transcript of an hour-long call in full. Pass it to a text model to prepare a summary, extract decisions and tasks, tag customer requests by topic or draft an article from an interview. The key stays the same; only the SDK changes, and text models use openai.
The following code extends transcribe.py: it sends the dialogue from the lines list to the model with an instruction.
from openai import OpenAI
llm = OpenAI(base_url="https://llmbox.cc/v1", api_key=os.environ["LLMBOX_API_KEY"])
transcript = "\n".join(f"{names[sp]}: {text}" for _, sp, text in lines)
resp = llm.chat.completions.create(
model="deepseek/deepseek-v4.1-flash",
messages=[
{"role": "system", "content": "Write meeting minutes: a short summary, decisions, and tasks with owners."},
{"role": "user", "content": transcript},
],
)
print(resp.choices[0].message.content)
For minutes and summaries, a model with a large context window works well: DeepSeek V4.1 Flash and Gemini 3.8 Flash both have 1M tokens, which is enough for a long transcript in a single request.
More examples of working with text models are in the guides DeepSeek API in Python: chat, streaming, JSON and functions and ChatGPT API in Python and curl: your first requests. They also show how to return a response that follows a JSON schema, so you can write the minutes directly to a task table without parsing the text manually.
Word timestamps are useful even without a text model. To build video subtitles, group several adjacent words into one line and use the first and last word for its start and end times. The same technique helps with recording archives: a phrase found in the text links directly to the corresponding point in the audio. If the archive is large and you need to search by meaning rather than exact words, you can turn transcripts into vectors; see the news post Embeddings: POST /v1/embeddings.
How to estimate the cost
Transcription is billed by the duration of the source recording. The number of words, speakers and enabled labels do not affect the price. The Scribe v2 rate and a calculator based on recording length in minutes are on the model page.
Text processing is billed separately according to the tokens used by the text model you choose. Enter the number of transcripts per day and the average text size in the calculator. The usage field in your first request shows the actual token count.
Charges are deducted from your balance based on actual usage, with no subscription. Both transcription and minutes requests appear in the cabinet's Logs section with their status and cost, so you can refine the budget using actual figures after the first few recordings.
Where to go next
The full description of the recognition parameters, error codes and Node examples is in the ElevenLabs-compatible API documentation page, and connecting the ElevenLabs and OpenAI SDKs is covered in OpenAI and ElevenLabs SDKs. To generate speech from a finished reply, see the audio model collection, which includes ElevenLabs text to speech models that work with the same key.
Questions
Can I send a video without processing it first?
Yes. The /v1/speech-to-text endpoint accepts audio and video files up to 90 MiB. If the video is larger, extract the audio track, for example with ffmpeg, and send that.
Do I need to specify the language of the recording?
It is optional. You can set the language with the language_code field or let the model detect it. The detected language is returned in the response's language_code field.
How many speakers can Scribe v2 distinguish?
According to ElevenLabs documentation, it can distinguish up to 32 speakers in one recording. Enable diarize to give every word in the response a speaker label and timestamps.
Will code written for the OpenAI SDK work?
Yes. Speech recognition also works through the /v1/audio/transcriptions path. Call client.audio.transcriptions.create with the scribe_v2 model and the llmbox base URL. The response formats are json, text and verbose_json.
What does the cost of a transcription depend on?
On the duration of the source recording, not on the number of words or speakers in it. The rate and a calculator are on the Scribe v2 model page, and the cost of each request is shown in the Logs section of the cabinet.
Published November 15, 2026


