# Microsoft MAI Image 2.5 Edit API

> Mai Image 2.5 Edit by Microsoft - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.

Source: https://www.sandbase.ai/models/microsoft/mai-image-2.5/edit
API reference: https://www.sandbase.ai/models/microsoft/mai-image-2.5/edit/docs

## Facts

- Provider: Microsoft
- Type: Image model
- Model ID: `microsoft/mai-image-2.5/edit`
- Price: $0.05 per run
- Capabilities: image to image
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "microsoft/mai-image-2.5/edit",
  "images": [
    "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png"
  ],
  "prompt": "Turn this into a clean, futuristic product shot with soft studio lighting.",
  "output_format": "png"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Microsoft MAI Image 2.5 Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "microsoft/mai-image-2.5/edit" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Microsoft account?

No. One SandBase API key and balance gives you access to Microsoft MAI Image 2.5 Edit and the other models in the catalog; you do not need to sign up with Microsoft separately.

## README

### MAI Image 2.5 Edit

MAI Image 2.5 edit: fast, low-cost edits and multi-image composition from Microsoft.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 5,000 characters. |
| `images` | image URL[] | — | Images to edit or combine, Image 1, Image 2, … |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` | — | Output shape. |

#### Billing

$0.05 per output image.

| Request | Price |
|---|---|
| One image | $0.05 |

Failed runs are not charged.

#### Prompting

- State the change and what must stay.

#### Also on SandBase

Related: `microsoft/mai-image-2.5-pro/edit`.
