Make a picture the first or last frame of a generated video, with frame_images.
Use this guide to make a video whose first frame — or last frame — is a picture you give. By the end you will have submitted an image-to-video job with frame_images, and downloaded the clip.
Submitting
POST /v1/videosstarts a real video job and is billed in DA when the clip is delivered.
OPENDUNES_API_KEY.200 with an image type — no cookies, no redirect through a web page. Or a picture you uploaded to Files.GET /v1/videos/models; a model's supported_frame_images names the frames it takes — first_frame, last_frame, or both.curl https://opendunes.com/v1/videos \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/veo-3.1-lite",
"prompt": "Sand slowly rippling in a gentle wind, golden hour light",
"duration": 4,
"frame_images": [
{
"type": "image_url",
"image_url": { "url": "https://your-cdn.example/dunes-still.jpg" },
"frame_type": "first_frame"
}
]
}'The answer is 202, with the job's id, its polling_url and its status. prompt may be left out when the picture is the whole input — for a model that needs one, the model's provider refuses and its words come back.
frame_images item | Takes |
|---|---|
type | image_url, or file for a picture on Files |
image_url.url | the picture's address |
file.file_id | the stored picture's id |
frame_type | first_frame or last_frame |
At most two items. Every other key — resolution, aspect_ratio, seed — travels to the model as you send it; a value the model does not take is refused with the values it does.
With both frames, the model moves from one picture to the other:
"frame_images": [
{ "type": "image_url", "image_url": { "url": "https://your-cdn.example/first.jpg" }, "frame_type": "first_frame" },
{ "type": "image_url", "image_url": { "url": "https://your-cdn.example/last.jpg" }, "frame_type": "last_frame" }
]Poll GET /v1/videos/{id} until status is completed, then fetch the clip from GET /v1/videos/{id}/content. Polling is free. Or pass a callback_url and be told when it ends — see Get Video Results with Webhooks. The whole loop is in Generate and Download a Video from Text.
frame_images pins an exact frame. To guide a video's subject or style without pinning a frame, use input_references — see Guide a Video with Reference Images. Sent together, the request is treated as image-to-video.