{"tool_key":"image","description":"Generate an image from a text prompt and/or reference files.","input_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","minLength":1},"prompt":{"type":"string","maxLength":2000},"aspect_ratio":{"type":"string"},"files":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"media_type":{"type":"string"}},"required":["url"],"additionalProperties":false}},"options":{"type":"object","properties":{"webhook_url":{"type":"string","format":"uri"},"cache":{"type":"boolean"}},"additionalProperties":{}},"provider_options":{"type":"object","properties":{"fal":{"type":"object","properties":{"seed":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_url":{"type":"string","description":"The image to expand (file or URL)."},"sync_mode":{"type":"boolean","description":"If true, returns the image directly in the response (increases latency)."},"canvas_size":{"anyOf":[{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"type":"null"}]},"aspect_ratio":{"anyOf":[{"type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9"]},{"type":"null"}]},"preserve_alpha":{"type":"boolean","description":"Keep the input's transparency. The model works in RGB, so the alpha channel is not generated -- the original's own is extended outwards by replicating its edges, which is what expanding a cutout means. Turn it off to get a flattened RGB result."},"negative_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"original_image_size":{"anyOf":[{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"type":"null"}]},"return_model_output":{"type":"boolean","description":"Also return the model's own frame, before the original was pasted back and the seam blended. Diagnostic only -- it does not change the returned image. Use it to tell a bad generation apart from a bad composite: a boundary already broken in that frame came from the model, not from post-processing."},"original_image_location":{"anyOf":[{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"type":"null"}]},"retain_original_quality":{"type":"boolean","description":"Keep the original's own pixels at full resolution. Generation happens near one megapixel, so a larger canvas is scaled up afterwards; leave this on and the region the mask protected is not resampled at all. Turn it off for a uniformly soft result, which can hide the seam on a textured background."}},"additionalProperties":false}},"additionalProperties":false}},"required":["model"],"additionalProperties":false},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"string","const":"v1"},"outputs":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"file_id":{"type":"string"},"media_type":{"type":"string"},"size_bytes":{"type":"number"},"raw":{}},"required":["url"],"additionalProperties":false}}},"required":["version","outputs"],"additionalProperties":false},"example":{"input":{"prompt":"a serene mountain lake at sunrise, photorealistic","aspect_ratio":"16:9"},"output":{"version":"v1","outputs":[{"url":"https://cdn.varg.dev/files/img_abc123.png","media_type":"image/png","size_bytes":2048576}]}}}