Skip to content
中文

Wan 2.7 Video API documentation

Integrate Wan 2.7 Video with your VezAPI key. The operations below share the same authentication and account balance.

Base URL: https://api.vezapi.com
Send Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.

Wan 2.7 - Image to Video

POST/api/v1/jobs/createTask

Model IDs: wan/2-7-image-to-video

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This field is required. This endpoint must use the `wan/2-7-image-to-video` model.

Values: "wan/2-7-image-to-video"

Default: "wan/2-7-image-to-video"

callBackUrl
optional
string

Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent.

input
required
object

Input parameters for the image-to-video task.

input.prompt
required
string

Positive prompt. Maximum length: 5000 characters.

maxLength: 5000

input.negative_prompt
optional
string

Negative prompt. Maximum length: 500 characters.

maxLength: 500

input.first_frame_url
optional
string

First frame image URL.

input.last_frame_url
optional
string

Last frame image URL.

input.first_clip_url
optional
string

First clip video URL, used for video continuation.

input.driving_audio_url
optional
string

Driving audio URL.

input.resolution
optional
string

Video resolution. - `720p`: 720p - `1080p`: 1080p

Values: "720p", "1080p"

Default: "1080p"

input.duration
optional
integer

Total output video duration in seconds. - Minimum: `2` - Maximum: `15` - Default: `5`

Default: 5

minimum: 2

maximum: 15

input.prompt_extend
optional
boolean

Whether to enable intelligent prompt rewriting. Default value: `true`.

Default: true

input.watermark
optional
boolean

Whether to add an AI-generated watermark. Default value: `false`.

Default: false

input.seed
optional
integer

Random seed. - Minimum: `0` - Maximum: `2147483647`

minimum: 0

maximum: 2147483647

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "wan/2-7-image-to-video",
  "input": {
    "prompt": "Your prompt",
    "resolution": "1080p",
    "duration": 5
  }
}'
Responses and errors

HTTP 200

Request successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Wan 2.7 - Reference to Video

POST/api/v1/jobs/createTask

Model IDs: wan/2-7-r2v

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This field is required. This endpoint must use the `wan/2-7-r2v` model.

Values: "wan/2-7-r2v"

Default: "wan/2-7-r2v"

callBackUrl
optional
string

Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent.

input
required
object

Input parameters for the reference-to-video task.

input.prompt
required
string

Text prompt. Required. Describes the desired elements and visual features in the generated video. Supports Chinese and English. Maximum length: 5000 characters.

maxLength: 5000

input.negative_prompt
optional
string

Optional negative prompt describing what should not appear in the video. Supports Chinese and English. Maximum length: 500 characters.

maxLength: 500

input.reference_image
optional
array

Array of reference image URLs. At least one of `reference_image` or `reference_video` must be provided. The total number of images and videos cannot exceed 5.

maxItems: 5

input.reference_video
optional
array

Array of reference video URLs. At least one of `reference_image` or `reference_video` must be provided. The total number of images and videos cannot exceed 5.

maxItems: 5

input.first_frame
optional
string

First frame image URL. At most one image can be provided. If supplied, `aspect_ratio` is ignored and the output uses a ratio close to the first frame image.

input.reference_voice
optional
string

Audio URL used to specify the voice timbre of the subject in the reference material. Rules: - If `reference_video` contains audio and `reference_voice` is not provided, the original video audio is used by default - If both `reference_video` and `reference_voice` are provided, `reference_voice` takes priority Audio limits: - Formats: `wav`, `mp3` - Duration: `1` to `10` seconds - File size: up to `30MB`

input.resolution
optional
string

Output video resolution tier. Available values: `720p`, `1080p`. Default value: `1080p`.

Values: "720p", "1080p"

Default: "1080p"

input.aspect_ratio
optional
string

Output video aspect ratio. Effective logic: - If `first_frame` is not provided: the video is generated using the specified `aspect_ratio` - If `first_frame` is provided: `aspect_ratio` is ignored and the output uses a ratio close to the first frame image

Values: "16:9", "9:16", "1:1", "4:3", "3:4"

Default: "16:9"

input.duration
optional
integer

Output video duration in seconds. Valid range is an integer from `2` to `10`. Default value: `5`.

Default: 5

minimum: 2

maximum: 10

input.prompt_extend
optional
boolean

Whether to enable prompt rewriting. When enabled, the model expands the input prompt. This usually works better for short prompts but increases processing time.

Default: true

input.watermark
optional
boolean

Whether to add a watermark. The watermark is placed in the lower-right corner of the video with the fixed text "AI generated".

Default: false

input.seed
optional
integer

Random seed. Range: `0-2147483647`. If omitted, the system generates one automatically.

minimum: 0

maximum: 2147483647

input.nsfw_checker
optional
boolean

Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "wan/2-7-r2v",
  "input": {
    "prompt": "Image 1 is eating, while video 1 and image 2 are singing beside it.",
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 5
  }
}'
Responses and errors

HTTP 200

Request successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Wan 2.7 - Text to Video

POST/api/v1/jobs/createTask

Model IDs: wan/2-7-text-to-video

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This field is required. - This endpoint must use the `wan/2-7-text-to-video` model

Values: "wan/2-7-text-to-video"

Default: "wan/2-7-text-to-video"

input
required
object

Input parameters for the text-to-video task.

input.prompt
required
string

Positive prompt. Minimum length: 1 character. Maximum length: 5000 characters.

minLength: 1

maxLength: 5000

input.negative_prompt
optional
string

Negative prompt. Maximum length: 500 characters.

maxLength: 500

input.audio_url
optional
string

Optional custom audio URL.

input.resolution
optional
string

Video resolution. - `720p`: 720p - `1080p`: 1080p

Values: "720p", "1080p"

Default: "1080p"

input.ratio
optional
string

Video aspect ratio. - `16:9`: Landscape - `9:16`: Portrait - `1:1`: Square - `4:3`: Landscape 4:3 - `3:4`: Portrait 3:4

Values: "16:9", "9:16", "1:1", "4:3", "3:4"

Default: "16:9"

input.duration
optional
integer

Video duration in seconds. - Minimum: `2` - Maximum: `15` - Default: `5`

Default: 5

minimum: 2

maximum: 15

input.prompt_extend
optional
boolean

Whether to enable intelligent prompt rewriting. Default value: `true`.

Default: true

input.watermark
optional
boolean

Whether to add an AI-generated watermark. Default value: `false`.

Default: false

input.seed
optional
integer

Random seed. - Minimum: `0` - Maximum: `2147483647`

minimum: 0

maximum: 2147483647

input.nsfw_checker
optional
boolean

Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

callBackUrl
optional
string

Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent.

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "wan/2-7-text-to-video",
  "input": {
    "prompt": "Your prompt",
    "resolution": "1080p",
    "duration": 5
  }
}'
Responses and errors

HTTP 200

Request successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Wan 2.7 - Video Edit

POST/api/v1/jobs/createTask

Model IDs: wan/2-7-videoedit

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This field is required. This endpoint must use the `wan/2-7-videoedit` model.

Values: "wan/2-7-videoedit"

Default: "wan/2-7-videoedit"

callBackUrl
optional
string

Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent.

input
required
object

Input parameters for the video editing task.

input.prompt
optional
string

Optional text prompt describing the expected elements and visual features in the generated video. Supports Chinese and English. Maximum length: 5000 characters.

maxLength: 5000

input.negative_prompt
optional
string

Optional negative prompt describing content that should not appear in the video. Supports Chinese and English. Maximum length: 500 characters.

maxLength: 500

input.video_url
required
string

URL of the source video to edit. Required. Only one video is supported. - Formats: `mp4`, `mov` - Duration: `2` to `10` seconds - Resolution: width and height range `[240,4096]` pixels - Aspect ratio: `1:8` to `8:1` - File size: up to `100MB` - Supports public `http/https` URLs or temporary `oss` URLs

input.reference_image
optional
string

Optional reference image URL for character, clothing, or style guidance. - Formats: `JPEG`, `JPG`, `PNG` (no alpha channel), `WEBP` - Resolution: width and height range `[240,8000]` pixels - Aspect ratio: `1:8` to `8:1` - Supports public `http/https` URLs or temporary `oss` URLs

input.resolution
optional
string

Output video resolution tier. `1080p` costs more than `720p`. Default value: `1080p`. - `720p`: 720p - `1080p`: 1080p

Values: "720p", "1080p"

Default: "1080p"

input.aspect_ratio
optional
string

Output video aspect ratio. - If omitted: the output uses an aspect ratio close to the input video - If provided: the output uses the specified aspect ratio - Available values: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`

Values: "16:9", "9:16", "1:1", "4:3", "3:4"

input.duration
optional
integer

Output video duration in seconds. - Default `0` means using the full input video duration without truncation - If a value is provided, the output is clipped from second `0` to the specified length - Valid values are `0` or any integer in `[2,10]`

Default: 0

minimum: 0

maximum: 10

input.audio_setting
optional
string

Video audio setting. - `auto`: default, the model decides whether to regenerate audio based on the `prompt` - `origin`: force keeping the original input video audio

Values: "auto", "origin"

Default: "auto"

input.prompt_extend
optional
boolean

Whether to enable prompt rewriting. When enabled, the model expands the input prompt. This usually works better for short prompts but increases processing time.

Default: true

input.watermark
optional
boolean

Whether to add a watermark. The watermark is placed in the lower-right corner of the video with the fixed text "AI generated".

Default: false

input.seed
optional
integer

Random seed. Range: `0-2147483647`. If omitted, the system generates one automatically.

minimum: 0

maximum: 2147483647

input.nsfw_checker
optional
boolean

Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "wan/2-7-videoedit",
  "input": {
    "prompt": "Change the character'\''s outfit and add the hat shown in the reference image.",
    "video_url": "https://example.com/input.png",
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 0
  }
}'
Responses and errors

HTTP 200

Request successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Task status and callbacks

For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.

A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.

Files, logs and billing

Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.

Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.