Spiral gives your agent every tool with one account. Browse the tools →

falImageAvailable now

MAI-Image-2.7 Flash · Text to Image

microsoft/mai-image-2.7/flash/text-to-image

Generate images from text with MAI-Image-2.7 Flash · Text to Image from fal through one Spiral API key. MAI-Image-2.7 Flash is Microsoft’s lower-cost image generation variant, producing images from text prompts with preset or custom dimensions and PNG, JPEG, or WebP output. It runs in the background and returns images. Pay as you go, with no subscription.

Pricing

Up to $0.01352 per run at the default inputs. resolution: 1K (default) $0.01352, 2K $0.05343.

Limits

Runs
In the background
Returns
image
Longest queue wait
1 hour
Run deadline
30 minutes
Longest run, end to end
225 minutes
Largest inline input
1 MB
Largest input file
2 GB
Largest output
5 GB

Input

FieldKindDefaultDescription
prompt requiredtext—

The text prompt to generate an image from.

image_sizeJSONsquare_hd

The size of the generated image. Each side must be at least 768 pixels and the total pixel count at most 4,194,304 (2048x2048). Custom sizes are rounded down to a multiple of 16.

resolutionone of
1K, 2K
1K

Resolution of preset image sizes: "1K" (about 1 megapixel) or "2K" (each side doubled). Ignored for custom sizes.

backgroundone of
opaque, transparent
opaque

Use "transparent" for a transparent background (requires png or webp output).

output_formatone of
jpeg, png, webp
png

The format of the generated image.

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "microsoft/mai-image-2.7/flash/text-to-image",
    "input": {
      "prompt": "A ceramic teapot beside a sunlit window, realistic photography."
    }
  }'

Frequently asked questions

How much does MAI-Image-2.7 Flash · Text to Image cost?

Up to $0.01352 per run at the default inputs. `resolution`: 1K (default) $0.01352, 2K $0.05343. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

How do I use MAI-Image-2.7 Flash · Text to Image through an API?

Send `POST /v1/runs` with `"provider": "fal"`, `"model": "microsoft/mai-image-2.7/flash/text-to-image"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

Do I need an account with fal to use MAI-Image-2.7 Flash · Text to Image?

No. Spiral runs it on its own fal account and charges your Spiral balance.

Can my AI agent use MAI-Image-2.7 Flash · Text to Image?

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.