Upscale an image or a video
upscale_mediaMake a sharper, cleaner, larger copy of an image or a video, as a new asset. It keeps the framing and what the picture shows. target film (null) makes it just large enough to fill the film's frame; 2x and 4x multiply each side. A video is upscaled up to 15 seconds a call: pass startSeconds and endSeconds for the part a clip plays. Upscaling does not remove compression blocks: a blocky clip comes back as blocky or worse (measured 2026-11-21), so do not upscale for them. A clip that is already the film's size but looks soft: pass inputShortSide at about two thirds of its short side (720 for 1080x1920) with target film: it is made smaller first and restored back at exactly the film's size, for the price of the film's size. Do not pass 2x for it: that makes four times the pixels and uses four times the credits, and the render throws them away. For a punch-in, pass crop with the part to show: only that part is upscaled and paid for. The new video keeps the source's length, frame rate and sound. Put the new asset on the clip in place of the old one, with the same at and duration: a whole video keeps the clip's offset; a part starts at startSeconds, so play it at offset 0 where that part played. A cropped asset shows only its part: fit it to the frame instead of the clip's old crop. A picture with a transparent background comes back without it: upscale first, then remove_background. A new image does not need it: make it with generate_image at imageSize 2K instead. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. Uses credits by the pixels it makes, not the pixels it reads: an image filled to 1920x1080 uses 1 credit; a video 1 credits a second at 1920x1080 and 24 frames a second, so a 5-second clip uses 1 credits (30 frames a second: 1).
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": {
"assetId": "<assetId>",
"startSeconds": "<startSeconds>",
"endSeconds": "<endSeconds>",
"target": "<target>",
"crop": "<crop>",
"inputShortSide": "<inputShortSide>",
"projectId": "<projectId>"
},
"name": "upscale_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crop | Yes | A part of the picture to upscale alone, [x0, y0, x1, y1] in the asset's own pixels from its top left (read_asset and find_objects give them), at least 64 on each side: a punch-in on a face or a product. Only that part is sent and paid for, and the new asset is that part, larger. null for the whole picture. | |
| target | Yes | film (null): just large enough to fill the film's frame. 2x or 4x: each side two or four times, for a deep punch-in or a crop of a small part. | |
| assetId | Yes | The image or video asset to upscale. Use the IDs search_assets gives. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| endSeconds | Yes | Source second of a video where the part to upscale ends. null for both upscales the whole video. null for an image. | |
| startSeconds | Yes | Source second of a video where the part to upscale starts, with endSeconds: the part a clip plays (its offset to offset + duration), up to 15 seconds. null for both upscales the whole video. null for an image. | |
| inputShortSide | Yes | Make the picture (or its crop) smaller first, to this many pixels on its short side, then upscale it: the way to clean up a soft copy that is already the film's size. It does not remove compression blocks: they come back. About two thirds of its short side works: 720 for a 1080x1920 clip, which target film then upscales back to exactly 1080x1920. null sends it at its own size. |