The image generation tool allows your AI assistant to create images from text descriptions on demand, directly within a conversation.
{
"organization_id": "org_your_org_id",
"assistant_id": "asst_abc123",
"tools": [{"type": "image_generation"}],
"inputs": [{"role": "user", "content": "Create an illustration of a mountain at sunset."}]
}| Mode | Behavior |
|---|---|
auto | Model generates images when appropriate (recommended) |
on | Always attempt image generation |
off | Disable image generation |
Image generation is powered by integrated providers:
| Provider | Notes |
|---|---|
| OpenAI (DALL-E) | High quality, strong prompt understanding |
| ClipDrop | Fast generation, creative styles |
Provider selection is configured at the organization level. Contact your admin to change providers.
When the model generates an image, the response includes an image_generation_call output item:
{
"output": [
{
"type": "image_generation_call",
"id": "ig_abc123",
"status": "completed",
"result": {
"url": "https://...",
"revised_prompt": "A dramatic mountain range at sunset with orange and purple clouds..."
}
},
{
"type": "message",
"role": "assistant",
"content": [
{"type": "output_text", "text": "Here's the mountain sunset illustration:"},
{"type": "image_url", "image_url": {"url": "https://..."}}
]
}
]
}The revised_prompt field shows the prompt as actually sent to the image provider (the model may enhance your description for better results).
- Be specific about style: "oil painting", "photorealistic", "minimalist vector illustration"
- Describe composition: "wide angle", "close-up portrait", "bird's eye view"
- Specify mood and lighting: "golden hour lighting", "dramatic shadows", "soft pastel colors"
- Mention what to exclude: "no text", "no people"
Default output is typically 1024×1024 pixels. Some providers support other aspect ratios. Configuration options are available at the assistant level.
For generating images outside of a conversational context, use the dedicated Images API directly.
- System Tools Overview — All available built-in tools
- Images API — Direct image generation endpoint
- Images and Vision — Image capabilities overview
- Assistants — Configuring tools on an assistant