by Microsoft

Grounded 2K stills and multi-photo edits that keep faces and lighting steady

microsoft/mai-image-2.7/text-to-image
MAI-Image-2.7 AI Image Generator online
  • Up to 2K
  • Up to 5 reference images
  • 11 aspect ratios
  • Create Image
  • Edit Image

About MAI-Image-2.7

Two async endpoints. text-to-image takes prompt, resolution (1k by default, or 2k) and aspect_ratio (11 values, 1:1 by default). image-to-image takes prompt plus an image_urls array of one to five pictures and nothing else. Our 2K text-to-image jobs finished in 55 to 60 seconds and edits in about 39, so a job queue with callbacks fits better than a spinner on a blocking request.

Call it with the model name microsoft/mai-image-2.7/text-to-image on POST /jobs/createTask, from $0.084.

Introduction

Text-to-image generation with MAI-Image-2.7

MAI-Image-2.7 turns structured text prompts into clean editorial stills, product photography, and architectural exteriors at 1K or 2K resolution. In our November 25, 2026 live tests, a 1K 4:3 tabletop prompt returned an 1152 x 864 PNG and a 2K 16:9 architectural exterior returned a 2720 x 1536 PNG.

Observed behaviour and prompting tips

  • Material realism: Travertine marble, tinted cobalt glass, brushed brass, and wet slate reflections rendered cleanly without waxy smoothing.
  • Unrequested prop copy: In our MORNING ROAST test, the model invented a short subtitle under the requested heading and printed titles on nearby prop books.

Request parameters

ParameterRequiredDescription
promptYesDescribe what you want to make.
resolutionNoChoose an available output size. 1k · 2k · Default: 1k
aspect_ratioNoThe shape of the frame: wide, square or tall. 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 21:9 · 9:21 · 4:1 · 1:4 · Default: 1:1

Pricing

Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per image
resolution 1K$0.084
resolution 2K$0.168

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

API quick start

Call the MAI-Image-2.7 API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
  2. Send the request. POST /jobs/createTask with model microsoft/mai-image-2.7/text-to-image and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "microsoft/mai-image-2.7/text-to-image",
  "input": {
    "prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
    "aspect_ratio": "1:1",
    "resolution": "1k"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

What to build with the MAI-Image-2.7 API

  • A listing or travel tool that re-shoots an approved photo for another season: send it with a one-line change, keep the original as its own asset, and present the winter or evening version next to it for approval.
  • A two-photo compositor for campaign shoots, where the first URL carries the talent and the second the location. Two labelled drop zones in your UI compile into an ordered image_urls array and matching prompt wording.
  • An editorial illustration service that renders final 2K stills at 4:1 or 21:9 for article headers, after cheaper concept passes on MAI-Image-2.7 Flash, which accepts the identical body.

MAI-Image-2.7 parameter notes

  • resolution and aspect_ratio exist only on text-to-image. The edit schema lists prompt and image_urls with additional properties disallowed, so strip generation fields before calling it.
  • Measured outputs: 2k returned 2720 × 1536 at 16:9 and 1760 × 2336 at 3:4, while 1k at 4:3 returned 1152 × 864. Store the width and height of the delivered file rather than deriving them from the ratio string.
  • Edit output does not track upload size. A 1543 × 2048 source came back at 896 × 1184, still 3:4. If your product promises print dimensions, route the final through text-to-image or an upscale job.
  • prompt takes up to 10,000 characters. The model letters signs, labels and props unprompted, so append no text, no signage, no logo server-side when your own overlay will add the copy later. There is no seed or negative_prompt field.

How MAI-Image-2.7 API pricing adds up

Text-to-image bills per image by resolution: 2k is exactly twice the 1k rate, and the aspect ratio does not move the price. Image-to-image has its own flat per-image rate plus a surcharge for each image_urls entry after the first, so quote again whenever the user changes the reference set. Read the maximum from a quote before submitting and reconcile costUsd when the job completes.

  • resolution 1k: $0.084 per run, $8.40 for 100 runs
  • resolution 2k: $0.168 per run, $16.80 for 100 runs

Async jobs, webhooks and rate limits

Every MAI-Image-2.7 request is asynchronous: createTask returns a taskId straight away, and the result arrives when the job finishes. Poll GET /jobs/recordInfo every few seconds, or pass a public https callBackUrl and verify the X-Webhook-Signature header (HMAC-SHA256 over taskId, timestamp and the body hash) before trusting the payload. Each account gets 1,000 write requests per 10 seconds; a 429 carries Retry-After. Send an Idempotency-Key with createTask so a retried request for microsoft/mai-image-2.7/text-to-image never runs or bills twice.

Common MAI-Image-2.7 API errors

errorCodeWhat it usually means and how to fix it
invalid_requestUsually an image_urls array with zero or more than five items, a prompt longer than 10,000 characters, or resolution and aspect_ratio sent to the edit task.
invalid_assetA URL in image_urls could not be fetched or is not JPEG, PNG, WebP or GIF. Re-upload that file into the same slot so image 1 and image 2 keep their meaning.
content_rejectedThe prompt or one of the photos was refused. Show the message and let the user replace the specific picture instead of resubmitting the whole set.
timeoutLook the task up with recordInfo before retrying. 2K renders close to a minute are normal, and a fresh submit without the original Idempotency-Key is a second billable job.

MAI-Image-2.7 API questions

How much does the MAI-Image-2.7 API cost?

MAI-Image-2.7 starts at $0.06168 per image with Edit Image, its lowest-priced task. Prices for Create Image by option: 1K $0.084 per image, 2K $0.168 per image. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What is the model name for MAI-Image-2.7 in the API?

Put microsoft/mai-image-2.7/text-to-image for Create Image; microsoft/mai-image-2.7/edit for Edit Image in the model field of POST /jobs/createTask.

Does the MAI-Image-2.7 edit task take a resolution?

No. It accepts prompt and image_urls only. In our tests it returned images of roughly one megapixel that kept the shape of the first upload.

Is there a seed or a negative prompt?

Neither field exists. Put exclusions into the prompt itself and keep completed files when a user needs to hold on to an exact picture.

How should my app order image_urls?

In the order your prompt names them. The text refers to positions, so reordering the array without rewriting the prompt changes what each reference means.

What are the limits of the MAI-Image-2.7 API?

Resolutions: 1K · 2K; Aspect ratios: 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 +5; Prompt length (characters): 10,000. Requests outside these limits are rejected before anything is charged.

Can I try MAI-Image-2.7 without writing code?

Run MAI-Image-2.7 in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.

All MAI models

MAI-Image-2.7 Flash has the same eleven ratios and five-photo editing at roughly a third of the price, and it returned our 2K tests sooner. Pick MAI-Image-2.7 when skin texture, fine material detail and believable scale decide whether the picture works. Pick Flash for drafts, packshots and volume.

More about MAI-Image-2.7