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.
Quick start
- 01
Subscribe to Pro and Business
API access comes with these plans. Pricing - 02
Create an API key
User Center → API Keys. The key is shown once; keep it in a server-side secret. - 03
Upscale an image
POST the image URL, then poll the job until it is done and download the result.
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_xxxxxxxxxxxxxxxxPOST /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.
| Field | Type | Description |
|---|---|---|
image_url | string | Public https:// URL of a JPG, PNG or WebP image. |
image_base64 | string | The image as base64 (or a data: URL), instead of image_url. |
image_file | file | Multipart upload, instead of image_url. |
model | string | general, anime, face, waifu2x, ultra. Default general. |
scale | string | 2x or 4x; 2k or 4k for ultra. Default: the model default. |
noise | integer | waifu2x only: denoise level from -1 (off) to 3. Default 1. |
curl https://upscaylai.app/api/v1/upscale \
-H "Authorization: Bearer $UPSCAYLAI_API_KEY" \
-F image_file=@portrait.jpg -F model=face -F scale=2x{
"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"{
"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
| Endpoint | Key | Returns |
|---|---|---|
GET /api/v1/models | Not needed | Models, scales, credits per image and input limits |
GET /api/v1/account | Required | Your plan and credit balance |
| model | Engine | Scales | Credits |
|---|---|---|---|
general | Real-ESRGAN x4plus | 2x, 4x, 6x, 8x | 1 |
anime | Real-ESRGAN x4plus anime 6B | 2x, 4x, 6x, 8x | 1 |
face | GFPGAN v1.4 | 2x | 1 |
waifu2x | waifu2x (nunif) | 2x, 4x | 1 |
ultra | SeedVR2 | 2k, 4k | 2–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"}}.
| Status | code | Meaning |
|---|---|---|
| 400 | invalid_model, invalid_scale, missing_image… | Fix the request |
| 401 | missing_api_key, invalid_api_key | No key, or a deleted one |
| 402 | insufficient_credits | Top up or wait for your renewal |
| 403 | plan_required | Needs the Pro and Business plan |
| 404 | not_found | Unknown or expired job, or not yours |
| 413 | too_large, file_too_large | Resize the image |
| 422 | image_url_unreachable | We could not download image_url |
| 429 | rate_limited | Slow down and retry |
| 502 / 503 | provider_error, model_unavailable | Retry 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.