Skip to main content
ArtEmotion
Image

CodeFormer (Face Restore)

Credit-based pricing. Supports reference images.

CodeFormer (Face Restore) preview
Output
image

Inputs

  • Reference image (required)

Example prompt

Upload a damaged, blurry, or low-quality photo containing faces — CodeFormer will reconstruct fine facial details while preserving the original identity.
Try this prompt →
LLM-ready

API & LLM schema

Exact request contract for this model. Agents can fetch it from /api/v1/models?id=fal-ai/codeformer.

POST/api/v1/generate14 fields · 2 required
FieldTypeRequirementContract
model_idconstantRequiredArtEmotion model identifier.
extraobjectOptionalModel-specific settings may also be nested here.
max_creditsnumberOptionalReject before submission if the estimated list price exceeds this cap. · Range: 1–…
webhook_urlstringOptionalFormat: uri
webhook_secretstringOptionalOptional model input.
folder_idstringOptionalOptional model input.
promptstringOptionalOptional model input.
face_upscalebooleanOptionalShould faces be upscaled · Default: true
only_center_facebooleanOptionalShould only center face be restored · Default: false
fidelitynumberOptionalBalance between quality (0) and fidelity to the input face (1). · Default: 0.5 · Range: 0–1
upscale_factornumberOptionalOutput upscaling factor applied after face restoration. · Default: 2 · Range: 1–4
seedintegerOptionalRandom seed for reproducible generation.
alignedbooleanOptionalShould faces be aligned before restoration. · Default: false
reference_image_urlstringRequiredFormat: uri
Minimal request example
{
  "model_id": "fal-ai/codeformer",
  "reference_image_url": "https://example.com/reference_image"
}
Raw JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.artemotion.ai/api/v1/models?id=fal-ai%2Fcodeformer",
  "title": "CodeFormer (Face Restore) generation request",
  "description": "Request body accepted by POST /api/v1/generate for fal-ai/codeformer.",
  "type": "object",
  "properties": {
    "model_id": {
      "type": "string",
      "const": "fal-ai/codeformer",
      "description": "ArtEmotion model identifier."
    },
    "extra": {
      "type": "object",
      "additionalProperties": true,
      "description": "Model-specific settings may also be nested here."
    },
    "max_credits": {
      "type": "number",
      "minimum": 1,
      "description": "Reject before submission if the estimated list price exceeds this cap."
    },
    "webhook_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048
    },
    "webhook_secret": {
      "type": "string",
      "maxLength": 512
    },
    "folder_id": {
      "type": "string"
    },
    "prompt": {
      "type": "string"
    },
    "face_upscale": {
      "title": "Face Upscale",
      "description": "Should faces be upscaled",
      "default": true,
      "type": "boolean"
    },
    "only_center_face": {
      "title": "Only Center Face",
      "description": "Should only center face be restored",
      "default": false,
      "type": "boolean"
    },
    "fidelity": {
      "title": "Fidelity",
      "description": "Balance between quality (0) and fidelity to the input face (1).",
      "default": 0.5,
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "multipleOf": 0.05
    },
    "upscale_factor": {
      "title": "Upscale Factor",
      "description": "Output upscaling factor applied after face restoration.",
      "default": 2,
      "type": "number",
      "minimum": 1,
      "maximum": 4,
      "multipleOf": 0.5
    },
    "seed": {
      "title": "Seed",
      "description": "Random seed for reproducible generation.",
      "type": "integer"
    },
    "aligned": {
      "title": "Aligned",
      "description": "Should faces be aligned before restoration.",
      "default": false,
      "type": "boolean"
    },
    "reference_image_url": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "model_id",
    "reference_image_url"
  ],
  "additionalProperties": false
}

FAQ

How much does CodeFormer (Face Restore) cost on ArtEmotion?

Credit-based pricing. You pay in ArtEmotion credits — every plan and top-up converts USD to credits at a fixed rate.

Do I get my credits back if CodeFormer (Face Restore) fails?

Yes — failed generations are never charged. The credits are released back to your balance automatically.

Can I call CodeFormer (Face Restore) from the API?

Yes. Use POST /api/v1/generate with model_id: "fal-ai/codeformer". See the API reference for the full schema.

Where are my generations stored?

Every output is saved to your personal Library. You can export or delete everything any time from Privacy & deletion.

Ready to generate with CodeFormer (Face Restore)?

Start now →

No commitment. New accounts get 50 free credits on signup. See pricing.