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 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 material 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 material URL for the first item. The value can be a public HTTP or HTTPS URL, a temporary oss:// URL, or inline data in the data:{mime};base64,... format.

Image URL

Media.2.Type

string

No

The material 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 material URL for the second item. The value can be a public HTTP or HTTPS URL, a temporary oss:// URL, or inline data in the data:{mime};base64,... format.

Image URL

Resolution

string

No

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

reference_image

Ratio

string

No

The material URL for the third item. The value can be a public HTTP or HTTPS URL, a temporary oss:// URL, or inline data in the data:{mime};base64,... format.

https://xxx/xxx.png

Duration

integer

No

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

reference_image

Audio

boolean

No

The material URL for the fourth item. The value can be a public HTTP or HTTPS URL, a temporary oss:// URL, or inline data in the data:{mime};base64,... format.

https://xxx/xxx.png

Seed

integer

No

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

reference_image

PromptExtend

boolean

No

The material URL for the fifth item. The value can be a public HTTP or HTTPS URL, a temporary oss:// URL, or inline data in the data:{mime};base64,... format.

https://xxx/xxx.png

Watermark

boolean

No

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

reference_image

Response elements

Element

Type

Description

Example

object

Schema of Response

Code

string

The return code.

OK

HttpStatusCode

integer

The HTTP status code. A value of 200 is returned if the request is successful.

200

Message

string

The additional information. A value of success is returned if 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.