CreateVideoTask

Updated at:

Creates a video generation task.

Operation description

Request description

  • This operation creates an AI video generation task. The system generates a video based on the positive prompt provided by the user.

  • By default, the generated video is automatically embedded with a C2PA digital signature.

  • After creating the task, use the TaskId to call the GetVideoTaskResult operation to query the generation result.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

aideepsign:CreateVideoTask

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

The idempotency parameter.

f47ac10b-58cc-4372-a567-0e02b2c3d479

Prompt

string

No

The video description prompt. Either this parameter or Media is required. For pure text-to-video generation, only Prompt is required.

A meeting room full of cats

Model

string

No

The model name. Valid values: wan3.0-video (default) and wan3.0-video-prime (high-speed version).

wan3.0-video

Media.1.Type

string

No

The media type for the first item. Valid values: first_frame, last_frame, reference_image, reference_video, reference_audio, file, and link.

JPEG

Media.1.Url

string

No

The media URL for the first item. You can specify a public HTTP or HTTPS URL, a temporary oss:// URL, or inline data in the format of data:{mime};base64,....

Image URL

Media.2.Type

string

No

The media type for the second item. Valid values: first_frame, last_frame, reference_image, reference_video, reference_audio, file, and link.

JPEG

Media.2.Url

string

No

The media URL for the second item. You can specify a public HTTP or HTTPS URL, a temporary oss:// URL, or inline data in the format of data:{mime};base64,....

Image URL

Resolution

string

No

The resolution. Valid values: 1080P (default), 720P, and 480P.

1080P

Ratio

string

No

The aspect ratio. Valid values: adaptive (default), 16:9, 4:3, 1:1, 3:4, and 9:16.

adaptive

Duration

integer

No

The video duration in seconds. Valid values: an integer in the range of [2, 30], -1 (intelligent duration), and 0 (the server uses the default value of 5 seconds).

2

Audio

boolean

No

Specifies whether to include an audio track. Default value: true.

true

Seed

integer

No

The random seed. Valid values: -1 (random), an integer in the range of [0, 2147483647], and 0 (the server uses a random seed by default).

42

PromptExtend

boolean

No

Specifies whether to enable intelligent rewriting (prompt_extend). Default value: true.

true

Watermark

boolean

No

Specifies whether to add a Model Studio watermark. Default value: false.

false

Response elements

Element

Type

Description

Example

object

Schema of Response

Code

string

The return code.

OK

HttpStatusCode

integer

HTTP status code. A value of 200 indicates that the request is successful.

200

Message

string

The additional information. A value of success indicates that the request is successful.

success

RequestId

string

Id of the request

A1B2C3D4-E5F6-7890-ABCD-EF1234567890

Success

boolean

Indicates whether the call is successful. Valid values:

  • true: The call is successful.

  • false: The call fails.

true

TaskId

string

The task ID, which is used to query the generation result.

f47ac10b-58cc-4372-a567-0e02b2c3d479

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "success",
  "RequestId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
  "Success": true,
  "TaskId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Error codes

HTTP status code

Error code

Error message

Description

400 IdempotentParameterMismatch The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.