---
title: Image Generator
description: Generate images
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard 
  type="image_generator_v2"
  color="#4D5FFF"
/>

{/* MANUAL-CONTENT-START:intro */}
The Image Generator block creates images from text prompts using leading image generation providers. Choose OpenAI for GPT Image models, Google Gemini for Nano Banana models, or Fal.ai for a multi-model catalog that includes Nano Banana, GPT Image, Seedream, FLUX, and Grok Imagine.

Use it to:

- **Generate production images**: Create polished visuals from workflow prompts
- **Choose the right provider**: Route requests to OpenAI, Gemini, or Fal.ai based on model availability and cost
- **Control output shape**: Set provider-specific size, aspect ratio, resolution, quality, background, and output format options
- **Use advanced Fal.ai features**: Configure safety tolerance, safety checking, web search grounding, seeds, and thinking level when supported
- **Pass generated files downstream**: Use the returned image file or URL in later workflow steps

In Sim, the Image Generator block lets agents create visual assets programmatically as part of automated workflows. This is useful for content creation, design mockups, product visuals, creative ideation, and any flow that needs generated imagery without a manual handoff.
{/* MANUAL-CONTENT-END */}


## Usage Instructions

Generate images using OpenAI GPT Image, Google Nano Banana, or Fal.ai image models.



## Tools

### `image_generate`

Generate images with OpenAI GPT Image, Google Nano Banana, or Fal.ai image models

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `provider` | string | Yes | Image generation provider: openai, gemini, or falai |
| `apiKey` | string | Yes | Provider API key |
| `model` | string | Yes | Provider model ID, such as gpt-image-1.5, gemini-3.1-flash-image-preview, or nano-banana-2 |
| `prompt` | string | Yes | Text prompt describing the image to generate |
| `size` | string | No | Provider-specific image size |
| `aspectRatio` | string | No | Aspect ratio, such as auto, 1:1, 16:9, or 9:16 |
| `resolution` | string | No | Provider-specific image resolution, such as 1K, 2K, 4K, 1k, or 2k |
| `quality` | string | No | Provider-specific image quality |
| `background` | string | No | Background setting when supported |
| `outputFormat` | string | No | Output image format: png, jpeg, or webp where supported |
| `moderation` | string | No | OpenAI moderation level: auto or low |
| `safetyTolerance` | string | No | Fal.ai safety tolerance when supported |
| `numImages` | number | No | Number of images to generate, subject to provider limits |
| `seed` | number | No | Random seed when supported |
| `enableSafetyChecker` | boolean | No | Enable the Fal.ai safety checker when supported |
| `enableWebSearch` | boolean | No | Enable web search grounding when supported by the selected Fal.ai model |
| `thinkingLevel` | string | No | Fal.ai thinking level when supported: minimal or high |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Generated image URL or identifier |
| `image` | file | Generated image file |
| `imageUrl` | string | Generated image URL |
| `provider` | string | Provider used |
| `model` | string | Model used |
| `metadata` | json | Generation metadata |
|   ↳ `provider` | string | Provider used |
|   ↳ `model` | string | Model used |
|   ↳ `description` | string | Provider description |
|   ↳ `revisedPrompt` | string | Revised prompt |
|   ↳ `seed` | number | Seed used for generation |
|   ↳ `jobId` | string | Provider job ID |
|   ↳ `contentType` | string | Image MIME type |


