Media editing
Alpha

Media editing

Upscale media, remove image backgrounds, trim video, and render timelines.

reframe

Alpha

Change a video’s aspect ratio. Set params.get_cost to true to quote the job without starting it. The current Luma provider accepts source videos of up to 10 seconds and supports explicit 720p or 1080p output.

Operation Write, approval required, requires the creative flag

Sample prompt: Quote the cost of reframing this uploaded video to 9:16 at 720p before starting the job.

Parameters

ParameterTypeRequiredDefaultDescription
paramsobjectYes——
params.aspect_ratiostringNo—Required unless get_cost is true.
params.duration_secondsnumberNo——
params.get_costbooleanNo—Requires duration_seconds and resolution. Medias and aspect_ratio are optional for quotes.
params.mediasarray of objectNo—Exactly one source video, optional one start_image, optional one or two image references. Over 15 seconds, supply only the source video.
params.resolutionstringNo—Required for get_cost and for clips longer than 15 seconds.

Send these values in tools/call request metadata under params._meta.

ParameterTypeRequiredDefaultDescription
idempotency_keystringNo—The plan’s request.idempotencyKey. Reuse it after approval or when retrying the same action.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

remove_background

Alpha

Remove the background from a public image in the connected workspace when its Creative flag is enabled.

Operation Write, approval required, requires the creative flag

Sample prompt: Remove the background from my uploaded product photo and give me the transparent PNG.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Media settings.
body.image_urlstringYes—Public HTTPS URL of a PNG, JPEG, or WebP image, up to 100 MB.
body.sync_modebooleanNo—Request inline PNG data from the provider. The result is still saved as a workspace artifact.
body.metadataobjectNo—Caller data to keep with the job.
body.modestringNo—Use async to get a job ID immediately, sync or subscribe for a bounded wait, or webhook for terminal delivery.
body.webhook_urlstringNo—Public HTTPS URL for terminal delivery.
body.wait_timeout_secondsintegerNo—Wait from 0 to 30 seconds in sync or subscribe mode.
body.project_idstringNo—Destination project in the same workspace.
idempotency_keystringYes—Reuse this key to retry the same request.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

timeline_audio

Alpha

Join or split saved audio in the connected workspace when its Creative flag is enabled.

Operation Write, approval required, requires the creative flag

Sample prompt: Join the two saved voice clips as a WAV, then give me the output URL and the start time of each clip.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Timeline settings.
body.operationstringYes—Use concat to join parts or split to cut ranges from one file.
body.partsarray of objectConditional—For concat, provide 1–20 ordered parts with url and optional source_in and duration in seconds. Use the same channel layout for all parts.
body.outputobjectNo—Set format to wav (default) or mp3.
body.metadataobjectNo—Caller data to keep with the job.
body.modestringNo—Use async for an immediate job ID, sync or subscribe for a bounded wait, or webhook for terminal delivery.
body.webhook_urlstringNo—Public HTTPS URL for terminal delivery.
body.wait_timeout_secondsintegerNo—Wait from 0 to 30 seconds in sync or subscribe mode.
body.project_idstringNo—Destination project in the same workspace.
body.urlstringConditional—For split, provide one saved audio URL.
body.rangesarray of objectConditional—For split, provide 1–20 ranges. Each has a start and optional end in seconds. Omit end to cut through the end of the file.
idempotency_keystringYes—Reuse this key to retry the same request.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

timeline_compose

Alpha

Compose a saved still image and video in one frame when the connected workspace has the Creative flag.

Operation Write, approval required, requires the creative flag

Sample prompt: Make a vertical MP4 with my saved product still in the top half and my saved demo video with its audio in the bottom half.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Timeline settings.
body.operationstringYes—Use stack for two regions or overlay to place the still over the video.
body.imageobjectYes—Provide the saved still image url.
body.videoobjectYes—Provide the saved video url and optional source_in and duration in seconds.
body.layoutobjectNo—Stack accepts split, image_region, ratio, image_fit, and video_fit. Overlay accepts position, width_ratio, margin_ratio, and video_fit.
body.outputobjectNo—Set even width and height from 256 to 2160 and optional fps (24, 25, 30, or 60).
body.metadataobjectNo—Caller data to keep with the job.
body.modestringNo—Use async for an immediate job ID, sync or subscribe for a bounded wait, or webhook for terminal delivery.
body.webhook_urlstringNo—Public HTTPS URL for terminal delivery.
body.wait_timeout_secondsintegerNo—Wait from 0 to 30 seconds in sync or subscribe mode.
body.project_idstringNo—Destination project in the same workspace.
idempotency_keystringYes—Reuse this key to retry the same request.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

timeline_plan

Alpha

Validate a timeline for the connected workspace when its Creative flag is enabled.

Operation Read only, requires the creative flag

Sample prompt: Check my 75-second timeline with a silent spine and two clips. Tell me the billable minutes before rendering.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Timeline settings.
body.outputobjectNo—Set output geometry, frame rate, and intro or outro fades. The output format is MP4.
body.audioobjectYes—Set duration_seconds from 1 to 1800 and choose a saved url, ordered parts, or mode: silence.
body.soundtrackobjectNo—Provide a saved audio url with optional gain, looping, fade-out, or ducking under the spine.
body.videoarray of objectYes—Provide 1–200 ordered clips or stills. Each needs a source_url, start, and duration. Optional fields include source_in, fit, and the incoming transition.
body.renderobjectNo—Set the render strategy, chunk_max_segments, and short-source pad_mode.
body.metadataobjectNo—Public metadata available for selecting candidates. The provider does not receive arbitrary data from the request.
body.project_idstringNo—ID of the project associated with the job or output destination.
idempotency_keystringNo—Use a unique key per action and reuse it when retrying the same input.

timeline_render

Alpha

Render a timeline from saved media when the connected workspace has the Creative flag.

Operation Write, approval required, requires the creative flag

Sample prompt: Render an MP4 from my saved narration, product still, and demo clip. Use a quarter-second fade into the demo and wait for the result.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Timeline settings.
body.outputobjectNo—Set output geometry, frame rate, and intro or outro fades. The output format is MP4.
body.audioobjectYes—Set duration_seconds from 1 to 1800 and choose a saved url, ordered parts, or mode: silence.
body.soundtrackobjectNo—Provide a saved audio url with optional gain, looping, fade-out, or ducking under the spine.
body.videoarray of objectYes—Provide 1–200 ordered clips or stills. Each needs a source_url, start, and duration. Optional fields include source_in, fit, and the incoming transition.
body.renderobjectNo—Set the render strategy, chunk_max_segments, and short-source pad_mode.
body.metadataobjectNo—Caller data to keep with the job.
body.modestringNo—Use async for an immediate job ID, sync or subscribe for a bounded wait, or webhook for terminal delivery.
body.webhook_urlstringNo—Public HTTPS URL for terminal delivery.
body.wait_timeout_secondsintegerNo—Wait from 0 to 30 seconds in sync or subscribe mode.
body.project_idstringNo—Destination project in the same workspace.
idempotency_keystringYes—Reuse this key to retry the same request.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

upscale_image

Alpha

Upscale an uploaded or generated image to 2K or 4K. Use the uploaded media ID or the UUID portion of a completed image job ID. Set params.get_cost to true for the credit quote.

Operation Write, approval required, requires the creative flag

Sample prompt: Show me the credit estimate for upscaling this product image to 4K.

Parameters

ParameterTypeRequiredDefaultDescription
paramsobjectYes——
params.get_costbooleanNo——
params.heightintegerYes——
params.image_idstringYes—Confirmed uploaded image media_id or completed image job_id.
params.providerstringNo"bytedance"—
params.resolutionstringNo"4k"—
params.widthintegerYes——

Send these values in tools/call request metadata under params._meta.

ParameterTypeRequiredDefaultDescription
idempotency_keystringNo—The plan’s request.idempotencyKey. Reuse it after approval or when retrying the same action.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

video_filter

Alpha

Apply pixel filters to a saved video in the connected workspace when its Creative flag is enabled.

Operation Write, approval required, requires the creative flag

Sample prompt: Dim my imported clip to 60 percent brightness, wait for the edit, and return the new MP4.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Video program.
body.video_urlstringYes—URL of a video saved in this workspace. Maximum 100 MB.
body.opsarray of objectNo—Up to eight dim or crop operations, applied in order.
body.filtergraphstringNo—An allowlisted pixel filtergraph. Supply ops, filtergraph, or both.
body.metadataobjectNo—Caller data to keep with the job.
body.modestringNo—Use async to get a job ID immediately, sync or subscribe for a bounded wait, or webhook for terminal delivery.
body.webhook_urlstringNo—Public HTTPS URL for terminal delivery.
body.wait_timeout_secondsintegerNo—Wait from 0 to 30 seconds in sync or subscribe mode.
body.project_idstringNo—Destination project in the same workspace.
idempotency_keystringYes—Reuse this key to retry the same request.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

video_filter_check

Alpha

Check a video filter program against a saved video in the connected workspace when its Creative flag is enabled.

Operation Read only, requires the creative flag

Sample prompt: Check whether I can dim my imported clip to 60 percent brightness. Show me any diagnostics.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Video program.
idempotency_keystringNo—Use a unique key per action and reuse it when retrying the same input.

video_trim

Alpha

Trim a saved video in the connected workspace when its Creative flag is enabled.

Operation Write, approval required, requires the creative flag

Sample prompt: Trim seconds 2 to 7 from my imported product video, keep its audio, and give me the new MP4.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Video program.
body.endnumberConditional—End in seconds. Supply exactly one of end and duration.
body.durationnumberConditional—Length in seconds, from 0.2 to 900.
body.video_urlstringYes—URL of a video saved in this workspace. Maximum 100 MB.
body.startnumberYes—Start in seconds from the beginning.
body.precisionstringNo"exact"Use exact for re-encoding or keyframe for stream copy.
body.audiostringNo"keep"Keep or drop the audio track. Default keep.
body.outputobjectNo—Optional width, height, and fps with exact precision.
body.metadataobjectNo—Caller data to keep with the job.
body.modestringNo—Use async to get a job ID immediately, sync or subscribe for a bounded wait, or webhook for terminal delivery.
body.webhook_urlstringNo—Public HTTPS URL for terminal delivery.
body.wait_timeout_secondsintegerNo—Wait from 0 to 30 seconds in sync or subscribe mode.
body.project_idstringNo—Destination project in the same workspace.
idempotency_keystringYes—Reuse this key to retry the same request.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.

video_upscale

Alpha

Upscale a public video in the connected workspace when its Creative flag is enabled.

Operation Write, approval required, requires the creative flag

Sample prompt: Upscale my imported product video to 2K with standard enhancement and give me the finished video.

Parameters

ParameterTypeRequiredDefaultDescription
bodyobjectYes—Media settings.
body.video_urlstringYes—Public HTTPS video URL. Maximum 100 MB and 600 seconds.
body.duration_secondsnumberNo—Optional declared duration from 1 to 30 seconds. Billing uses the measured file duration.
body.enhancement_tierstringNo—fast, standard, or pro. Default fast.
body.resolutionstringNo—1080p, 2K, or 4K. Default 1080p.
body.metadataobjectNo—Caller data to keep with the job.
body.modestringNo—Use async to get a job ID immediately, sync or subscribe for a bounded wait, or webhook for terminal delivery.
body.webhook_urlstringNo—Public HTTPS URL for terminal delivery.
body.wait_timeout_secondsintegerNo—Wait from 0 to 30 seconds in sync or subscribe mode.
body.project_idstringNo—Destination project in the same workspace.
idempotency_keystringYes—Reuse this key to retry the same request.
approval_receiptstringNo—The plan’s approval_id. Supply it after the user approves the plan.