Blog Article

Introducing FLUX.1 Kontext API, GFPGAN API & CodeFormer API on Pixazo


Deepak Joshi
By Deepak Joshi | Last Updated on May 7th, 2026 10:49 am

We’re excited to introduce three new image restoration APIs on Pixazo — FLUX.1 Kontext API, GFPGAN API, and CodeFormer API. Together, they cover the three most common restoration jobs developers actually need to ship: context-aware repair of damaged photographs, high-accuracy face reconstruction, and fidelity-controlled enhancement with separate background upscaling.

Each model is exposed through Pixazo’s unified API platform with the same authentication pattern, the same async queue, and the same webhook callbacks — so you can integrate one or all three without learning three different SDKs. Pricing starts at $0.0021 per megapixel (CodeFormer), and a $5 promotional credit is available on first payment.

This guide explains what each model does well, where each one falls short, how to choose between them for a given input, and how to call them. If you only have time for one section, jump to the side-by-side comparison or the decision guide.

What are the new image restoration APIs on Pixazo?

The new APIs are three independently selectable restoration models — FLUX.1 Kontext, GFPGAN, and CodeFormer — available behind Pixazo’s standardized gateway. Each accepts a public image URL, processes asynchronously, and returns a restored image via polling or webhook.

They are not interchangeable. FLUX.1 Kontext reasons about the entire scene before restoring, GFPGAN is purpose-built for faces, and CodeFormer gives you an explicit fidelity dial plus separate background enhancement. Picking the right one for the input is the difference between a clean restoration and a hallucinated face.

Pixazo does not own these models. FLUX.1 Kontext is built by Black Forest Labs, GFPGAN by TencentARC, and CodeFormer by Sczhou. Pixazo provides the unified API layer, billing, async queue, webhooks, and CDN delivery on top.

FLUX.1 Kontext API: Context-Aware Image Restoration

Provider: Black Forest Labs Pricing: $0.04 per request

FLUX.1 Kontext is a general-purpose, context-aware restoration model. Unlike face-only restorers, it considers the entire scene — lighting, texture, composition, surrounding objects — before reconstructing damaged or degraded regions. This makes it the right pick for full-frame photo repair where the subject is not necessarily a face.

What it’s designed for:

  • Old or damaged photographs with cracks, fading, water damage, or dust
  • Low-quality scans of mixed scenes (people, landscape, objects)
  • Recovering degraded digital media without face-specific bias
  • Workflows where you need a single restoration pass that handles the whole image

Key technical details:

  • Input formats: JPEG, PNG, GIF, WebP (via public URL)
  • Output formats: JPG or PNG
  • Reproducibility: Optional seed for deterministic outputs
  • Safety control: safety_tolerance integer (0–2)
  • Processing: Async — returns a request_id and polling URL; webhook supported
  • Authentication: Ocp-Apim-Subscription-Key header
Best for: mixed-content photo restoration where the damage isn’t limited to faces — family archives, vintage prints, scanned documents with imagery, scene-level repair.

GFPGAN API: High-Accuracy Face Restoration

Provider: TencentARC Pricing: $0.0031 per request $5 first-payment credit

GFPGAN is a specialist. It exists to fix blurry, low-quality, or damaged face images with high accuracy and natural detail — nothing more, nothing less. If your input is a portrait or a photo where the face is the subject, GFPGAN is typically the cheapest and fastest path to a clean result.

What it’s designed for:

  • Restoring blurred, pixelated, or low-resolution face photos
  • Repairing damaged portraits (scratches, compression artifacts, slight tears)
  • Improving detail on small faces in larger compositions
  • High-volume workflows where cost per image matters

Key technical details:

  • Endpoint: https://gateway.pixazo.ai/gfpgan/v1/gfpgan/generate
  • Required parameter: img (public image URL)
  • Optional scale: 1–4 (defaults to 2)
  • Optional version: defaults to v1.4
  • Output: PNG, delivered via Cloudflare R2 CDN
  • Async pipeline: QUEUED → PROCESSING → COMPLETED / FAILED / ERROR
  • Webhook: Supported for completion callbacks
Best for: face-only restoration at the lowest per-image cost — profile photos, ID photos, batch portrait cleanup, social-app face enhancement.

CodeFormer API: Fidelity-Controlled Restoration with Background Enhancement

Provider: CodeFormer (sczhou) Pricing: $0.0021 per megapixel $5 first-payment credit

CodeFormer is the most configurable of the three. It restores faces while letting you explicitly trade off between visual quality (sharper, more “hallucinated” detail) and fidelity (closer to the original person’s identity). It also handles backgrounds separately via Real-ESRGAN integration, and it can upscale up to 8× — which neither FLUX.1 Kontext nor GFPGAN does in a single request.

What it’s designed for:

  • Portrait restoration where preserving the actual person’s identity matters (legal, archival, journalistic)
  • Photos that need both face restoration and background upscaling
  • Outputs that need to be enlarged 4×–8× from a small source
  • Workflows priced by output size rather than per request

Key technical details:

ParameterTypeRangePurpose
imageURL (string)Public URLSource image to restore
codeformer_fidelityNumber0–1Quality vs. identity trade-off (lower = sharper, higher = closer to original)
background_enhanceBooleantrue / falseRun Real-ESRGAN on non-face regions
face_upsampleBooleantrue / falseRe-upsample restored faces for higher detail
upscaleInteger1–8Output resolution multiplier
webhookURL (optional)Valid URLAsync completion notification

Endpoint: https://gateway.pixazo.ai/codeformer-image-restoration/v1/codeformer/generate

Best for: archival and identity-sensitive restoration, mixed face + background repair, and small images that need to be enlarged 4×–8× in the same step.

How do the three models compare side by side?

The short answer: FLUX.1 Kontext is the broadest, GFPGAN is the cheapest face specialist, and CodeFormer is the most configurable with the largest upscale range. The table below shows the differences that actually matter when picking one.

Capability FLUX.1 Kontext GFPGAN CodeFormer
ProviderBlack Forest LabsTencentARCCodeFormer (sczhou)
Primary focusWhole-image restorationFaces onlyFaces + background
Fidelity controlNo (single mode)NoYes (0–1 dial)
Max upscale factorNot configurable1–4×1–8×
Background enhancementNative (full image)NoOptional (Real-ESRGAN)
Input formatsJPEG, PNG, GIF, WebPPublic image URLPublic image URL
Output formatJPG or PNGPNGPNG
Reproducibility (seed)YesNoNo
Async queue + webhookYesYesYes
Pricing modelPer requestPer requestPer megapixel
Price$0.04 / request$0.0031 / request$0.0021 / megapixel
Best when…Damage spans the whole sceneSubject is a face, cost mattersIdentity preservation + upscale

All three share the same authentication header (Ocp-Apim-Subscription-Key), the same async pattern (queue → poll or webhook → CDN-hosted result), and the same Pixazo billing account — so switching between them in code is a parameter change, not a re-integration.

Suggested Read: Best AI Photo Restoration Tools in 2026

Which restoration API should you use, and when?

Use the input as the deciding factor, not the price. A face-only model run on a non-face photo will produce worse results no matter how cheap it is.

Pick FLUX.1 Kontext when…

The damage covers the whole image, the subject isn’t exclusively a face, or you need reproducible outputs with seed control. Best for vintage photographs, scanned archives, and mixed-content scenes.

Pick GFPGAN when…

The subject is a face, the cost per image is critical, and you don’t need an explicit fidelity dial or 8× upscaling. Best for high-volume portrait cleanup, profile photos, and ID images.

Pick CodeFormer when…

You need to preserve a specific person’s identity, restore both the face and the background, or upscale beyond 4× in a single request. Best for archival, journalism, and legal-grade restoration.

Not sure which one fits? Run the same input through GFPGAN ($0.0031) and CodeFormer ($0.0021/MP) and compare. Two test calls cost less than one cent on a 1MP image.

Suggested Read: Best AI Image Enhancers in 2026

How do you integrate the restoration APIs?

All three APIs follow the same async contract: submit a JSON request, get a request_id back, then either poll a status URL or wait for a webhook callback. The example below shows a CodeFormer request — FLUX.1 Kontext and GFPGAN follow the same shape with their own parameter names.

curl -X POST \ https://gateway.pixazo.ai/codeformer-image-restoration/v1/codeformer/generate \ -H "Ocp-Apim-Subscription-Key: YOUR_PIXAZO_KEY" \ -H "Content-Type: application/json" \ -d '{ "image": "https://example.com/old-portrait.jpg", "codeformer_fidelity": 0.7, "background_enhance": true, "face_upsample": true, "upscale": 4, "webhook": "https://yourapp.com/restore-callback" }'

Status states across all three models: QUEUEDPROCESSINGCOMPLETED (or FAILED / ERROR). Restored images are delivered from Pixazo’s CDN with a stable URL, so you can store the URL or stream the file directly to the client.

Recommended polling cadence is every 5–10 seconds when not using webhooks. For production workflows, prefer webhooks — they remove the need for client-side polling logic and reduce wasted requests.

Suggested Read: Best AI HD Image Converters in 2026

Real-World Use Cases for Image Restoration

The three APIs cover most production restoration jobs developers actually ship. The patterns below are common across Pixazo’s API users:

  • Family photo apps: GFPGAN for face cleanup on uploaded portraits; FLUX.1 Kontext as a fallback for whole-frame vintage scans.
  • Archival and digitization platforms: CodeFormer with high codeformer_fidelity (0.8–0.9) to preserve the original subject’s identity, plus background_enhance for the surrounding context.
  • E-commerce reseller platforms: CodeFormer with 4×–8× upscale to enlarge small product photos sourced from older listings.
  • Social and dating apps: GFPGAN as a server-side enhancement step on user-uploaded profile photos, gated behind explicit user consent.
  • Genealogy and ancestry tools: FLUX.1 Kontext for full-scene restoration of damaged historical photographs where faces, clothing, and backgrounds all need attention.
  • Document and ID workflows: CodeFormer with low upscale and high fidelity to clean up scanned documents containing photos.

Suggested Read: Best AI Image Inpainting/Replacer Tools to Edit Photos Like a Pro in 2026

Honest Limitations You Should Know

None of these three models is magic. Each has failure modes that you should plan for in production.

  • GFPGAN can hallucinate faces when the input face is too small or too damaged. The reconstructed face may look plausible but may not match the original person. For identity-sensitive use cases, prefer CodeFormer with high fidelity.
  • CodeFormer’s fidelity dial is a trade-off, not a free lunch. Pushing fidelity to 1.0 reduces sharpness; pushing it to 0 increases hallucination risk. Test on representative inputs before committing to a value.
  • FLUX.1 Kontext costs more per request ($0.04) than the other two. For face-only inputs at scale, it’s usually overkill.
  • Async only. All three return a request ID and require polling or webhooks. There is no synchronous “return the image in the response” mode — design your client accordingly.
  • Public input URLs only. The image must be reachable from Pixazo’s gateway. Private S3 buckets need a presigned URL or a public mirror.
  • Restoration is not generation. If the original information isn’t there, the model will invent something plausible. Plan for human review on legal, journalistic, or evidentiary outputs.
  • User consent is non-negotiable for any face-restoration workflow involving end-user uploads. Restoration changes appearance — users must opt in.

Suggested Read: Best AI Image Upscaler Tools in 2026

Accessing the Image Restoration APIs on Pixazo

All three models are live on Pixazo today. You can review each model’s full documentation, parameters, and pricing on its dedicated page:

Pixazo accounts share a single API key across all three models, so you can integrate one and add the others without re-authenticating. New users get a $5 promotional credit on first payment, which is enough to test all three models on roughly 1,000+ images at small resolutions.

Frequently Asked Questions About Pixazo’s Image Restoration APIs

1. What’s the difference between FLUX.1 Kontext, GFPGAN, and CodeFormer?

FLUX.1 Kontext restores the entire image with scene-level reasoning. GFPGAN restores faces only at the lowest cost per request. CodeFormer restores faces with an explicit identity-vs-quality dial and supports up to 8× upscaling plus separate background enhancement.

2. Which restoration API is the cheapest on Pixazo?

CodeFormer is cheapest for small images at $0.0021 per megapixel. GFPGAN is cheapest for fixed face-only restoration at $0.0031 per request. FLUX.1 Kontext is $0.04 per request and is priced for whole-image, scene-level work.

3. Can I use these APIs to restore old family photos?

Yes. For mixed scenes use FLUX.1 Kontext. For face-focused archival work where preserving the actual person’s identity is important, use CodeFormer with a high codeformer_fidelity value (0.8–0.9).

4. Do the restoration APIs support webhooks?

Yes. All three models are asynchronous and accept a webhook URL for completion callbacks. They also expose a polling endpoint if webhooks aren’t practical for your stack.

5. What input formats are supported?

FLUX.1 Kontext accepts JPEG, PNG, GIF, and WebP. GFPGAN and CodeFormer accept any public image URL. All three require the input to be reachable over the public internet.

6. How large can I upscale an image?

CodeFormer supports up to 8× upscaling in a single request. GFPGAN supports 1×–4×. FLUX.1 Kontext doesn’t expose a configurable upscale factor — it focuses on restoration quality at native resolution.

7. Is image restoration the same as image generation?

No. Restoration recovers detail from existing pixels; generation creates new pixels from a prompt. When the original input is too damaged to recover, restoration models will plausibly invent missing detail — which is why human review is recommended for evidentiary or legal use cases.

8. Can I use the restored images commercially?

Yes, restored outputs from all three models can be used commercially under Pixazo’s API terms. You are responsible for having the rights to the input images you submit.

Deepak Joshi

Deepak Joshi - Content Marketing Specialist at Pixazo

Deepak Joshi is a Content Marketing specialist having a combined experience of 10+ years working in the digital world. He is one of the active contributors to Pixazo Blog.