{"info":{"title":"FireRed Image Edit","version":"1.0.0"},"paths":{"/":{"post":{"summary":"Run Prediction","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}}},"description":"Successful Response"}},"operationId":"run_prediction","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_urls"],"properties":{"seed":{"type":"integer","title":"Seed","x-order":5,"nullable":true,"description":"The same seed and the same prompt given to the same version of the model will output the same image every time."},"prompt":{"type":"string","title":"Prompt","x-order":0,"description":"The editing instruction describing what changes to make to the image. Supports both English and Chinese instructions."},"image_size":{"anyOf":[{"$ref":"#/components/schemas/ImageSize"},{"enum":["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],"type":"string"}],"title":"Image Size","x-order":7,"description":"The size of the generated image. If not provided, it uses the input image dimensions."},"image_urls":{"type":"array","items":{"type":"string","format":"uri"},"title":"Image URLs","x-order":1,"description":"The URLs of the images to edit. Supports single image editing and multi-image references (e.g., virtual try-on, style transfer from reference)."},"num_images":{"type":"integer","title":"Num Images","default":1,"maximum":4,"minimum":1,"x-order":6,"description":"The number of images to generate."},"acceleration":{"allOf":[{"$ref":"#/components/schemas/Acceleration"}],"title":"Acceleration","default":"regular","x-order":9,"description":"The acceleration level to use for inference speed optimization."},"output_format":{"allOf":[{"$ref":"#/components/schemas/OutputFormat"}],"title":"Output Format","default":"png","x-order":8,"description":"The format of the generated image."},"guidance_scale":{"type":"number","title":"Guidance scale","default":4,"maximum":10,"minimum":1,"x-order":4,"description":"Classifier-free guidance scale. Higher values make the model follow the prompt more closely."},"negative_prompt":{"type":"string","title":"Negative Prompt","default":"","x-order":2,"description":"The negative prompt for the generation."},"num_inference_steps":{"type":"integer","title":"Num Inference Steps","default":30,"maximum":50,"minimum":2,"x-order":3,"description":"The number of inference steps to perform. More steps generally produce higher quality results."},"enable_safety_checker":{"type":"boolean","title":"Enable Safety Checker","default":true,"x-order":10,"description":"If set to true, the safety checker will be enabled."}}},"Output":{"type":"array","items":{"type":"string","format":"uri"},"title":"Output"},"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}}},"Acceleration":{"enum":["none","regular","high"],"type":"string","title":"Acceleration","description":"An enumeration."},"OutputFormat":{"enum":["jpeg","png"],"type":"string","title":"Output Format","description":"An enumeration."}}}}