# Wan2.7 Image-to-Video Task Status

> Video Generation

Query asynchronous task status. When the task is complete, the response will contain the result URL, usage information, or error information.

## Endpoint

`GET https://api.modelverse.cn/v1/tasks/status`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| task_id | query | string | Yes | The asynchronous task identifier returned by `/v1/tasks/submit`. |

## Responses

- **200** — Task status response.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "wan2.7-i2v Interface Documentation",
    "version": "1.0.0",
    "description": "This is the image-to-video API documentation for `wan2.7-i2v` on ModelVerse, explaining how to submit generation tasks, query task status, retrieve video results, and handle errors.\nThe API paths include `POST /v1/tasks/submit` and `GET /v1/tasks/status`.\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "The ModelVerse API endpoint used in this model documentation."
    }
  ],
  "tags": [
    {
      "name": "wan2.7-i2v",
      "description": "Image-to-video asynchronous task operations."
    }
  ],
  "paths": {
    "/v1/tasks/submit": {
      "post": {
        "tags": [
          "wan2.7-i2v"
        ],
        "operationId": "submitWan27I2VTask",
        "summary": "Wan2.7 Image-to-Video",
        "description": "Submit an asynchronous task. The model and parameters in the request body should be filled according to this model documentation. The response will return a task ID.\nWan2.7-I2V supports generating smooth, high-quality videos from static images.\nSupports audio-driven generation: You can provide an audio file to synchronize character movements with the audio rhythm.\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Wan27I2VSubmitRequest"
              },
              "examples": {
                "imageToVideo": {
                  "summary": "Submit image-to-video task",
                  "value": {
                    "model": "wan2.7-i2v",
                    "input": {
                      "prompt": "A scene of urban fantasy art...",
                      "media": [
                        {
                          "type": "first_frame",
                          "url": "https://example.com/image.png"
                        }
                      ]
                    },
                    "parameters": {
                      "resolution": "720P",
                      "duration": 10,
                      "prompt_extend": true,
                      "watermark": true
                    }
                  }
                },
                "audioDrivenVideo": {
                  "summary": "Submit audio-driven video task",
                  "value": {
                    "model": "wan2.7-i2v",
                    "input": {
                      "prompt": "A boy sings an English rap song...",
                      "media": [
                        {
                          "type": "first_frame",
                          "url": "https://example.com/image.png"
                        },
                        {
                          "type": "driving_audio",
                          "url": "https://example.com/audio.mp3"
                        }
                      ]
                    },
                    "parameters": {
                      "resolution": "720P",
                      "duration": 10,
                      "prompt_extend": true,
                      "watermark": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task submitted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27I2VSubmitResponse"
                },
                "examples": {
                  "submitted": {
                    "summary": "Task submitted",
                    "value": {
                      "output": {
                        "task_id": "task_xxxxxxxxxxxxx"
                      },
                      "request_id": "req_xxxxxxxxxxxxx"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27I2VErrorResponse"
                },
                "examples": {
                  "paramError": {
                    "$ref": "#/components/examples/Wan27I2VParamError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27I2VErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/Wan27I2VParamError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/status": {
      "get": {
        "tags": [
          "wan2.7-i2v"
        ],
        "operationId": "getWan27I2VTaskStatus",
        "summary": "Wan2.7 Image-to-Video Task Status",
        "description": "Query asynchronous task status. When the task is complete, the response will contain the result URL, usage information, or error information.\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "The asynchronous task identifier returned by `/v1/tasks/submit`.",
            "schema": {
              "type": "string"
            },
            "examples": {
              "placeholder": {
                "summary": "Placeholder value from source document",
                "value": "task_xxxxxxxxxxxxx"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task status response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27I2VStatusResponse"
                },
                "examples": {
                  "success": {
                    "summary": "Successful task",
                    "value": {
                      "output": {
                        "task_id": "task_xxxxxxxxxxxxx",
                        "task_status": "SUCCEEDED",
                        "urls": [
                          "https://xxxxx/xxxx.mp4"
                        ],
                        "submit_time": 1756959000,
                        "finish_time": 1756959050
                      },
                      "usage": {
                        "duration": 5
                      },
                      "request_id": ""
                    }
                  },
                  "failure": {
                    "summary": "Failed task",
                    "value": {
                      "output": {
                        "task_id": "task_xxxxxxxxxxxxx",
                        "task_status": "FAILED",
                        "error_message": "Invalid parameter: input.media"
                      },
                      "usage": {
                        "duration": 0
                      },
                      "request_id": ""
                    }
                  },
                  "running": {
                    "summary": "Task in progress",
                    "value": {
                      "output": {
                        "task_id": "task_xxxxxxxxxxxxx",
                        "task_status": "RUNNING"
                      },
                      "request_id": ""
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27I2VErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/Wan27I2VParamError"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Use your ModelVerse API key as the Bearer token."
      }
    },
    "schemas": {
      "Wan27I2VSubmitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model name: Must be `wan2.7-i2v`.\n",
            "enum": [
              "wan2.7-i2v"
            ]
          },
          "input": {
            "$ref": "#/components/schemas/Wan27I2VInput"
          },
          "parameters": {
            "$ref": "#/components/schemas/Wan27I2VParameters"
          }
        }
      },
      "Wan27I2VInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string",
            "description": "Text description used to generate the video. Supports:\n- Basic prompt: Scene + subject + movement + environment\n- Multi-shot prompt: Use \"Shot X [start-end seconds]\" format\n- Camera movement: Add keywords like \"pan up\", \"zoom in\"\n"
          },
          "media": {
            "type": "array",
            "description": "List of reference media. The `type` field identifies the media type.\n\nMedia type descriptions:\n- first_frame: Initial frame of the video\n- last_frame: Ending frame of the video\n- first_clip: Initial clip of the video\n- driving_audio: Audio file to drive video motion\n",
            "items": {
              "$ref": "#/components/schemas/Wan27I2VMediaItem"
            }
          }
        }
      },
      "Wan27I2VMediaItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Media type",
            "enum": [
              "first_frame",
              "last_frame",
              "first_clip",
              "driving_audio"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL of the media file"
          }
        }
      },
      "Wan27I2VParameters": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "resolution": {
            "type": "string",
            "description": "Resolution of the generated video. Different resolutions affect price and generation quality.\n",
            "enum": [
              "720P",
              "1080P"
            ],
            "default": "720P"
          },
          "duration": {
            "type": "integer",
            "description": "Duration of the generated video, in seconds.\n",
            "enum": [
              5,
              10
            ]
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295,
            "description": "Random seed. The same seed with the same input and parameters will generate similar results.\nIf not specified, the system will randomly generate a seed.\n"
          },
          "prompt_extend": {
            "type": "boolean",
            "description": "Whether to enable intelligent prompt expansion. When enabled, the system will automatically optimize the prompt,\nwhich may improve generation quality.\n",
            "default": true
          },
          "watermark": {
            "type": "boolean",
            "description": "Whether to add watermark to the generated video.\n",
            "default": true
          }
        }
      },
      "Wan27I2VSubmitResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "task_id"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "description": "Unique identifier for the asynchronous task."
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "Unique request identifier."
          }
        }
      },
      "Wan27I2VStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "$ref": "#/components/schemas/Wan27I2VStatusOutput"
          },
          "usage": {
            "$ref": "#/components/schemas/Wan27I2VUsage"
          },
          "request_id": {
            "type": "string",
            "description": "Unique request identifier."
          }
        }
      },
      "Wan27I2VStatusOutput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "task_id",
          "task_status"
        ],
        "properties": {
          "task_id": {
            "type": "string",
            "description": "Unique identifier for the asynchronous task."
          },
          "task_status": {
            "$ref": "#/components/schemas/Wan27I2VTaskStatus"
          },
          "urls": {
            "type": "array",
            "description": "List of video result URLs.",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "submit_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the task was submitted."
          },
          "finish_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the task was completed."
          },
          "error_message": {
            "type": "string",
            "description": "Error message returned when the task fails."
          }
        }
      },
      "Wan27I2VTaskStatus": {
        "type": "string",
        "description": "Asynchronous task status.\n- Pending: Waiting to be processed\n- Running: Processing\n- Success: Task completed successfully\n- Failure: Task failed\n",
        "enum": [
          "Pending",
          "Running",
          "Success",
          "Failure"
        ]
      },
      "Wan27I2VUsage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "duration": {
            "type": "integer",
            "description": "Task execution duration, in seconds."
          }
        }
      },
      "Wan27I2VErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Wan27I2VErrorObject"
          }
        }
      },
      "Wan27I2VErrorObject": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "message",
          "type"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message."
          },
          "type": {
            "type": "string",
            "description": "Error type.",
            "examples": [
              "invalid_request_error"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error code.",
            "examples": [
              "param_error"
            ]
          },
          "param": {
            "type": [
              "string",
              "null"
            ],
            "description": "Related request parameter, if any."
          }
        }
      }
    },
    "examples": {
      "Wan27I2VParamError": {
        "summary": "Parameter error",
        "value": {
          "error": {
            "message": "Invalid param",
            "type": "invalid_request_error",
            "code": "param_error",
            "param": "input.media"
          }
        }
      }
    }
  }
}
```
