> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onyx.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Generation

> Enable image generation capabilities for your AI Agents in Onyx

The image generation action allows your Agents to create images based on text prompts. Once configured,
any AI model in Onyx can invoke this action to generate images using supported image generation models.

## Supported Models

| Model           | Provider              |
| --------------- | --------------------- |
| GPT Image 1.5   | OpenAI / Azure OpenAI |
| GPT Image 1     | OpenAI / Azure OpenAI |
| DALL-E 3        | OpenAI / Azure OpenAI |
| Nano Banana     | Vertex (Google)       |
| Nano Banana Pro | Vertex (Google)       |

## Configuration

<Steps>
  <Step title="Navigate to Image Generation">
    Go to the **Admin Panel** and select **Image Generation** under the **Configuration** section.

    <img className="rounded-image" src="https://mintcdn.com/danswer/o7_g7TjtK5IBJ2zG/assets/admins/actions/image_generation_overview.png?fit=max&auto=format&n=o7_g7TjtK5IBJ2zG&q=85&s=72b550080584e232942b09e892b1f5a3" alt="Image Generation Configuration Page" width="1473" height="889" data-path="assets/admins/actions/image_generation_overview.png" />
  </Step>

  <Step title="Connect a Model">
    The page displays available models grouped by provider (OpenAI, Azure OpenAI and Vertex).

    Click **Connect** on any model to configure it. A modal will open where you can set up credentials:

    <Tabs>
      <Tab title="OpenAI">
        * **Use existing API key**: Select from previously configured OpenAI API keys
        * **Enter new API key**: Add a new OpenAI API key
      </Tab>

      <Tab title="Azure OpenAI">
        * **Use existing API key**: Select from previously configured Azure OpenAI API keys
        * **Enter new API key**: Add a new Azure OpenAI API key
      </Tab>

      <Tab title="Vertex (Google)">
        * **Service Account**: Create a Google Cloud service account, then generate and download a JSON key file
        * **Upload credentials**: Upload the service account JSON key file
        * **Region (Optional)**: Define the region you want requests sent to. Defaults to global
      </Tab>
    </Tabs>

    The last configured model will automatically become the **Current Default**.
  </Step>

  <Step title="Manage Default Model">
    The model marked as **Current Default** is used when users request image generation in chat.

    * To **remove** a model as default: Click the "Current Default" badge on that model
    * To **edit credentials**: Click the settings icon (gear) to open a modal where you can update the API key
  </Step>
</Steps>

## Using Image Generation

Once image generation is configured with a default model, any AI model in Onyx can invoke the image generation action.
When a user requests an image, the Agent will automatically use the configured default image generation model.
