generate_image
Create 2D images from text prompts using PicoBerry's multi-engine API. Optionally add up to 4 reference images to guide results, then wait for the asset to finish before reading the PNG URL.
Instructions
Generate a 2D image from a text prompt (async). Returns an asset { id }; then call wait_for_asset (or poll get_asset) until taskStatus=2 and read files.image (PNG URL). Costs credits — see list_models(category='image'). Omit model for the default. Up to 4 reference image URLs can guide the result (best with nano-banana). Set count (1–4) for several images from one call: the top-level fields stay the first image and assets[] lists every image (same batchId) — wait_for_asset on each id. Each image is billed separately; if the balance can't cover all of them nothing is charged. A count above the plan's image slots fails with 400 (don't retry); a busy queue fails with 429 (retry later).
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 |
|---|---|---|---|
| count | No | images to make in this call, 1–4 (default 1). Needs that many free image slots on the plan (Free 1 · Starter 3 · Pro 6 · Max 15). | |
| model | No | engine name from list_models(category='image') | |
| prompt | Yes | ||
| aspect_ratio | No | W:H, e.g. "1:1", "16:9", "9:16", "21:9". Use a value from the model's supportedAspectRatios in list_models(category='image') — nano-banana models reject anything else with 400 before charging credits; gpt-image-* buckets any ratio to its nearest of three output sizes. | |
| reference_image_urls | No |