Skip to main content
POST
Picture editing

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Required. Forward model ID for MAI Image 2.5 Pro.

Available options:
microsoft/mai-image-2.5-pro
images
object[]
required

Required. A single JPEG or PNG source image. Forward JSON compatible form uses a file_id/image_url object.

Required array length: 1 element
prompt
string
required

Required. Text description of how you wish to edit or expand the image.

Minimum string length: 1
size
enum<string> | null

Compatible output sizes. The MAI native editing interface does not provide independent size parameters, and whether it takes effect depends on the OFOX upstream.

Available options:
auto,
1024x1024,
1536x1024,
1024x1536,
null
response_format
enum<string>
default:b64_json

OFOX compatible response format. MAI native output is fixed to a single PNG Base64; it is recommended to use b64_json.

Available options:
b64_json,
url

Response

200 - application/json
created
integer
required

The Unix timestamp in seconds when the edit result was created.

data
object[]
required

Edited image list.

background
enum<string>

The actual output context used.

Available options:
transparent,
opaque
output_format
enum<string>

Actual output format.

Available options:
png,
webp,
jpeg
quality
enum<string>

Output quality for actual use.

Available options:
low,
medium,
high,
auto
size
string

The actual generated image size.

usage
object

The token usage of the GPT Image model.