Image generation

MAI-Image-2.7

MAI-Image-2.7 is Microsoft AI's diffusion model for text-to-image generation and precise image editing, with output up to 2048x2048 and transparent backgrounds.

1024x1024 · One image per request

$0.03667Per image

Pricing

Price

Per image
$0.03667
Text input per 1M tokens
$5.25

Includes the 5% MiniRouter fee. The final charge uses the provider’s actual cost and stays within your reserved hold. MiniRouter absorbs any overrun.

Estimate your credit hold

Credit is reserved before the request. The final charge may be lower.

Up to 32,000 characters.

Estimated hold

$0.0764106

2× the total estimated cost, including the 5% fee. Your charge stays within this hold; unused credit is released.

Estimate only; nothing is sent. Includes text and one output image.

Use the Images API

Set MINIROUTER_KEY to your inference key. Copy the example.

curl --fail-with-body --retry 0 --max-time 120 \
  'https://api.minirouter.sh/v1/images/generations' \
  -H "Authorization: Bearer $MINIROUTER_KEY" \
  -D response.headers --output response.json \
  -H 'Content-Type: application/json' \
  --data '{
  "model": "microsoft/mai-image-2.7",
  "prompt": "A blue circle on a white background.",
  "size": "1024x1024",
  "n": 1
}'

Keep the request ID. The image response can arrive before its final charge. Check Request logs for the settled cost. A failed or disconnected request may still incur a cost; these examples disable automatic retries.

Operations

Supported operations

Generate from a prompt
POST /v1/images/generations
Send JSON with a prompt. The response contains one base64 image.

Every model, one key.

MAI-Image-2.7 — API setup and current pricing · minirouter