Let the model trigger image generation mid-conversation and receive the result as message content.
Not yet available. The Image Generation server tool is not yet available.
The Image Generation server tool lets any text model request an image as part of its response. When the model decides an image is useful, the gateway calls the underlying image model, receives the result, and returns it inline as a content part — no separate API call required from your code.
When the model decides to generate an image, the gateway runs generation in the background and returns the result as an image_url content part in the assistant message:
| Option | Type | Default | Description |
|---|---|---|---|
model | string | gateway default | Image model slug to use for generation |
size | string | "1024x1024" | Output dimensions (model-dependent) |
quality | string | "standard" | "standard" or "hd" |
style | string | "natural" | "natural" or "vivid" |
max_images | integer | 1 | Cap on images per conversation turn (1–4) |
The catalog endpoint lists image-capable models with "capability": "image_generation". Check /api/models?capability=image_generation for the current set and their DA pricing.
Generated images are hosted on OpenDunes' object storage and returned as signed, time-limited URLs. Download and store them on your side promptly — the link expires.
Image generation is billed at the underlying image model's DA rate (per image, not per token). The text model's token cost for the surrounding conversation is charged separately. Both line items appear in your per-request usage breakdown.