Text-to-Image API
Generate images from text prompts through one API — open-source diffusion models and first-party provider models side by side, priced per image or per megapixel so short runs stay cheap.
24 text-to-image models available right now — every one runnable in a free playground, through the REST API and JavaScript SDK, or from an AI assistant via MCP.
Text-to-Image models & pricing
| Model | Endpoint | Price |
|---|---|---|
| HunyuanImage 3.0 | tencent/hunyuan-image/v3/text-to-image | $0.1 per megapixel |
| HiDream I1 Fast | hidream/i1-fast | $0.01 per megapixel |
| HiDream I1 Full | hidream/i1-full | $0.05 per megapixel |
| Stable Diffusion 3.5 Large | stability-ai/stable-diffusion-v3.5-large | $0.065 per megapixel |
| Imagen 4 Fast | google/imagen4/fast | $0.02 per image |
| Imagen 4 | google/imagen4 | $0.04 per image |
| Boogu-Image | boogu/boogu-image | $0.04 per megapixel |
| Recraft V3 | recraft/v3/text-to-image | $0.04 per image |
| FLUX.2 [dev] | black-forest-labs/flux-2 | $0.012 per megapixel |
| Qwen-Image | qwen/qwen-image | $0.02 per megapixel |
| GPT Image 2 | openai/gpt-image-2 | $0.145 per image |
| Ideogram V4 | ideogram/ideogram-v4 | $0.06 per megapixel |
| Luma Uni-1 | luma/uni-1 | $0.042 per image |
| Krea 2 Large | krea/krea-2-large | $0.06 per image |
| Luma Uni-1 Max | luma/uni-1-max | $0.102 per image |
| Seedream V5 Image Editing | bytedance/seedream-v5/edit | $0.035 per image |
| Seedream V5 Text to Image | bytedance/seedream-v5/text-to-image | $0.035 per image |
| Seedream V4.5 Image Editing | bytedance/seedream-v4.5/edit | $0.04 per image |
| Seedream V4.5 Text to Image | bytedance/seedream-v4.5/text-to-image | $0.04 per image |
| Nano Banana 2 Text to Image | google/nano-banana-2 | usage-based |
| BitDance Text to Image | shallowdream204/bitdance | $0.01 per image |
| Z-Image Base | tongyi-mai/z-image/base | $0.01 per megapixel |
| Z-Image Turbo | tongyi-mai/z-image/turbo | $0.005 per megapixel |
| SDXL Lightning 4-step | bytedance/sdxl-lightning-4step | ≈$0.00251692 per image |
Full catalog on the models page; live per-configuration costs on the pricing page.
Call a text-to-image model in one request
Every model shares the same request lifecycle: submit to the queue, poll the status URL, fetch the result. Swap the endpoint to switch models — nothing else changes.
cURL
curl -X POST https://queue.modelrunner.run/tencent/hunyuan-image/v3/text-to-image \
-H "Authorization: Key $MRUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "input": { "prompt": "..." } }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }Use text-to-image models from Claude & Cursor
Connect the ModelRunner MCP server once and your AI assistant can run every text-to-image model in this table as a tool — authorized via OAuth, results returned as hosted URLs in the conversation.
Claude Code
claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcpFrequently asked questions
How much does a text-to-image API cost?
Pricing is per model and pay-per-use: most text-to-image models are priced per generated image or per megapixel of output, with the exact rate shown in the table above and on each model page. There is no subscription — you buy credits and pay only for what you generate.
How do I call a text-to-image model via the API?
Every model shares the same request shape: POST https://queue.modelrunner.run/<owner>/<alias> with an Authorization: Key header and an {"input": {...}} body, then poll the returned status_url and fetch the result from response_url. The JavaScript SDK (@modelrunner/client) wraps this in a single subscribe() call. Each model page shows copy-paste cURL, JavaScript, and Python examples with that model's real inputs.
Can I run text-to-image models from Claude or Cursor?
Yes. Connect the ModelRunner MCP server (https://mcp.modelrunner.run/mcp) once and every text-to-image model in the catalog becomes a tool your AI assistant can call with the run_model tool — authorized via OAuth, no API key pasted into config.
