Talking Avatar
Build Preview
POST https://devapi.vidnoz.com/v2/task/preview
Request Headers
Parameter | Required | Type | Description |
---|---|---|---|
Content-Type | true | string | Data Tranmission Type: multipart/form-data |
Request Attributes
Start with the API
Parameter | Required | Type | Description |
---|---|---|---|
voice_id | true | string | ID of the voice list (voice_id is preferred) |
text | true | string | Text content |
Start with the API
Parameter | Required | Type | Description |
---|---|---|---|
file | false | file | Original audio uploaded (priority is given to this field). There are two methods supported to upload audios. |
file_url | false | string | Original audio address. There are two methods supported to upload audios. |
text | true | string | Text content |
Response Attributes
Parameter | Type | Description |
---|---|---|
code | int | 200 |
message | string | Task Remark |
data | obj | Task Object |
data.task_id | string | Task ID |
Example
Request Attributes
1. Use Preset Voice
curl --request POST \
--url https://devapi.vidnoz.com/v2/task/preview \
--header "accept: application/json" \
--header "content-type: multipart/form-data" \
--header "Authorization: Bearer $API_KEY" \
--form 'voice_id="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'text="Input your text here"' \
2. Use Cloned Voice
curl --request POST \
--url https://devapi.vidnoz.com/v2/task/preview \
--header "accept: application/json" \
--header "content-type: multipart/form-data" \
--header "Authorization: Bearer $API_KEY" \
--form 'file="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'file_url="https://static.vidnoz.com/system/openapi/sample/audio-Cora.wav"' \
--form 'text="Input your text here"' \
Response Attributes
{
"code": 200,
"message": "ok",
"data": {
"task_id": "T2hzVGJ5dWhaSUxSSUJqSzZORUdpUT09"
}
}
Next you can query the task status and get the task data through the task/detail interface.
Generate Talking Photo Video
POST https://devapi.vidnoz.com/v2/task/generate-talking-head
Request Headers
Parameter | Required | Type | Description |
---|---|---|---|
Content-Type | true | string | Data Tranmission Type: multipart/form-data |
Request Attributes
Start with the API
Parameter | Required | Type | Description |
---|---|---|---|
voice_id | true | string | ID of the voice list (voice_id is preferred) |
text | true | string | Text content |
type | true | int | 0:Preset voice |
style | false | string | Emotion default normal |
avatar | false | file | Original avatar image uploaded (priority is given to this field). There are two methods supported to upload avatar images. Supported Format: JPG, PNG, JPEG, WebP |
avatar_url | false | string | Original avatar image uploaded. There are two methods supported to upload avatar image. Supported Format: JPG, PNG, JPEG, WebP |
Start with the API
Parameter | Required | Type | Description |
---|---|---|---|
text | true | string | Text content |
avatar | false | file | Original avatar image uploaded (priority is given to this field). There are two methods supported to upload avatar images. Supported Format: JPG, PNG, JPEG, WebP |
avatar_url | false | string | Original avatar image uploaded. There are two methods supported to upload avatar image. Supported Format: JPG, PNG, JPEG, WebP |
type | true | int | 1:Cloned voice |
file | false | file | Original audio file uploaded (priority is given to this field). There are two methods supported to upload audio files. Supported Format: WAV,MP3,MP4,AAC,WebM Maximum 200M |
file_url | false | string | Original audio file uploaded. There are two methods supported to upload audio files. Supported Format: WAV ,MP3, MP4, AAC, WebM (Maximum 200M). |
Start with the API
Parameter | Required | Type | Description |
---|---|---|---|
avatar | false | file | Original avatar image uploaded (priority is given to this field). There are two methods supported to upload avatar images. Supported Format: JPG, PNG, JPEG, WebP |
avatar_url | false | string | Original avatar image uploaded. There are two methods supported to upload avatar image. Supported Format: JPG, PNG, JPEG, WebP |
type | true | int | 2:Upload audio |
file | false | file | Original audio file uploaded (priority is given to this field). There are two methods supported to upload audio files. Supported Format: WAV,MP3,MP4,AAC,WebM Maximum 200M |
file_url | false | string | Original audio file uploaded. There are two methods supported to upload audio files. Supported Format: WAV ,MP3, MP4, AAC, WebM (Maximum 200M). |
Response Attributes
Parameter | Type | Description |
---|---|---|
code | int | 200 |
message | string | Task Remark |
data | obj | Task Object |
data.task_id | string | Task ID |
Example
Request Attributes
1. Synthesizing Audio with Preset Voice
curl --request POST \
--url https://devapi.vidnoz.com/v2/task/generate-talking-head \
--header "accept: application/json" \
--header "content-type: multipart/form-data" \
--header "Authorization: Bearer $API_KEY" \
--form 'voice_id="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'text="Input your text here"' \
--form 'type="0"' \
--form 'style="normal"' \
--form 'avatar="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'avatar_url="https://static.vidnoz.com/system/openapi/sample/talking-photo.jpg"' \
2. Synthesizing Audio with Cloned Voice
curl --request POST \
--url https://devapi.vidnoz.com/v2/task/generate-talking-head \
--header "accept: application/json" \
--header "content-type: multipart/form-data" \
--header "Authorization: Bearer $API_KEY" \
--form 'text="Input your text here"' \
--form 'avatar="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'avatar_url="https://static.vidnoz.com/system/openapi/sample/talking-photo.jpg"' \
--form 'type="1"' \
--form 'file="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'file_url="https://static.vidnoz.com/system/openapi/sample/audio-Cora.wav"' \
3. Upload Audio Files Directly
curl --request POST \
--url https://devapi.vidnoz.com/v2/task/generate-talking-head \
--header "accept: application/json" \
--header "content-type: multipart/form-data" \
--header "Authorization: Bearer $API_KEY" \
--form 'avatar="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'avatar_url="https://static.vidnoz.com/system/openapi/sample/talking-photo.jpg"' \
--form 'type="2"' \
--form 'file="YmUxSTFBcVA1V1A3N2Y3L2hxMHhGQT09"' \
--form 'file_url="https://static.vidnoz.com/system/openapi/sample/audio-Cora.wav"' \
Response Attributes
{
"code": 200,
"message": "",
"data": {
"id": 200080893,
"message": "",
"status": 0,
"additional_data": {
"key": "1328/asset/202412/204867612a0e51e4b2.55156474.mp4",
"url": "https://r2-aivid-002-test.214dcedd27630abef236dcb67de0ce92.r2.cloudflarestorage.com/1328/asset/202412/204867612a0e51e4b2.55156474.mp4?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=91ac9d3ee865be05c575d38c9bdd1275%2F20241217%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20241217T073646Z&X-Amz-SignedHeaders=host&X-Amz-Expires=259200&X-Amz-Signature=c8e0bc699c4a3532052322d6994e6de3558ff4de994bf971d37ca3bd1a14c119",
"video_720p": {
"key": "1328/asset/202412/204867612a0e51e4b2.55156474.mp4",
"url": "https://r2-aivid-002-test.214dcedd27630abef236dcb67de0ce92.r2.cloudflarestorage.com/1328/asset/202412/204867612a0e51e4b2.55156474.mp4?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=91ac9d3ee865be05c575d38c9bdd1275%2F20241217%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20241217T073646Z&X-Amz-SignedHeaders=host&X-Amz-Expires=259200&X-Amz-Signature=c8e0bc699c4a3532052322d6994e6de3558ff4de994bf971d37ca3bd1a14c119",
"video_size": 1072200,
"video_duration": 13.6
},
"video_size": 1072200,
"video_duration": 13.6
},
"user_id": 1328
}
}
Next you can query the task status and get the task data through the task/detail interface.