{"openapi":"3.0.2","info":{"title":"freepik/ai-image-relight","description":"The request body Comfy Router accepts for the model \"freepik/ai-image-relight\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"750490e884ba"},"paths":{"/v2/models/freepik/ai-image-relight":{"post":{"operationId":"runRouterModel","summary":"Run freepik/ai-image-relight synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"example":{"image":"https://img.magnific.com/free-photo/light-through-mountains_395237-33.jpg?semt=ais_hybrid\u0026w=740\u0026q=80","prompt":"warm golden-hour sunlight from the left"},"properties":{"advanced_settings":{"properties":{"blacks":{"default":50,"description":"Adjust the level of black color in the image.","maximum":100,"minimum":0,"type":"integer"},"brightness":{"default":50,"description":"Adjust the level of brightness in the image.","maximum":100,"minimum":0,"type":"integer"},"contrast":{"default":50,"description":"Adjust the level of contrast in the image.","maximum":100,"minimum":0,"type":"integer"},"engine":{"default":"automatic","description":"Engine preset for relighting:\n- balanced: Well-rounded, general-purpose option\n- cool: Brighter with cooler tones\n- real: Aims to enhance photographic quality (Experimental)\n- illusio: Optimized for illustrations and drawings\n- fairy: Suited for fantasy-themed images\n- colorful_anime: Ideal for anime, cartoons, and vibrant colors\n- hard_transform: Significantly alters the original image\n- softy: Slightly softer effect, suitable for graphic designs\n","enum":["automatic","balanced","cool","real","illusio","fairy","colorful_anime","hard_transform","softy"],"type":"string"},"fixed_generation":{"default":false,"description":"When enabled, using the same settings will consistently produce the same image.","type":"boolean"},"saturation":{"default":50,"description":"Adjust the level of saturation in the image.","maximum":100,"minimum":0,"type":"integer"},"transfer_light_a":{"default":"automatic","description":"Adjusts the intensity of light transfer.","enum":["automatic","low","medium","normal","high","high_on_faces"],"type":"string"},"transfer_light_b":{"default":"automatic","description":"Also modifies light transfer intensity. Can be combined with transfer_light_a for varied effects.","enum":["automatic","composition","straight","smooth_in","smooth_out","smooth_both","reverse_both","soft_in","soft_out","soft_mid","strong_mid","style_shift","strong_shift"],"type":"string"},"whites":{"default":50,"description":"Adjust the level of white color in the image.","maximum":100,"minimum":0,"type":"integer"}},"type":"object"},"change_background":{"default":true,"description":"When enabled, changes the background based on prompt and/or reference image. Useful for product placement and portraits.","type":"boolean"},"image":{"description":"Base64 or URL of the image to do the relight","type":"string"},"interpolate_from_original":{"default":false,"description":"When enabled, makes the final image interpolate from the original using the light transfer strength slider.","type":"boolean"},"light_transfer_strength":{"default":100,"description":"Level of light transfer intensity. 0% keeps closest to original, 100% is maximum transfer.","maximum":100,"minimum":0,"type":"integer"},"preserve_details":{"default":true,"description":"Maintains texture and small details of the original image. Good for product photography, texts, etc.","type":"boolean"},"prompt":{"description":"You can guide the generation process and influence the light transfer with a descriptive prompt.\nIMPORTANT: You can emphasize specific aspects of the light in your prompt by using a number in parentheses, ranging from 1 to 1.4, like \"(dark scene:1.3)\".\n","type":"string"},"style":{"default":"standard","description":"Style preset for the relight operation.","enum":["standard","darker_but_realistic","clean","smooth","brighter","contrasted_n_hdr","just_composition"],"type":"string"},"transfer_light_from_lightmap":{"description":"Base64 or URL of the lightmap for light transfer. Incompatible with 'transfer_light_from_reference_image'","type":"string"},"transfer_light_from_reference_image":{"description":"Base64 or URL of the reference image for light transfer. Incompatible with 'transfer_light_from_lightmap'","type":"string"},"webhook_url":{"description":"Optional callback URL that will receive asynchronous notifications whenever the task changes status.","example":"https://www.example.com/webhook","format":"uri","type":"string"}},"required":["image"],"type":"object"}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FreepikTaskResponse"},{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/FreepikTaskData"},{"properties":{"generated":{"description":"The finished generation's image URLs. Present and non-empty on the document Router returns; this list IS the result. The links are Freepik's own and expire.","items":{"format":"uri","type":"string"},"minItems":1,"type":"array"},"status":{"enum":["COMPLETED"],"type":"string"}},"required":["status","generated"],"type":"object"}]}},"required":["data"],"type":"object"}],"description":"Comfy Router output schema for the Freepik upscale, skin-enhance, relight and style-transfer models: the terminal Freepik task document, forwarded unchanged. All six ids are SUBMIT-AND-POLL - `routerresult/classification.go` records each `POST /proxy/freepik/v1/ai/...` submit as `ReturnModeSubmitPoll` - and Router polls on the caller's behalf, so the body a caller receives is the finished task rather than the `{\"data\": {\"task_id\": ..., \"status\": \"CREATED\"}}` handle the underlying submit answers with.\nONE document describes all six because Freepik answers one. The upscaler, relight and style transfer each poll their own submit path and the three skin-enhancer tunings share a single status route, but every one of those routes declares the same task document, and the three tunings (`creative`, `faithful`, `flexible`) are three settings of one operation rather than three result shapes. Each id publishes its own `example` so the asset the page shows is the asset that page's model produces.\nTHE ASSET IS `data.generated`, a list of URL STRINGS pointing at the generated images - not objects with a URL inside, so there is no deeper field to key completion off. A `COMPLETED` task carrying an empty `generated` is a success that produced nothing, and through Router that case never reaches the caller as this document: Router answers it as a Comfy Router error instead, so a `200` here always carries at least one image URL. `data.task_id` is the handle the poll was addressed with and must never be read as an asset.\nThe URLs are Freepik's own delivery links and they EXPIRE. Router does not re-host these images onto Comfy storage, so what a caller receives is Freepik's short-lived URL rather than a Comfy one - download the asset rather than storing the link.\n`data.status` is Freepik's own UPPERCASE vocabulary (`CREATED`, `IN_PROGRESS`, `COMPLETED`, `FAILED`), compared without case folding. `COMPLETED` is the one terminal success and the only value this document can carry: `FAILED` and a budget-exhausted `CREATED`/`IN_PROGRESS` reach a Router caller as a Comfy Router error rather than as this body.","example":{"data":{"generated":["https://example.invalid/freepik/ai-image-relight/relit.png"],"status":"COMPLETED","task_id":"046b6c7f-0b8a-43b9-b35d-6489e6daee91"}}}}}}}}}},"components":{"schemas":{"FreepikTaskData":{"properties":{"generated":{"description":"URLs to the generated images.","items":{"format":"uri","type":"string"},"type":"array"},"status":{"enum":["CREATED","IN_PROGRESS","COMPLETED","FAILED"],"type":"string"},"task_id":{"example":"046b6c7f-0b8a-43b9-b35d-6489e6daee91","format":"uuid","type":"string"}},"type":"object"},"FreepikTaskResponse":{"properties":{"data":{"$ref":"#/components/schemas/FreepikTaskData"}},"required":["data"],"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"freepik/ai-image-relight","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text","image"],"x-comfy-router-output-modalities":["image"]}
