Make a video from a photo
generate_videoUse this to turn one of the user's photos into a short video of their influencer: the photo is the first frame, and the prompt says what happens next. Get the photo_id from get_generation or list_media (make a photo first with generate_photos if there's none that fits). Write the prompt as motion and camera: what the influencer does, how the camera moves, the mood. To have them speak, put the words in quotes in the prompt ("she smiles and says "you have to try this place"") and set sound to true; keep a line to about 2 words a second of video. For music or other sound, describe it in the prompt ("upbeat house music playing") and set sound to true. Costs 1 credit per second, or 2 per second with sound; say the cost before calling. Length is 3 to 15 seconds, up to the plan's limit (get_account). To bring in an object (a product, a drink), pass element_image (one of the user's photos, an upload_id from upload_image, or a link) and write @element in the prompt where it appears. Returns at once with a generation_id; then call get_generation to wait (videos take 1 to 3 minutes, sometimes 5). Calling it again starts and charges a new video. Failed videos are refunded automatically.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"photo_id": "<photo_id>",
"prompt": "<prompt>"
},
"name": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sound | No | Make sound with the video, as the prompt describes it: speech, music, ambience, effects. 2 credits per second instead of 1. | |
| prompt | Yes | What happens: movement, camera, mood, and any spoken words in quotes. | |
| captions | No | Burn word-by-word captions of the speech into the video. Free; needs sound. | |
| photo_id | Yes | The photo to start from: a photo_id from get_generation or list_media. | |
| element_image | No | An image: an upload_id from upload_image (for a file the user has), a photo_id of one of the user's photos, or an https:// link to an image. An object to bring into the video; the prompt names it as @element. | |
| duration_seconds | No | Length in seconds, up to the plan's limit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | Present only on a refusal: the summary says why, and what the user can do. | |
| sound | No | ||
| summary | Yes | ||
| photo_id | No | ||
| video_id | No | ||
| view_url | No | ||
| can_extend | No | Whether extend_video can add to it once it's ready. | |
| error_code | No | Present only on a refusal. | |
| credits_left | No | ||
| generation_id | No | ||
| credits_charged | No | ||
| duration_seconds | No | ||
| expected_seconds | No |