{"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":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","description":"The prompt to generate an image from. The model is trained on detailed captions: describe framing, subject, background and lighting."},"sync_mode":{"type":"boolean","description":"If True, the media will be returned as a data URI and the output data won't be available in the request history."},"image_size":{},"num_images":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The number of images to generate."},"output_format":{"type":"string","enum":["jpeg","png","webp"]},"bounding_boxes":{"type":"array","items":{"type":"object","properties":{"box":{"type":"object","properties":{"x_max":{"type":"number"},"x_min":{"type":"number"},"y_max":{"type":"number"},"y_min":{"type":"number"}},"additionalProperties":false},"label":{"type":"string","description":"Short name for the object in this box. Write <label> in the prompt to tie the box to those words."},"description":{"type":"string","description":"What to draw in this box: the object and its look."},"source_box":{"type":"object","properties":{"x_max":{"type":"number"},"x_min":{"type":"number"},"y_max":{"type":"number"},"y_min":{"type":"number"}},"required":["x_max","x_min","y_max","y_min"],"additionalProperties":false},"target_box":{"type":"object","properties":{"x_max":{"type":"number"},"x_min":{"type":"number"},"y_max":{"type":"number"},"y_min":{"type":"number"}},"required":["x_max","x_min","y_max","y_min"],"additionalProperties":false},"source_image_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0-based index into image_urls of the reference the object comes from. Leave unset for a new object."}},"additionalProperties":false}},"enable_safety_checker":{"type":"boolean","description":"If set to true, the safety checker will be enabled."},"enable_prompt_expansion":{"type":"boolean","description":"If set to true, the prompt is expanded into a detailed caption before generation."},"image_urls":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"bfl":{"type":"object","properties":{"seed":{"anyOf":[{"type":"integer","minimum":0,"maximum":4294967295},{"type":"null"}]},"steps":{"anyOf":[{"type":"integer","minimum":1,"maximum":16},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"images":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"prompt":{"type":"string","description":"Free-form prompt describing the image."},"resolution":{"anyOf":[{"type":"string","enum":["768sq","1k","1.5k","2k","4k"]},{"type":"null"}]},"aspect_ratio":{"anyOf":[{"type":"string","enum":["21:9","2:1","16:9","3:2","7:5","4:3","5:4","1:1","4:5","3:4","5:7","2:3","9:16","1:2","9:21"]},{"type":"string"}]},"output_format":{"type":"string","enum":["jpeg","png"]},"safety_tolerance":{"type":"integer","minimum":0,"maximum":7,"description":"Harm moderation tolerance from 0 (strictest) to 7."}},"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}]}}}