Skip to main content
One API, every provider

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

ModelEndpointPrice
HunyuanImage 3.0tencent/hunyuan-image/v3/text-to-image$0.1 per megapixel
HiDream I1 Fasthidream/i1-fast$0.01 per megapixel
HiDream I1 Fullhidream/i1-full$0.05 per megapixel
Stable Diffusion 3.5 Largestability-ai/stable-diffusion-v3.5-large$0.065 per megapixel
Imagen 4 Fastgoogle/imagen4/fast$0.02 per image
Imagen 4google/imagen4$0.04 per image
Boogu-Imageboogu/boogu-image$0.04 per megapixel
Recraft V3recraft/v3/text-to-image$0.04 per image
FLUX.2 [dev]black-forest-labs/flux-2$0.012 per megapixel
Qwen-Imageqwen/qwen-image$0.02 per megapixel
GPT Image 2openai/gpt-image-2$0.145 per image
Ideogram V4ideogram/ideogram-v4$0.06 per megapixel
Luma Uni-1luma/uni-1$0.042 per image
Krea 2 Largekrea/krea-2-large$0.06 per image
Luma Uni-1 Maxluma/uni-1-max$0.102 per image
Seedream V5 Image Editingbytedance/seedream-v5/edit$0.035 per image
Seedream V5 Text to Imagebytedance/seedream-v5/text-to-image$0.035 per image
Seedream V4.5 Image Editingbytedance/seedream-v4.5/edit$0.04 per image
Seedream V4.5 Text to Imagebytedance/seedream-v4.5/text-to-image$0.04 per image
Nano Banana 2 Text to Imagegoogle/nano-banana-2usage-based
BitDance Text to Imageshallowdream204/bitdance$0.01 per image
Z-Image Basetongyi-mai/z-image/base$0.01 per megapixel
Z-Image Turbotongyi-mai/z-image/turbo$0.005 per megapixel
SDXL Lightning 4-stepbytedance/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/mcp

Frequently 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.