Topview-api
  1. Avatar Marketing Video
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. Avatar Marketing Video

submit task

Developing
POST
/v1/m2v/task/submit

参数说明#

1.
如果 productLink和fileIds同时存在,fileIds的参数会被忽略, 默认使用productLink解析回来的全部视频和图片。

Request

Header Params
Topview-Uid
string 
required
Authorization
string 
required
Body Params application/json
productLink
string 
产品链接
optional
productLink 和 fileIds必须有一个非空
fileIds
array[string]
自定义素材文件
optional
视频或者图片。通过upload接口上传后获得fileId
productName
string 
产品名称
optional
可通过产品链接自动解析出来。当productLink为空时,必填
productDescription
string 
产品描述
optional
可通过产品链接自动解析出来。当productLink为空时,必填
aspectRatio
string 
期望输出的分辨率
optional
默认值:9:16。可选值:9:16,3:4,1:1,4:3,16:9
language
string 
语言
optional
默认值:en
语言列表:
English: en
Arabic (العربية): ar
Bulgarian (Български): bg
Croatian (Hrvatski): hr
Czech (Čeština): cs
Danish (Dansk): da
Dutch (Nederlands): nl
Filipino (Filipino): fil
Finnish (Suomi): fi
French (Français): fr
German (Deutsch): de
Greek (Ελληνικά): el
Hindi (हिन्दी): hi
Hungarian (Magyar): hu
Indonesian (Bahasa Indonesia): id
Italian (Italiano): it
Japanese (日本語): ja
Korean (한국어): ko
Malay (Bahasa Melayu): ms
Norwegian (Norsk): nb
Polish (Polski): pl
Portuguese (Português): pt
Romanian (Română): ro
Russian (Русский): ru
Simplified Chinese (简体中文): zh-CN
Slovak (Slovenčina): sk
Spanish (Español): es
Swedish (Svenska): sv
Traditional Chinese (繁體中文): zh-Hant
Turkish (Türkçe): tr
Ukrainian (Українська): uk
Vietnamese (Tiếng Việt): vi
Thai (ภาษาไทย): th 泰语目前仅支持的voiceId:5d188a658b5a424e98bf0dbbcb8f97d8, eea5e5a4fb534231a5b4cf4766dd7a5f, 537e2643719c47bdac1d8a2c7f0c844a,
e22db502aa8d40d9ba791083c9f4ab35
voiceId
string 
音色id
optional
通过Voice Query接口获取
captionId
string 
optional
通过Caption List接口获取。如果不指定,则随机
aiavatarId
string 
数字人id
optional
通过AiAvatar Query接口获取
videoLengthType
integer 
输出视频长度类型
optional
默认值:1。 1:30-50s; 2:15-30s; 3:30-45s; 4:45-60s
endcardFileId
string 
片尾文件id
optional
通过upload接口上传后获得
endcardAspectRatio
string 
片尾文件期望的分辨率
optional
默认值:all。可选值:all, 9:16, 3:4, 1:1, 4:3, 16:9
endcardBackgroundColor
string 
片尾背景颜色
optional
默认值:black。可选值:black, white
logoFileId
string 
logo文件id
optional
通过upload接口上传后获得
preview
boolean 
是否预览模式
optional
默认值:false。
当设置成true,会先返回预览视频,当需要导出视频时,需要触发export接口进行导出;
当设置成false或者空,会返回导出视频
noticeUrl
string 
optional
回调地址。详情看api文档
Example
{
    "productLink": "string",
    "fileIds": [
        "string"
    ],
    "productName": "string",
    "productDescription": "string",
    "aspectRatio": "string",
    "language": "string",
    "voiceId": "string",
    "captionId": "string",
    "aiavatarId": "string",
    "videoLengthType": 0,
    "endcardFileId": "string",
    "endcardAspectRatio": "string",
    "endcardBackgroundColor": "string",
    "logoFileId": "string",
    "preview": true,
    "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/m2v/task/submit' \
--header 'Topview-Uid;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "productLink": "string",
    "fileIds": [
        "string"
    ],
    "productName": "string",
    "productDescription": "string",
    "aspectRatio": "string",
    "language": "string",
    "voiceId": "string",
    "captionId": "string",
    "aiavatarId": "string",
    "videoLengthType": 0,
    "endcardFileId": "string",
    "endcardAspectRatio": "string",
    "endcardBackgroundColor": "string",
    "logoFileId": "string",
    "preview": true,
    "noticeUrl": "string"
}'

Responses

🟢200成功
application/json
Body
code
string 
required
message
string 
required
result
object 
required
taskId
string 
任务id
required
status
string 
任务状态
required
errorMsg
string 
任务异常信息
optional
subTaskId
string 
required
当前任务为主任务时,与taskId一致
Example
{
    "code": "string",
    "message": "string",
    "result": {
        "taskId": "string",
        "status": "string",
        "errorMsg": "string",
        "subTaskId": "string"
    }
}
Modified at 2025-06-13 03:30:05
Previous
update script content
Next
query task
Built with