Skip to content

Generate Image

Generate Image with LLM is the native tool that turns a description into an image during a conversation. The agent decides when to call it, sends the image model a detailed description in English, and, when generation succeeds, receives a URL to include in its reply as Markdown.

Use it for creatives, covers, mockups, illustrations, avatars, and other flows where the final reply needs a visual. It does not render HTML as an image; for that, see HTML to Image.

The person must be able to edit the agent (agents.write). The team permission Generate images controls the Hub’s manual image mode; it does not disable this native tool in conversations handled by the agent.

  1. Open the agent and go to Tools.
  2. Select Add Tool.
  3. Under Native Tools, choose Generate Image with LLM.
  4. In the Generate images panel, select the Image model.

The choice is saved as soon as the model is selected. Without an image_model_id, the card keeps its yellow configuration warning and the tool is not offered to the agent.

The selector shows global models marked active and compatible with image generation. Settings → AI models is a read-only catalog of capabilities and estimates; models are not activated for the organization there. If the list is empty, a regular administrator cannot activate a model: escalate the case to support or the platform administrator.

The product currently does not apply the plan catalog correctly in this selector and does not revalidate activity, capability, or entitlement at execution time. Until that inconsistency is fixed, confirm with the person responsible for the plan that the selected model should be available to the organization.

The agent chooses whether to call the tool. State in the agent prompt:

  • which requests should produce an image;
  • which details must be collected before generation;
  • style, audience, composition, visible text, and forbidden elements;
  • that it must not repeat the call for the same request after receiving success.

The contract accepts prompt as a required field and aspectRatio as an optional field. Supported values are:

ValueCommon use
1:1square; also the default when the ratio is omitted
16:9landscape
9:16vertical portrait
4:3traditional landscape
3:4traditional portrait

Effective support for a ratio still depends on the selected model. If the provider rejects the request, the tool returns an error to the agent.

On success, the tool returns status, imageUrl, and aspectRatio. The agent is instructed to include ![description](imageUrl) in its own reply. The Hub renders it as an image; for external channels, the pipeline can split that reference for delivery as media.

The image is therefore not an automatic attachment independent of the reply: delivery depends on the agent using the returned URL. The file is stored in the public generated-images bucket at a permanent, non-expiring URL. Anyone with the URL can access it; do not use the tool for confidential material. The known cleanup runs when the organization is closed, not when a conversation is completed or archived.

A completed generation adds its cost to the same assistant turn. When the provider reports actual cost, that value takes precedence; the local pricing table is a fallback. With the organization’s own OpenRouter key, the product applies the operational credit defined for BYOK. See Image Models for estimates and monitor the balance under Settings → Subscription.

On failure, the tool returns status: "error" and instructs the agent to explain the problem without retrying on its own. A retry should be an explicit decision, especially because the provider may already have processed a generation before a storage or accounting failure.

  • test requests that should and should not generate an image;
  • check that the agent collects enough context before the call;
  • validate the required ratios with the selected model;
  • confirm that the final reply contains and renders the image;
  • treat the URL as public and monitor credits after publishing.