Generate Video
AI Studio
Generate Video
Generate an AI video from a text prompt using a selection of AI video models
POST
Generate Video
Overview
The Generate Video API creates an AI-generated video based on a text prompt. You can choose from multiple AI video models, specify an aspect ratio and duration, and optionally provide a first frame image, a video to extend, or reference images to guide the output. The API returns a job ID that you can use to poll for the result once the video generation is complete.A valid API key is required to use this endpoint. Obtain your API key from the API Access page in your Pictory dashboard.
API Endpoint
Request Headers
API key for authentication (starts with
pictai_)Must be
application/jsonRequest Body
A text description of the video you want to generate. The prompt must be between 5 and 5,000 characters.Example:
"A drone flying over a lush green forest with sunlight filtering through the canopy"The AI model to use for video generation. Each model offers different quality levels, durations, and aspect ratios. Defaults to
pixverse5.5 if not specified.Supported models: veo3.1, veo3.1_fast, pixverse5.5Model Capabilities and Pricing:| Model | Supported Aspect Ratios | Supported Durations | AI Credits per Second |
|---|---|---|---|
veo3.1 | 16:9, 9:16 | 4s, 6s, 8s | 20 |
veo3.1_fast | 16:9, 9:16 | 4s, 6s, 8s | 10 |
pixverse5.5 | 16:9, 9:16, 1:1, 3:4, 4:3 | 5s, 8s, 10s | 1.6 |
The aspect ratio for the generated video. The available values depend on the selected model. Defaults to the first supported aspect ratio of the chosen model. Refer to the model table above for supported aspect ratios per model.
The duration of the generated video. The available values depend on the selected model. Defaults to the first supported duration of the chosen model. Refer to the model table above for supported durations per model.
An optional URL of an image to use as the first frame of the video. This guides the visual starting point for the generation. The URL must be a valid, publicly accessible URI.
An optional URL of an existing video to extend. The AI model will generate additional content that continues from the end of the provided video. The URL must be a valid, publicly accessible URI.
An optional array of image URLs (1 to 3) to use as visual references for the generated video. The AI model will use these images to influence the style and content of the output. Each URL must be a valid, publicly accessible URI.
An optional webhook URL that will receive a notification when the video generation job completes. The URL must be a valid URI.
Response
Success Response (200)
true when the job has been created successfullyThe unique identifier (UUID) of the video generation job. Use this ID to poll for the result using the Get Video Generation Job endpoint.
Response Examples
Status Codes
| Status Code | Description |
|---|---|
| 200 | Job created successfully. Use the returned jobId to poll for the result. |
| 400 | Invalid request body. Check the fields array for specific validation errors. This also occurs when mutually exclusive parameters are used together. |
| 401 | Unauthorized. The API key in the Authorization header is missing or invalid. |
| 500 | Internal server error. Retry the request after a brief delay. |
Parameter Exclusivity
ThefirstFrameImageUrl, extendVideoUrl, and referenceImageUrls parameters are mutually exclusive. You may use only one of these in a single request. Providing more than one will result in a 400 validation error.
| Parameter | Can be combined with |
|---|---|
firstFrameImageUrl | prompt, model, aspectRatio, duration, webhook only |
extendVideoUrl | prompt, model, aspectRatio, duration, webhook only |
referenceImageUrls | prompt, model, aspectRatio, duration, webhook only |
Code Examples
Next Steps
After receiving thejobId, poll for the video generation result using the Get Video Generation Job endpoint. Use a polling interval of 10–30 seconds to check the job status.