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.

5 MinutesStep-by-StepComplete Example

4 Simple Steps

Follow these steps to generate your first video

1
Get Your API Key
Obtain your authentication credentials
1 minute

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_1234567890abcdef1234567890abcdef
Tip
Keep your API key secure and never expose it in client-side code.
2
Make Your First Request
Generate a video from text prompt
30 seconds

What 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
  }'
Tip
Start with the Fast model for quicker results and lower cost.
3
Check Generation Status
Monitor your video generation progress
1-2 minutes

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"
Tip
Generation typically takes 60-120 seconds depending on complexity.
4
Download Your Video
Get the download links for completed videos
10 seconds

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.mp4
Tip
Download URLs expire in 24 hours, so save your videos promptly.

Complete Bash Script

A complete shell script that demonstrates the entire workflow

Full Workflow Script
Copy and run this script to see the complete process in action
# 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
done

Requirements: 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

JavaScript (Node.js)
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();
Python
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

401 Unauthorized Error

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"
402 Insufficient Credits

You need more credits. Check your balance or upgrade your plan

# Check your credit balance in the dashboard
Generation Takes Too Long

Complex prompts take longer. Try simpler prompts or use the Fast model

"model": "veo-3.0-fast-generate-preview"
Task Not Found

Task IDs expire after 24 hours. Use the correct, recent task ID

# Save task IDs and use them promptly

What's Next?

Now that you've generated your first video, explore more advanced features

Explore Models
Learn about VEO 3.0 Generate vs Fast models and their capabilities
More Examples
Discover advanced usage patterns and integration examples
Credit System
Understand pricing, credit calculation, and cost optimization
Parameters
Master all available parameters for fine-tuned control
Error Handling
Build robust applications with proper error handling
SDKs & Tools
Use official SDKs and tools for faster development

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

Explore Models
Learn about VEO 3.0 Generate vs Fast models and their capabilities
More Examples
Discover advanced usage patterns and integration examples