curl --request POST \
--url https://api.modellix.ai/api/v1/microsoft/mai-image-2.7-flash-edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Keep the subjects and composition, and give the background a warm sunset color grade.",
"images": [
"https://dashscope.oss-cn-beijing.aliyuncs.com/images/dog_and_girl.jpeg"
]
}
'
{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-mai-image-2-7-flash-edit-001",
"model_id": "microsoft/mai-image-2.7-flash-edit",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-mai-image-2-7-flash-edit-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'images' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}MAI Image 2.7 Flash Edit
Microsoft’s fast image-editing model for rapid revisions of a source image, including color changes, object adjustments, and retouching.
POST
/
microsoft
/
mai-image-2.7-flash-edit
curl --request POST \
--url https://api.modellix.ai/api/v1/microsoft/mai-image-2.7-flash-edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Keep the subjects and composition, and give the background a warm sunset color grade.",
"images": [
"https://dashscope.oss-cn-beijing.aliyuncs.com/images/dog_and_girl.jpeg"
]
}
'
{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-mai-image-2-7-flash-edit-001",
"model_id": "microsoft/mai-image-2.7-flash-edit",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-mai-image-2-7-flash-edit-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'images' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}Poll the returned task URL to retrieve the PNG. Query Task Result
Body
application/json
Apply a prompt-guided edit to one source image and return one PNG.
Provide exactly one publicly accessible HTTP or HTTPS URL for a JPEG or PNG. Use a URL string or an object with an image_url string.
Required array length:
1 elementPattern:
^https?://Example:
[ "https://dashscope.oss-cn-beijing.aliyuncs.com/images/dog_and_girl.jpeg" ]