AI Voiceover
POST /v1/ai/voiceover
Generate natural-sounding voiceovers from text using ElevenLabs voices. Choose from dozens of voices across multiple languages.
Models
| Model | Speed | Quality | Cost (per min) |
|---|---|---|---|
elevenlabs-flash | Fast (2-5s) | Good | $0.22 |
elevenlabs-hd | Medium (5-15s) | Highest | $0.28 |
Request
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The text to convert to speech |
model | string | No | elevenlabs-flash, elevenlabs-hd (default: elevenlabs-flash) |
voice | string | No | Voice ID or name (default: rachel) |
language | string | No | Language code, e.g., en, es, fr (default: en) |
speed | number | No | Speaking speed 0.5 to 2.0 (default: 1.0) |
stability | number | No | Voice stability 0 to 1 (default: 0.5) |
callback | string | No | Webhook URL |
Example
curl
curl -X POST https://api.vidiking.com/v1/ai/voiceover \
-H "Authorization: Bearer $VIDIKING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome to our product demo. Today we will walk you through the key features that make our platform stand out from the competition.",
"model": "elevenlabs-flash",
"voice": "rachel",
"language": "en",
"speed": 1.0
}'
Node.js
const voiceover = await client.ai.generateVoiceover({
text: 'Welcome to our product demo. Today we will walk you through the key features.',
model: 'elevenlabs-flash',
voice: 'rachel',
language: 'en',
speed: 1.0,
});
console.log('Audio URL:', voiceover.url);
console.log('Duration:', voiceover.duration, 'seconds');
Python
voiceover = client.ai.generate_voiceover(
text="Welcome to our product demo. Today we will walk you through the key features.",
model="elevenlabs-flash",
voice="rachel",
language="en",
speed=1.0,
)
print("Audio URL:", voiceover.url)
print("Duration:", voiceover.duration, "seconds")
Response
{
"id": "vo_abc123",
"url": "https://cdn.vidiking.com/ai/vo_abc123.mp3",
"duration": 8.5,
"model": "elevenlabs-flash",
"voice": "rachel",
"credits_used": 6,
"created_at": "2025-01-15T10:30:00Z"
}
Available Voices
| Voice ID | Name | Gender | Accent | Best For |
|---|---|---|---|---|
rachel | Rachel | Female | American | Narration, explainers |
adam | Adam | Male | American | Corporate, tutorials |
bella | Bella | Female | British | Storytelling, documentaries |
james | James | Male | British | News, presentations |
sofia | Sofia | Female | Spanish | Multilingual content |
marcus | Marcus | Male | American | Energetic, marketing |
aria | Aria | Female | American | Conversational, podcasts |
otto | Otto | Male | German | Technical, precise |
Use GET /v1/ai/voices to list all available voices.
curl https://api.vidiking.com/v1/ai/voices \
-H "Authorization: Bearer $VIDIKING_API_KEY"
Supported Languages
English, Spanish, French, German, Italian, Portuguese, Dutch, Polish, Swedish, Norwegian, Danish, Finnish, Japanese, Korean, Chinese (Mandarin), Hindi, Arabic, Turkish, Russian, and more.
curl -X POST https://api.vidiking.com/v1/ai/voiceover \
-H "Authorization: Bearer $VIDIKING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Bienvenidos a nuestra plataforma de video.",
"voice": "sofia",
"language": "es",
"speed": 0.9
}'
Speed Control
Adjust the speed parameter to control pacing.
| Speed | Effect |
|---|---|
0.5 | Very slow, deliberate |
0.75 | Slightly slow, clear enunciation |
1.0 | Natural pace (default) |
1.25 | Slightly fast |
1.5 | Fast, energetic |
2.0 | Very fast |
Using Voiceover in Video
Generate a voiceover and add it to a video timeline as an audio track.
// Generate voiceover
const vo = await client.ai.generateVoiceover({
text: 'This product will change how you work. Let me show you why.',
voice: 'marcus',
model: 'elevenlabs-hd',
});
// Use in video
const { jobId } = await client.render({
timeline: {
soundtrack: { src: vo.url, effect: 'fadeOut', volume: 1.0 },
tracks: [
{
clips: [
{
asset: { type: 'video', src: 'https://example.com/demo.mp4' },
start: 0,
length: vo.duration,
},
],
},
],
},
output: { format: 'mp4', resolution: 'hd' },
});