Topview-api
  1. Video Avatar
Topview-api
  • API文档
  • Avatar Marketing Video
    • script
      • list script content
      • update script content
    • submit task
      POST
    • query task
      GET
    • export
      POST
  • Video Avatar
    • Video Avatar API Usage
    • submit task
      POST
    • query task
      GET
  • Product Avatar
    • Product Avatar API Usage
    • Replace Product Image
      • submit task
      • query task
    • Image2Video
      • submit task
      • query task
    • Category Query
      GET
    • Public product avatar Query
      GET
  • Product AnyShoot
    • Replace Product Image
      • submit task
      • query task
    • Template Category
      GET
    • Template List
      GET
  • Common Task
    • image2Video
      • submit task
      • query task
  • Scraper
    • submit scraper task
      POST
    • query scraper task
      GET
  • Upload
    • Get Upload Credential
      GET
    • Get Upload Check
      GET
  • check notice url
    POST
  • Voice Query
    GET
  • Ethnicity Query
    GET
  • AiAvatar Query
    GET
  • Caption List
    GET
  1. Video Avatar

submit task

Developing
POST
/v1/video_avatar/task/submit

说明#

1.
avatar id来自于 AiAvatar Query 接口。
2.
ethnicity id来自于 Ethnicity Query 接口,scene 请传值 video_avatar。
3.
voiceover id 来自于 Voice Query 接口。

使用方法#

1.
使用上传视频,avatarSourceFrom 、videoFileId 必传。
2.
使用公模数字人,avatarSourceFrom、aiAvatarId 必传。
3.
使用上传音频,audioSourceFrom、audioFileId 必传。
4.
使用tts,audioSourceFrom、ttsText 必传。
4.1. 当使用公模数字人时,voiceoverId 不传可使用公模数字人的音色;
4.2. 其余使用tts的情况下,voiceoverId必传。

Request

Header Params
Topview-Uid
string 
required
Authorization
string 
required
Body Params application/json
avatarSourceFrom
enum<integer> 
required
数字人来源:0-用户上传的视频;1-公模列表;
The sources of avatars: 0- User uploaded video file; 1- avatar list;
Allowed values:
01
videoFileId
string 
optional
用户通过上传接口上传的视频文件id。avatarSourceFrom=0时g该字段必传。
File id you uploaded video via the upload api. When avatarSourceFrom equals 1, this field must be provided.
aiAvatarId
string 
optional
公模数字人id,当avatarSourceFrom=1时,该字段必传。
avatar id. When avatarSourceFrom equals 0, this field must be provided.
audioSourceFrom
enum<integer> 
required
音频来源。0-用户上传音频;1-文本转语音。
The sources of audio: 0-user uploaded audio file; 1- text to speech.
Allowed values:
01
audioFileId
string 
optional
用户上传的音频文件id,当audioSourceFrom=0时必传。
File id via the upload api. When audioSourceFrom equals 0, this field must be provided.
ttsText
string 
optional
用户输入文本内容,当audioSourceFrom=1时必传。
User input content. When audioSourceFrom equals 1, this field must be provided.
voiceoverId
string 
optional
音色id,当audioSourceFrom=1时必传。
当audioSourceFrom = 1且avatarSourceFrom=1时,不传该值表示使用数字人默认音色。
Voice over id. When audioSourceFrom equals 1, and avatarSourceFrom equals 0, this field must be provided.
When audioSourceFrom equals 1 and avatarSourceFrom equals 1, voiceoverId is null means use the default voiceover id of the avatar.
noticeUrl
string 
optional
回调地址。详情看api文档
Example
{
    "avatarSourceFrom": 0,
    "videoFileId": "string",
    "aiAvatarId": "string",
    "audioSourceFrom": 0,
    "audioFileId": "string",
    "ttsText": "string",
    "voiceoverId": "string",
    "noticeUrl": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.topview.ai/v1/video_avatar/task/submit' \
--header 'Topview-Uid;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "avatarSourceFrom": 0,
    "videoFileId": "string",
    "aiAvatarId": "string",
    "audioSourceFrom": 0,
    "audioFileId": "string",
    "ttsText": "string",
    "voiceoverId": "string",
    "noticeUrl": "string"
}'

Responses

🟢200成功
application/json
Body
object {0}
Example
{}
Modified at 2025-05-21 03:00:18
Previous
Video Avatar API Usage
Next
query task
Built with