APIMaster.ai

APIMaster ElevenLabs API

Use an APIMaster API key in the `Authorization: Bearer` header. These endpoints are under `/v1/elevenlabs` on APIMaster. The parameter references link to ElevenLabs.

Use an APIMaster API key in the Authorization: Bearer header. These endpoints are under /v1/elevenlabs on APIMaster. The parameter references link to ElevenLabs.

Upload a local file to the metered endpoints. Remote audio URLs and transcription webhooks are unavailable. Voice Design requires explicit preview text of at least 100 characters. Music and sound effects require a duration. Realtime conversation uses the APIMaster WebSocket, which handles upstream credentials. Send response.create after committing audio and wait for response.done.

Models and endpoints

Capability Model IDs Upstream endpoint Key parameters
Speech and dialogue eleven_v4, eleven_v4_turbo, eleven_v3, eleven_v3_conversational, eleven_multilingual_v2, eleven_flash_v2_5, eleven_flash_v2, eleven_turbo_v2_5, eleven_turbo_v2 POST /v1/elevenlabs/text-to-speech/{voice_id} · POST /v1/elevenlabs/text-to-dialogue text · model_id · voice_settings · language_code · output_format · inputs[].voice_id · inputs[].text
File transcription scribe_v3, scribe_v2, scribe_v2_medical POST /v1/elevenlabs/speech-to-text model_id · file · language_code · diarize · timestamps_granularity · keyterms · transcript_edit
Realtime transcription scribe_v3_live, scribe_v2_realtime WSS /v1/elevenlabs/speech-to-text/realtime model_id · audio_format · commit_strategy · audio_base_64 · commit
Voice changer eleven_multilingual_sts_v2, eleven_english_sts_v2 POST /v1/elevenlabs/voice-changer/{voice_id} audio · model_id · remove_background_noise · voice_settings · output_format
Voice design eleven_ttv_v3, eleven_multilingual_ttv_v2 POST /v1/elevenlabs/text-to-voice/design model_id · voice_description · text · guidance_scale · seed
Sound effects eleven_text_to_sound_v3, eleven_text_to_sound_v2 POST /v1/elevenlabs/sound-generation model_id · text · duration_seconds · loop · prompt_influence
Music music_v2_5, music_v2, music_v1 POST /v1/elevenlabs/music model_id · prompt · composition_plan · music_length_ms · force_instrumental
Realtime conversation eleven_realtime_v1_mini, eleven_realtime_v1_max WSS /v1/elevenlabs/realtime model · input_audio_buffer.append · response.create
Dubbing dubbing_v2, dubbing_v1 POST /v1/elevenlabs/dubbing/project model_id · file · source_language · target_language · project_id

Parameters and responses

  • For speech, voice_id selects the voice and model_id selects the synthesis model. language_code sets the language and voice_settings adjusts delivery. For dialogue, each inputs entry supplies its own text and voice ID.
  • For file transcription, upload audio with file. Use diarize for speaker labels and timestamps_granularity for timestamp detail. For realtime transcription, send Base64 PCM chunks, commit a segment with commit, and wait for committed_transcript.
  • Voice Changer preserves the original delivery and uses voice_id for the target voice. Voice Design returns three previews. Provide at least 100 characters in text.
  • For sound effects, duration_seconds accepts 0.5–30 seconds. For music, use either prompt or composition_plan. With prompt, use music_length_ms to set the duration and force_instrumental for music without vocals.
  • Dubbing first returns a project_id. Poll the project and language target and download outputs.lossless_audio once complete.

Examples

curl https://apimaster.ai/v1/elevenlabs/text-to-speech/JBFqnCBsd6RMkjVDRZzb \
  -H "Authorization: Bearer $APIMASTER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model_id":"eleven_v4","text":"Hello from ElevenLabs."}' \
  --output speech.mp3

curl https://apimaster.ai/v1/elevenlabs/speech-to-text \
  -H "Authorization: Bearer $APIMASTER_API_KEY" \
  -F 'model_id=scribe_v3' -F 'file=@speech.mp3' \
  -F 'diarize=true' -F 'timestamps_granularity=word'

curl https://apimaster.ai/v1/elevenlabs/music \
  -H "Authorization: Bearer $APIMASTER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model_id":"music_v2_5","prompt":"Soft piano jingle","music_length_ms":3000,"force_instrumental":true}' \
  --output jingle.mp3

curl https://apimaster.ai/v1/elevenlabs/dubbing/project \
  -H "Authorization: Bearer $APIMASTER_API_KEY" \
  -F 'model_id=dubbing_v2' -F 'file=@speech.mp3' \
  -F 'source_language=en' -F 'target_language=es'

curl "https://apimaster.ai/v1/elevenlabs/dubbing/project/$PROJECT_ID" \
  -H "Authorization: Bearer $APIMASTER_API_KEY"

curl "https://apimaster.ai/v1/elevenlabs/dubbing/project/$PROJECT_ID/language/$LANGUAGE_ID" \
  -H "Authorization: Bearer $APIMASTER_API_KEY"

Request formats and limits

Send synthesis, dialogue, voice design, sound effects, and music as application/json up to 4 MiB. Put output_format in the query string. Multi-speaker dialogue accepts eleven_v4 and eleven_v3. Append /stream to the synthesis, dialogue, voice changer, music, or audio isolation endpoint to read the response in chunks.

Uploads use multipart/form-data with one file. Use audio for voice changing and isolation, and file for transcription, alignment, stem separation, and dubbing. For raw mono 16 kHz 16-bit little-endian PCM, use file_format=pcm_s16le_16.

Music must be 3,000–600,000 milliseconds long. Supply music_length_ms with prompt. With composition_plan, set duration_ms on each segment and keep section durations fixed.

Realtime conversation example

Install websocket-client, set APIMASTER_API_KEY, and run this example. Send input after session.created. Play the audio as response.audio.delta or response.output_audio.delta events arrive. Read the turn status and usage from response.done.

import json
import os
from urllib.parse import urlsplit, urlunsplit

from websocket import create_connection

base = urlsplit("https://apimaster.ai/v1")
url = urlunsplit(("wss", base.netloc, base.path.rstrip("/") + "/elevenlabs/realtime",
                  "model=eleven_realtime_v1_mini", ""))
socket = create_connection(
    url, header={"Authorization": "Bearer " + os.environ["APIMASTER_API_KEY"]},
    timeout=30,
)
try:
    assert json.loads(socket.recv())["type"] == "session.created"
    socket.send(json.dumps({
        "type": "conversation.item.create",
        "item": {"type": "message", "role": "user",
                 "content": [{"type": "input_text", "text": "Say hello."}]},
    }))
    socket.send(json.dumps({"type": "response.create"}))
    while True:
        event = json.loads(socket.recv())
        if event["type"] == "error":
            raise RuntimeError(event["error"])
        if event["type"] == "response.done":
            print(event["response"]["status"], event["response"].get("usage"))
            break
finally:
    socket.close()

Standalone audio endpoints

Billing and compatibility

Speech is metered by characters. Transcription, voice conversion, dubbing, music and effects have separate duration-based units. Realtime conversations meter both connected minutes and tokens. Voice Design charges credits once for the preview text covering three samples. ElevenLabs plans to remove music_v1 on 2027-01-31 and eleven_text_to_sound_v2 on 2027-03-01.

Official pricing