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

urlstringrequired
format: uri
sizeobject | stringrequired

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

"2x""4x"
type"scale"required
factornumberrequired
24
effortstringrequired

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

"low""high"
outputobject
formatstring
"png""jpg""webp"
generate_public_access_tokenboolean

Return a short-lived public access token as public_access_token, for polling this task from browser code without your API key. Defaults to false.

webhookobject
registeredboolean

Set to false to skip the webhooks registered on the account for this task. Custom webhooks in custom are still sent.

customobject[]
≥ 1 items≤ 5 items
urlstringrequired

Receives this task's events, unsigned. Use https and a public host, and put a secret token in the query string to verify deliveries: only scheme://host is ever shown back.

e.g. "https://example.com/hooks/mynth?token=your-secret-token"
destinationstring
e.g. "bunny-prod"≥ 1 characters≤ 64 characters
metadataobject

Response

Image upscale task created

dataobjectrequired
task_idstringrequired

Task ID

e.g. "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP"
estimated_coststringrequired

Estimated cost in USD reserved for this task. Work that fails is refunded, so the final cost may be lower.

e.g. "0.03"
public_access_tokenstring

Short-lived public access token for polling this task's status and result.

Safe to hand to browser code instead of your API key. Returned only when the request set generate_public_access_token: true.

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.