Editing · REPRODUCIBLE GUIDE

AI Photo Restoration Prompts with Preservation Constraints

A restoration workflow for damaged portraits that prioritizes identity, period details, natural texture, and reversible review notes.

One API gateway for multiple AI models.

APIMart is a multi-model AI API gateway with an OpenAI-compatible endpoint. Use one account to access supported image models, compare current pricing, and choose a cost-efficient option for each workload.

Create an APIMart account ↗
Browse all guides
WHY THIS GUIDE EXISTS

Test the workflow,
not the marketing claim.

Restoration prompts need stronger preservation language than creative edits; this guide records protected facial features, damage targets, historical details, and acceptance criteria.

Editing

Repair vintage portrait

Repair scratches and missing emulsion in the masked areas of the vintage portrait, preserve original facial features and film grain, maintain monochrome tonality, do not beautify or modernize.
Photo restoration fixture4:5
Editing

Remove tabletop object

Remove the red ceramic cup from the table and reconstruct the walnut grain and its soft window reflection; preserve every other object, crop, color, and shadow.
Localized object removal3:2
Editing

Expand cafe scene

Extend the cafe photograph horizontally, continuing the tiled wall, wooden counter and warm pendant lighting with correct perspective; keep the central subject unchanged and avoid adding people.
Outpainting fixture16:9
PYTHON QUICKSTART

Keep the request reproducible.

Store credentials in the environment. Record the exact model identifier, dimensions, test date, and retry count with the resulting asset.

import os
from openai import OpenAI

client = OpenAI(
  api_key=os.environ["APIMART_API_KEY"],
  base_url="https://api.apimart.ai/v1",
)

result = client.images.generate(
  model="gpt-image-1-official",
  prompt=PROMPT,
  size="1024x1024",
  n=1,
)
REVIEW CHECKLIST

Before you publish a result