apicheats.dev elevenlabs/llms.txt Raw .md
POST

/v1/text-to-voice/design

ElevenLabs API

Design A Voice.

Base URL
https://api.elevenlabs.io
Auth
xi-api-key: <ELEVENLABS_API_KEY>
Last verified
2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 214 tokens · Vary: Accept

Critical gotchas

Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.

Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.

cURL

curl -X POST 'https://api.elevenlabs.io/v1/text-to-voice/design?output_format=mp3_22050_32' \  -H "xi-api-key: $ELEVENLABS_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "voice_description": "string",  "model_id": "eleven_multilingual_ttv_v2",  "text": "string",  "auto_generate_text": false,  "loudness": 0.5,  "seed": 0,  "guidance_scale": 5,  "stream_previews": false,  "should_enhance": false,  "remixing_session_id": "string",  "remixing_session_iteration_id": "string",  "quality": 0,  "reference_audio_base64": "string",  "prompt_strength": 0}'
Get a free ElevenLabs API key → sponsored

Parameters

Name In Type Required Description
output_format query string No Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
voice_description body string Yes Description to use for the created voice.
model_id body string No Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3.
text body string No Text to generate, text length has to be between 100 and 1000.
auto_generate_text body boolean No Whether to automatically generate a text suitable for the voice description.
loudness body number No Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS.
seed body integer No Random number that controls the voice generation. Same seed with same inputs produces same voice.
guidance_scale body number No Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.
stream_previews body boolean No Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.
should_enhance body boolean No Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
remixing_session_id body string No The remixing session id.
remixing_session_iteration_id body string No The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created.
quality body number No Higher quality results in better voice output but less variety.
reference_audio_base64 body string No Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model.
prompt_strength body number No Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model.

Response 200 OK

{
  "previews": [
    {
      "audio_base_64": "string",
      "generated_voice_id": "string",
      "media_type": "string",
      "duration_secs": 0,
      "language": "string"
    }
  ],
  "text": "string"
}