Upscale an image
upscale_imageIncreases an existing image's resolution and returns the new job's id immediately (it does NOT wait). Same image, more pixels. WHEN: the user asks to upscale, enhance, sharpen or increase the resolution of a picture they have, including one an earlier generate_image returned. It is not how you change what is IN the picture (generate_image with the picture as a reference). WHICH MODEL (upscale_factor has each one's factors): topaz-upscale-image is the general-purpose safe default. seedvr-upscale-image is priced by the size of its output. recraft-creative-upscale-image decides its own output size and REPAINTS detail: a reinterpretation, not a faithful enlargement. Ask the user when the choice is not obvious. THE CARD: this call already opened the aicut card: do not call show_generation for this job. WAIT: wait_for_generation (this id, media), again at once while terminal: false, then one short line; no get_* polling, timers, background shells or narrating the wait. No card? Give the user the url. COST: this spends the user's tokens, and the three models price differently. topaz-upscale-image: 0.32 tokens up to 24 megapixels of OUTPUT, 0.64 up to 48, 1.28 up to 96, 5.44 above that. seedvr-upscale-image: 0.025 tokens per output megapixel (a 1024x1024 picture at 4x is about 0.42). recraft-creative-upscale-image: a flat 1 token. The image's dimensions are MEASURED BY THE SERVER from the file, never taken from anything you say: that measurement is the price. PNG, JPEG and WebP are readable; anything else (AVIF, HEIC, TIFF, GIF), a picture below the model's minimum size or one whose result would exceed its output limit is REFUSED with nothing charged: re-encode to PNG or JPEG. The estimate_only quote is what the job charges. An external url costs one media-ingest slot: quote and create from the SAME url to pay it once. SPENDS TOKENS: price with estimate_only: true, ask in the SAME message as the price, and wait for a go that names THIS purchase (SPENDING RULES, this server's instructions). IDEMPOTENCY: a reused idempotency_key REPLAYS the first job whatever the settings: never reuse one for a new generation (this server's instructions).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Which upscaler. They differ in price by more than any other setting: use the one the user asked for. REQUIRED: if the user gave none, put your pick and its price in the priced ask; never one chosen to save tokens, never carried over. | |
| source_image | Yes | URL of the image to upscale. A URL from this account's generations or uploads, or a public https URL (imported first); another account's is refused. A PHOTO FROM THE USER'S OWN MACHINE QUALIFIES: upload it first with `upload_media_widget` (or `upload_media` where no card renders) and pass the url `confirm_upload` returns. | |
| estimate_only | No | Price only; creates nothing. | |
| upscale_factor | No | Times larger. topaz: 1, 2 or 4; seedvr: any whole number 1 to 10; recraft takes NONE and REFUSES the request if you send one. Default 2 on the two that take it. A result over the model's output limit is refused before anything is charged. Only if the user asked; never to save tokens, never carried over. | |
| idempotency_key | No | Retry-safety key (IDEMPOTENCY). |