Skip to main content
Loading credits
REST API

Image Upscaler API

Send an image URL, get back a sharper image 2× or 4× larger. Use it from your backend or a script, with the same models as the website.

The API is included in the Pro and Business plans (from $19.99 a month). Each upscale spends your plan credits. See compare plans, then create a key in User Center → API Keys.

Quick start

  1. 01

    Subscribe to Pro and Business

    API access comes with these plans. Pricing
  2. 02

    Create an API key

    User Center → API Keys. The key is shown once; keep it in a server-side secret.
  3. 03

    Upscale an image

    POST the image URL, then poll the job until it is done and download the result.
Start an upscale
curl https://upscaylai.app/api/v1/upscale \
  -H "Authorization: Bearer $UPSCAYLAI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: photo-001" \
  -d '{"image_url": "https://example.com/photo.jpg", "model": "general", "scale": "4x"}'

Authentication

Send your key in the Authorization header as a bearer token (x-api-key works too). Keys start with upai_, are stored only as a hash and can be deleted at any time. Never put a key in browser or mobile code: call the API from your server.

Authorization: Bearer upai_xxxxxxxxxxxxxxxx

POST /api/v1/upscale

Starts a job and returns 202 Accepted with the job. Send JSON, or multipart/form-data with the file in image_file.

Upscale request fields
FieldTypeDescription
image_urlstringPublic https:// URL of a JPG, PNG or WebP image.
image_base64stringThe image as base64 (or a data: URL), instead of image_url.
image_filefileMultipart upload, instead of image_url.
modelstringgeneral, anime, face, waifu2x, ultra. Default general.
scalestring2x or 4x; 2k or 4k for ultra. Default: the model default.
noiseintegerwaifu2x only: denoise level from -1 (off) to 3. Default 1.
Multipart upload
curl https://upscaylai.app/api/v1/upscale \
  -H "Authorization: Bearer $UPSCAYLAI_API_KEY" \
  -F image_file=@portrait.jpg -F model=face -F scale=2x
202 Accepted
{
  "id": "1137886e-bdb3-4f80-b69f-e749fadfed7d",
  "status": "pending",
  "model": "general",
  "scale": "4x",
  "credits_charged": 1,
  "input": { "width": 480, "height": 358 },
  "expected_output": { "width": 1920, "height": 1432 },
  "output": null,
  "poll_url": "https://upscaylai.app/api/v1/jobs/1137886e-bdb3-4f80-b69f-e749fadfed7d",
  "expires_at": "2026-11-15T02:55:13.666Z"
}

Idempotency: send an Idempotency-Key header (any string up to 200 characters). Repeating the request with the same key within 24 hours returns the first job with Idempotent-Replayed: true and charges nothing.

GET /api/v1/jobs/{id}

Returns the job. Poll every 2–3 seconds while status is pending; most jobs finish in 5–40 seconds. When it is done, output.url shows the image and output.download_url downloads it. Both links work for 24 hours, without the key, so copy the file to your own storage. A failed job has error set and its credits refunded.

curl https://upscaylai.app/api/v1/jobs/1137886e-bdb3-4f80-b69f-e749fadfed7d \
  -H "Authorization: Bearer $UPSCAYLAI_API_KEY"
200 OK
{
  "id": "1137886e-bdb3-4f80-b69f-e749fadfed7d",
  "status": "done",
  "output": {
    "width": 1920,
    "height": 1432,
    "url": "https://upscaylai.app/api/upscale-jobs/1137886e-…?as=image",
    "download_url": "https://upscaylai.app/api/upscale-jobs/1137886e-…?as=download"
  },
  "credits_charged": 1,
  "refunded": false
}

Models and account

Other endpoints
EndpointKeyReturns
GET /api/v1/modelsNot neededModels, scales, credits per image and input limits
GET /api/v1/accountRequiredYour plan and credit balance
Models and credits
modelEngineScalesCredits
generalReal-ESRGAN x4plus2x, 4x, 6x, 8x1
animeReal-ESRGAN x4plus anime 6B2x, 4x, 6x, 8x1
faceGFPGAN v1.42x1
waifu2xwaifu2x (nunif)2x, 4x1
ultraSeedVR22k, 4k2–4

Using an AI assistant?

Claude, Codex, Cursor and other MCP clients can use the same key through our remote MCP server, without writing code. Setup commands and tools are on the MCP server page.

Limits

  • 120 requests a minute per key, REST and MCP together (polling counts).
  • Images up to 10 MB: JPG, PNG or WebP, at least 16 px per side.
  • Input up to 4 MP for 2× and 2.25 MP for 4×; larger images return 413 too_large, so resize first.
  • Jobs and result links expire after 24 hours.

Errors

Errors return JSON: {"error": {"code", "message"}}.

API error codes
StatuscodeMeaning
400invalid_model, invalid_scale, missing_image…Fix the request
401missing_api_key, invalid_api_keyNo key, or a deleted one
402insufficient_creditsTop up or wait for your renewal
403plan_requiredNeeds the Pro and Business plan
404not_foundUnknown or expired job, or not yours
413too_large, file_too_largeResize the image
422image_url_unreachableWe could not download image_url
429rate_limitedSlow down and retry
502 / 503provider_error, model_unavailableRetry later or use another model

API FAQ

Which plans include the API?

The Pro and Business subscriptions. Credit packs and the Basic plan work on the website only. The free trial upscales are not available through the API.

How much does one API call cost?

Starting an upscale costs the same credits as on the website: 1 credit for General Photo, Anime & Art, Face Restore and waifu2x at 2× or 4×, 2 at 6× and 3 at 8×; Ultra Detail is 2 credits at 2K and 4 at 4K. Reading jobs, models and your balance is free. Failed jobs are refunded automatically.

Can I use the same key for REST and MCP?

Yes. One key works for both, and both spend credits from the same account. Create separate keys per app so you can delete one without breaking the others.

Do you keep my images?

No. We pass the image to the GPU provider that runs the model and stream the result back. Job records and result links expire after 24 hours, so download results you want to keep.

Does the Upscayl desktop app have an API?

No. The Upscayl desktop app does not have a cloud API of its own. This API runs on the Upscayl AI Online servers and charges the same credits as the website.