blockrun_image
Generate images from text prompts or edit existing images with no separate API keys required.
Instructions
Generate or edit images via BlockRun. Pays with USDC on the ACTIVE chain — Base, Solana or Arc (see blockrun_wallet) — no separate API keys needed.
Actions:
generate (default): Create image from text prompt
edit: Transform an existing image using img2img
Generation models (1024x1024 base price; larger sizes cost more on gpt-image-*):
openai/gpt-image-2 ($0.06–0.12) — flagship, reasoning-driven, multilingual on-image text + character consistency (default)
openai/gpt-image-2.5-sunburst ($0.28–0.56) — OpenAI's most capable image model, high-precision editing
openai/gpt-image-2.5-flare ($0.28–0.56) — GPT Image 2.5 fast tier, same price as Sunburst (generate only)
openai/gpt-image-1 ($0.02–0.04) — GPT native image generation
google/nano-banana ($0.05) — Gemini-family image model
google/nano-banana-2 ($0.09) — Gemini 3.1 Flash, pro-level quality at Flash speed (1024x1024 only)
google/nano-banana-2-lite ($0.05) — Gemini 3.1 Flash Lite, lowest-cost Nano Banana 2 (1024x1024 only)
google/nano-banana-2.1 ($0.07) — newer Flash-tier Nano Banana with thinking (1024x1024 only)
google/nano-banana-pro ($0.17; $0.30 at 4096px) — up to 4K, strongest photorealism
xai/grok-imagine-image ($0.02) — stylized, fast
xai/grok-imagine-image-2.0 ($0.04) — Grok Imagine 2.0, between Grok Imagine and Pro on price
xai/grok-imagine-image-pro ($0.06) — Grok Imagine 2.0 at medium quality, finer detail
zai/cogview-4 ($0.015) — cheapest, photorealistic detailed scenes
bytedance/seedream-5-pro ($0.045; $0.09 when both dimensions exceed 1024) — Seedream 5.0 Pro; cheap widescreen at 1280x720 / 2048x1024, large formats up to 2848x1600
Edit (img2img) models: openai/gpt-image-2 (default), openai/gpt-image-2.5-sunburst, openai/gpt-image-1, google/nano-banana, google/nano-banana-2, google/nano-banana-2-lite, google/nano-banana-2.1, google/nano-banana-pro Multi-image edit: pass an array of 2–4 source images to "image" to fuse them in one render (openai/* up to 4, google/* up to 3) — e.g. a subject plus a sprite layout guide, or a reference plus a brand logo. Source images and masks accept a base64 data URI, an http(s) URL, or a local file path (auto-encoded). Inpaint mask (openai/gpt-image-* only) via "mask"; not combinable with multiple source 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": "blockrun_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | Inpaint mask for edit action (openai/gpt-image-* only): a base64 data URI, http(s) URL, or local file path. Transparent areas of the mask are regenerated. Cannot be combined with multiple source images. | |
| size | No | Image size. Common values: 1024x1024 (all models), 1536x1024 / 1024x1536 (gpt-image-*), 2048x2048 / 4096x4096 (nano-banana-pro), 1280x720 / 2048x1024 / 2048x2048 / 2848x1600 (seedream-5-pro) | 1024x1024 |
| image | No | Source image(s) for edit action: a base64 data URI, an http(s) URL, or a local file path (auto-encoded to a data URI) — or an array of 2–4 to fuse into one render (e.g. subject + layout guide, or reference + brand logo). openai/* accepts up to 4, google/* up to 3; a mask cannot be combined with multiple images. | |
| model | No | Model to use (default: openai/gpt-image-2 for both generate and edit). gpt-image-2 renders on-image text best; nano-banana-pro for 4K photorealism; cogview-4 / grok-imagine-image for cheap drafts. | |
| action | No | generate: create from text; edit: transform existing image | generate |
| inline | No | Return a small inline image preview (thumbnail) the client can render in-conversation, in addition to the full-resolution URL. Defaults to the BLOCKRUN_INLINE_IMAGES env setting (off unless set). Rich clients (e.g. the VS Code extension) render it; plain terminals ignore it. Off keeps responses lightweight. | |
| prompt | Yes | Image description or edit instructions | |
| agent_id | No | Agent identifier for budget tracking and enforcement. |