Edit asset
edit_assetRun pipeline nodes over ONE video, image, or audio file the account already has and get the edited file back: captions, an upscale, background removal, lipsync, a crop, an overlay, a cutaway, a thumbnail, a trim, or any other transform in list_node_types. To put music under a video, use assemble_video with musicPrompt instead. Operations run in order, each fed the output of the one before, so "caption it and upscale it" is one call with two operations; a Transcribe stage is added wherever an operation needs a transcript. Check a node's config and ports with get_node_type first. A setting the node does not define, or a value outside what it offers, is refused with the valid ones listed. The source, and any url given as an input, must come from list_assets or a run's outputs in get_run. Renders in the background and spends credits: poll get_run with the returned pipelineId and runId. The same edit asked for again within a few minutes returns the render already started (repeat: true) rather than charging for another; to render it a second time on purpose, pass a new requestId. Needs the pipelines:run and pipelines:write scopes.
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": {
"sourceUrl": "<sourceUrl>",
"operations": "<operations>"
},
"name": "edit_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | What to call the render, e.g. "Captioned short". | |
| requestId | No | Any id you choose for this one request. A call with an id that already started a render returns that render; a new id renders again even when everything else is identical. | |
| sourceUrl | Yes | The asset to edit, from list_assets or a run output. | |
| operations | Yes | The nodes to run over the asset, in order. | |
| callbackUrl | No | An https URL Treza POSTs the finished run to, once, when it ends (success, partial, error or cancelled), so an automation can wait for the render instead of polling get_run. The body is the JSON get_run returns for the run, sent with the headers X-Treza-Event: run.finished and X-Treza-Delivery: <runId>. It must be https on the default port and reach a public address; a URL that does not is refused before anything runs or is charged. Each attempt waits 10 seconds for a 2xx, and a timeout, 408, 429 or 5xx is retried twice more. |