Edit an image with a prompt instead of a mask
Image-to-image editing through one endpoint: send a source image and a prompt, get the edit back. Priced per edit in USDC, quoted before the call runs.
AI image editor API: image-to-image editing from a prompt
Send a source image (a URL or inline data, as JSON or multipart) and a prompt describing the change; the edited image comes back the same way a generated one does. The card lists only the models the editing route accepts — several image models generate but do not edit.
The OpenAI-family models also take a mask for inpainting a single region; the Google-family models edit from the prompt alone. Both accept more than one source image for a fusion edit, each up to its own limit, and a mask cannot be combined with multiple images.
How to call the image editing API — source image, prompt, optional mask
One endpoint, priced in dollars before it runs and settled in USDC. No API key and no account — the request pays for itself.
POST /api/v1/images/image2image
Host: blockrun.aiAI image editing API pricing, per edit, per model
Image editing for agents: from an MCP host, ClawRouter or the SDK
In Claude Code, Claude Desktop, Cursor, Windsurf, Cline and any other MCP host, this is the blockrun_image tool of the BlockRun MCP server — the agent calls it like any other tool and the result comes back in the conversation. In OpenClaw, Codex and Hermes, ClawRouter exposes the same catalog. In your own code, the Python and TypeScript SDKs wrap the endpoint above with types; any HTTP client works too. Every harness, with its setup →
No account and no API key stand between an agent and the first call: the request is quoted in dollars and the agent's client pays it. A team that prefers keys gets one, with a monthly invoice.
Image editing API vs Photoroom, Clipdrop and the OpenAI edits endpoint
Image editing APIs come in two shapes. Consumer-grade services — Photoroom, Clipdrop, remove.bg — expose fixed operations: cut out the background, upscale, relight. Model APIs — OpenAI's edits endpoint, Google's image models — take an instruction in plain language and change whatever it describes. This page is the second kind, across more than one model, so a prompt like "replace the sky and keep the building" works without choosing an operation first.
The models on the card differ in what they accept. OpenAI's take an optional mask for inpainting one region; Google's edit from the prompt alone and are the better choice when there is no mask to draw. Both take more than one source image for a fusion edit. The card lists only the models the editing route accepts — several image models generate but do not edit, and they are not here.
Billing is per edit at the same per-image rate as generation on the model you pick, quoted before the request runs, and the edited image is returned on a URL that does not expire.
Related tools
AI image editor API questions: masks, inpainting, formats, pricing
What is an AI image editor API?
An endpoint that takes an existing image and a prompt describing the change and returns the edited image — image-to-image editing, as opposed to text-to-image generation, which starts from a prompt alone.
How is AI image editing different from image generation?
Generation starts from a prompt; editing starts from an image you supply. The same models often do both, but the editing route accepts only the ones that edit — the rate card on this page is that allowlist.
Does the image editing API support inpainting with a mask?
Yes, on the OpenAI-family models, which take a mask that marks the region to repaint. The Google-family models edit from the prompt alone and do not take a mask.
Can I edit multiple images at once — image fusion?
Yes. Both model families accept more than one source image for a fusion edit, each up to its own limit. A mask cannot be combined with multiple source images.
What image formats does the image editor API accept?
Standard web image formats, sent as a URL or as inline data, as JSON or as a multipart upload. The docs carry the exact request shape and the size limits per model.
How much does an AI image edit cost?
The same per-image rate as generation on the model you choose, shown on the rate card above and quoted in the 402 before the edit runs.
Can I remove a background or an object with the image editor API?
Yes — describe the change in the prompt. "Remove the person on the left" or "replace the background with a plain white studio" are ordinary edits; no operation has to be selected first.
Image editing API vs Photoroom, Clipdrop or OpenAI's edits endpoint?
Fixed-operation services do one thing each well; OpenAI's endpoint edits with one vendor's models. This page edits with a prompt across more than one vendor's models, priced per edit before the call, with no account to open.
Do I need an API key for the image editing API?
No. The request pays for itself in USDC, so there is no signup and no key — an agent can edit an image unattended.
Two ways to run this
Get an API key
Sign in, get a key, and call the same endpoints with usage billed to your account. For teams that want one invoice instead of one wallet.
Get an API keyOr let your agent pay per call, in USDC
No account, no API key. Three steps, and the last one is the request this page is about.
- Point your agent at BlockRun
Install ClawRouter, or add the BlockRun MCP server to Claude Code, Cursor, Codex or OpenClaw. Any OpenAI-compatible client works too — change the base URL, nothing else.
curl -fsSL https://blockrun.ai/ClawRouter-update | bash - Fund a wallet with USDC
Send USDC to a wallet on Base or Solana. There is no account to create and no API key to issue: the wallet is the account, and it pays per call.
- Call AI Image Editor
The first call returns HTTP 402 with the exact price, your agent signs it, and the answer comes back. Payment settles on-chain; nothing is charged if the call fails.
POST /api/v1/images/image2image Host: blockrun.ai
Explore everything on BlockRun
- GPT-6 Astra
- GPT-6.1 Sol
- GPT-6 Sol
- GPT-6 Luna
- GPT-5.6 Sol
- GPT-5.6 Terra
- GPT-5.6 Luna
- GPT-5.6 Sol Pro
- GPT-5.6 Terra Pro
- GPT-5.6 Luna Pro
- GPT-5.5
- GPT-5.5 Pro
- ChatGPT Instant (GPT-5.5)
- GPT-5.4
- GPT-5.4 Pro
- GPT-5.1
- GPT-5.2
- GPT-5.4 Mini
- GPT-5 Mini
- GPT-5.4 Nano
- GPT-5.2 Pro
- GPT-5.3 Codex
- GPT-4.1
- GPT-4.1 Mini
- GPT-4.1 Nano
- GPT-4o
- GPT-4o Mini
- o1
- o3
- o3-mini
- All models →