Old Photo Restorer API

by PopNow

Clear scratches, dust and grain from old photos, faces unchanged

popnow/photo-restorer-v1/edit
  • Old Photo Restorer

About Old Photo Restorer

Clear scratches, dust and grain from old photos, faces unchanged.

Call it with the model name popnow/photo-restorer-v1/edit on POST /jobs/createTask, from $0.048.

Introduction

Old Photo Restorer is a one-field endpoint for scanned prints. Send the photo in image_url and it comes back with scratches, dust spots, grain and blur cleaned up. It does not colorize and it does not ask for a prompt.

Request

{
 "image_url": "https://example.com/scan.jpg"
}

What we saw in testing

We made a 640×960 sepia scan of a portrait on a rooftop and added the usual damage: four long scratches, seven dust specks, grain, blur and heavy JPEG compression. After about 17 seconds it came back as an 832×1248 PNG with every scratch and speck gone and the face, beard and jacket noticeably sharper. The man was clearly the same person. The faint clouds in the sky were smoothed into an even pale sky, and the sepia cast became lighter.

A clean 2048×1152 color photo came back at 1360×768 with its colors kept and the skin a little smoother. That shows the size rule: the output is about one megapixel whatever you send.

Tips

  • Scan at a decent resolution and crop off the album page or frame before sending.
  • Glare and reflections are harder to remove than scratches, so photograph prints without a flash.
  • Need color? Pass the restored PNG to Photo Colorizer (/api/photo-colorizer-v1).
  • Need a bigger file for printing? Run Image Upscaler (/api/image-upscaler-v1) after restoring.

Request parameters

ParameterRequiredDescription
image_urlYesThe picture to start from.

Pricing

Prices are in USD. The API uses a separate USD balance. Website credits cannot be used or transferred to it, and API funds cannot be transferred to website credits. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per image
Standard$0.048

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

API quick start

Call the Old Photo Restorer API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls use your separate USD balance.
  2. Send the request. POST /jobs/createTask with model popnow/photo-restorer-v1/edit and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "popnow/photo-restorer-v1/edit",
  "input": {
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

Old Photo Restorer API questions

How much does the Old Photo Restorer API cost?

Old Photo Restorer costs $0.048 per image. The API uses a separate USD balance. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What is the model name for Old Photo Restorer in the API?

Put popnow/photo-restorer-v1/edit for Old Photo Restorer in the model field of POST /jobs/createTask.

Will it add color to a black-and-white photo?

No. It repairs the damage and keeps the photo's tones; our sepia scan came back as a cleaner, lighter sepia picture. To color it, send the restored file to Photo Colorizer (/models/photo-colorizer-v1).

Does it keep the original resolution?

Not exactly. The result is about one megapixel at the source's aspect ratio: our 640×960 scan came back at 832×1248, while a 2048×1152 photo came back at 1360×768. For a large print, run Image Upscaler (/models/image-upscaler-v1) on the result.

Will the people still look like themselves?

In our test the man's face, beard and hairline matched the scan closely. Detail is rebuilt where the print was damaged, so look at faces at full size before you share the result.

What can change besides the damage?

Areas with little detail may be simplified: the faint clouds in our scan's sky came back as an even pale sky, and skin on a modern photo came back slightly smoother. Keep the original scan alongside the restored copy.

Can I try Old Photo Restorer without writing code?

Run Old Photo Restorer in the Playground with your API USD balance, without an API key. Each run appears in your developer history with its matching code.

More about Old Photo Restorer