Quick Start Guide
Generate your first video in just 5 minutes. This guide walks you through the complete process from API key to downloaded video.
4 Simple Steps
Follow these steps to generate your first video
What to do:
- Sign up at veo3gen.co if you haven't already
- Navigate to the API Keys section in your dashboard
- Click 'Create New Key' and give it a name
- Copy the generated API key securely
Code Example:
# Your API key will look like this:
veo3_1234567890abcdef1234567890abcdefWhat to do:
- Use curl or your preferred HTTP client
- Include your API key in the X-API-Key header
- Send a POST request to the text-to-video endpoint
- Include a descriptive prompt in the request body
Code Example:
curl -X POST "https://api.veo3gen.co/api/veo/text-to-video" \
-H "Content-Type: application/json" \
-H "X-API-Key: veo3_your_api_key_here" \
-d '{
"prompt": "A cat playing with a ball of yarn in a sunny garden",
"model": "veo-3.0-fast-generate-preview",
"durationSeconds": 8,
"generateAudio": true
}'What to do:
- Save the taskId from the response
- Poll the status endpoint every 10-15 seconds
- Wait for status to change to 'completed'
- Handle any errors if status becomes 'failed'
Code Example:
# Response from step 2:
{
"success": true,
"taskId": "veo_1703123456789_abc123def",
"status": "pending",
"estimatedWaitTime": "60-120 seconds",
"creditsUsed": 190
}
# Check status:
curl -X GET "https://api.veo3gen.co/api/veo/status/veo_1703123456789_abc123def" \
-H "X-API-Key: veo3_your_api_key_here"What to do:
- When status is 'completed', download URLs are available
- URLs are pre-signed and expire after 24 hours
- Download the video file(s) to your local system
- Videos are in MP4 format with optional audio
Code Example:
# Status response when completed:
{
"status": "completed",
"videos": [
{
"url": "https://storage.googleapis.com/veo3videosave/...",
"mimeType": "video/mp4",
"expiresAt": "2023-12-21T10:32:15.456Z"
}
]
}
# Download the video:
curl -L "https://storage.googleapis.com/veo3videosave/..." \
-o my_generated_video.mp4Complete Bash Script
A complete shell script that demonstrates the entire workflow
# Complete workflow example
#!/bin/bash
# Step 1: Generate video
RESPONSE=$(curl -s -X POST "https://api.veo3gen.co/api/veo/text-to-video" \
-H "Content-Type: application/json" \
-H "X-API-Key: veo3_your_api_key_here" \
-d '{
"prompt": "A serene lake surrounded by mountains at sunset",
"model": "veo-3.0-fast-generate-preview",
"durationSeconds": 8,
"generateAudio": true
}')
# Extract task ID
TASK_ID=$(echo $RESPONSE | jq -r '.taskId')
echo "Task ID: $TASK_ID"
# Step 2: Poll for completion
while true; do
STATUS_RESPONSE=$(curl -s -X GET "https://api.veo3gen.co/api/veo/status/$TASK_ID" \
-H "X-API-Key: veo3_your_api_key_here")
STATUS=$(echo $STATUS_RESPONSE | jq -r '.status')
echo "Status: $STATUS"
if [ "$STATUS" = "completed" ]; then
# Step 3: Download video
VIDEO_URL=$(echo $STATUS_RESPONSE | jq -r '.videos[0].url')
curl -L "$VIDEO_URL" -o "generated_video.mp4"
echo "Video downloaded as \"generated_video.mp4\""
break
elif [ "$STATUS" = "failed" ]; then
echo "Generation failed"
break
else
echo "Waiting for completion..."
sleep 15
fi
doneRequirements: bash, curl, jq (for JSON parsing)
Usage: Replace "veo3_your_api_key_here" with your actual API key
Language Examples
See how to implement the workflow in popular programming languages
const axios = require('axios');
async function generateVideo() {
try {
// Step 1: Start generation
const response = await axios.post('https://api.veo3gen.co/api/veo/text-to-video', {
prompt: 'A cat playing with a ball of yarn',
model: 'veo-3.0-fast-generate-preview',
durationSeconds: 8,
generateAudio: true
}, {
headers: {
'X-API-Key': 'veo3_your_api_key_here',
'Content-Type': 'application/json'
}
});
const taskId = response.data.taskId;
console.log('Task started:', taskId);
// Step 2: Wait for completion
let status = 'pending';
while (status === 'pending' || status === 'processing') {
await new Promise(resolve => setTimeout(resolve, 15000)); // Wait 15s
const statusResponse = await axios.get(`https://api.veo3gen.co/api/veo/status/${taskId}`, {
headers: { 'X-API-Key': 'veo3_your_api_key_here' }
});
status = statusResponse.data.status;
console.log('Status:', status);
if (status === 'completed') {
const videoUrl = statusResponse.data.videos[0].url;
console.log('Video ready:', videoUrl);
break;
}
}
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
generateVideo();import requests
import time
import json
def generate_video():
# Step 1: Start generation
response = requests.post(
'https://api.veo3gen.co/api/veo/text-to-video',
headers={
'X-API-Key': 'veo3_your_api_key_here',
'Content-Type': 'application/json'
},
json={
'prompt': 'A cat playing with a ball of yarn',
'model': 'veo-3.0-fast-generate-preview',
'durationSeconds': 8,
'generateAudio': True
}
)
result = response.json()
task_id = result['taskId']
print(f'Task started: {task_id}')
# Step 2: Wait for completion
while True:
status_response = requests.get(
f'https://api.veo3gen.co/api/veo/status/{task_id}',
headers={'X-API-Key': 'veo3_your_api_key_here'}
)
status_data = status_response.json()
status = status_data['status']
print(f'Status: {status}')
if status == 'completed':
video_url = status_data['videos'][0]['url']
print(f'Video ready: {video_url}')
break
elif status == 'failed':
print('Generation failed')
break
else:
time.sleep(15) # Wait 15 seconds
if __name__ == '__main__':
generate_video()Common Issues
Quick fixes for problems you might encounter
Check that your API key is correct and included in the X-API-Key header
-H "X-API-Key: veo3_your_actual_api_key_here"You need more credits. Check your balance or upgrade your plan
# Check your credit balance in the dashboardComplex prompts take longer. Try simpler prompts or use the Fast model
"model": "veo-3.0-fast-generate-preview"Task IDs expire after 24 hours. Use the correct, recent task ID
# Save task IDs and use them promptlyWhat's Next?
Now that you've generated your first video, explore more advanced features
Important Notes
- API keys should be kept confidential and used in server-side applications.
- Generation times can vary based on model complexity and server load.
- Download URLs are signed and expire after 24 hours. Don't link directly to them.
What's Next?
Now that you've generated your first video, explore more advanced features