restore_face
Restore blurry, damaged, or AI-generated faces to natural sharpness with adjustable fidelity. Enhances background and upscales images using CodeFormer.
Instructions
Restore blurry, damaged, or AI-generated faces to sharp, natural quality. Uses CodeFormer (NeurIPS 2022, state-of-the-art FID 32.65 on CelebA-Test). Adjustable fidelity — balance between quality enhancement and identity preservation. Also enhances background and upsamples. Stable endpoint — model upgrades automatically as SOTA evolves. 5 sats per image, pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='restore_face'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paymentId | Yes | Valid payment ID (must be paid) | |
| imageBase64 | Yes | Base64-encoded image containing faces (PNG, JPEG, WEBP) or data URI | |
| fidelity | No | Fidelity to input: 0.0 = max quality enhancement, 1.0 = max identity preservation (default 0.5) | |
| background_enhance | No | Also enhance the background (default true) | |
| face_upsample | No | Upsample restored faces (default true) | |
| upscale | No | Output upscale factor 1-4 (default 2) |