Extend Video
Videos
Extend Video
Extend videos using AI to continue and extend your content seamlessly
POST
Extend Video
Try it out! Use the API playground on the right to test the Extend Video endpoint directly.
Overview
Extend Video uses AI (Veo 3.1) to intelligently continue and extend your videos. Perfect for:- Creating longer content from short clips
- Generating smooth video continuations
- Extending storytelling sequences
- Producing extended versions of marketing videos
- Automating video length optimization
Extensions are generated in segments of 4-8 seconds each. The AI analyzes the last frame of your video and generates a seamless continuation based on your prompt.
Endpoint
Required Fields
Media ID of the video to extend (as a string)
Describe how the AI should continue the video (1-2000 characters)Example: “The camera continues to zoom out, revealing a cityscape at sunset with birds flying across the sky”
Optional Fields
Custom name for the project (max 100 characters)
Total duration to extend in seconds (4-60 seconds, must be multiple of 4)
- Minimum: 4 seconds
- Maximum: 60 seconds
- Default: 4 seconds
Whether to generate audio for the extended portion
Webhook URL for status notifications (max 500 characters, must be HTTPS)
Custom metadata object (max 5KB JSON)
Request Examples
Basic Video Extension
Extended Duration with Webhook
Multiple Extensions
Response
Webhook Notification
When your extended video is ready, we’ll POST to your webhook URL (if configured):Webhook Payload
How It Works
Best Practices
Clear Prompts
Describe the continuation clearly and specifically for best results
Match Style
Reference the visual style of your source video in the prompt
Realistic Durations
Start with 8-16 seconds to ensure quality, then scale up
Audio Consistency
Enable generateAudio for better continuity with the source
Prompt Writing Tips
Good Prompts
✅ “The camera continues to pan right, revealing a mountain range at golden hour with soft clouds drifting across the sky” ✅ “The dancer spins gracefully as the lighting shifts from warm orange to cool blue” ✅ “The product rotates smoothly on the pedestal while particles float upward in the background”Avoid
❌ “Continue the video” (too vague) ❌ “Make it longer” (no direction) ❌ “Add random stuff” (unclear intent)Error Handling
| Error | Description | Solution |
|---|---|---|
media: A video is required | Missing or invalid media ID | Provide a valid video media ID |
Media not found | Media ID doesn’t exist | Check that the media ID is correct and exists |
Media is not a video | Media is not a video type | Ensure the media ID points to a video, not an image |
prompt: Prompt is required | Missing prompt | Provide a descriptive prompt for the extension |
targetDuration: Target duration must be at least 4 seconds | Duration too short | Use minimum 4 seconds |
targetDuration: Target duration cannot exceed 60 seconds | Duration too long | Use maximum 60 seconds |
aspectRatio: Invalid enum value | Invalid aspect ratio | Use ratio_9_16, ratio_16_9, or ratio_1_1 |
Not enough credits | Insufficient credits | Top up your account credits |
Processing Time
Extension processing time varies based on:- Target Duration: Longer extensions take more time (each 8-second segment ~2-3 minutes)
- Audio Generation: Enabling audio adds processing time
- Queue Load: Peak times may have longer waits
- 8 seconds: 2-3 minutes
- 16 seconds: 4-6 minutes
- 32 seconds: 8-12 minutes
- 60 seconds: 15-20 minutes
Next Steps
List Videos
View all your created videos
Video Details
Check your video processing status
Webhooks Guide
Learn how to handle webhook notifications
Examples
See more extend video examples
Authorizations
Body
application/json
Media ID from uploaded video
Describe how the AI should continue the video
Required string length:
1 - 2000Total duration to extend in seconds (must be multiple of 4)
Required range:
4 <= x <= 60Whether to generate audio for the extended portion
Custom name for the project
Maximum string length:
100HTTPS URL for status notifications (max 500 characters)
Maximum string length:
500Custom metadata object (max 5KB)