About MAI-Image-2.7 Flash
This is the endpoint for revisions that should feel instant inside a product: swap the backdrop behind a packshot, relight a still life, or merge an item with a texture photo. The body carries two fields, prompt and image_urls, with no size or seed controls, so client code stays small and the speed comes from the model rather than from tuning.
Call it with the model name microsoft/mai-image-2.7-flash/edit on POST /jobs/createTask, from $0.0186.
Introduction
Fast multi-photo editing with MAI-Image-2.7 Flash
MAI-Image-2.7 Flash Edit accepts one to five reference images in image_urls and applies targeted edits, background replacements, and compositing guided by your prompt. It is designed for rapid drafts and high-volume iteration before rendering final assets with MAI-Image-2.7.
Key parameters
image_urls— One to five source images (JPEG, PNG, or WebP) to edit or combine.prompt— Clear instruction describing what to change and what to keep from the reference images.aspect_ratio— Choose a specific output ratio or match the input framing.
Request parameters
| Parameter | Required | Description |
|---|---|---|
image_urls | Yes | Photos to edit or combine. Say in the prompt what each one adds. |
prompt | Yes | Describe what you want to make. |
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.
| Option | USD per image |
|---|---|
| Standard | $0.01548 |
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 Flash API in three steps
- 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.
- Send the request. POST /jobs/createTask with model microsoft/mai-image-2.7-flash/edit and an input object that follows the parameter table. The response returns a task ID straight away.
- 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-flash/edit",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"image_urls": [
"https://media.popnow.ai/influencer/examples/marco.webp"
]
}
}'
# 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.
About the MAI-Image-2.7 Flash Edit Image endpoint
Our two November 2026 edits on PopNow finished in 27 seconds (a square shoe photo moved onto a neon street) and 33 seconds (a 3:4 book still life relit for evening). Both figures include queue time. Polling every three to five seconds is plenty for a single job; for batches, a callback URL saves you from holding hundreds of open poll loops.
Outputs sit close to one megapixel and follow the source shape: the 2048 × 2048 shoe returned 1024 × 1024, the 1760 × 2336 still life 896 × 1184. If a listing template needs 2,000-pixel images, chain an upscale job or regenerate the final through text-to-image at 2K on Flash or the full model.
Locking instructions work when they are explicit. Keep the shoe exactly as it is, same angle and size, held the silhouette, colour and knit through a complete background change. Same scene and composition kept every spine title on the relit books. Put the locked items first and the change second, and avoid vague verbs such as improve that invite a redraw.
Know where it slips. Distant signage in the neon edit came back as unreadable glyphs, so a feature that promises legible storefront text should hand that step to a lettering model such as Ideogram 4.6. Up to five references are accepted; the first is covered by the edit rate and each further one adds a small fee, so quote after the user's selection is final.
Error handling: invalid_asset points at one unreachable or unsupported file, so replace that entry without reordering the rest. content_rejected means a refused prompt or photo; let the user swap it. On timeout, check recordInfo before resubmitting, because a duplicate request without the original Idempotency-Key becomes a second billable job.
MAI-Image-2.7 Flash API questions
How much does the MAI-Image-2.7 Flash API cost?
MAI-Image-2.7 Flash starts at $0.0186 per image with Edit Image, its lowest-priced task. 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 are the limits of the MAI-Image-2.7 Flash · Edit Image API?
Reference images: 5; Prompt length (characters): 10,000. Requests outside these limits are rejected before anything is charged.
More about MAI-Image-2.7 Flash
- Endpoints
- MAI-Image-2.7 Flash · Create Image