# Generate Image with API

<figure><img src="https://3762890407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-3d87b45f7e0ab3c3c0bf710a82864781356f6cef%2FCleanShot%202025-03-17%20at%2013.55.21%402x.png?alt=media" alt=""><figcaption></figcaption></figure>

The Generate Image with AI step allows you to create, edit, or generate variations of images directly within your AirOps workflows.

## Generate Image

### Popular AI Models for Image Generation

AirOps offers the following AI models for image generation:

| Model                      | Provider     | Description                                                        |
| -------------------------- | ------------ | ------------------------------------------------------------------ |
| GPT Image 1.5              | OpenAI       | OpenAI's flagship text-to-image model                              |
| Nano Banana Pro            | Google       | Advanced text-to-image with 4K support and superior text rendering |
| Stable Image Ultra         | Stability AI | Highest quality photorealistic image generation                    |
| Stable Diffusion 3.5 Large | Stability AI | Balanced speed and quality for digital content                     |

{% hint style="info" %}
**Nano Banana Pro** offers multiple resolutions up to 4K, improved text rendering, and better style consistency. Note that it is approximately 4x more expensive than other image generation models.
{% endhint %}

## Edit Images

The Image Generation Step also allows you to edit images. To do this, you must have an input in the form of either:

1. A ["File Media" Workflow Input](https://docs.airops.com/actions/application-inputs#advanced-input-types) variable
2. A publicly accessible URL with a .png endpoint

Additionally, you must provide a similar input for an Image Mask URL (an image of the same size, with fully transparent areas to mark where the image should be edited).

{% hint style="info" %}
Editing images is currently only supported with **DALL·E 2.**
{% endhint %}

## Generate Variations

As a third option, the Image Generation Step allows you to generate variations of an existing image. Similar to editing an image, you are required to have an input in the form of either:

1. A ["File Media" Workflow Input](https://docs.airops.com/actions/application-inputs#advanced-input-types) variable
2. A publicly accessible URL with a .png endpoint

{% hint style="info" %}
Generating variations is currently only supported with **DALL·E 2.**
{% endhint %}

If you choose to generate multiple images, the output will be surfaced in a JSON format with the accessible URL's for each distinctly generated image.
