# Generating Images with AI

To generate an image using AI, you can use the specific AI step called "Generate an Image":

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-7f2b43ee2f536a88870f86d8df7d5bac451dfe8a%2FScreenshot%202025-07-03%20at%202.45.26%E2%80%AFPM.png?alt=media" alt="" width="375"><figcaption><p>The AI step menu scrolled down to "Generate an Image".</p></figcaption></figure>

In that step, you'll need to specify three things:

1\) The Prompt

2\) The Model

3\) The size

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-0c5e64ca5801db7817c9b526db1df7a06c3dbc13%2FScreenshot%202025-07-03%20at%202.46.22%E2%80%AFPM.png?alt=media" alt=""><figcaption><p>The detailed step for generating an image.</p></figcaption></figure>

After your 'Generate an Image' step, you'll get a Step Output (more on that in [step-outputs](https://docs.relay.app/data/step-outputs "mention")) that is an image file. You can use that in subsequent steps, for example to upload the image to Google Drive or post the image on LinkedIn.

<figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-b80904bec13f777d94cf4a897b7bf251b582443d%2FScreenshot%202025-07-03%20at%202.49.44%E2%80%AFPM.png?alt=media" alt=""><figcaption><p>Uploading the AI image to Google Drive</p></figcaption></figure>


---

# 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.relay.app/ai/generating-images-with-ai.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.
