Skip to content

ElevenLabs

ElevenLabs offers advanced text-to-speech services, enabling high-quality voice synthesis in multiple languages.

Endpoint

https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/elevenlabs

Prerequisites

When making requests to ElevenLabs, ensure you have the following:

  • Your AI Gateway Account ID.
  • Your AI Gateway gateway name.
  • An active ElevenLabs API token.
  • The model ID of the ElevenLabs voice model you want to use.

Example

cURL

Request
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/elevenlabs/v1/text-to-speech/JBFqnCBsd6RMkjVDRZzb?output_format=mp3_44100_128 \
--header 'Content-Type: application/json' \
--header 'xi-api-key: {elevenlabs_api_token}' \
--data '{
"text": "Welcome to Cloudflare - AI Gateway!",
"model_id": "eleven_multilingual_v2"
}'