Edit a segment
segment_editChange one segment without losing renders. Returns the changed segments.
set_prompts: write prompts verbatim, no AI rewrite. The renders stay as they are: render the segment again to apply the new prompts. set_continuation: make this segment's image continue an earlier one's (same composition, only the change); render the image again. rollback: restore one of the last 5 renders of the image or clip; the current one takes its place, so it can be undone, and the prompt editor's model stays as it is. split: cut into 2-4 parts; every part keeps the prompts and renders (copies, so each part can be changed and rendered on its own), and nothing is rendered or rewritten. Later segments renumber: read the storyboard again before more edits.
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": {
"action": "<action>",
"project_id": "<project_id>",
"segment_number": "<segment_number>"
},
"name": "segment_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| what | No | rollback: restore the image or the clip | |
| index | No | rollback: which earlier render, 0 = the latest | |
| action | Yes | set_prompts: image_prompt, video_prompt and/or media_queries; set_continuation: continues_from; rollback: what, optional index; split: offsets_ms | |
| offsets_ms | No | split: 1-3 ascending cut points, in ms from the segment's start; word timings: voiceover_read action=blocks include_subtitle_data=true | |
| project_id | Yes | Project id | |
| image_prompt | No | set_prompts: the image prompt | |
| video_prompt | No | set_prompts: the motion used when the image is animated | |
| media_queries | No | set_prompts: searches for a real photo or B-roll | |
| continues_from | No | set_continuation: an EARLIER segment number; 0 clears the link | |
| segment_number | Yes | Segment number (1-based, from storyboard_read) |