Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

Microsoft MAI Image 2.6 edit request. Shared by MAI Image 2.6 Edit and 2.6 Flash Edit. Accepts exactly one source image (JPEG or PNG); output is always PNG. auto_aspect_ratio and web_grounding are optional; omit them to leave upstream defaults (do not send the fields).

prompt
string
required

Text description of the edit to apply. Platform limit is 32,000 UTF-8 bytes, not Unicode characters.

Required string length: 1 - 32000
Example:

"Turn this photo into a watercolor painting"

images
string[]
required

Exactly one source image. The item must be a publicly accessible HTTP or HTTPS image URL (JPEG or PNG only).

Required array length: 1 element
Minimum string length: 1
Example:
auto_aspect_ratio
boolean

Optional. When true, the model chooses the output aspect ratio from the prompt and source image. Omit this field unless the caller explicitly wants model-directed framing.

web_grounding
boolean

Optional. When true, the model may retrieve current public information (Bing) as extra context. Omit this field unless the caller explicitly wants web-grounded editing.

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.