Topview-api-English version
  1. Avatar Marketing Video
Topview-api-English version
  • API Document
  • Avatar Marketing Video
    • script
      • List script content
      • Update script content
    • Submit task
      POST
    • Query task
      GET
    • Export
      POST
  • Video Avatar
    • submit task
      POST
    • query task
      GET
  • Scraper
    • submit scraper task
      POST
    • query scraper task
      GET
  • Upload
    • Get Upload Credential
      GET
    • Get Upload Check
      GET
  • Product Avatar
    • Replace Product Image
      • submit task
      • query task
    • Image2Video
      • submit task
      • query task
    • Category Query
      GET
    • Public product avatar Query
      GET
  • Common Task
    • image2Video
      • submit task
      • query task
  • Product AnyShoot
    • Replace Product Image
      • submit task
      • query task
    • Template Category
      GET
    • Template List
      GET
  • Caption List
    GET
  • Voice Query
    GET
  • AiAvatar Query
    GET
  • check notice url
    POST
  • Ethnicity Query
    GET
  1. Avatar Marketing Video

Submit task

POST
/v1/m2v/task/submit

Parameter Description#

1.
If both productLink and fileIds exist, the parameter of fileIds will be ignored, and all videos and images parsed from productLink will be used by default.

Request

Header Params
Topview-Uid
string 
required
Authorization
string 
required
Body Params application/json
productLink
string 
Product link
optional
Either productLink or fileIds must be non-empty.
fileIds
array[string]
Custom material files
optional
Videos or images. Obtain the fileId after uploading through the upload interface.
productName
string 
Product name
optional
It can be automatically parsed from the product link. Required when productLink is empty.
productDescription
string 
Product description
optional
It can be automatically parsed from the product link. Required when productLink is empty.
aspectRatio
string 
Expected output resolution
optional
Default value: 9:16. Optional values: 9:16, 3:4, 1:1, 4:3, 16:9
language
string 
Language
optional
Default value: en
Language list:
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. Currently, the supported voiceIds for Thai are: 5d188a658b5a424e98bf0dbbcb8f97d8, eea5e5a4fb534231a5b4cf4766dd7a5f, 537e2643719c47bdac1d8a2c7f0c844a, e22db502aa8d40d9ba791083c9f4ab35
voiceId
string 
Voice ID
optional
Obtain it through the Voice Query interface.
captionId
string 
Obtain it through the Caption List interface. If it is not specified, it will be randomly selected.
optional
aiavatarId
string 
AI avatar ID
optional
Obtain it through the AiAvatar Query interface.
videoLengthType
integer 
Output video length type
optional
Default value: 1. 1: 30 - 50s; 2: 15 - 30s; 3: 30 - 45s; 4: 45 - 60s
endcardFileId
string 
End card file ID
optional
Obtain it after uploading through the upload interface.
endcardAspectRatio
string 
Expected resolution of the end card file
optional
Default value: all. Optional values: all, 9:16, 3:4, 1:1, 4:3, 16:9
endcardBackgroundColor
string 
End card background color
optional
Default value: black. Optional values: black, white
logoFileId
string 
Logo file ID
optional
Obtain it after uploading through the upload interface.
preview
boolean 
Whether it is in preview mode
optional
Default value: false.
When set to true, a preview video will be returned first. When you need to export the video, you need to trigger the export interface for export.
When set to false or empty, an exported video will be returned.
noticeUrl
string 
notice_url
optional
Please refer to the API documentation for details
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 
Task ID
required
status
string 
Task status
required
errorMsg
null 
Task error information
optional
Example
{
    "code": "string",
    "message": "string",
    "result": {
        "taskId": "string",
        "status": "string",
        "errorMsg": null
    }
}
Modified at 2025-06-10 07:06:17
Previous
Update script content
Next
Query task
Built with