Skip to main content
When the agent has the image generation tool available and decides to use it, it opens an interactive widget directly in the conversation. You control the prompt, model, style, count, size, and quality — the agent proposes a starting prompt but you refine it before anything is generated.

The image generation widget

The widget appears inline below the agent’s message that triggered it. It stays active for the lifetime of the conversation, so you can return to it and generate more images at any time.

Settings

At the top of the widget a settings panel shows the available controls: On small screens these controls collapse behind a Settings disclosure. The summary line shows the current selection at a glance.

Prompt

Edit the initial prompt the agent suggested, or replace it entirely. The text area resizes as you type.

Reference images

Attach one or more images to switch the widget into edit mode. In edit mode the model uses your references as a visual starting point and applies your prompt as an instruction. Only models with edit support (shown by the “edits” badge) can process reference images.
  • Click Add to upload PNG, JPG, or WebP files.
  • Remove a reference by clicking the × button on its thumbnail (“Remove reference image”).
If you select a model that does not support editing while references are attached, the widget shows a warning and blocks generation.

Generate

Press Generate to start. The button changes to “Generating… (click to cancel)” while IMP calls the LiteLLM proxy. Typical wait time is 5–30 seconds. Click the button again to cancel. If generation fails, an error message appears below the button.

Reviewing and selecting images

Generated images appear in a History section below the controls. Each row shows the model, size, quality, and prompt used, followed by the generated images.
  • Click an image to select it (a blue border and a check mark appear).
  • Hover or focus the image to reveal per-image actions: Download image and, for editable models, Use as reference (adds the image as a reference for the next generation).
  • Once you have selected the images you want to send to the agent, click Use these in the footer.
When you click Use these, IMP marks your selection and inserts a system message so the agent can see which images were chosen. The widget collapses into a compact Final selection view. You can reopen it with Edit again.

Next steps

Artifacts and sharing

Share generated images via a link.

Attachments and session files

Access images the agent saves to the session.