# Microsoft MAI Image 2.5 Pro Edit API

> Mai Image 2.5 Pro 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-pro/edit
API reference: https://www.sandbase.ai/models/microsoft/mai-image-2.5-pro/edit/docs

## Facts

- Provider: Microsoft
- Type: Image model
- Model ID: `microsoft/mai-image-2.5-pro/edit`
- Price: From $0.29 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-pro/edit",
  "image": "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 Pro Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "microsoft/mai-image-2.5-pro/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 Pro Edit and the other models in the catalog; you do not need to sign up with Microsoft separately.

## README

### MAI Image 2.5 Pro Edit

MAI Image 2.5 Pro edit: Microsoft's top image model for photoreal edits from an instruction.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 5,000 characters. |
| `image` | image URL, required | — | Image to edit. JPEG, PNG, or WebP URL. |
| `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.29 per output image.

| Request | Price |
|---|---|
| One image | $0.29 |

Failed runs are not charged.

#### Prompting

- State the change and what must stay.

#### Also on SandBase

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