Actions7
Generate Video from Prompt and Image
AI-generatedSummary
Generates a video from a source image and text prompt using the Picsart GenAI API.
Inputs
- Image Source — Choose between Binary Image or Image URL as the source for the image input.
- Input Binary Field — Required when using Binary Image; specifies the binary field name (default: data).
- Image URL — Required when using Image URL; the source image URL (1–2083 characters).
- Prompt (required) — Text prompt describing how the video should be generated from the image.
- Width — Desired width in pixels (64–1024). Actual output is matched to the closest supported aspect ratio for the model.
- Height — Desired height in pixels (64–1024). Actual output is matched to the closest supported aspect ratio for the model.
- Quality — Video output quality tier: 480p, 720p, or 1080p.
- Audio — Whether to generate video with audio. Note that some models always include sound regardless of this setting.
- Video Length (Seconds) — Desired video length in seconds (1–20). Mapped to the closest supported duration for the selected model.
- Model (required) — AI model to use for image-to-video generation (e.g., Veo, Kling, Luma).
Output shape
One item per input with a binary video file and metadata in JSON.
Polls the API for completion (up to 600 attempts) and downloads the video as a .mp4 file. The JSON includes the inference ID, selected model, prompt, dimensions, quality, and audio setting.
Examples
Example 1: Generate a 5-second video from a binary image file.
Select 'Binary Image' source, specify the binary field name, enter a prompt, set Width to 1024, Height to 1024, Quality to 1080p, and Video Length to 5.
Example 2: Create a video from a hosted image URL.
Select 'Image URL' source, paste the URL, provide a detailed prompt, and choose a model like Veo-3.1-fast-image-to-video.