{"version":"1","model":{"id":"fal-ai/codeformer","name":"CodeFormer (Face Restore)","kind":"image","availability":"available","available":true,"restricted":false,"api_key_only":false,"description":"CodeFormer — reconstructs fine facial details from damaged or low-quality photos while preserving identity.","pricing_note":"$0.0021 / output MP — ~4 MP at the default 2x upscale of a 1MP image","categories":["enhance"],"prompt_required":false,"prompt_supported":true,"supports":{"referenceImage":true},"requires":{"referenceImage":true},"aspect_ratios":[],"resolutions":[],"durations":[],"max_images":1,"base_credits":2,"api_gross_margin_percent":20,"added_at":"2026-05-05","popularity_rank":203,"example_prompt":"Upload a damaged, blurry, or low-quality photo containing faces — CodeFormer will reconstruct fine facial details while preserving the original identity.","preview":{"image":"https://cdn.artemotion.ai/file/artemotion-ai-bckt/model-previews/codeformer-sm.webp"},"schema_url":"/api/v1/models?id=fal-ai%2Fcodeformer","input_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},"parameters":[{"key":"face_upscale","label":"Face Upscale","type":"toggle","default":true,"description":"Should faces be upscaled"},{"key":"only_center_face","label":"Only Center Face","type":"toggle","default":false,"description":"Should only center face be restored"},{"key":"fidelity","label":"Fidelity","type":"number","default":0.5,"min":0,"max":1,"step":0.05,"description":"Balance between quality (0) and fidelity to the input face (1)."},{"key":"upscale_factor","label":"Upscale Factor","type":"number","default":2,"min":1,"max":4,"step":0.5,"description":"Output upscaling factor applied after face restoration."},{"key":"seed","label":"Seed","type":"seed","description":"Random seed for reproducible generation."},{"key":"aligned","label":"Aligned","type":"toggle","default":false,"description":"Should faces be aligned before restoration."}]}}