Model ID
Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.
Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.
- Third-party
Eleven Sound Effects v3 generates sound effects up to 30 seconds long from a text description, with optional seamless looping.
| Model Info | |
|---|---|
| Terms and License | link ↗ |
| More information | link ↗ |
| Pricing |
|
const response = await env.AI.run(
'elevenlabs/eleven-text-to-sound-v3',
{ text: 'Heavy wooden door creaking open slowly in an empty stone hallway', duration_seconds: 4 },
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "elevenlabs/eleven-text-to-sound-v3",
"input": {
"text": "Heavy wooden door creaking open slowly in an empty stone hallway",
"duration_seconds": 4
}
}'{
"state": "Completed",
"result": {
"audio": "https://examples.aig.cloudflare.com/elevenlabs/eleven-text-to-sound-v3/door-creak.mp3"
}
}Rain Loop — Generate a seamless loop for background ambience
const response = await env.AI.run(
'elevenlabs/eleven-text-to-sound-v3',
{
text: 'Gentle rain on a tin roof with distant thunder',
duration_seconds: 8,
loop: true,
output_format: 'mp3_44100_128',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "elevenlabs/eleven-text-to-sound-v3",
"input": {
"text": "Gentle rain on a tin roof with distant thunder",
"duration_seconds": 8,
"loop": true,
"output_format": "mp3_44100_128"
}
}'{
"state": "Completed",
"result": {
"audio": "https://examples.aig.cloudflare.com/elevenlabs/eleven-text-to-sound-v3/rain-loop.mp3"
}
}text
stringrequiredminLength: 1Description of the sound effect to generate.duration_seconds
numberrequiredminimum: 0.5maximum: 30Length of the sound effect in seconds, from 0.5 to 30.loop
booleanCreate a sound effect that loops smoothly.prompt_influence
numberminimum: 0maximum: 1How closely to follow the prompt, from 0 to 1 (default 0.3). Higher is closer and less varied.output_format
stringenum: mp3_22050_32, mp3_24000_48, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, opus_48000_32, opus_48000_64, opus_48000_96, opus_48000_128, opus_48000_192Audio codec, sample rate and bitrate (default mp3_44100_128).audio
stringURL of the generated sound effect.