Trim a Playground clip
playground_video_trimCut a finished video node to [startSeconds, endSeconds] on the server. Creates a "Clip" (video-result) node wired from the source, as the in-app Clip tool does, and queues the existing FFmpeg film worker, which cuts the stored clip (re-encoded, frame accurate) and attaches the MP4 to that node. The range must be at least 0.2 s and inside the clip; the worker re-checks it against the probed duration. The source must be a finished clip in this project's storage. Free: no credits are spent. Revision checked and idempotent. Returns immediately; poll playground_run_delivery with the returned runId (every ≥30 s) until verified, or read the Clip node's generated URL with playground_node_get.
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": {
"projectId": "<projectId>",
"videoNodeId": "<videoNodeId>",
"expectedRevision": "<expectedRevision>",
"idempotencyKey": "<idempotencyKey>",
"startSeconds": "<startSeconds>",
"endSeconds": "<endSeconds>"
},
"name": "playground_video_trim"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Human-readable label to display for this item in Playground. | |
| projectId | Yes | ID of the Playground project chosen for this task; obtain it from project creation, an explicit project link or current context. | |
| endSeconds | Yes | End of the retained clip in seconds; must be later than startSeconds. | |
| videoNodeId | Yes | Existing canvas video node ID containing the source video. | |
| startSeconds | Yes | Start of the retained clip in seconds from the source video’s beginning. | |
| idempotencyKey | Yes | Unique key for this request; reuse only when retrying the identical request after a lost response. Use a new key after quoting or changing inputs. | |
| expectedRevision | Yes | Current canvas revision from canvas_read; on revision_conflict, read again and rebuild the change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poll | Yes | ||
| error | No | ||
| runId | Yes | ||
| status | Yes | ||
| replayed | Yes | ||
| revision | Yes | ||
| canvasUrl | Yes | ||
| onFailure | Yes | ||
| clipNodeId | Yes | ||
| endSeconds | Yes | ||
| sourceNodeId | Yes | ||
| startSeconds | Yes | ||
| conversationId | Yes | ||
| sourceVideoUrl | Yes | ||
| retry_after_seconds | Yes |