Upscale image

Beta. Queues an enlargement of an image and returns the task. effort picks the upscaler and sets a flat price; size never changes it. The result can be at most 4096x4096 pixels, so a larger request fails with OUTPUT_TOO_LARGE and is not charged.

POST/image/upscale
AuthAPI keyorOAuth tokenHow to send it

Request body

effortstringrequired

Upscaler to run, and the price. 'low' is fast and sharp; 'high' rebuilds fine detail such as small text and faces.

"high""low"
sizeobject | stringrequired

How much to enlarge each side. The upscaled image can be at most 4096x4096 pixels.

"2x""4x"
factornumberrequired
24
type"scale"required
urlstringrequired
accessobject

Controls whether the create-task response should include a short-lived Public Access Token.

That token can be passed to browser or client-side code for polling task status and task images without exposing your API key.

patobjectrequired
enabledboolean
default true
destinationstring
e.g. "bunny-prod"≥ 1 characters≤ 64 characters
metadataobject
outputobject
formatstring
"jpg""png""webp"
webhookobject
customobject[]
≥ 1 items≤ 5 items
urlstringrequired
dashboardboolean

Set to false to disable dashboard-managed webhooks for this task. Request-level custom webhooks are still sent.

Response

Image upscale task created

dataobjectrequired
estimatedCoststringrequired

Estimated cost in USD reserved for this task. Failed images are refunded, so the final cost may be lower.

e.g. "0.03"
taskIdstringrequired

Task ID

e.g. "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP"
accessobject

Returned when access.pat.enabled is true.

publicAccessTokenstringrequired

Short-lived Public Access Token for polling task status and image results.

This token is safe to return to frontend code and can be used instead of your API key for polling public task state.

e.g. "pat_eyJhbGciOi..."

Errors

A failed call names what went wrong in code, with a sentence in message. The codes, which of them are worth retrying, and how to read a validation failure are on Errors.