{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"image":{"type":"string","description":"Source image as a public HTTPS URL or a base64 data URI (JPEG, PNG, or TIFF)"},"output_width":{"description":"Desired output width in pixels. If only one dimension is set, the other scales proportionally. If neither is set, the source resolution is kept (enhancement without upscaling)","type":"integer","minimum":1,"maximum":32000},"output_height":{"description":"Desired output height in pixels. If only one dimension is set, the other scales proportionally. If neither is set, the source resolution is kept (enhancement without upscaling)","type":"integer","minimum":1,"maximum":32000},"output_format":{"default":"jpeg","description":"Format of the upscaled image","type":"string","enum":["jpeg","png","tiff"]},"crop_to_fill":{"description":"Crop to fill the requested dimensions instead of letterboxing when the aspect ratio differs","type":"boolean"},"face_enhancement":{"description":"Run face recovery on detected faces","type":"boolean"},"face_enhancement_strength":{"type":"number","minimum":0,"maximum":1,"description":"Strength of face recovery"},"face_enhancement_creativity":{"type":"number","minimum":0,"maximum":1,"description":"Face recovery style, from realistic (0) to creative (1)"},"subject_detection":{"description":"Where enhancements are applied","type":"string","enum":["foreground","background","all"]},"sharpen":{"type":"number","minimum":0,"maximum":1,"description":"Amount of additional sharpening"},"denoise":{"type":"number","minimum":0,"maximum":1,"description":"Amount of noise reduction"},"fix_compression":{"type":"number","minimum":0,"maximum":1,"description":"Amount of compression-artifact reduction"}},"required":["image","output_format"],"additionalProperties":false}