MAI-Image-2.6 API access to Microsoft AI's latest image model. Call it with one APIMart API key, with no Azure or Foundry deployment to set up. Generate from text, edit one image or combine up to five references, and get one PNG per request, billed by actual text-input, reference-image and output-image tokens.
Run estimates image-output tokens only; text and reference-image input cost extra. The estimate is — when auto or reference-based dimensions are unknown.

Generated image links are valid for 72 hours after completion. Save your images promptly.
Transparent pricing with no hidden fees. Pay only for what you use.
| Variant | Tier | GoldCurrent price | Platinum | Diamond | Official | Your savings |
|---|---|---|---|---|---|---|
mai-image-2.6Prices are estimates; actual cost is billed by token usage. | 1K · 1024×1024 | 0.3113Credits(~$0.0311)/pic | 0.2957Credits(~$0.0296)/pic | 0.2802Credits(~$0.028)/pic | 0.3891Credits(~$0.0389)/pic | 20% |
| 2K · 1536×1536 | 0.7004Credits(~$0.07)/pic | 0.6654Credits(~$0.0665)/pic | 0.6304Credits(~$0.063)/pic | 0.8755Credits(~$0.0876)/pic | 20% |
* Actual costs are subject to final output.
* Image-output estimate only, using 1024×1024 for 1K and 1536×1536 for 2K. Text and reference-image input are billed separately; actual tokens determine the final charge.
What Microsoft's model does well, and the controls the API exposes
Practical ideas for marketing, product and visual-content teams
Create an account, add funds and generate your first image
Sign up to access MAI-Image-2.6, MAI-Image-2.6 Flash and the other models in the catalog with one account.
Top up your balance. Usage is billed per request by actual tokens, and the same balance works across all models.
Create a key in the console and send it as a Bearer token with every request to the MAI-Image-2.6 API.
Call the mai-image-2.6 model on APIMart with one POST request. Generation is asynchronous: submit a task, then poll the task endpoint to get the MAI-Image-2.6 image URL.
Save the key you created above in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every request.
POST /v1/images/generations with model mai-image-2.6 and your prompt. Add size and resolution for text-to-image, or image_urls to edit. The response returns a task_id in data[0].task_id.
Poll GET /v1/tasks/{task_id} every 3–5 seconds until status is completed, then read the PNG URL from data.result.images[0].url[0]. Download it before expires_at (results are kept for 72 hours). A failed task returns the reason in data.error.message and is fully refunded.
See the MAI-Image-2.6 API reference for every parameter, size table and error code.
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mai-image-2.6",
"prompt": "A travel poster of a university campus at dusk with the headline \"OPEN DAY 2026\", photorealistic, cinematic light",
"size": "16:9",
"resolution": "2K"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "mai-image-2.6",
"prompt": "A travel poster of a university campus at dusk with the headline \"OPEN DAY 2026\", photorealistic, cinematic light",
"size": "16:9",
"resolution": "2K"
}
resp = requests.post(f"{API_BASE}/v1/images/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["images"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(3)
else:
raise TimeoutError(f"task {task_id} did not finish in time")curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mai-image-2.6",
"prompt": "Make the bicycle blue and add a small dog next to it",
"image_urls": [
"https://example.com/bicycle.png"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: mai-image-2.6 | Model ID: mai-image-2.6, or mai-image-2.6-flash for the faster, lower-cost version. |
prompt | string | Required | Default: — | Image description or editing instruction in English or Chinese, up to about 32,000 tokens. |
size | string | Optional | Default: 1:1 | Any integer aspect ratio from 1:4 to 4:1 (such as 16:9), a pixel size such as 1536x1024, or auto. Text-to-image only. |
resolution | string | Optional | Default: 1K | 1K or 2K, used with an aspect-ratio size. 4K is not supported and returns HTTP 400. |
width / height | integer | Optional | Default: — | Exact pixels, sent as a pair. Each side at least 768, at most 2,359,296 total pixels; values round down to multiples of 32. Overrides size and resolution. |
image_urls | array | Optional | Default: — | Up to 5 public image URLs or Base64 data URLs. One image edits it; several are combined. JPEG and PNG are supported; WebP and GIF are converted to PNG. Output dimensions are chosen by the model. |
auto_aspect_ratio | boolean | Optional | Default: false | Set to true to let the model pick the aspect ratio from the prompt, the same as size: auto. |
web_grounding | boolean | Optional | Default: false | Set to true to retrieve current information before generation, useful for real people, places or events. |
n | integer | Optional | Default: 1 | Only 1 is supported. Values above 1 return HTTP 400; submit separate tasks for more images. |
Model names, inputs, output limits, pricing and result handling
MAI-Image-2.6 is Microsoft AI's image generation and editing model, the quality tier of a family that also includes MAI-Image-2.6 Flash. It supports text-to-image, single-image editing and multi-image composition with up to five references. On APIMart, call it with the model ID mai-image-2.6.
Microsoft announced MAI-Image-2.6 on August 10, 2026. API access followed through Microsoft Foundry public preview, announced on September 4, 2026.
Yes. Microsoft Foundry lists the model as MAI-Image-2.6 (Preview) because it is in public preview there; Preview is a release status, not a separate model. The model is also written MAI Image 2.6. On APIMart, use the model ID mai-image-2.6.
Both models share the same capabilities and parameters. mai-image-2.6 is the higher-quality version for final assets; mai-image-2.6-flash is faster and costs less, with slightly lower image quality. Switch between them by changing the model field.
model and prompt are required. Optional fields are size, resolution, width and height, image_urls (up to five references), auto_aspect_ratio, web_grounding and n, which must be 1. quality, style, background, output_format, response_format and mask_url are not supported and are ignored.
Provide up to five HTTP(S) image URLs or Base64 data URLs in image_urls. One image is edited; several are combined. JPEG and PNG are supported; WebP and GIF are converted to PNG. Public URLs must remain accessible.
Use 1K or 2K with an integer aspect ratio from 1:4 to 4:1, or auto. Exact width and height must each be at least 768, with at most 2,359,296 total pixels. For example, 3072×768 is valid; 2048×2048 and 4K are not.
For text-to-image, paired width/height override size and resolution; pixel-valued size overrides resolution. Exact dimensions round down to multiples of 32. With references, the model determines dimensions and these settings do not apply.
Set web_grounding to true to use Bing retrieval before generation, especially for real people, places and events. It defaults to false. Retrieved context does not replace checking the final image.
No. Each request generates one PNG and n must be 1. Mask editing is not supported, and this page does not provide mask or output-format settings.
The MAI-Image-2.6 API charges actual text-input, reference-image and output-image tokens; see the pricing table on this page for current rates. Output-image tokens equal width × height ÷ 1024. An upfront charge is reconciled after completion. The displayed output estimate excludes text-input, reference-image and web-grounding costs, and failed tasks are fully refunded. Membership saves 20% (Gold) and up to 28% (Platinum and Diamond).
No. APIMart has no free quota for MAI-Image-2.6; you pay per request from your balance. Microsoft offers the model as a hosted service and has not published downloadable weights, for example on Hugging Face, so it cannot be self-hosted.
Sign in to APIMart, add funds, then create a key on the API Keys page. The same key works for mai-image-2.6, mai-image-2.6-flash and every other model on the platform.
Submit to POST /v1/images/generations, then query GET /v1/tasks/{task_id} every 3–5 seconds. Download completed images before expires_at (results are kept for 72 hours). A paused status check does not mean generation failed; resume querying the existing task. Full parameters are in the MAI-Image-2.6 docs at docs.apimart.ai.
Explore more models in the same category.

Mai Image 2.6 Flash
MAI-Image-2.6 Flash is the Flash version of Microsoft MAI-Image-2.6 for text-to-image and image editing with up to 5 references, 1K/2K PNG output and optional Bing grounding, billed by actual token usage.

Flux 3 Image
FLUX 3 Image by Black Forest Labs handles text-to-image, single-image editing and generation with up to 10 reference images. It supports multiple aspect ratios and resolutions up to 4K, priced by resolution with no extra charge for references.

Nano banana 2.1
Nano Banana 2.1 is Google's Gemini image model for text-to-image generation and reference-image editing. It outputs 1K, 2K or 4K images in 14 aspect ratios and is available through official and Ext routes.

Seedream 5.0 Flash
Seedream 5.0 Flash is ByteDance's fast, lower-cost text-to-image model. It supports single-image and multi-reference editing with up to 10 references and generates 1K, 1.5K or 2K images, or exact pixel sizes, with strong text rendering.