Upscale an image or a video
upscale_mediaMake a sharper, larger copy of an image or a video, as a new asset. Use it before export on every picture smaller than the film's frame: a generated 720p clip or a 1K image in a 1080p film is stretched to fill the frame and comes out soft, and the upscaled copy keeps its detail. 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, and upscale a longer clip in parts. 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 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: an image filled to 1920x1080 uses 1 credit; a video 19 credits a second at 1920x1080 and 24 frames a second, so a 5-second clip uses 95 credits (30 frames a second: 118).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | film (null): just large enough to fill the film's frame, the right size before export. 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: a ready asset smaller than the film's frame. 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. |