---
title: "Image Generation with AI Agents | Hostman Docs"
description: "Learn how to enable image generation for your AI agent, choose between Gemini and GPT Image models, and let it create illustrations right in the chat."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

The image generation feature lets your agent create images from text descriptions right within the conversation.

The agent automatically detects whether a message is a request to generate an image and routes it to the [selected image model](https://hostman.com/docs/ai-services/ai-agents/manage-agents/image-generation/#available-models). If the message isn't an image generation request, the agent simply replies with a regular text message.

Image generation works when interacting with the agent through the [external chat](https://hostman.com/docs/ai-services/ai-agents/manage-agents/external-chat/) or an [embedded widget](https://hostman.com/docs/ai-services/ai-agents/manage-agents/embed-chatbots/).

Pricing depends on the selected model and is calculated per token. Input tokens (the prompt) and output tokens (the generated image) are billed separately.

You can switch models at any time [in the agent's settings](https://hostman.com/docs/ai-services/ai-agents/manage-agents/image-generation/#in-an-existing-agents-settings).

## Enabling and Disabling Image Generation

You can turn image generation on or off either while creating an agent or from an existing agent's settings.

### When Creating an Agent

On the **Pricing** step, enable the **Image Generation** option and select your preferred model.

![Create AI Agent 2026 09 03 12 10 2026 09 03 12 10](https://content.hostman.com/assets/dd2e357f-765d-4e03-b52d-7475a04fe881.png?width=754&height=795)

### In an Existing Agent's Settings

1.  Go to **AI Services** → **Agents** and click the agent you want to configure.
    
2.  Open the **Management** tab.
    
3.  Click **Modify** in the **Image Generation** block.
    

![Inventive Umbriel 2026 08 17 12 52](https://content.hostman.com/assets/4a8b7ea4-fdb3-44c8-83ec-e5ec65d7e043.png?width=1581&height=869)

4.  Toggle the option on or off.
    
5.  If enabling it, select an image generation model from the dropdown.
    
6.  Click **Save**.
    

![Inventive Umbriel 2026 08 17 12 52 (1)](https://content.hostman.com/assets/a93e3266-bf1d-4817-98dc-cc76e6a3dcd6.png?width=1754&height=869)
