blockrun_image
Generate images from text prompts or edit existing images. Pay per call using USDC, no separate API keys required.
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:
zai/cogview-4 ($0.015) — Zhipu CogView-4, photorealistic, great for detailed scenes
xai/grok-imagine-image ($0.02) — xAI Grok Imagine, stylized, fast
xai/grok-imagine-image-pro ($0.07) — xAI Grok Imagine Pro, higher quality
openai/gpt-image-1 ($0.02-0.04) — GPT native image generation
openai/gpt-image-2 ($0.06-0.12) — ChatGPT Images 2.0, reasoning-driven, multilingual text rendering + character consistency
openai/dall-e-3 ($0.04-0.08) — High quality, prompt adherence
google/nano-banana ($0.05) — Google image model Edit models: openai/gpt-image-1, openai/gpt-image-2 (default for edits)
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: dall-e-3 for generate, gpt-image-2 for edit). xai/grok-imagine-image is stylized and fast; xai/grok-imagine-image-pro is higher quality; gpt-image-2 is the newest edit-capable model with stronger instruction following. | |
| image | No | Source image for edit action: base64-encoded image or URL | |
| size | No | 1024x1024 | |
| quality | No | standard | |
| agent_id | No | Agent identifier for budget tracking and enforcement. |