What You Will Build
Video Extension
Continue an existing video with new AI-generated content
Narrative Building
Add follow-up scenes to develop a story over multiple segments
Seamless Transitions
The AI model maintains visual continuity from the source video
Iterative Creation
Extend videos repeatedly to build longer sequences
Before You Begin
Make sure you have:- A Pictory API key (get one here)
- Node.js or Python installed on your machine
- The required packages installed
- A publicly accessible URL of the video you want to extend
Step-by-Step Guide
Step 1: Set Up Your Request
Prepare your API credentials, the source video URL, and a prompt that describes what should happen next in the video.The
extendVideoUrl must point to a publicly accessible video file. This parameter cannot be used together with firstFrameImageUrl or referenceImageUrls.Step 2: Submit the Video Extension Request
Send the request to the AI Studio video generation endpoint. The API processes the source video and generates a new segment that continues from it.Step 3: Poll for the Result
Check the job status at regular intervals until the extended video is ready.Understanding the Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | — | A text description of what should happen next in the video. Must be between 5 and 5,000 characters. |
extendVideoUrl | string | No | — | A publicly accessible URL of the video to extend. Must be a valid URI. Cannot be used together with firstFrameImageUrl. |
model | string | No | pixverse5.5 | The AI model to use for generation. Supported values: veo3.1, veo3.1_fast, pixverse5.5. See Generate Video API for model capabilities and pricing. |
aspectRatio | string | No | First supported ratio of the selected model | The output aspect ratio. Valid values depend on the model. For example, pixverse5.5 supports 16:9, 9:16, 1:1, 3:4, 4:3, while veo3.1 supports 16:9, 9:16. |
duration | string | No | First supported duration of the selected model | The duration of the extended segment. Valid values depend on the model. For example, pixverse5.5 supports 5s, 8s, 10s, while veo3.1 supports 4s, 6s, 8s. |
webhook | string | No | — | A URL to receive a POST notification when the job completes. Must be a valid URI. |
Building Multi-Segment Videos
You can extend videos iteratively to build longer sequences. Each extension generates a new video segment that continues from the previous one. Example workflow:- Generate the first video segment using a text prompt.
- Retrieve the video URL from the completed job.
- Use that URL as the
extendVideoUrlin a new request with a prompt for the next scene. - Repeat to build a multi-segment video.
Tips for Extending Videos
- Describe the transition naturally. Write your prompt as a continuation of the action. For example, if the source video shows someone walking, your prompt might say “She stops and turns to look at the sunset.”
- Maintain consistency. Use the same
modelandaspectRatioas the original video for the best visual continuity between segments. - Keep prompts grounded. Reference what is happening at the end of the source video. Abrupt changes in subject or setting may produce less coherent results.
- Plan your narrative. When building multi-segment sequences, outline the full story before generating. This helps you write prompts that flow naturally from one segment to the next.
Next Steps
- Generate Video from Text Prompt to create videos from scratch
- Generate Video from First Frame to animate from a specific starting image
- Generate Video from Reference Images to guide generation with reference visuals
- Generate Video API Reference for the complete parameter documentation
