# Wan2.7 Text-to-Video

> Video Generation

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.
Wan2.7-T2V supports generating smooth, high-quality videos from text.
Supports audio-driven generation: You can provide an audio file to synchronize character movements with the audio rhythm.
Text-to-video tasks take 1-5 minutes. The API uses asynchronous calls.

## Endpoint

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

## Request Body

## Responses

- **200** — Task submitted successfully.
- **400** — Invalid request parameters.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "wan2.7-t2v Interface Documentation",
    "version": "1.0.0",
    "description": "This is the text-to-video API documentation for `wan2.7-t2v` 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-t2v",
      "description": "Text-to-video asynchronous task operations."
    }
  ],
  "paths": {
    "/v1/tasks/submit": {
      "post": {
        "tags": [
          "wan2.7-t2v"
        ],
        "operationId": "submitWan27T2VTask",
        "summary": "Wan2.7 Text-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-T2V supports generating smooth, high-quality videos from text.\nSupports audio-driven generation: You can provide an audio file to synchronize character movements with the audio rhythm.\nText-to-video tasks take 1-5 minutes. The API uses asynchronous calls.\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Wan27T2VSubmitRequest"
              },
              "examples": {
                "textToVideo": {
                  "summary": "Submit text-to-video task",
                  "value": {
                    "model": "wan2.7-t2v",
                    "input": {
                      "prompt": "A beautiful girl is dancing in the moonlight"
                    },
                    "parameters": {
                      "resolution": "720P",
                      "ratio": "16:9",
                      "duration": 5,
                      "prompt_extend": true,
                      "watermark": true
                    }
                  }
                },
                "withAudio": {
                  "summary": "Text-to-video task with audio guidance",
                  "value": {
                    "model": "wan2.7-t2v",
                    "input": {
                      "prompt": "A kitten general wearing golden armor, saying war poems",
                      "audio_url": "https://example.com/audio.mp3"
                    },
                    "parameters": {
                      "resolution": "1080P",
                      "ratio": "16:9",
                      "duration": 10,
                      "prompt_extend": true
                    }
                  }
                },
                "withNegativePrompt": {
                  "summary": "Text-to-video task with negative prompt",
                  "value": {
                    "model": "wan2.7-t2v",
                    "input": {
                      "prompt": "A kitten running in the moonlight",
                      "negative_prompt": "flower, blurry, low quality"
                    },
                    "parameters": {
                      "resolution": "720P",
                      "ratio": "16:9",
                      "duration": 5
                    }
                  }
                },
                "multiShot": {
                  "summary": "Multi-shot narrative video task",
                  "value": {
                    "model": "wan2.7-t2v",
                    "input": {
                      "prompt": "Shot 1 [0-3 seconds] wide shot: Rainy New York street. Shot 2 [3-6 seconds] medium shot: Detective enters building."
                    },
                    "parameters": {
                      "resolution": "1080P",
                      "ratio": "16:9",
                      "duration": 15,
                      "prompt_extend": true,
                      "watermark": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task submitted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27T2VSubmitResponse"
                },
                "examples": {
                  "submitted": {
                    "summary": "Task submitted",
                    "value": {
                      "output": {
                        "task_id": "task_xxxxxxxxxxxxx",
                        "task_status": "PENDING"
                      },
                      "request_id": "req_xxxxxxxxxxxxx"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27T2VErrorResponse"
                },
                "examples": {
                  "paramError": {
                    "$ref": "#/components/examples/Wan27T2VParamError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wan27T2VErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/Wan27T2VParamError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/status": {
      "get": {
        "tags": [
          "wan2.7-t2v"
        ],
        "operationId": "getWan27T2VTaskStatus",
        "summary": "Wan2.7 Text-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/Wan27T2VStatusResponse"
                },
                "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: prompt"
                      },
                      "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/Wan27T2VErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/Wan27T2VParamError"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Use your ModelVerse API key as the Bearer token."
      }
    },
    "schemas": {
      "Wan27T2VSubmitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model name: Must be `wan2.7-t2v`.\n",
            "enum": [
              "wan2.7-t2v"
            ]
          },
          "input": {
            "$ref": "#/components/schemas/Wan27T2VInput"
          },
          "parameters": {
            "$ref": "#/components/schemas/Wan27T2VParameters"
          }
        }
      },
      "Wan27T2VInput": {
        "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- Negative prompt: Set via `negative_prompt` field\n"
          },
          "negative_prompt": {
            "type": "string",
            "description": "Prompt for content to exclude from the generation result. Used to suppress unwanted elements like blur, noise, or specific objects.\n"
          },
          "audio_url": {
            "type": "string",
            "format": "uri",
            "description": "URL of the reference audio file for audio-driven generation. When provided, character movements will sync with the audio rhythm.\nAudio requirements:\n- MP3 or WAV format\n- Bitrate 128-320kbps\n- Duration must be less than video duration\n- File size under 20MB\n"
          }
        }
      },
      "Wan27T2VParameters": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "resolution": {
            "type": "string",
            "description": "Resolution of the generated video. Different resolutions affect price and generation quality.\n- 720P: 1280x720, standard quality, faster generation\n- 1080P: 1920x1080, higher quality, higher price, suitable for professional scenarios\n",
            "enum": [
              "720P",
              "1080P"
            ],
            "default": "720P"
          },
          "ratio": {
            "type": "string",
            "description": "Aspect ratio of the generated video.\n",
            "enum": [
              "16:9",
              "9:16"
            ],
            "default": "16:9"
          },
          "duration": {
            "type": "integer",
            "description": "Duration of the generated video, in seconds.\n- 5 seconds: Quick preview\n- 10 seconds: Standard output\n- 15 seconds: Extended output (requires longer processing)\n",
            "enum": [
              5,
              10,
              15
            ],
            "default": 5
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "Random seed. Range [0, 2147483647].\nIf not specified, a random seed is generated. Fixed seeds can improve reproducibility but do not guarantee identical results.\n"
          },
          "prompt_extend": {
            "type": "boolean",
            "description": "Whether to enable intelligent prompt expansion. When enabled, the large model rewrites the input prompt before generation.\nSignificantly improves quality for short prompts but increases processing time.\n",
            "default": true
          },
          "watermark": {
            "type": "boolean",
            "description": "Whether to add \"AI Generated\" watermark to the bottom-right corner of the generated video.\n",
            "default": false
          }
        }
      },
      "Wan27T2VSubmitResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "task_id",
              "task_status"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "description": "Unique identifier for the asynchronous task. Valid for 24 hours."
              },
              "task_status": {
                "type": "string",
                "description": "Task status.",
                "enum": [
                  "PENDING",
                  "RUNNING",
                  "SUCCEEDED",
                  "FAILED",
                  "CANCELED",
                  "UNKNOWN"
                ]
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "Unique request identifier."
          }
        }
      },
      "Wan27T2VStatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "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/Wan27T2VTaskStatus"
              },
              "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."
              }
            }
          },
          "usage": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "duration": {
                "type": "integer",
                "description": "Video output duration, in seconds."
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "Unique request identifier."
          }
        }
      },
      "Wan27T2VStatusOutput": {
        "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/Wan27T2VTaskStatus"
          },
          "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."
          }
        }
      },
      "Wan27T2VTaskStatus": {
        "type": "string",
        "description": "Asynchronous task status.\n- PENDING: Waiting to be processed\n- RUNNING: Processing\n- SUCCEEDED: Task completed successfully\n- FAILED: Task failed\n- CANCELED: Task was canceled\n- UNKNOWN: Task does not exist or status is unknown\nStatus flow: PENDING → RUNNING → SUCCEEDED or FAILED\n",
        "enum": [
          "PENDING",
          "RUNNING",
          "SUCCEEDED",
          "FAILED",
          "CANCELED",
          "UNKNOWN"
        ]
      },
      "Wan27T2VUsage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "duration": {
            "type": "integer",
            "description": "Video output duration, in seconds."
          }
        }
      },
      "Wan27T2VErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Wan27T2VErrorObject"
          },
          "request_id": {
            "type": "string",
            "description": "Unique request identifier, if available."
          }
        }
      },
      "Wan27T2VErrorObject": {
        "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": [
              "InvalidApiKey",
              "InvalidParameter"
            ]
          },
          "param": {
            "type": [
              "string",
              "null"
            ],
            "description": "Related request parameter, if any."
          }
        }
      }
    },
    "examples": {
      "Wan27T2VParamError": {
        "summary": "Parameter error",
        "value": {
          "error": {
            "message": "Invalid param",
            "type": "invalid_request_error",
            "code": "InvalidParameter",
            "param": "parameters.resolution"
          },
          "request_id": "req_xxxxxxxxxxxxx"
        }
      }
    }
  }
}
```
