MCP / Models / Image generation
MAI-Image 2.7 MCP: 1K and 2K pictures from a prompt
Microsoft's MAI-Image 2.7 turns a prompt into a 1K or 2K picture in seven shapes, with a transparent background option. Run it from Claude Code, Codex, Cursor or any MCP client through one FlyMy.AI MCP, or call its API.

$ YOUR NEXT RUN
Use MAI-Image 2.7 in your assistant
Paste this prompt into Claude Code, Codex, Cursor or any agent. It reads the guide and helps you connect.
Read https://flymy.ai/skill.md and https://flymy.ai/mcp/models/mai-image-2-7-text-to-image.md. Help me connect the FlyMy.AI MCP to this assistant, then run MAI-Image 2.7 (flymyai/mai-image-2_7-text-to-image) for this task: Generate a product photo of a ceramic coffee mug on a sunlit kitchen counter with MAI-Image 2.7.
What MAI-Image 2.7 does
Describe the picture in prompt, up to 8,000 characters. image_size picks one of seven shapes (square, 4:3, 3:2 and 16:9, each also in portrait) and resolution is 1K, about one megapixel, or 2K, with each side doubled. background transparent makes a picture with a clear background, which needs png or webp as output_format (png is the default and a jpeg request is refused). It makes one picture per request.
It is billed on the tokens a run uses, for the picture and the prompt, and a 2K picture costs about four times a 1K one; the price shown before the run is an upper bound held on your balance. It does not edit a picture you send (MAI-Image 2.7 Edit does), take custom pixel sizes or make video.
MAI-Image 2.7 inputs
Every input of flymyai/mai-image-2_7-text-to-image as its live schema lists them. Returns images (array).
| Input | Type, values and default |
|---|---|
# prompt | string required What to draw: the subject, the scene, the light and the style |
# image_size | string optional Allowed: square_hd, portrait_4_3, landscape_4_3, portrait_3_2, landscape_3_2, portrait_16_9, landscape_16_9 Default: square_hd The shape of the picture at 1K: square_hd 1024x1024, portrait_4_3 768x1024, landscape_4_3 1024x768, portrait_3_2 768x1152, landscape_3_2 1152x768, portrait_16_9 768x1360, landscape_16_9 1360x768 (2K doubles each side) |
# resolution | string optional Allowed: 1K, 2K Default: 1K 1K (about 1 megapixel, 1,024 image tokens at most) or 2K (each side doubled, up to 4,096 tokens: about four times the price of the picture) |
# background | string optional Allowed: opaque, transparent Default: opaque opaque, or transparent (PNG or WebP output only: with jpeg the request is refused) |
# output_format | string optional Allowed: jpeg, png, webp Default: png The file format of the picture: png (default), jpeg or webp |
Ask your agent
Requests to paste as they are, once the FlyMy.AI MCP is connected.
flymyai/mai-image-2_7-text-to-imageflymyai/mai-image-2_7-text-to-imageflymyai/mai-image-2_7-text-to-imageMAI-Image 2.7 price
From $0.0349 per run, depending on resolution and prompt. A run at the default settings costs $0.0349. A run costs $0.0349 to $0.139, depending on resolution and prompt. Billed to your FlyMy.AI balance; no seats, no subscription and no minimum.
Call MAI-Image 2.7 from code
The same model, from an agent or from your own code. Keys stay in your FlyMy.AI account.
From an agent, through the MCP
The agent calls get_model_schema, then run_model with:
{
"endpoint_id": "flymyai/mai-image-2_7-text-to-image",
"input": {
"prompt": "A ceramic mug on a sunlit kitchen counter, product photo"
}
}From your code, over HTTP
Form fields, not JSON; files go as uploads or public URLs. The answer is a prediction_id; read the result at https://api.flymy.ai/api/v1/flymyai/mai-image-2_7-text-to-image/predict/async/result/?request_id=<prediction_id>.
curl -X POST https://api.flymy.ai/api/v1/flymyai/mai-image-2_7-text-to-image/predict/async/ \
-H "X-API-KEY: $FLYMYAI_API_KEY" \
-F 'prompt=A ceramic mug on a sunlit kitchen counter, product photo'Questions about MAI-Image 2.7
Do I need a Microsoft API key for MAI-Image 2.7?
No. MAI-Image 2.7 runs on FlyMy.AI's account, so you need no Microsoft key or plan: sign in to FlyMy.AI once and each run is billed to your FlyMy.AI balance.
How much does MAI-Image 2.7 cost?
From $0.0349 per run, depending on resolution and prompt. There is no subscription or minimum; the price comes from FlyMy.AI billing and was checked on 2026-11-18.
How do I use MAI-Image 2.7 in Claude Code, Codex or Cursor?
Add the FlyMy.AI MCP with one command and sign in, then ask in plain words, for example: "Generate a product photo of a ceramic coffee mug on a sunlit kitchen counter with MAI-Image 2.7." Your agent reads the inputs with get_model_schema and runs flymyai/mai-image-2_7-text-to-image with run_model.
What does MAI-Image 2.7 need as input?
MAI-Image 2.7 requires prompt; it also takes 4 optional inputs, each listed on this page with its allowed values and default.
Can I call MAI-Image 2.7 from my own code?
Yes. Send form fields to https://api.flymy.ai/api/v1/flymyai/mai-image-2_7-text-to-image/predict/async/ with your FlyMy.AI API key in the X-API-KEY header.
Go to the source
From the FlyMy.AI model catalog of 2026-11-18: inputs from the model's live schema, prices from FlyMy.AI billing. Requests are examples to paste, not recorded runs.





