generate_video
Create videos from text prompts, optionally using a reference image for image-to-video. Polls until complete and returns a video URL valid for 7 days.
Instructions
Generate a video from a text prompt (and optional reference image). Polls until done and returns the video URL(s), valid 7 days. May take a few minutes. Video is the most expensive modality here — the default model costs roughly $0.30-$0.50 per clip; pass model:"veo-3.1-fast-fhd" for the cheapest option at $0.07 flat.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Video model id. Use the dotted public names: seedance-2.0-fast, seedance-2.0, seedance-2.5, veo-3.1-fast-fhd ($0.07 flat, cheapest), veo-3.1, grok-video-3, kling-v2-6, minimax-h3. The bare forms seedance-2-fast / seedance-2 are internal names and will 400. | seedance-2.0-fast |
| prompt | Yes | Text description of the video. | |
| duration | No | Optional duration in seconds, e.g. 5 or 10. | |
| image_url | No | Optional first-frame / reference image for image-to-video. Accepts a public https:// URL, a LOCAL FILE PATH, a localhost URL, or a data: URI — local sources are uploaded for you automatically. | |
| resolution | No | Optional resolution, e.g. 480p, 720p, 1080p. | |
| aspect_ratio | No | Optional aspect ratio, e.g. 16:9, 9:16, 1:1. |