# Generate Image with API

<figure><img src="/files/DsYsyneCdlS448JFhh4Q" 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 2                | OpenAI       | OpenAI's latest text-to-image model                                |
| GPT Image 1.5              | OpenAI       | Previous-generation OpenAI 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 %}

{% hint style="warning" %}
**DALL·E models have been deprecated** and are no longer available in the model picker. Workflows that previously generated images, edited images, or generated variations with DALL·E should migrate to one of the models listed above.
{% 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](/actions/workflow-concepts/application-inputs.md#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" %}
Image editing was previously supported via DALL·E 2, which has been deprecated.
{% 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](/actions/workflow-concepts/application-inputs.md#advanced-input-types) variable
2. A publicly accessible URL with a .png endpoint

{% hint style="info" %}
Generating variations was previously supported via DALL·E 2, which has been deprecated.
{% 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.airops.com/actions/workflow-concepts/workflow-steps/image-and-video/image-generation-step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
