Creative
Alphacreative_video_trim
Trim a saved video in the connected workspace when its Creative flag is enabled.
Operation Write.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
body | object | Yes | Video program. |
body.video_url | string | Yes | URL of a video saved in this workspace. Maximum 100 MB. |
body.start | number | Yes | Start in seconds from the beginning. |
body.end | number | No | End in seconds. Supply exactly one of end and duration. |
body.duration | number | No | Length in seconds, from 0.2 to 900. |
body.precision | string | No | Use exact for re-encoding or keyframe for stream copy. |
body.audio | string | No | Keep or drop the audio track. Default keep. |
body.output | object | No | Optional width, height, and fps with exact precision. |
body.mode | string | No | Use async to get a job ID immediately, sync or subscribe for a bounded wait, or webhook for terminal delivery. |
body.wait_timeout_seconds | integer | No | Wait from 0 to 30 seconds in sync or subscribe mode. |
body.webhook_url | string | No | Public HTTPS URL for terminal delivery. |
body.project_id | string | No | Destination project in the same workspace. |
body.metadata | object | No | Caller data to keep with the job. |
idempotency_key | string | Yes | Reuse this key to retry the same request. |
The source can be up to 1,800 seconds and the cut up to 900 seconds. Exact mode re-encodes the cut. Keyframe mode can start at an earlier keyframe.
Pass data.job.id to creative_jobs_wait, then read the saved output with creative_jobs_result.
Sample prompt
Trim seconds 2 to 7 from my imported product video, keep its audio, and give me the new MP4.