Skip to main content
⚠️ This documentation is for legacy custom API, not recommendedThe newer legacy-route entry is Veo-3.1 Best Practices, but the Veo-3.1 legacy route has been temporarily unavailable since May 14, 2026. Pause new production integrations based on the legacy VEO custom API. If you need a currently available Veo 3.1 video route, use Veo 3.1 Official API Forwarding.

Prompt Writing Guide

Writing high-quality prompts is key to obtaining excellent videos. Below are detailed explanations of each element:

Prompt Structure

Clearly describe the main object or character in the videoGood examples:
  • “An orange kitten”
  • “A young girl in a red dress”
  • “A silver sports car”
Avoid:
  • “Something”
  • “Some animals”

Excellent Prompt Examples

Prompt Enhancement Feature

Enabling enhance_prompt allows AI to automatically optimize your prompt, improving generation quality

When to Use Prompt Enhancement

Recommended

  • First-time API usage
  • Simple prompts
  • Want better results
  • Unsure how to describe

Can Disable

  • Need precise control
  • Already have comprehensive prompts
  • Specific style requirements
  • Technical descriptions

Using Reference Images

Image Requirements

Usage Tips

1

Choose High-Quality Images

Use clear, high-resolution images as references
2

Maintain Consistent Style

Multiple images should maintain visual style consistency
3

Prioritize Relevance

Select reference images most relevant to the target video
4

Avoid Conflicts

Image content should not conflict with text descriptions

Polling Strategy

Polling Parameter Recommendations

  • Initial interval: 5 seconds
  • Max interval: 60 seconds
  • Backoff factor: 1.5
  • Max wait: 30 minutes

Error Handling

Retry Strategy

Common Error Handling

Performance Optimization

Batch Processing

When generating multiple videos, batch processing is recommended:

Resource Management

Note concurrency limit: Maximum 10 tasks simultaneously

Cost Optimization

Model Selection Strategy

Testing Recommendations

Use veo3 or veo3-fast for testing during development, select appropriate models for production based on needs

Monitoring and Logging

Monitoring Metrics

  • Task success rate
  • Average generation time
  • API response time
  • Error rate statistics
  • Cost tracking