Generate video template
How to generate video template based on Tusheng video
POST
/openapi/v2/video/img/generateBody Parametersapplication/json
duration* integer
Just pass 5. The actual duration is generated according to the template duration.
img_id* integer
Used when using a single image template
img_ids array
Use when using multiple image templates ex) "img_ids ":[0,0]
items integer integer
model* string
You can upload any model, the template is not related to the model
prompt* string
The template does not recognize prompt, just pass it empty.
quality* string
"360p","540p","720p","1080p"
sound_effect_switch boolean
When true, there will be background music
template_id* integer
Template ID
Responses
200 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
1{
2"duration": 5,
3"img_id": 1,
4"model": "v6",
5"prompt": "string",
6"quality": "720p",
7"template_id": 0
8}
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"prompt": "string",
9"quality": "720p",
10"template_id": 0
11}'
1▼{
2"ErrCode": 0,
3"ErrMsg": "success",
4▼"RespData": {
5"id": 123456
6}
7}
