generate_image
Generate images from a text prompt and save them into the project's assets folder, with optional reference-image editing, model, size, aspect ratio, and seed controls for consistent visual assets.
Instructions
Generate an image with Siray and save it into the current project.
Args: prompt: What to draw. Be specific about subject, style, lighting, background. out_dir: Absolute path of the folder to save into, e.g. the project's assets/images folder. Created if missing. model: Siray model id, e.g. "bytedance/seedream-4.5-t2i", "google/nano-banana-pro-t2i", "black-forest-labs/flux-1.1-pro-ultra-t2i". Omit for the default. Call list_models() for the live list. image: Optional reference image for image-to-image / editing — a URL or a local file path. When you pass this you MUST also pass an -i2i / -edit model (e.g. "google/nano-banana-pro-i2i"); -t2i models reject it. Note: bytedance/seedream-* ignores size and aspect ratio entirely. size: exact output dimensions, e.g. "1920x1080". Use this whenever the user names dimensions. openai/* models render at that size natively; for other models the nearest aspect ratio is requested and the file is resized to exactly this. aspect_ratio: e.g. "16:9", "1:1", "9:16". Ignore when passing size. seed: Integer for reproducible output.
Returns the saved file path(s).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| size | No | ||
| image | No | ||
| model | No | ||
| prompt | Yes | ||
| out_dir | Yes | ||
| aspect_ratio | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |