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

Table of Contents
- 1. What are the new image restoration APIs on Pixazo?
- 2. FLUX.1 Kontext API: Context-Aware Image Restoration
- 3. GFPGAN API: High-Accuracy Face Restoration
- 4. CodeFormer API: Fidelity-Controlled Restoration with Background Enhancement
- 5. How do the three models compare side by side?
- 6. Which restoration API should you use, and when?
- 7. How do you integrate the restoration APIs?
- 8. Real-World Use Cases for Image Restoration
- 9. Honest Limitations You Should Know
- 10. Accessing the Image Restoration APIs on Pixazo
- 11. Frequently Asked Questions About Pixazo’s Image Restoration APIs
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
seedfor deterministic outputs - Safety control:
safety_toleranceinteger (0–2) - Processing: Async — returns a
request_idand polling URL; webhook supported - Authentication:
Ocp-Apim-Subscription-Keyheader
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
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:
| Parameter | Type | Range | Purpose |
|---|---|---|---|
image | URL (string) | Public URL | Source image to restore |
codeformer_fidelity | Number | 0–1 | Quality vs. identity trade-off (lower = sharper, higher = closer to original) |
background_enhance | Boolean | true / false | Run Real-ESRGAN on non-face regions |
face_upsample | Boolean | true / false | Re-upsample restored faces for higher detail |
upscale | Integer | 1–8 | Output resolution multiplier |
webhook | URL (optional) | Valid URL | Async completion notification |
Endpoint: https://gateway.pixazo.ai/codeformer-image-restoration/v1/codeformer/generate
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 |
|---|---|---|---|
| Provider | Black Forest Labs | TencentARC | CodeFormer (sczhou) |
| Primary focus | Whole-image restoration | Faces only | Faces + background |
| Fidelity control | No (single mode) | No | Yes (0–1 dial) |
| Max upscale factor | Not configurable | 1–4× | 1–8× |
| Background enhancement | Native (full image) | No | Optional (Real-ESRGAN) |
| Input formats | JPEG, PNG, GIF, WebP | Public image URL | Public image URL |
| Output format | JPG or PNG | PNG | PNG |
| Reproducibility (seed) | Yes | No | No |
| Async queue + webhook | Yes | Yes | Yes |
| Pricing model | Per request | Per request | Per megapixel |
| Price | $0.04 / request | $0.0031 / request | $0.0021 / megapixel |
| Best when… | Damage spans the whole scene | Subject is a face, cost matters | Identity 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.
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.
Status states across all three models: QUEUED → PROCESSING → COMPLETED (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, plusbackground_enhancefor the surrounding context. - E-commerce reseller platforms: CodeFormer with 4×–8×
upscaleto 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
upscaleand 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:
- FLUX.1 Kontext: https://www.pixazo.ai/models/flux
- GFPGAN: https://www.pixazo.ai/models/gfpgan
- CodeFormer: https://www.pixazo.ai/models/codeformer
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.
Related Articles
- Introducing FASHN Virtual Try-On V1.6 API on Pixazo for High-Resolution Virtual Try-On
- Introducing LTX-2 19B API on Pixazo for Cinematic Image-to-Video and Audio-Synchronized Generation
- Best Trending APIs in 2026
- Best Reference To Video APIs in 2026
- Best AI Image Upscaler APIs in 2026
- Nano Banana Pro API Pricing: Complete Breakdown & The Cheapest Way to Generate Nano Banana–Quality Images
- Best Virtual Try On APIs in 2026
- Introducing FLUX.2 Pro API on Pixazo: Frontier Text-to-Image, Now in Playground & API
- Introducing Kling AI Avatar v2 Pro API on Pixazo: Ultra-Realistic Talking Avatars from a Single Image
- Introducing WAN 2.6 API on Pixazo: High-Fidelity Image-to-Video and Text-to-Video Generation
- Best fal.ai Alternatives for Image & Video Generation APIs (2026)
- Best 3D Models APIs in 2026
- Best Lipsync APIs in 2026
- Best Background Remover APIs in 2026
- Best AI Image and Video Generation API Platforms in 2026
Most Popular Posts
- Best AI Image and Video Generators in 2026
- Best AI 3D Model Generators in 2026
- Best AI Image Generation Models in 2026
- Best AI Video Generation Models in 2026
- Best Open Source Image Generation Models in 2026
- Best Open Source Video Generation Models in 2026
- Best Prompts to Create Amazing Videos using AI
