{"info":{"title":"lllyasviel/iclight/v2","version":"1.0.0"},"paths":{"/":{"post":{"summary":"Relight","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}}},"description":"Successful Response"}},"operationId":"iclight_v2_relight","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}},"required":true}}}},"openapi":"3.1.0","components":{"schemas":{"Input":{"type":"object","title":"Input","required":["prompt","image_url"],"properties":{"cfg":{"type":"number","title":"CFG","default":1,"maximum":5,"minimum":0.01,"x-order":8,"description":"Real classifier-free-guidance scale. Lower values stay more faithful to the input image."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","x-order":13,"description":"Random seed. The same seed, prompt, and image produce the same result."},"prompt":{"type":"string","title":"Prompt","x-order":0,"description":"Describe the lighting you want — direction, color, mood — and the surrounding scene to relight the subject into (e.g. 'warm sunset light from the left, golden-hour window behind')."},"image_url":{"type":"string","title":"Image URL","format":"uri","x-order":1,"description":"The source photo to relight. The subject is preserved while its lighting is re-rendered."},"image_size":{"anyOf":[{"$ref":"#/components/schemas/ImageSize"},{"$ref":"#/components/schemas/ImageSizeEnum"}],"title":"Image Size","x-order":2,"description":"Output dimensions. Leave unset to keep the input image's dimensions (recommended for compositing). Pass a preset string (e.g. 'landscape_4_3') or a custom {width, height} object to re-frame the result."},"hr_downscale":{"type":"number","title":"HR Downscale","default":0.5,"maximum":1,"minimum":0.01,"x-order":12,"description":"Downscale factor for the high-res fix pass; only used when enable_hr_fix is true."},"enable_hr_fix":{"type":"boolean","title":"Enable HR Fix","default":false,"x-order":9,"description":"Run a high-resolution refinement pass for sharper detail (slower)."},"guidance_scale":{"type":"number","title":"Guidance Scale","default":5,"maximum":20,"minimum":0,"x-order":7,"description":"Prompt adherence strength. Higher values follow the lighting description more strongly."},"initial_latent":{"allOf":[{"$ref":"#/components/schemas/InitialLatentEnum"}],"title":"Initial Latent","default":"None","x-order":3,"description":"Bias the dominant light direction. 'None' lets the prompt decide; 'Left', 'Right', 'Top', or 'Bottom' push the key light to that side."},"lowres_denoise":{"type":"number","title":"Low-res Denoise","default":0.98,"maximum":1,"minimum":0.01,"x-order":10,"description":"Denoise strength for the initial low-resolution pass."},"mask_image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"title":"Mask Image URL","x-order":5,"description":"Optional binary mask marking the subject to keep. When omitted, the subject is isolated automatically by background removal."},"highres_denoise":{"type":"number","title":"High-res Denoise","default":0.95,"maximum":1,"minimum":0.01,"x-order":11,"description":"Denoise strength for the high-res fix pass; only used when enable_hr_fix is true."},"negative_prompt":{"type":"string","title":"Negative Prompt","default":"","x-order":4,"description":"Describe what you do not want in the relit result."},"num_inference_steps":{"type":"integer","title":"Num Inference Steps","default":28,"maximum":50,"minimum":1,"x-order":6,"description":"Number of denoising steps. More steps can improve detail at the cost of speed."},"enable_safety_checker":{"type":"boolean","title":"Enable Safety Checker","default":true,"x-order":14,"description":"If set to true, the safety checker will be enabled."}},"x-fal-order-properties":["prompt","image_url","image_size","initial_latent","negative_prompt","mask_image_url","num_inference_steps","guidance_scale","cfg","enable_hr_fix","lowres_denoise","highres_denoise","hr_downscale","seed","enable_safety_checker"]},"Output":{"type":"array","items":{"type":"string","format":"uri"},"title":"Output","description":"The relit image files."},"ImageSize":{"type":"object","title":"ImageSize","properties":{"width":{"type":"integer","title":"Width","default":512,"maximum":14142,"description":"The width of the generated image.","exclusiveMinimum":0},"height":{"type":"integer","title":"Height","default":512,"maximum":14142,"description":"The height of the generated image.","exclusiveMinimum":0}}},"ImageSizeEnum":{"enum":["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],"type":"string","title":"ImageSizeEnum","description":"Predefined image sizes."},"InitialLatentEnum":{"enum":["None","Left","Right","Top","Bottom"],"type":"string","title":"InitialLatentEnum","description":"Bias for the dominant light direction."}}}}