Перейти до основного вмісту
POST
/
wan
/
videos
Generate videos based on prompt and image frames
curl --request POST \
  --url https://api.acedata.cloud/wan/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "text2video",
  "prompt": "Astronauts shuttle from space to volcano",
  "model": "wan2.6-i2v",
  "audio": false,
  "prompt_extend": false,
  "resolution": "480P",
  "shot_type": "single",
  "duration": 5,
  "negative_prompt": "Astronauts shuttle from space to volcano",
  "size": "<string>",
  "audio_url": "<string>",
  "reference_video_urls": "<string>",
  "callback_url": "<string>",
  "image_url": "https://cdn.acedata.cloud/r9vsv9.png"
}
'
{
  "state": "completed",
  "prompt": "Astronauts shuttle from space to volcano",
  "success": true,
  "task_id": "5636d6ba-957f-475e-a98a-718a07ee89a6",
  "video_id": "b4ef4c5e-9680-41c8-a678-0ce2ce6194de",
  "video_url": "https://platform.cdn.acedata.cloud/luma/5636d6ba-957f-475e-a98a-718a07ee89a6.mp4",
  "video_width": 1552,
  "video_height": 656,
  "thumbnail_url": "https://platform.cdn.acedata.cloud/luma/5636d6ba-957f-475e-a98a-718a07ee89a6.jpg",
  "thumbnail_width": 1552,
  "thumbnail_height": 656
}

Авторизації

Authorization
string
header
обов'язково

Заголовки

accept
enum<string>

Specifies the format of the response from the server.

Доступні опції:
application/json

Тіло

application/json
action
enum<string>
за замовчуванням:text2video
обов'язково

Operation type. Use 'text2video' for the first time and 'image2video' for subsequent operations, and you can specify specific action to perform on the generated video.

Доступні опції:
text2video,
image2video
prompt
string
обов'язково

The prompt to generate the video.

Приклад:

"Astronauts shuttle from space to volcano"

model
enum<string>
обов'язково

The model used to generate the video.

Доступні опції:
wan2.6-i2v,
wan2.6-r2v,
wan2.6-i2v-flash,
wan2.6-t2v
audio
boolean
за замовчуванням:false

It can be determined whether the generated video has sound or not.

prompt_extend
boolean
за замовчуванням:false

Whether to enable prompt intelligent rewriting. After activation, use the large model to intelligently rewrite the input prompt. The generation effect of shorter prompts is significantly improved, but it will increase the time consumption.

resolution
enum<string>

Specify the resolution level of the generated video to adjust the video's clarity (total pixels). The model automatically scales to a similar total pixel based on the selected resolution level, and the video aspect ratio will be as consistent as possible with the aspect ratio of the input image img_url.

Доступні опції:
480P,
720P,
1080P
shot_type
enum<string>

Specify the type of shots for generating the video, that is, whether the video consists of a single continuous shot or multiple switching shots..

Доступні опції:
single,
multi
duration
enum<number>

Specify the type of shots for generating the video, that is, whether the video consists of a single continuous shot or multiple switching shots..

Доступні опції:
5,
10,
15
negative_prompt
string

Reverse prompt words are used to describe the content that is not desired to be seen in the video frame and can be used to restrict the video frame. Supports both Chinese and English, with a length not exceeding 500 characters. Any excess characters will be automatically truncated..

Приклад:

"Astronauts shuttle from space to volcano"

size
string

The size of the generated video.

audio_url
string

The URL of the audio file, the model will use this audio to generate a video.

reference_video_urls
string

The uploaded reference video file url array. It is used to extract character images and timbres (if any) to generate videos that conform to the reference features.

callback_url
string

Webhook callback URL for asynchronous notifications.

image_url
string

The URL of the start image, it will be the first frame of the generated video.

Приклад:

"https://cdn.acedata.cloud/r9vsv9.png"

Відповідь

Video generated successfully or operation performed successfully.

state
string

The state of the video generation.

prompt
string

The prompt used to generate the video.

success
boolean

Indicates if the task was successful executed.

task_id
string

The ID of the imagine task.

video_id
string

The unique identifier of the generated video.

video_url
string

The URL of the generated video.

video_width
number

The width of the generated video.

video_height
number

The height of the generated video.

thumbnail_url
string

The URL of the thumbnail of the generated video.

thumbnail_width
number

The width of the thumbnail of the generated video.

thumbnail_height
number

The height of the thumbnail of the generated video.