2 credits per call

Photo Restoration API

Repair old, damaged and faded photographs from your own backend. Optionally colorize and increase resolution in the same request instead of chaining three calls.

  • REST · JSON
  • No watermark
  • Nothing stored
endpoint

POST /v1/image-restoration

Base URL
https://app.imggen.ai
Auth
Authorization: Bearer sk_live_…
Cost
2 credits
Input
JPEG (JPG), PNG and WebP · max 25 MB

01 — Overview

What is the Photo Restoration API?

The ImgGen AI photo restoration API is a REST endpoint that repairs damaged photographs. It reduces scratches, tears, stains, fading and blur, and can optionally add colour to a black-and-white original and raise its resolution in the same call. You upload the scan and the restored image is returned in the response.

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 Image Restoration tool.

02 — Request

Request parameters

Send a POST request to https://app.imggen.ai/v1/image-restoration, authenticated with an API key in the Authorization header.

Parameters accepted by this endpoint
ParameterTypeRequiredDefaultDescription
imagefileREQUIREDAdd realistic colour to a black-and-white photograph while restoring it.
colorizebooleanoptionalfalseRepair scratches, tears and physical damage.
removeTearsbooleanoptionalfalseUpscale the restored image for extra resolution. Adds the upscaler cost to the call.
enhanceResolutionbooleanoptionalfalseUpscale the restored image for extra resolution. Adds the upscaler cost to the call.
03 — Integrate

How do I integrate the photo restoration 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/image-restoration' \
  --header 'Authorization: Bearer sk_live_YOUR_API_KEY' \
  --form image=@/path/to/photo.jpg \
  --form colorize=false \
  --form removeTears=true \
  --form enhanceResolution=false
04 — Response

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 restored successfully",
  "image": "iVBORw0KGgoAAAANSUhEUgAA...SUVORK5CYII="
}
05 — Limits

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.

Three operations, one call

Repair, colorize, and upscale are flags on the same request rather than separate endpoints, so a full restoration is one round trip instead of three.

enhanceResolution costs extra

Turning on enhanceResolution adds the upscaler’s cost on top of the base restoration charge, because it runs the upscaling model as well.

Scan quality matters

The model reconstructs from what it can see. A flat, evenly lit scan at the highest resolution your scanner supports gives noticeably better results than a phone photo of a print.

06 — In production

What is the photo restoration API used for?

Where teams put this endpoint into production to process images programmatically, at scale.

Genealogy and archive platforms

Offer one-click restoration of user-uploaded family photographs without building or hosting a restoration model.

Digitization services

Run restoration automatically as scans come off the scanner, so operators review results instead of editing every frame.

Museum and library collections

Produce presentable access copies of deteriorated photographic material while the originals stay untouched.

Photo-printing products

Repair and upscale a customer’s uploaded photograph in one call before it goes to print.

07 — Cost

How much does the photo restoration API cost?

Each successful call costs 2 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.

ImgGen AI plans and API access
PlanPriceCreditsAPI
Free$050 one-time free creditsNo API access
Starter$9.99 / month400 credits / monthAPI access included
Pro$29.99 / month1,400 credits / monthAPI access + priority support
EnterpriseCustomCustom volumeDedicated infrastructure

Credit costs and limits last verified 2026-08-27.

08 — Related

Teams using the photo restoration API usually reach for these next.

Photo Colorization APIImage Upscaling APIImage Restoration (web tool)All API endpoints

Also available: Background Removal, Watermark Removal, Text Removal, Image Generation.

FAQ

Photo Restoration API FAQ

It is an HTTP endpoint that repairs damaged photographs automatically. It reduces scratches, tears, stains, fading, and blur, and can optionally colorize and enlarge the result. It exists so that a product can offer restoration to its users without anyone doing retouching work by hand.

Get started

Start calling the Photo Restoration 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