generate_image
Generate images from text descriptions using Fal.ai models. Supports multiple sizes, models like FLUX and Stable Diffusion, and up to 4 images per prompt.
Instructions
Generate one or more images from a text prompt using Fal.ai image generation models. Supports models like FLUX (fal-ai/flux/dev, fal-ai/flux/schnell), Stable Diffusion, and more. Returns the URL(s) of the generated image(s).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The text prompt describing the image to generate. | |
| model_id | No | The Fal.ai model ID to use for generation. Defaults to 'fal-ai/flux/dev'. Examples: 'fal-ai/flux/dev', 'fal-ai/flux/schnell', 'fal-ai/stable-diffusion-v3-medium'. | fal-ai/flux/dev |
| image_size | No | The size/aspect ratio of the output image. Options: 'square_hd', 'square', 'portrait_4_3', 'portrait_16_9', 'landscape_4_3', 'landscape_16_9'. Defaults to 'landscape_4_3'. | |
| num_images | No | Number of images to generate (1–4). Defaults to 1. | |
| negative_prompt | No | Text describing what to exclude from the image (not supported by all models). | |
| seed | No | Random seed for reproducible results. Omit for a random seed. |