{"info":{"title":"tencentarc/gfpgan","version":"1.0.0"},"paths":{"/":{"post":{"summary":"GFPGAN","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}}},"description":"Successful Response"}},"operationId":"tencentarc_gfpgan","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}},"required":true}}}},"openapi":"3.1.0","components":{"schemas":{"Input":{"type":"object","title":"Input","required":["image"],"properties":{"image":{"type":"string","title":"Image","format":"uri","x-order":0,"description":"URL of the photo to restore. It works on genuinely degraded faces - blurry, low-resolution, heavily compressed, scanned, faded, or a face an image generator rendered badly - and needs no prompt or description of the damage. Every face detected in the frame is restored and the rest of the picture is enhanced at the same time; there is no way to restrict restoration to one subject. An image with no detectable face still succeeds and is still billed: it comes back as a general upscale rather than an error."},"scale":{"type":"number","title":"Scale","default":2,"maximum":4,"minimum":1,"x-order":2,"description":"Post-restoration resize - and it does NOT behave like a plain output multiplier. Restoration always runs at a fixed 2x, and this value then resizes that result off the dimensions of the image that WENT INTO restoration - normally the file you uploaded - so measured against the file you sent: 1 returns 0.50x, 2 returns 2.00x, 3 returns 1.50x, 4 returns 2.00x. The default 2 is therefore both the largest result available and, for an image 300 px tall or taller, the only value that behaves as its name suggests; every other value is a plain interpolation of the already-restored image and adds no detail. One rule compounds with this: an image under 300 px tall is enlarged 2x before restoration begins, so the resize measures off that enlarged copy and each figure above doubles for such an input (1 -> 1.00x, 2 -> 4.00x, 3 -> 3.00x, 4 -> 4.00x). File size grows with the square of the resulting dimensions and the output format is not selectable."},"version":{"allOf":[{"$ref":"#/components/schemas/VersionEnum"}],"title":"Version","default":"v1.4","x-order":1,"description":"Which restoration checkpoint runs. v1.4 (the default) produces more detail and better identity than v1.3; v1.3 gives more natural results and copes better with very low-quality input but is less sharp; v1.2 is sharper and adds a beauty-makeup effect but can look unnatural."}}},"Output":{"type":"string","title":"Output","format":"uri","description":"URL of the restored image. Every result is a PNG - the output format is fixed and cannot be selected, whatever format you upload."},"VersionEnum":{"enum":["v1.2","v1.3","v1.4"],"type":"string","title":"VersionEnum"}}}}