blockrun_image
Generate or edit images using AI models via text prompts or existing images. Pay with USDC and skip API key management.
Instructions
Generate or edit images via BlockRun. Pays with USDC — 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-1 ($0.02–0.04) — GPT native image generation
google/nano-banana ($0.05) — Gemini-family image model
google/nano-banana-pro ($0.10; $0.15 at 4096px) — up to 4K, strongest photorealism
xai/grok-imagine-image ($0.02) — stylized, fast
xai/grok-imagine-image-pro ($0.07) — higher quality Grok Imagine
zai/cogview-4 ($0.015) — cheapest, photorealistic detailed scenes
Edit (img2img) models: openai/gpt-image-2 (default), openai/gpt-image-1, google/nano-banana, google/nano-banana-pro
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Image description or edit instructions | |
| action | No | generate: create from text; edit: transform existing image | generate |
| 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. | |
| image | No | Source image for edit action: base64-encoded image or URL | |
| size | No | Image size. Common values: 1024x1024 (all models), 1536x1024 / 1024x1536 (gpt-image-*), 2048x2048 / 4096x4096 (nano-banana-pro) | 1024x1024 |
| quality | No | standard | |
| agent_id | No | Agent identifier for budget tracking and enforcement. |