Voice

Generate speech audio

Credit-gated ElevenLabs proxy. The text field is used for per-character credit charging and the full body is forwarded to ElevenLabs. Successful responses stream audio bytes back to the desktop.

post/v1/voice/text-to-speech/{voiceId}

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /v1/voice/text-to-speech/{voiceId}
  • Auth: HTTP bearer

Path parameters

voiceIdstring required

Voice id.

Example:21m00Tcm4TlvDq8ikWAM

ElevenLabs voice id.

Headers

Idempotency-Keystring required

Required stable key for metered POST retries. Reusing the same key for the same user, route, and method reuses the same credit reservation anchor.

Request body

model_idstring nullable

Optional ElevenLabs model id.

textstring required

Text to synthesize. Charged per Unicode character.

Example request

{
  "model_id": "eleven_multilingual_v2",
  "text": "Hello from Solomon AI.",
  "voice_settings": {
    "similarity_boost": 0.75,
    "stability": 0.5,
    "use_speaker_boost": true
  }
}

Response

Audio stream returned by ElevenLabs.

Changes

No operation changes recorded.