# Wan-AI Wan2.7 Async Image Generation

> Image Generation

Submit an asynchronous image generation task with `wan2.7-image` or
`wan2.7-image-pro`. At least one of `input.prompt`, `input.images`,
`input.img_url`, or `input.first_frame_url` must be provided. If
multiple image fields are supplied, `input.images` takes priority over
`input.img_url` and `input.first_frame_url`.

## Endpoint

`POST https://api.modelverse.cn/v1/tasks/submit`

## Request Body

## Responses

- **200** — Task submitted successfully.
- **400** — Invalid request parameters or task submission error.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "ModelVerse Wan-AI/Wan2.7 Image API",
    "version": "1.0.0",
    "description": "Self-contained OpenAPI 3.1 schema for the ModelVerse `wan2.7-image`\nand `wan2.7-image-pro` image generation APIs.\n\nThe source document covers the synchronous OpenAI-compatible image\ngeneration route and the asynchronous task submit/status routes.\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "ModelVerse API endpoint documented for this model."
    }
  ],
  "tags": [
    {
      "name": "Wan-AI/Wan2.7 Image",
      "description": "Synchronous and asynchronous image generation operations for Wan-AI/Wan2.7."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/images/generations": {
      "post": {
        "tags": [
          "Wan-AI/Wan2.7 Image"
        ],
        "operationId": "createWanAIWan27ImageGeneration",
        "summary": "Wan-AI Wan2.7 Image Generation",
        "description": "Generate images synchronously with `wan2.7-image` or `wan2.7-image-pro`.\nThe same route supports text-to-image, single-image editing,\nmulti-image fusion/editing, and sequential multi-image generation.\n\nAt least one of `prompt`, `image`, or `images` must be provided. If\nboth `image` and `images` are supplied, `images` takes priority.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WanAIWan27ImageGenerationRequest"
              },
              "examples": {
                "textToImage": {
                  "summary": "Text-to-image",
                  "value": {
                    "model": "wan2.7-image",
                    "prompt": "A futuristic cloud data center floating above the sea at sunrise",
                    "size": "1K",
                    "seed": 123456,
                    "watermark": false
                  }
                },
                "singleImageEdit": {
                  "summary": "Single-image edit",
                  "value": {
                    "model": "wan2.7-image-pro",
                    "prompt": "把这只猫改成赛博朋克风格，霓虹灯光，电影感构图",
                    "image": "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg",
                    "size": "2K",
                    "thinking_mode": true,
                    "watermark": false
                  }
                },
                "multiImageFusion": {
                  "summary": "Multi-image fusion",
                  "value": {
                    "model": "wan2.7-image-pro",
                    "prompt": "融合两张参考图的主体特征，生成一张高级感品牌海报",
                    "images": [
                      "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg",
                      "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
                    ],
                    "size": "2048*2048",
                    "thinking_mode": true,
                    "seed": 20260402
                  }
                },
                "sequentialImageGeneration": {
                  "summary": "Sequential multi-image generation",
                  "value": {
                    "model": "wan2.7-image-pro",
                    "prompt": "生成一组同一角色在春夏秋冬四季中的海报，人物形象保持一致",
                    "size": "2K",
                    "thinking_mode": true,
                    "enable_sequential": true,
                    "n": 4
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image generation response. Generated image URLs are valid for 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageGenerationResponse"
                },
                "examples": {
                  "generatedImages": {
                    "summary": "Generated image URLs",
                    "value": {
                      "created": 1775558400,
                      "data": [
                        {
                          "url": "https://example.com/generated-image-1.png"
                        },
                        {
                          "url": "https://example.com/generated-image-2.png"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or image generation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageErrorResponse"
                },
                "examples": {
                  "invalidImageUrl": {
                    "$ref": "#/components/examples/WanAIWan27ImageInvalidImageUrlError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/WanAIWan27ImageInvalidImageUrlError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/submit": {
      "post": {
        "tags": [
          "Wan-AI/Wan2.7 Image"
        ],
        "operationId": "submitWanAIWan27ImageTask",
        "summary": "Wan-AI Wan2.7 Async Image Generation",
        "description": "Submit an asynchronous image generation task with `wan2.7-image` or\n`wan2.7-image-pro`. At least one of `input.prompt`, `input.images`,\n`input.img_url`, or `input.first_frame_url` must be provided. If\nmultiple image fields are supplied, `input.images` takes priority over\n`input.img_url` and `input.first_frame_url`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WanAIWan27ImageTaskSubmitRequest"
              },
              "examples": {
                "textToImage": {
                  "summary": "Text-to-image task",
                  "value": {
                    "model": "wan2.7-image",
                    "input": {
                      "prompt": "A futuristic cloud data center floating above the sea at sunrise"
                    },
                    "parameters": {
                      "size": "1K",
                      "seed": 123456
                    }
                  }
                },
                "singleImageEdit": {
                  "summary": "Single-image edit task",
                  "value": {
                    "model": "wan2.7-image-pro",
                    "input": {
                      "prompt": "把这只猫改成赛博朋克风格，霓虹灯光，电影感构图",
                      "img_url": "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
                    },
                    "parameters": {
                      "size": "2K",
                      "prompt_extend": true,
                      "watermark": false
                    }
                  }
                },
                "multiImageFusion": {
                  "summary": "Multi-image fusion task",
                  "value": {
                    "model": "wan2.7-image-pro",
                    "input": {
                      "prompt": "融合两张参考图的主体特征，生成一张高级感品牌海报",
                      "images": [
                        "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg",
                        "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
                      ]
                    },
                    "parameters": {
                      "size": "2048*2048",
                      "prompt_extend": true,
                      "seed": 20260402
                    }
                  }
                },
                "sequentialImageGeneration": {
                  "summary": "Sequential multi-image generation task",
                  "value": {
                    "model": "wan2.7-image-pro",
                    "input": {
                      "prompt": "生成一组同一角色在春夏秋冬四季中的海报，人物形象保持一致"
                    },
                    "parameters": {
                      "size": "2K",
                      "prompt_extend": true,
                      "enable_sequential": true,
                      "n": 4
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task submitted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageTaskSubmitResponse"
                },
                "examples": {
                  "submitted": {
                    "summary": "Submitted task",
                    "value": {
                      "output": {
                        "task_id": "3c7d6b6c-7cdb-4f37-bf41-7f2b0f1a9f0d"
                      },
                      "request_id": "req_202604021530000001"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or task submission error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageErrorResponse"
                },
                "examples": {
                  "invalidImageUrl": {
                    "$ref": "#/components/examples/WanAIWan27ImageInvalidImageUrlError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/WanAIWan27ImageInvalidImageUrlError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/status": {
      "get": {
        "tags": [
          "Wan-AI/Wan2.7 Image"
        ],
        "operationId": "getWanAIWan27ImageTaskStatus",
        "summary": "Wan-AI Wan2.7 Image Task Status",
        "description": "Query the status, result URLs, and optional usage details for an asynchronous image task.",
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "Asynchronous task identifier returned by `/v1/tasks/submit`.",
            "schema": {
              "type": "string"
            },
            "examples": {
              "documented": {
                "summary": "Source documentation placeholder",
                "value": "<task_id>"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task status response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageTaskStatusResponse"
                },
                "examples": {
                  "success": {
                    "summary": "Successful task",
                    "value": {
                      "output": {
                        "task_id": "3c7d6b6c-7cdb-4f37-bf41-7f2b0f1a9f0d",
                        "task_status": "Success",
                        "urls": [
                          "https://example.com/generated-image-1.png",
                          "https://example.com/generated-image-2.png",
                          "https://example.com/generated-image-3.png",
                          "https://example.com/generated-image-4.png"
                        ],
                        "submit_time": 1775115000,
                        "finish_time": 1775115038
                      },
                      "usage": {
                        "completion_tokens": 4,
                        "total_tokens": 4
                      },
                      "request_id": ""
                    }
                  },
                  "failure": {
                    "summary": "Failed task",
                    "value": {
                      "output": {
                        "task_id": "3c7d6b6c-7cdb-4f37-bf41-7f2b0f1a9f0d",
                        "task_status": "Failure",
                        "submit_time": 1775115000,
                        "finish_time": 1775115012,
                        "error_message": "code=InvalidParameter, message=invalid image url"
                      },
                      "request_id": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid task identifier or task status error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageErrorResponse"
                },
                "examples": {
                  "invalidTaskId": {
                    "$ref": "#/components/examples/WanAIWan27ImageInvalidTaskIdError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WanAIWan27ImageErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/WanAIWan27ImageInvalidTaskIdError"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "ModelVerse API key sent in the `Authorization: Bearer <MODELVERSE_API_KEY>` header."
      }
    },
    "schemas": {
      "WanAIWan27ImageModel": {
        "type": "string",
        "enum": [
          "wan2.7-image",
          "wan2.7-image-pro"
        ],
        "description": "Model name. This schema is pinned to the Wan2.7 image models documented in the source file."
      },
      "WanAIWan27ImageGenerationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model"
        ],
        "anyOf": [
          {
            "required": [
              "prompt"
            ]
          },
          {
            "required": [
              "image"
            ]
          },
          {
            "required": [
              "images"
            ]
          }
        ],
        "properties": {
          "model": {
            "$ref": "#/components/schemas/WanAIWan27ImageModel"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "Text prompt. At least one of `prompt`, `image`, or `images` must be provided."
          },
          "image": {
            "$ref": "#/components/schemas/WanAIWan27ImageInputImage"
          },
          "images": {
            "$ref": "#/components/schemas/WanAIWan27ImageInputImages"
          },
          "size": {
            "$ref": "#/components/schemas/WanAIWan27ImageSize"
          },
          "n": {
            "$ref": "#/components/schemas/WanAIWan27ImageCount"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "description": "Random seed. The source recommends a positive integer; `0` or omission is treated as unset."
          },
          "watermark": {
            "type": "boolean",
            "default": false,
            "description": "Whether to add a watermark."
          },
          "thinking_mode": {
            "type": "boolean",
            "default": true,
            "description": "Whether to enable deep thinking mode. This is effective only when\nsequential generation is disabled and no image input is provided.\nEnabling it can improve image quality but increases latency.\n"
          },
          "enable_sequential": {
            "type": "boolean",
            "default": false,
            "description": "Whether to enable sequential multi-image/group-image generation."
          }
        }
      },
      "WanAIWan27ImageTaskSubmitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "$ref": "#/components/schemas/WanAIWan27ImageModel"
          },
          "input": {
            "$ref": "#/components/schemas/WanAIWan27ImageTaskInput"
          },
          "parameters": {
            "$ref": "#/components/schemas/WanAIWan27ImageTaskParameters"
          }
        }
      },
      "WanAIWan27ImageTaskInput": {
        "type": "object",
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "prompt"
            ]
          },
          {
            "required": [
              "images"
            ]
          },
          {
            "required": [
              "img_url"
            ]
          },
          {
            "required": [
              "first_frame_url"
            ]
          }
        ],
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "Text prompt."
          },
          "images": {
            "$ref": "#/components/schemas/WanAIWan27ImageInputImages"
          },
          "img_url": {
            "$ref": "#/components/schemas/WanAIWan27ImageInputImage"
          },
          "first_frame_url": {
            "$ref": "#/components/schemas/WanAIWan27ImageInputImage"
          }
        }
      },
      "WanAIWan27ImageTaskParameters": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "size": {
            "$ref": "#/components/schemas/WanAIWan27ImageSize"
          },
          "n": {
            "$ref": "#/components/schemas/WanAIWan27ImageCount"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "description": "Random seed. The source recommends a positive integer; `0` or omission is treated as unset."
          },
          "watermark": {
            "type": "boolean",
            "description": "Whether to add a watermark."
          },
          "enable_sequential": {
            "type": "boolean",
            "default": false,
            "description": "Whether to enable sequential multi-image/group-image generation."
          },
          "prompt_extend": {
            "type": "boolean",
            "description": "Prompt enhancement switch. Passing `true` maps to Wan2.7 `thinking_mode=true`."
          }
        }
      },
      "WanAIWan27ImageInputImage": {
        "type": "string",
        "minLength": 1,
        "description": "Image input as a public URL or Base64 string. Supported formats are\nJPEG/JPG, PNG without alpha transparency, BMP, and WEBP. Width and\nheight must each be in the `[240, 8000]` pixel range, aspect ratio must\nbe between `1:8` and `8:1`, and each image must be no larger than 20 MB.\n",
        "examples": [
          "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
        ]
      },
      "WanAIWan27ImageInputImages": {
        "type": "array",
        "minItems": 1,
        "maxItems": 9,
        "description": "Multiple image inputs as public URLs or Base64 strings. A maximum of 9\nimages is supported; array order defines image order.\n",
        "items": {
          "$ref": "#/components/schemas/WanAIWan27ImageInputImage"
        }
      },
      "WanAIWan27ImageSize": {
        "type": "string",
        "default": "2K",
        "description": "Output size. Supported values are the tiers `1K`, `2K`, and `4K`, or an\nexplicit pixel size written as `WIDTH*HEIGHT`; `WIDTHxHEIGHT` is also\naccepted.\n\nTier values map to total pixel budgets equivalent to 1024x1024,\n2048x2048, and 4096x4096. With image input, output aspect ratio follows\nthe input image; with multiple images, it follows the last image. Without\nimage input, tier output is square.\n\n`wan2.7-image-pro` supports `1K`, `2K`, and `4K` for text-to-image when\nno image input is provided and sequential mode is disabled; image\nediting and sequential generation support only `1K` and `2K`.\n`wan2.7-image` supports only `1K` and `2K`.\n\nFor explicit pixel sizes, aspect ratio must be between `1:8` and `8:1`.\n`wan2.7-image-pro` text-to-image supports total pixels in the\n`[768x768, 4096x4096]` range; other `wan2.7-image-pro` scenarios support\n`[768x768, 2048x2048]`. `wan2.7-image` supports `[768x768, 2048x2048]`\nin all scenarios.\n",
        "oneOf": [
          {
            "enum": [
              "1K",
              "2K",
              "4K"
            ]
          },
          {
            "pattern": "^[1-9][0-9]*[x*][1-9][0-9]*$"
          }
        ],
        "examples": [
          "1K",
          "2K",
          "4K",
          "1280*720",
          "1280x720"
        ]
      },
      "WanAIWan27ImageCount": {
        "type": "integer",
        "minimum": 1,
        "maximum": 12,
        "default": 1,
        "description": "Number of images to generate. In ordinary mode the documented range is\n`1` to `4`. When `enable_sequential` is true, the documented range is\n`1` to `12`; the model decides the actual image count, not exceeding `n`.\n"
      },
      "WanAIWan27ImageGenerationResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "created",
          "data"
        ],
        "properties": {
          "created": {
            "type": "integer",
            "description": "Unix timestamp in seconds for request creation."
          },
          "data": {
            "type": "array",
            "description": "Generated image URL list.",
            "items": {
              "$ref": "#/components/schemas/WanAIWan27ImageUrlData"
            }
          }
        }
      },
      "WanAIWan27ImageUrlData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Generated image download URL. Links are valid for 24 hours."
          }
        }
      },
      "WanAIWan27ImageTaskSubmitResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "task_id"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "description": "Asynchronous task identifier."
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "Request identifier."
          }
        }
      },
      "WanAIWan27ImageTaskStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "$ref": "#/components/schemas/WanAIWan27ImageTaskStatusOutput"
          },
          "usage": {
            "$ref": "#/components/schemas/WanAIWan27ImageUsage"
          },
          "request_id": {
            "type": "string",
            "description": "Request identifier."
          }
        }
      },
      "WanAIWan27ImageTaskStatusOutput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "task_id",
          "task_status"
        ],
        "properties": {
          "task_id": {
            "type": "string",
            "description": "Asynchronous task identifier."
          },
          "task_status": {
            "type": "string",
            "enum": [
              "Pending",
              "Running",
              "Success",
              "Failure",
              "Cancelled"
            ],
            "description": "Task status."
          },
          "urls": {
            "type": "array",
            "description": "Generated image result URLs. Links are valid for 24 hours.",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "submit_time": {
            "type": "integer",
            "description": "Task submission timestamp."
          },
          "finish_time": {
            "type": "integer",
            "description": "Task finish timestamp."
          },
          "error_message": {
            "type": "string",
            "description": "Error message returned when the task fails."
          }
        }
      },
      "WanAIWan27ImageUsage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "completion_tokens": {
            "type": "integer",
            "description": "Optional output token count."
          },
          "total_tokens": {
            "type": "integer",
            "description": "Optional total token count."
          }
        }
      },
      "WanAIWan27ImageErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": true,
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Error code.",
                "examples": [
                  "InvalidParameter"
                ]
              },
              "message": {
                "type": "string",
                "description": "Error message.",
                "examples": [
                  "invalid image url"
                ]
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "Optional request identifier."
          }
        }
      }
    },
    "examples": {
      "WanAIWan27ImageInvalidImageUrlError": {
        "summary": "Invalid image URL",
        "value": {
          "error": {
            "code": "InvalidParameter",
            "message": "invalid image url"
          },
          "request_id": "req_202604021530000001"
        }
      },
      "WanAIWan27ImageInvalidTaskIdError": {
        "summary": "Invalid task ID",
        "value": {
          "error": {
            "code": "InvalidParameter",
            "message": "invalid task_id"
          },
          "request_id": "req_202604021530000001"
        }
      }
    }
  }
}
```
