generate_image
Create new images from a text prompt and save full-resolution files to a local image folder. For existing image changes, use edit_image instead of creating a new version.
Instructions
Generates new images from a text prompt and saves them to the user's image folder.
For changes to an image that already exists, use edit_image on its saved path instead;
generating again produces a different image rather than a revision.
Args:
prompt: What to draw. Be specific about subject, style, composition, and any text to render.
size: "auto", or WIDTHxHEIGHT such as 1024x1024 (square), 1536x1024 (landscape), or
1024x1536 (portrait). Edges must be multiples of 16, at most 3840.
quality: "low" for fast drafts up to "max". "auto" lets the model choose.
background: "transparent" needs output_format "png" or "webp".
output_format: File format of the saved image.
n: Number of images, 1 to 4. Each one is billed.
model: A model ID for this request only. Leave empty to use the user's default
(the newest model unless they pinned one). See list_image_models.
open_after: Open each saved image in the user's default image viewer. Set it when the
user asks to see or open the result, which helps most in Claude Code, where the chat
is a terminal that can't display images.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| size | No | auto | |
| model | No | ||
| prompt | Yes | ||
| quality | No | auto | |
| background | No | auto | |
| open_after | No | ||
| output_format | No | png |