ElevenLabs transcription
Transcribe audio files with the official ElevenLabs JavaScript or Python SDK.
Set the ElevenLabs client's base URL to https://api.allmodels.io/el, then upload audio with speechToText.convert() or speech_to_text.convert().
Transcribe a file
https://api.allmodels.io/el/v1/speech-to-textElevenLabsimport { File } from "node:buffer";
import { readFile } from "node:fs/promises";
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({
apiKey: process.env.ALLMODELS_API_KEY,
baseUrl: "https://api.allmodels.io/el"
});
const bytes = await readFile("call.wav");
const transcript = await client.speechToText.convert({
file: new File([bytes], "call.wav", { type: "audio/wav" }),
modelId: "scribe_v2",
languageCode: "en",
timestampsGranularity: "word"
});
console.log(transcript.text);Transcription options
| Field | Description |
|---|---|
file | WAV, MP3, FLAC, MP4/M4A, OGG, or WebM audio. |
model_id | Model name or accepted alias. |
language_code | Expected language code. |
timestamps_granularity | none, word, or character, where supported. |
diarize | Request speaker diarization where supported. |
The response shape follows the ElevenLabs SDK types. Read transcript.text for the full transcript and inspect transcript.words when the selected model returns timestamps.
Select a provider
Submit provider preferences through the SDK request. JavaScript adds them to the request query; Python adds them to the multipart request body.
const transcript = await client.speechToText.convert({
file,
modelId: "scribe_v2",
timestampsGranularity: "word"
}, {
queryParams: {
provider: { only: ["elevenlabs"] }
}
});The JavaScript SDK validates batch transcription model IDs before sending the request, so use an SDK-recognized ID such as scribe_v2 there. The Python SDK accepts canonical AllModels model names such as deepgram/nova-3.
For live microphones or calls, use the ElevenLabs realtime guide. See the file transcription API reference for every request field.
