Generate Videos/Images
Generate Video with Template
The resources (image, video) generated by our API are valid for 7 days. Please save the relevant resources as soon as possible to prevent expiration.
Generate video from template
Start with the API
POST https://devapi.vidnoz.com/v2/task/template-to-video
Request Headers
Parameter | Required | Type | Description |
---|---|---|---|
Content-Type | true | string | Data Tranmission Type: multipart/form-data |
Request Attributes
Parameter | Required | Type | Description |
---|---|---|---|
name | false | string | Specify the video name. If not specified, it will be randomly generated. |
template_id | true | int | Specify the template ID |
voices | true | array | Voice settings (array: each scene in the template corresponds to a voice) |
voices.tts | false | obj | Synthesize speech via TTS |
voices.tts.id | false | string | Specify the voice ID |
voices.tts.text | false | string | Enter text |
voices.file | false | obj | Directly provide audio files |
voices.file.asset_id | false | string | Specify the attachment ID |
voices.file.url | false | string | Specify the file link |
voices.silence | false | obj | No Voice |
voices.silence.duration | false | int | Specify duration, unit: second, range: 1~99, default: 1 |
Response Attributes
Parameter | Type | Description |
---|---|---|
code | int | 200 |
message | string | Task Remark |
data | obj | Task Object |
task_id | string | Task ID |
Example
Request Attributes
curl --request POST \
--url https://devapi.vidnoz.com/v2/task/template-to-video \
--header "accept: application/json" \
--header "content-type: multipart/form-data" \
--header "Authorization: Bearer $API_KEY" \
--form 'name="example_name"' \
--form 'template_id="template_id_example"' \
--form 'voices[0][tts][text]="voice text to speech text";type=application/json' \
--form 'voices[0][file][asset_id]="154";type=application/json' \
--form 'voices[0][file][url]="https://static-alter1.vidnoz.com/system/asset/202308/64db429bb8f6f.wav";type=application/json' \
--form 'voices[0][silence][duration]=1;type=application/json' \
Response Attributes
{
"code": 200,
"message": "ok",
"data": {
"task_id": "OFZ2WS8wNWF6cGNURWVOVnpTUWNPdz09"
}
}