Source: https://ailoot.ai/models/en/microsoft-mai-image-2-6/
Canonical: https://ailoot.ai/models/en/microsoft-mai-image-2-6/
Language: en

# Microsoft AI: MAI-Image-2.6

[Markdown](https://ailoot.ai/models/en/microsoft-mai-image-2-6/index.md) · [JSON](https://ailoot.ai/models/en/microsoft-mai-image-2-6/facts.json)

## [Microsoft AI: MAI-Image-2.6](https://ailoot.ai/models/en/microsoft-mai-image-2-6/)

Microsoft AI MAI-Image-2.6 generates and edits images for precise design work. It combines text with up to five visual references, supports optional web grounding and automatic composition sizing, and produces PNG images up to 2,359,296 pixels. Its emphasis is controlled edits, text, portraits and commercial visuals.

- [**Ailoot Ultra · Images** `POST /v1/images/generations` `microsoft/mai-image-2.6`](https://ailoot.ai/models/en/microsoft-mai-image-2-6/#method-0)

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

Microsoft AI MAI-Image-2.6 is the precision-focused edition of the 2.6 image family, designed for text-to-image generation and controlled editing of existing visual assets. Its model card describes a diffusion model using flow matching, with 20 billion non-embedding parameters and a 32K-token context. The intended output is an image: a product composition, a portrait, a branded illustration or a revised visual whose layout and key subjects remain coherent while a specified element changes.

For generation, describe the subject, composition, materials, light, viewpoint and visual style. Include exact wording when a label, title or sign should appear in the image, and describe where that wording belongs. The manufacturer highlights stronger text rendering, portraits, 3D imagery and commercial or photorealistic output in this edition. A useful brief identifies the few relationships that make the image work: which object is foregrounded, how it sits in the scene and where the audience should look first. Inspect fine lettering and small details in the finished image.

For editing, provide the source asset and state the change together with the parts to retain. Documented tasks include object removal or replacement, attribute changes, inpainting, layout adaptation, text updates and cleanup of artifacts such as motion blur. The model card emphasizes reasoning across scale, perspective, lighting and spatial placement so a revision fits the existing scene. As preparation, identify the object or region clearly and explain whether the goal is a local correction, a different arrangement or a broader change of style.

The manufacturer’s image-editing guide accepts up to five JPEG or PNG references. Give each image a distinct role, such as the product, a person, a setting, a layout or a visual style. For a lighting edit, place a lamp from one reference on the desk in another, retaining the desk’s perspective and making the lamp’s shadow follow the room’s light. A separate revision can update a short label while preserving the product’s shape and position. Review the reference relationships in the result instead of accepting a plausible object that differs from the one supplied.

The 2.6 family adds optional web grounding and model-directed aspect-ratio selection. Web grounding supplies relevant current context when interpreting a request involving a real place, object or changing information. It is a creative input, so review factual visual details against the intended subject. Automatic aspect selection lets the model consider the prompt and images when choosing the composition’s shape. A design brief can specify the destination and required layout: for example, a wide product hero with breathing room on one side or a portrait image built around a standing subject.

Output size is governed by total area. The exact model card and image guide list a maximum of 2,359,296 pixels, equivalent to a 1536×1536 square. The documented image interface requires both width and height to be at least 768 pixels, and either dimension may exceed 1536 if the total stays within the area limit. This permits a longer landscape or portrait composition rather than imposing a 1536-pixel maximum on each side. For example, a 1024×2048 target has 2,097,152 pixels and fits that documented area rule. Check the final dimensions for the layout that will use the image.

The manufacturer’s guide returns generated and edited results as PNG image data. Keep the completed image alongside the brief and source references when preparing a design revision. The model card names a 32K-token context, while the serving guide specifies a 32,000-token maximum prompt context; retain those stated scopes when preparing a long brief rather than treating them as image dimensions. The useful production artifact is the decoded picture, which can be inspected and placed into a page, slide or composition. Record the intended crop and text placement with it so later edits do not accidentally change the design’s purpose.

Within this family, MAI-Image-2.6 emphasizes precise control and the latest gains in visual detail. MAI-Image-2.6-Flash supplies the same generation, editing, grounding and aspect-selection capabilities in an edition optimized for responsive, repeated production. The 2.5 series uses a smaller documented output-area limit and does not inherit the 2.6 grounding or automatic-aspect controls. Select the edition according to the required image and revision process rather than assuming that a shared family name makes every setting identical.

Review an edit against the complete source: retained faces, object identity, geometry, shadows, lettering and the intended layout all matter. A convincing photograph can still contain a wrong marking, an inconsistent reflection or a changed feature outside the requested edit. Keep the next correction concrete, such as the label, the object’s placement or a particular artifact. This makes iterative editing useful while preserving the original brief’s subject and composition.

**Ailoot Ultra · Images** `POST /v1/images/generations` `microsoft/mai-image-2.6`

[`microsoft/mai-image-2.6`](https://ailoot.ai/models/en/#m=microsoft%2Fmai-image-2.6&route=Ultra&caller=microsoft%2Fmai-image-2.6&fmt=images)

Microsoft AI /`microsoft/mai-image-2.6`

### Overview

Microsoft AI MAI-Image-2.6 generates and edits images for precise design work. It combines text with up to five visual references, supports optional web grounding and automatic composition sizing, and produces PNG images up to 2,359,296 pixels. Its emphasis is controlled edits, text, portraits and commercial visuals.

Accepted inputs

Text · Images

Results

Images

### Available in Ailoot · inputs & methods

**Ailoot Ultra · Images** `POST /v1/images/generations`

Input types

`text`, `image`

Output types

`image`

| Field | Type | Requirement | Values & limits | Default |
| --- | --- | --- | --- | --- |
| Field`model` | Type`string` | RequirementRequired | Values & limits microsoft/mai-image-2.6 | Default— |
| Field`prompt` | Type`string` | RequirementRequired | Values & limits Minimum length: 1 | Default— |
| Field`aspect_ratio` | Type`string` | RequirementOptional | Values & limits 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, auto | Default— |
| Field`n` | Type`integer` | RequirementOptional | Values & limits Minimum: 1 Maximum: 1 | Default— |
| Field`input_references` | Type`array` | RequirementOptional | Values & limits Minimum items: 0 Maximum items: 5 | Default— |
| Field`provider` | Type`object` | RequirementOptional | Values & limits | Default— |

Method parameters and lifecycle

| Parameter | Contract |
| --- | --- |
| Parameter`content_type` | Contractapplication/json |
| Parameter`required` | Contractmodel, prompt |
| Parameter`material_types` | Contracttext, image |

Lifecycle: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · actual returned task\_id or media library record

`GET /v1/media/assets/{asset_id}/content`

`GET /v1/media/assets`

`GET /v1/media/assets/{asset_id}`

### Pricing

##### How the final charge is calculated

The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode

Not specified When fast mode is selected

Flex mode

Not specified When flex mode is selected

Maximum reasoning effort

Not specified When maximum reasoning effort uses the default adjustment

#### Estimated rates for comparison

#### Prices by configuration

Match each charge to the conditions shown. Use one rate for each set of alternative configurations.

| Configuration | Rate schedule | Forecast quantity | Charge |
| --- | --- | --- | --- |
| ConfigurationBase token rates | Rate scheduleBase rate | Forecast quantity— | Charge Input · Input tokens · Estimate for comparison only **—** / 1K tokens Output · Output tokens · Estimate for comparison only **—** / 1K tokens Input · Cache read · Estimate for comparison only **—** / 1K tokens Input · Cache write · Estimate for comparison only **—** / 1K tokens Input · Cache write, 1 hour · Estimate for comparison only **—** / 1K tokens |
| ConfigurationEstimated generation cost | Rate schedule— | Forecast quantityone generation estimate | Charge Output · Estimated generation cost · Estimate for comparison only **$0.311296** estimate before generation This estimate is not an additional charge or a fixed rate for the completed generation. |

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. [How reservation and settlement work →](https://ailoot.ai/docs/en/billing/reserve/)

### Example requests

#### Ailoot Ultra · Images

curl

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p={'model': 'microsoft/mai-image-2.6', 'prompt': 'a red panda astronaut floating in space, studio lighting'}

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
```

### Receive and save results

#### Ailoot Ultra · Images

Download each returned image or save its Base64 contents

- `GET /v1/media/tasks/{task_id}`
- `GET /v1/media/assets/{asset_id}/content`
- `GET /v1/media/assets`
- `GET /v1/media/assets/{asset_id}`

Other content reads

Read existing owned assets

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/media/assets \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o owned-assets.json
# Preserve every returned asset and follow its exact signed content URL. Do not construct a signed token.
```

##### Keep all completed results

Save every completed image; retrieve each returned URL or decode its Base64 contents.

Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.

##### If the original response needs checking

Keep the returned X-Client-Request-ID for reconciliation. Read only actual returned task\_id/asset\_id values or the owned media library; never build a task URL from the operation ID and never resubmit creation.

Response fields

| Field | Type |
| --- | --- |
| Field`created` | Type |
| Field`data[].url` | Type |
| Field`data[].b64_json` | Type |
| Field`usage` | Type |

### Aliases

#### Model aliases

**Ailoot Ultra** [`microsoft/mai-image-2.6`](https://ailoot.ai/models/en/#m=microsoft%2Fmai-image-2.6&route=Ultra&caller=microsoft%2Fmai-image-2.6&fmt=images)

#### Method path aliases

`/v1/images`

#### Related caller IDs

[`microsoft/mai-image-2.6`](https://ailoot.ai/models/en/#m=microsoft%2Fmai-image-2.6&route=Ultra&caller=microsoft%2Fmai-image-2.6&fmt=images)

FAQ · Microsoft AI: MAI-Image-2.6

What inputs and results are available?

`POST /v1/images/generations` · `microsoft/mai-image-2.6`: `text`, `image` → `image`

Which fields does the request use?

`POST /v1/images/generations` · `microsoft/mai-image-2.6`: `model`, `prompt`, `aspect_ratio`, `n`, `input_references`, `provider`

What limits apply?

`POST /v1/images/generations` · `microsoft/mai-image-2.6`: `n.minimum`: `1`; `n.maximum`: `1`

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

## The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

## Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription

Choose a discounted plan for your regular requests.

Promo code: up to 50% off

Enter your code at checkout. The price updates to reflect the current promotion.

Spending in your history

The model, tokens and amount are recorded for each request.

[Choose a subscription](https://ailoot.ai/docs/en/billing/subscriptions/) · [View model prices](https://ailoot.ai/models/en/)

## Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application

Add text, image, video and audio generation to paid features in your service.

Reseller licence

Send a description of your project and how you provide access. Request written terms for use and resale.

Documents on the website

The service offer, licence agreement and data processing policy are available before you connect.

[Request a reseller licence](mailto:support@ailoot.ai) · [Service offer and licence agreement](https://ailoot.ai/legal/offer?lang=en)

## Ailoot · The company and its project portfolio





Ailoot combines established operating experience, a large client base, stable service and ongoing KPI control.





The company and its project portfolio: millions of customers; monthly sales in the billions.





Ailoot brings that operating experience to API access for AI features in customer products, agents, applications and automations.
