Skip to content

MAI Image 2.5 Pro (Edit)

Integrate

Model id microsoft/mai-image-2.5-pro/edit
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/microsoft/mai-image-2.5-pro/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

This request: ≈$0.179 179 API credits Run it on this page

Get API key
Microsoft Image Editing #image-editing#typography#photorealism#controllable-editing

Pro editing model that changes a single image from an instruction while keeping its layout and text

Microsoft · Image

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required 88 / 5000

Editing instructions for the supplied image or images.

aspect_ratio default auto

Output image proportions; "auto" either follows the input proportions or allows the model to choose.

num_images default 1

Image count requested for generation.

Advanced image · output_format
image_url default
Drop a file, or

Image to edit, supplied as a single http(s) URL or data: URL.

output_format default png

File format for the resulting image.

POST /run/microsoft/mai-image-2.5-pro/edit?wait=20 quote → $0.179
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/microsoft/mai-image-2.5-pro/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About MAI Image 2.5 Pro (Edit)

Edits a reference image from a text instruction of up to 5000 characters. Provide one image via `image_url` as an http(s) or data URL. It aims to keep composition, typography and identity intact. Return 1 to 4 images, choose an aspect ratio or auto to match the input, and pick jpeg, png or webp output.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptrequired
Typestring
≤ 5,000 characters≥ 3 characters
Editing instructions for the supplied image or images.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 4
Image count requested for generation.
aspect_ratiooptional
Typeenum
Defaultauto
auto1:14:33:416:99:163:22:3
Output image proportions; "auto" either follows the input proportions or allows the model to choose.
output_formatoptional
Typeenum
Defaultpng
jpegpngwebp
File format for the resulting image.
image_urloptional image
Typeurl · image
Default
Image to edit, supplied as a single http(s) URL or data: URL.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "microsoft/mai-image-2.5-pro/edit",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 179,
    "usd": "0.179",
    "charged": 179,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "description": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
images
array of object {url, content_type, file_name, file_size, width, height}Images resulting from editing.
description
stringDescription accompanying the generated images.

More models: Image Editing

For AI agents: this page as Markdown is at https://doitong.com/developers/models/microsoft/mai-image-2.5-pro/edit.md. All models and guides: https://doitong.com/developers/llms.txt