Guides
Generating videos
Text-to-video, image-to-video, and first/last frame.
6 min read
Video generations use the same POST /v1/generations endpoint with a video modelId. Outputs are MP4 URLs.
Text-to-video
1curl -X POST $BASE_URL/v1/generations \2 -H "x-api-key: $SIXART_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "prompt": "A cinematic aerial shot of a futuristic city at sunset",6 "modelId": "veo-3.1-fast",7 "attachments": [],8 "aspectRatio": "16:9",9 "options": { "resolution": "720p", "duration": 8 }10}'Image-to-video
Animate a still image by attaching it as input. The image becomes the first frame.
1curl -X POST $BASE_URL/v1/generations \2 -H "x-api-key: $SIXART_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "prompt": "Make this person turn their head slowly",6 "modelId": "veo-3.1-fast",7 "attachments": [8 { "url": "https://your-cdn.com/path/to/first-frame.jpg", "role": "input" }9 ],10 "aspectRatio": "16:9",11 "options": { "resolution": "720p", "duration": 6 }12}'First + last frame (Veo)
Veo accepts a target end frame. Pass two attachments — the first as input, the second as last — and Veo interpolates the motion between them.
1curl -X POST $BASE_URL/v1/generations \2 -H "x-api-key: $SIXART_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "prompt": "Slow pan as evening falls",6 "modelId": "veo-3.1-fast",7 "attachments": [8 { "url": "https://your-cdn.com/path/to/start.jpg", "role": "input" },9 { "url": "https://your-cdn.com/path/to/end.jpg", "role": "last" }10 ],11 "aspectRatio": "16:9",12 "options": { "duration": 8 }13}'