Appearance
Extend Veo3.1 Video
POST
/api/v1/veo/extend
Extend an existing Veo 3.1 video by generating new content based on the original video and a text prompt. This feature allows you to extend video duration or add new content based on your existing video clips.
Our Veo 3.1 Video Extension API is more than simple video splicing. It layers intelligent extension algorithms on top of the official models, giving you greater flexibility and markedly higher success rates - 25% of the official Google pricing (see pricing details for full details).
| Capability | Details |
|---|---|
| Smart Extension | Generate new video segments based on existing videos and text prompts |
| Seamless Connection | Extended videos naturally connect with the original video |
| Flexible Control | Precisely control the style and actions of extended content through prompts |
| High-Quality Output | Maintain the same quality and style as the original video |
| Audio Track | Extended videos default to background audio, consistent with the original video |
Why our Veo 3.1 Video Extension is different #
Smart Content Understanding - Deeply understands the content and style of the original video to ensure coherence of extended content.
Natural Transition - Extended video segments seamlessly connect with the original video without visible splicing marks.
Flexible Control - Precisely control the actions, scenes, and styles of extended content through detailed prompts.
Significant Cost Savings - Our rates are 25% of Google's direct API pricing.
Video Extension Workflow #
The video extension feature is based on your existing Veo3.1 generated videos and works through the following steps:
Provide Original Video: Use the taskId from the original video generation task
Describe Extension Content: Use prompt to detail how you want the video to be extended
Smart Analysis: The system analyzes the content, style, and actions of the original video
Generate Extension: Generate new video segments based on analysis results and your prompts
Seamless Connection: Naturally connect the extended video with the original video
Extension Features #
Through the video extension feature, you can:
Extend video duration and add more content
Change video direction and add new actions or scenes
Add new elements while maintaining the original style
Create richer video stories
Extension Features:
Smart Analysis: Deeply understand the content and style of the original video
Natural Connection: Extended content seamlessly connects with the original video
Flexible Control: Precisely control extended content through prompts
Quality Assurance: Maintain the same quality and style as the original video
Important Notes
Can only extend videos generated through the Veo3.1 API
Extended content must also comply with platform content policies
Recommend using English prompts for best results
Video extension consumes credits, see pricing Details for specific pricing
Best Practices #
Prompt Writing Suggestions
Detailed Action Description: Clearly describe how you want the video to be extended, e.g., "the dog continues running through the park, jumping over obstacles"
Maintain Style Consistency: Ensure the style of extended content matches the original video
Natural Transition: Described actions should naturally connect with the end of the original video
Use English: Recommend using English prompts for best results
Avoid Conflicts: Ensure extended content doesn't create logical conflicts with the original video
Technical Recommendations
Use Callbacks: Strongly recommend using callback mechanisms to get results in production environments
Download Promptly: Download video files promptly after generation, URLs have time limits
Error Handling: Implement appropriate error handling and retry mechanisms
Credit Management: Monitor credit usage to ensure sufficient balance
Seed Control: Use the seeds parameter to control the randomness of generated content
Important Notes #
Important Limitations
Original Video Requirements: Can only extend videos generated through the Veo3.1 API
Content Policy: Extended content must also comply with platform content policies
Credit Consumption: Video extension consumes credits, see pricing Details for specific pricing
Processing Time: Video extension may take several minutes to over ten minutes to process
URL Validity: Generated video URLs have time limits, please download and save promptly
Extended Video Features
Seamless Connection: Extended videos will naturally connect with the original video
Quality Maintenance: Extended videos maintain the same quality as the original video
Style Consistency: Extended content will maintain the visual style of the original video
Flexible Control: Prompts can precisely control the content and direction of extension
Troubleshooting #
Common Error Handling
Extension Quality Issues
Technical Issues
Callbacks
onVideoExtended
POST
Request
Authorization
Bearer Token
Provide your bearer token in the Authorization header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired
Generate Code
taskId
string
required
Task ID of the original video generation. Must be a valid taskId returned from the video generation interface. Note: Videos generated after 1080P generation cannot be extended.
Example: veo_task_abcdef123456
prompt
string
required
Text prompt describing the extended video content. Should detail how you want the video to be extended, including actions, scene changes, style, etc.
Example: The dog continues running through the park, jumping over obstacles and playing with other dogs
seeds
integer
optional
Random seed parameter for controlling the randomness of generated content. Range: 10000-99999. Same seeds will generate similar video content, different seeds will generate different video content. If not specified, the system will automatically assign random seeds.
= 10000<= 99999
Example: 12345
model
enum<string>
optional
Model type for video extension (optional). Defaults to fast if not specified.
fast: Fast generation mode
quality: High quality generation mode
lite: Most cost-effective generation mode
Allowed values: fastqualitylite
Default: fast
Example: fast
watermark
string
optional
Watermark text (optional). If provided, a watermark will be added to the generated video.
Example: MyBrand
callBackUrl
string
optional
Callback URL when the task is completed (optional). Strongly recommended for production environments.
The system will send a POST request to this URL when video extension is completed, containing task status and results
The callback contains generated video URLs, task information, etc.
Your callback endpoint should accept POST requests with JSON payloads containing video results
For detailed callback format and implementation guide, see Video Generation Callbacks
Alternatively, you can use the get video details interface to poll task status
To ensure callback security, see Webhook Verification Guide for signature verification implementation
Example: https://your-callback-url.com/veo-extend-callback
Examples
Responses
🟢200
application/json
Request successful
Bodyapplication/json
Generate Code
code
enum<integer>
optional
Response status code
200: Success - Extension task created
400: Client error - Prompt violates content policy or other input errors
401: Unauthorized - Authentication credentials missing or invalid
402: Insufficient credits - Account does not have enough credits to perform the operation
404: Not found - Original video or task does not exist
422: Validation error - Request parameter validation failed
429: Rate limit - Exceeded the request limit for this resource
455: Service unavailable - System is under maintenance
500: Server error - Unexpected error occurred while processing the request
501: Extension failed - Video extension task failed
505: Feature disabled - The requested feature is currently disabled
Allowed values: 200400401402404422429455500501505
msg
string
optional
Response message
Example: success
data
object
optional
taskId
string
optional
Task ID that can be used to query task status via the get video details interface
Example: veo_extend_task_xyz789
🔴500Error
Request Request Example
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
cURLcURL-WindowsHttpiewgetPowerShell
curl --location 'https://api.kie.ai/api/v1/veo/extend' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"taskId": "veo_task_abcdef123456",
"prompt": "The dog continues running through the park, jumping over obstacles and playing with other dogs",
"seeds": 12345,
"watermark": "MyBrand",
"callBackUrl": "https://your-callback-url.com/veo-extend-callback",
"model": "fast"
}'Response Response Example
200 - Example 1
{
"code": 200,
"msg": "success",
"data": {
"taskId": "veo_extend_task_xyz789"
}
}