Docs Ali Pix /openapi/v2/video/img/generate
API reference

Generate Tusheng video

Generate Tusheng videos through pictures. Pictures must be passed before generation, and img_id is used to make requests.

POST/openapi/v2/video/img/generate

Body Parametersapplication/json

duration* integer
img_id* integer

img_id obtained after uploading the image

model* string

Model "v3.5","v4","v4.5","v5","v5.5","v5.6","v6","c1"

template_id integer

Template ID

motion_mode string

"normal","fast". "fast" does not support 8s, "v5" or above does not support this field

camera_movement string
prompt* string

Within 2048 Characters

quality* string

"360p","540p","720p","1080p"

sound_effect_switch boolean

v5 or below or can be used when there is template_id.true, false If you want to use sound_effect together, please pass it as true

sound_effect_content string

It can be used when v5 is below or has template_id. You can enter the desired sound effect. If not filled in, the sound effect will be generated based on the video content.

lip_sync_tts_switch boolean

true, false If you want to use lip sync together, please pass it as true

lip_sync_tts_content string

~140Chracters (UTF-8). You can enter the desired tts content

lip_sync_tts_speaker_id string

Get the id of the TTS tone

seed integer
img_ids* array
style string

Style, optional: "anime", "3d_animation", "day", "cyberpunk", "comic", don't pass it if it's not necessary

generate_audio_switch boolean

Support v5.5, v5.6, v6, c1 / Control switch Audio. true: Audio on, false: Audio off

generate_multi_clip_switch boolean
thinking_type string

Responses

200 success application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example Generate Tusheng video
1{
2"duration": 5,
3"img_id": 1,
4"model": "v6",
5"template_id": 0,
6"motion_mode": "normal",
7"prompt": "string",
8"quality": "720p",
9"seed": 0
10}
Code Sample cURL
1curl -X POST "https://api.digislash.com/openapi/v2/video/img/generate" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"duration": 5,
6"img_id": 1,
7"model": "v6",
8"template_id": 0,
9"motion_mode": "normal",
10"prompt": "string",
11"quality": "720p",
12"seed": 0
13}'
Response
1▼{
2"ErrCode": 0,
3"ErrMsg": "success",
4▼"RespData": {
5"id": 123456
6}
7}