Skip to main content

Image Generation & Editing

Generate and edit images by chatting with an agent that has an image tool, using OpenAI, Gemini, Flux, or a local Stable Diffusion server.

IntelliAsk creates and edits images through agent tools. Give an agent an image tool, describe what you want, and the image appears in the conversation. Upload a picture with your message and the agent can change it instead of starting from scratch.

The image tools

ToolWhat it doesEdits images
OpenAI Image ToolsGenerates from text and edits uploaded or earlier images with OpenAI image models. A good default.Yes
Gemini Image ToolsGenerates with Google's Gemini image models, optionally using earlier images as visual context.Yes
FluxGenerates with Black Forest Labs' Flux models, including your own fine-tuned models.No
Stable DiffusionGenerates on your own Automatic1111 server, so nothing leaves your network.No

Which ones you see depends on what your admin has configured.

Generate an image

Open the agent in the Agent Builder, and select Add next to Tools.

Choose an image tool, such as OpenAI Image Tools, and save the agent. If the tool asks for an API key, your admin has left it to each user; enter your own.

Start a chat with the agent and describe the image.

The agent turns your request into a prompt for the tool, so you can talk normally ("a poster for a bake sale, wide format, lots of pastel colors"). Shape and size requests are passed through when the tool supports them: OpenAI takes square, landscape, or portrait sizes (newer models also take custom sizes up to 4K) plus a quality level and a transparent background, Gemini takes aspect ratios such as 16:9 or 9:16 and, on newer models, a resolution up to 4K. Stable Diffusion always produces 1024x1024.

Edit an image

Attach an image with Upload Image and ask for a change: "remove the people in the background", "make it look like a watercolor", "put this logo on a coffee mug". With OpenAI Image Tools the agent calls the editing tool; with Gemini it passes your image as context for a new generation.

You can keep going on an image the agent just produced ("now make the sky darker") without uploading anything. Every uploaded or generated image has an ID that the model refers to, and that works as long as the image is still within the conversation's context window. In a long conversation, attach the image again.

Flux and Stable Diffusion only work from text, so they cannot edit.

What the model sees

A generated image is shown to the model once, right after it is created, so it can describe or check its own work. After that the model only sees images attached to your messages. If you want to discuss an older image several turns later, attach it again.

Because the image goes back to the model, use a vision-capable model for agents with image tools. A text-only model may fail on the turn after the image is generated.

Generated images are stored like any other upload, under your admin's file storage settings. By default they are scaled down so the shorter side is at most 768 pixels, so a 4K request is saved smaller than the model made it unless your admin changes that.

Images from MCP servers

MCP tools can return images too, for example a browser server that takes screenshots. Images that the server returns in MCP's image format show up in the chat the same way as the built-in tools' output. Some servers return only a URL to the image, which IntelliAsk does not treat as image output.

Writing prompts

Image models respond to concrete descriptions. Start with the subject and the medium (photo, oil painting, flat vector illustration), then add composition, lighting, and the details that matter. Describe what you want to see rather than listing what to avoid. If a result is close, ask for the specific change instead of rewriting the whole prompt.

Setup

Each tool needs an API key or a server URL. An admin sets these in .env; for the key-based tools, an admin can instead leave the key for each user to enter. Setup for each tool: OpenAI Image Tools, Gemini Image Tools, Flux, and Stable Diffusion. Where images are stored is set by fileStrategy.

Last updated on