{"info":{"title":"xai/grok-imagine/image/edit","version":"1.0.0"},"paths":{"/":{"post":{"summary":"Edit","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}}},"description":"Successful Response"}},"operationId":"grok_imagine_image_edit","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":{"prompt":{"type":"string","title":"Prompt","x-order":0,"maxLength":8000,"description":"Text description of the desired edit."},"image_urls":{"type":"array","items":{"type":"string","format":"uri"},"title":"Image Urls","x-order":1,"maxItems":3,"description":"List of URLs of the images to edit. A maximum of 3 images are supported."},"num_images":{"type":"integer","title":"Num Images","default":1,"maximum":4,"minimum":1,"x-order":2,"description":"The number of images to generate. Each generated image is billed."},"resolution":{"allOf":[{"$ref":"#/components/schemas/ResolutionEnum"}],"title":"Resolution","default":"1k","x-order":4,"description":"Output resolution tier: 1k (standard) or 2k (high resolution)."},"aspect_ratio":{"allOf":[{"$ref":"#/components/schemas/AspectRatioEnum"}],"title":"Aspect Ratio","default":"auto","x-order":3,"description":"Aspect ratio of the edited image. When set to `auto` (the default), the output preserves the aspect ratio of the first input image."},"output_format":{"allOf":[{"$ref":"#/components/schemas/OutputFormatEnum"}],"title":"Output Format","default":"jpeg","x-order":5,"description":"The image file format of the output."}},"x-fal-order-properties":["prompt","image_urls","num_images","aspect_ratio","resolution","output_format"]},"Output":{"type":"array","items":{"type":"string","format":"uri"},"title":"Output","description":"The edited image files."},"ResolutionEnum":{"enum":["1k","2k"],"type":"string","title":"ResolutionEnum","description":"Output resolution tier."},"AspectRatioEnum":{"enum":["auto","2:1","20:9","19.5:9","16:9","4:3","3:2","1:1","2:3","3:4","9:16","9:19.5","9:20","1:2"],"type":"string","title":"AspectRatioEnum","description":"Supported aspect ratios for the edited image."},"OutputFormatEnum":{"enum":["jpeg","png","webp"],"type":"string","title":"OutputFormatEnum","description":"The image file format of the output."}}}}