generate_image
Generate one image from a prompt and return it as an image block. Models: google/nano-banana-2.1, google/nano-banana-2-lite, google/nano-banana-pro, openai/gpt-image-2, openai/gpt-image-2.5-flare, openai/gpt-image-2.5-sunburst (default google/nano-banana-2.1). openai/* models take size (1024x1024, 1024x1536, 1536x1024) and quality (low, medium, high; default medium); google/* models take resolution (1K, 2K, 4K where allowed) and aspect_ratio (1:1 default, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 21:9). Price per image is quoted in the 402 from the provider's list price for that choice (x 1.4 + $0.0005, minimum $0.005); settled as quoted. Charged only if an image comes back. Text prompts only; up to 4000 characters.
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 |
|---|---|---|---|
| size | No | ||
| model | No | ||
| prompt | Yes | ||
| quality | No | ||
| resolution | No | ||
| aspect_ratio | No | ||
| output_format | No |