Generate images from a text prompt, billed per image
Text-to-image across every major image model through one endpoint. Pay per image in USDC, with the exact price quoted before the request runs. No subscription.
AI image generator API: text to image from one endpoint
Send a prompt, a model and a size — the same request shape as OpenAI's image endpoint, so an existing client works by changing the base URL. Each model lists the sizes it renders, and the price on the card is the cheapest of them; a larger size on the same model costs what that size lists.
A fast generation comes back in the response; a slow one returns a job to poll. Either way the finished image is mirrored to durable storage and served from a URL that does not expire, so a caller does not have to store bytes it may want to reference later.
How to call the image generation API — the same request shape as OpenAI Images
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/generations
Host: blockrun.aiAI image generator API pricing, per image, per model
AI image generator for agents: from Claude Code, an MCP host 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 generation API vs fal.ai, Replicate and OpenAI Images
The platforms a developer usually compares are fal.ai and Replicate, which host open and licensed image models behind one key, and OpenAI's own Images API, which serves its models and no one else's. Each is a fine choice for its own catalog. The gap they leave is the one this page fills: one request shape across every major image model — OpenAI's, Google's, Seedream, Grok Imagine — with the price of each shown side by side before you pick.
Billing is the other difference. fal.ai and Replicate charge per second of GPU time or per image against a prepaid balance on an account; OpenAI charges per image against a card on file. Here an image is priced per image at the size you request, quoted in the 402 before it renders, and paid by the request itself — so an agent generating images unattended never needs a human to have signed up first.
What is deliberately the same: the request shape. It is OpenAI's images endpoint, so a client written against that works by changing the base URL, and the image comes back on a URL that does not expire rather than as bytes you have to store.
Related tools
AI image generator API questions: models, pricing, editing, commercial use
Which AI image generator models can I call?
Every model on the rate card above — OpenAI's image models, Google's Nano Banana family, Seedream, Grok Imagine and more — through one text-to-image endpoint, each row linking to the model's own page.
What is the cheapest AI image generator API?
The rate card above sorts every model by its price per image at the smallest size it renders, so the cheapest text-to-image model is the first row — and it changes as vendors reprice, which is why the number is read from the catalog rather than typed here.
Is there a free AI image generation API?
Not for images: every image model on the card is paid per image. The free tier covers chat models; a paid image costs what its row says, quoted before it renders.
How does pay-per-image pricing work?
Each model lists the sizes it renders and a price for each. You are billed per image at the size you request; the exact price is quoted in the 402 response before the image is generated, and settles in USDC.
Does the image generation API support image-to-image?
Yes, on a separate endpoint with its own page: send a source image and a prompt and get the edit back. The AI image editor covers inpainting with a mask and multi-image fusion.
Can I use generated images commercially?
The output is yours to use under each model vendor's terms, which the model's page links to. BlockRun adds no licence of its own on top of the vendor's.
What are the rate limits on the image generator API?
Paid requests carry no BlockRun rate limit — only the free chat tier is limited per IP — so throughput is whatever the upstream model allows. Slow generations return a job to poll rather than timing out.
Image generation API vs fal.ai, Replicate or OpenAI Images — which should I use?
Use them if you want one vendor's catalog behind an account and a key. Use this if you want every major image model behind one request shape, priced per image before the call, and callable by an agent with no account.
Can an AI agent generate images without an API key?
Yes. The request carries its own payment, so an agent with a funded balance can generate an image with no account, no key and no human in the loop.
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 Generator
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/generations 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 →