ElevenLabs SDK-compatible STT (file upload)
/el/v1/speech-to-textTranscribes an uploaded audio file with client.speechToText.convert(...).
Supported formats are WAV, MP3, FLAC, MP4/M4A, OGG, and WebM. Unsupported or
unreadable files return 422 indeterminate_audio_duration.
Use provider_options for provider-specific settings. You can also pass
supported options directly as query parameters. If both forms set the same
option, provider_options[<name>]=<value> takes precedence. Recognized enum
and boolean option values are case-insensitive and are normalized to each
provider's wire spelling; free-form values such as prompts, keyterms, and voice
IDs retain their original case.
Tenant key (ElevenLabs SDK convention).
In: header
Query Parameters
Comma-separated or repeated provider IDs in preferred order. Providers not listed remain eligible.
Comma-separated or repeated provider IDs. Only these providers may serve the request.
Comma-separated or repeated provider IDs that must not serve the request.
Set to false to prevent fallback to another provider. Automatic provider retries are not currently supported.
Provider-specific options in bracket notation, such as provider_options[encoding]=linear16. You can also pass supported options directly as query parameters. If both forms set the same option, the bracketed value takes precedence.
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Audio file and transcription options.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
import { open } from "node:fs/promises";const file = await open("call.wav");const form = new FormData();form.set("file", new Blob([await file.readFile()], { type: "audio/wav" }), "call.wav");form.set("model_id", "deepgram/nova-3");form.set("timestamps_granularity", "word");const response = await fetch("https://api.allmodels.io/el/v1/speech-to-text", { method: "POST", headers: { Authorization: `Bearer ${process.env.ALLMODELS_API_KEY}` }, body: form});if (!response.ok) throw new Error(`AllModels request failed: ${response.status}`);console.log(await response.json());import osimport requestswith open("call.wav", "rb") as audio: response = requests.post( "https://api.allmodels.io/el/v1/speech-to-text", headers={"Authorization": f"Bearer {os.environ['ALLMODELS_API_KEY']}"}, files={"file": ("call.wav", audio, "audio/wav")}, data={"model_id": "deepgram/nova-3", "timestamps_granularity": "word"}, timeout=120, )response.raise_for_status()print(response.json())curl -X POST https://api.allmodels.io/el/v1/speech-to-text \ -H "Authorization: Bearer $ALLMODELS_API_KEY" \ -F "file=@call.wav" \ -F "model_id=deepgram/nova-3" \ -F "timestamps_granularity=word"import { 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", timestampsGranularity: "word"});console.log(transcript.text);import osfrom elevenlabs.client import ElevenLabsclient = ElevenLabs( api_key=os.environ["ALLMODELS_API_KEY"], base_url="https://api.allmodels.io/el",)with open("call.wav", "rb") as audio: transcript = client.speech_to_text.convert( file=audio, model_id="scribe_v2", timestamps_granularity="word", )print(transcript.text){ "language_code": "en", "language_probability": 0.98, "text": "Hello from AllModels.", "words": [ { "text": "Hello", "start": 0, "end": 0.4, "type": "word" } ]}{ "detail": { "message": "invalid multipart body", "status": "invalid_multipart" }}{ "error": "missing_api_key"}{ "detail": { "message": "this organization has insufficient prepaid balance", "status": "insufficient_balance" }}{ "error": "tenant_disabled"}{ "detail": { "loc": [ "body", "file" ], "msg": "field required", "type": "value_error.missing" }}{ "detail": { "message": "provider 'example-provider' does not support file transcription", "status": "transcription_not_supported", "provider": "example-provider" }}{ "detail": { "message": "upstream text-to-speech request failed", "status": "upstream_error" }}ElevenLabs SDK-compatible streaming-input TTS (WebSocket) GET
Streams text into TTS with the ElevenLabs WebSocket protocol. Use it to start generating audio before all of the text is available. The request must include `Upgrade: websocket`.
ElevenLabs SDK-compatible realtime STT (WebSocket) GET
Streams audio and receives ElevenLabs-compatible transcript events with `client.speechToText.realtime.connect(...)`. The request must include `Upgrade: websocket`.
