2–4 credits per call
Image Upscaling API
Increase image resolution 2x or 4x from your own backend. Optional face enhancement and sharpening, JPEG or PNG output, and pricing that scales with the factor you ask for.
- REST · JSON
- No watermark
- Nothing stored
POST /v1/upscale-image
What is the Image Upscaling API?
The ImgGen AI image upscaling API is a REST endpoint that increases the resolution of an image using AI rather than simple interpolation. It reconstructs edges, textures, and fine detail instead of stretching pixels, so the output stays sharp. You send an image and a scale factor, and the higher-resolution result comes back in the same request.
It is one of seven endpoints in the ImgGen AI image editing API, all of which share a single API key, a single base URL, and the same request and response shape. If you also need this capability in a browser rather than from code, the same AI model powers the AI Image Upscaler tool.
Request parameters
Send a POST request to https://app.imggen.ai/v1/upscale-image, authenticated with an API key in the Authorization header.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| image | file | REQUIRED | — | Upscale factor. Accepts 2 or 4. |
| factor | number | optional | 4 | Apply additional facial reconstruction. Useful for portraits and group photos. |
| enhanceFace | boolean | optional | false | Apply extra sharpening to the upscaled result. |
| sharpen | boolean | optional | false | Output format. Accepts jpeg or png. |
| output | string | optional | jpeg | Output format. Accepts jpeg or png. |
How do I integrate the image upscaling API?
Create an API key in your ImgGen account, set it as an environment variable, and call the endpoint. Here is the same request in cURL, Node.js and Python.
curl --request POST \
--url 'https://app.imggen.ai/v1/upscale-image' \
--header 'Authorization: Bearer sk_live_YOUR_API_KEY' \
--form image=@/path/to/photo.jpg \
--form factor=4 \
--form enhanceFace=false \
--form sharpen=false \
--form output=jpegimport fs from 'node:fs';
const form = new FormData();
form.append('image', new Blob([fs.readFileSync('photo.jpg')]), 'photo.jpg');
form.append('factor', '4');
form.append('enhanceFace', 'false');
form.append('sharpen', 'false');
form.append('output', 'jpeg');
const res = await fetch('https://app.imggen.ai/v1/upscale-image', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.IMGGEN_API_KEY}` },
body: form,
});
const data = await res.json();
// data.image is a base64-encoded PNG
fs.writeFileSync('result.png', Buffer.from(data.image, 'base64'));import base64, os, requests
with open("photo.jpg", "rb") as f:
res = requests.post(
"https://app.imggen.ai/v1/upscale-image",
headers={"Authorization": f"Bearer {os.environ['IMGGEN_API_KEY']}"},
files={"image": f},
data={"factor": "4", "enhanceFace": "false", "sharpen": "false", "output": "jpeg"},
)
data = res.json()
with open("result.png", "wb") as out:
out.write(base64.b64decode(data["image"]))Response
A successful call returns JSON. The result is base64-encoded — decode it before writing to disk or object storage. Every successful response also carries an X-Credit-Remaining header with your balance after the call.
{
"success": true,
"message": "Image upscaled successfully",
"image": "iVBORw0KGgoAAAANSUhEUgAA...SUVORK5CYII="
}Limits and behaviour worth knowing
The endpoint accepts JPEG (JPG), PNG and WebP with a 25 MB maximum file size, and responds synchronously within 60 seconds — there is no job to poll and no webhook to configure.
Choose your output format
Set output=png when you need lossless results or an alpha channel to survive; jpeg keeps payloads small for high-volume catalog work.
Face enhancement is opt-in
enhanceFace runs additional facial reconstruction to enhance and upscale portraits. Leave it off for product shots and landscapes where there is no face to improve.
Synchronous by design
There is no job queue to poll. The upscaled image comes back in the same response, within the 60-second request ceiling.
What is the image upscaling API used for?
Where teams put this endpoint into production to process images programmatically, at scale.
Legacy catalog migration
Bring years of small, low-resolution product images up to modern high-resolution display standards in a batch job instead of re-shooting them.
Print preparation
Raise web-resolution assets to a high-quality size that holds up in print, with optional sharpening applied in the same call for a sharper result.
User-generated content
Upscale small avatars and uploads server-side so they render cleanly on high-DPI displays.
Media and archives
Increase the image resolution of scanned or compressed source images before they enter a content management system, alongside restoration where it is needed.
How much does the image upscaling API cost?
Each successful call costs 2–4 credits, so your effective cost per image follows whichever plan you are on. Credits come from your plan and are shared across every endpoint and the web editor, so you are not buying a separate quota per tool. A call that fails is refunded automatically. See the full pricing page for details.
| Plan | Price | Credits | API |
|---|---|---|---|
| Free | $0 | 50 one-time free credits | No API access |
| Starter | $9.99 / month | 400 credits / month | API access included |
| Pro | $29.99 / month | 1,400 credits / month | API access + priority support |
| Enterprise | Custom | Custom volume | Dedicated infrastructure |
Credit costs and limits last verified 2026-08-27.
Related endpoints and tools
Teams using the image upscaling API usually reach for these next.
Also available: Background Removal, Watermark Removal, Text Removal, Image Generation.
Image Upscaling API FAQ
- It is an HTTP endpoint that increases an image’s resolution using a trained model. Instead of interpolating between existing pixels the way a resize does, the model predicts the detail that a higher-resolution version of the image would contain — edges, texture, and structure — and reconstructs it. You POST the image and read the enlarged result from the response.
- The factor parameter accepts 2 or 4 and defaults to 4. Input can be JPEG (JPG), PNG and WebP up to 25 MB, and output can be returned as jpeg (default) or png.
- Cost follows the factor: 2 credits at factor=2 and 4 credits at factor=4 (the default). Starter gives you 400 credits a month for $9.99 and Pro gives you 1,400 for $29.99, and unused credits roll over while you stay subscribed. Credit-based pricing means a batch-heavy month and a quiet month cost you the same per image.
- Upscaling reconstructs detail as it enlarges, which sharpens soft images as a side effect, and the sharpen flag pushes that further to enhance the result. For damaged or faded photographs — scratches, tears, colour loss — use the photo restoration API instead, which is built for repair rather than resolution.
- Synchronous. There is no job ID to poll and no webhook to configure — the upscaled image is in the body of the same response, subject to a 60-second ceiling on the request.
- Yes. Every plan, including Free, includes full commercial usage rights, and no output carries a watermark. You can sell, print, or publish anything the API returns.
- No. The API is stateless: it does not create a project, save a file, or keep your image. Your upload is written to a temporary object, processed, and deleted as soon as the response is returned. The only thing retained is a usage log recording that a call happened and how many credits it cost. Your images are never used to train models.
Get started
Start calling the Image Upscaling API
One key unlocks all seven endpoints. No watermark, full commercial rights, and nothing you send is stored after the response is returned.
Get your API key