Make a video longer
extend_videoUse this to add 3 to 10 seconds to one of the user's finished videos; the new part picks up exactly where the video ends, in the same shot. The prompt (optional) says what happens next; leave it out to just continue. Costs the same per second as the video did (1 credit, or 2 with sound); say the cost before calling. Works for videos made since the upgraded engine (generate_video says can_extend), up to the plan's total length; the error says why when a video can't be extended. One part is made at a time. Returns at once with a generation_id; get_generation then returns the whole, longer video.
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": {
"video_id": "<video_id>",
"seconds": "<seconds>"
},
"name": "extend_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | What happens in the new part. | |
| seconds | Yes | Seconds to add. | |
| video_id | Yes | A video_id from get_generation or list_media. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | Present only on a refusal: the summary says why, and what the user can do. | |
| summary | Yes | ||
| video_id | No | ||
| view_url | No | ||
| error_code | No | Present only on a refusal. | |
| credits_left | No | ||
| generation_id | No | ||
| seconds_added | No | ||
| credits_charged | No | ||
| expected_seconds | No |