Polyv Help Center

Help Center

Create Video Creation Task

Updated: 2026-07-13 11:57:31

API Description

1、创建视频创作任务, 接口支持批量创建任务, 单次最多支持20个
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/ai/video-produce/create-batch

Online API Call

Request Method

POST

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details

URL Request Parameter Description (for signing)

Parameter Required Type Description
appId true String Account appId See details on obtaining keys
timestamp true Long Current 13-digit millisecond timestamp, valid within 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used for signing is critical for communication data security. It must never be saved or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server and obtain responses. See signature generation rules

Body (application/json) Parameter Description

Parameter Required Type Description
videoName true String Video name
hasDigitalHuman true Boolean Whether to include a digital human
ttsVoiceInfo true Object Voice configuration information; See ttsVoiceInfo parameter description
subtitleInfo true Object Subtitle configuration information; See subtitleInfo parameter description
fileId false String PPT file ID. Required if creating a video based on a PPT. The materialInfos parameter must be empty in this case (fileId has lower priority than materialInfos).
materialInfos false List Custom material information See materialInfos parameter description
digitalHumanInfos false List Digital human size and position information. Required if the video creation task needs a digital human. See digitalHumanInfos parameter description
tags false List Tags, in string array format. Duplicate tags are not supported. A maximum of 10 tags per task, each tag limited to 20 characters.

ttsVoiceInfo Parameter Description

Parameter Required Type Description
ttsVoiceId true Integer Voice ID. Can be obtained from the "Query available voices for video creation" API.
rate true Float Speech rate, between 0.5 and 2.0. 1 is normal speed. Pass 1 if no adjustment is needed.

subtitleInfo Parameter Description

Parameter Required Type Description
enableSubtitle true Boolean Whether subtitles are needed

materialInfos Parameter Description

Notes:

  1. A single video creation task supports a maximum of 100 pages of material (100 background images and voiceover scripts).
  2. The voiceover script for a single task is limited to 25,000 characters.
Parameter Required Type Description
backgroundImage true String Background image material URL. The image must be 1920x1080 (16:9) or 1080x1920 (9:16) resolution. Mixing landscape and portrait images in a single task is not supported, otherwise the final video will be abnormally stretched.
remark false String Voiceover script, used for text-to-speech.
audioFileUrl false String Custom voiceover audio file URL. Choose either this or the remark parameter. Only supports mp3, wav, and m4a audio formats. Single audio file must not exceed 50MB.

digitalHumanInfos Parameter Description

Explanation of digitalHumanInfos:

  1. This parameter is a collection type. If the current task does not require a digital human, this parameter does not need to be passed.
  2. This parameter is used to control the display and hiding of the digital human on each page of material, as well as to adjust the digital human's size and position.
  3. If the material is a PPT, adjusting the digital human's display/hiding, size, and position on each PPT page is not supported. (Only one set of digital human ID, size, and position information is needed. The digital human's size and position will be the same across all PPT video pages.)
  4. If the material consists of custom background images and custom voiceover scripts, this parameter can be used to control whether the digital human is displayed on each voiceover page, as well as its size and position. However, note that you must pass as many sets of digital human size and position information as there are pages of material (one background image + one voiceover script equals one page). If only one set is passed, it is assumed that the digital human is displayed on every page of material, and its size and position remain consistent.

Other Notes:

  1. Currently, a single video creation task supports a maximum of one digital human.

Examples:

  1. Material uses a PPT and requires a digital human. Only one set of digital human size and position is needed.
[
  {
    "digitalHumanId": 15,
    "x": "1412",
    "y": "247",
    "w": "467",
    "h": "830"
  }
]
  1. Custom material requires a digital human. Assume there are three pages of material. The first page needs the digital human displayed, the second page does not, and the third page needs it displayed with adjusted size and position compared to the first page.
[
  {
    "digitalHumanId": 15,
    "x": "1412",
    "y": "247",
    "w": "467",
    "h": "830"
  },
  {
    "digitalHumanId": null,
    "x": null,
    "y": null,
    "w": null,
    "h": null
  },
  {
    "digitalHumanId": 15,
    "x": "1012",
    "y": "147",
    "w": "367",
    "h": "530"
  }
]
  1. Custom material requires a digital human. If the digital human is displayed on all pages with the same size and position, passing one set of size and position parameters is sufficient.
[
  {
    "digitalHumanId": 15,
    "x": "1412",
    "y": "247",
    "w": "467",
    "h": "830"
  }
]
Parameter Required Type Description
digitalHumanId false Integer Digital human ID. If empty, the digital human is not displayed on the current page.
x false Integer Digital human position (x-axis coordinate). Required if digitalHumanId is not empty.
y false Integer Digital human position (y-axis coordinate). Required if digitalHumanId is not empty.
w false Integer Digital human size (width). Required if digitalHumanId is not empty.
h false Integer Digital human size (height). Required if digitalHumanId is not empty.

Recommended default size and position parameters for digital humans (different materials generally require different digital human size and position parameters. It is recommended to visualize the digital human's size and position first, then adjust it in the interface):

  • 16:9 landscape video, digital human on the right: x: 1325, y: 28, w: 588, h: 1045
  • 16:9 landscape video, digital human on the left: x: 3, y: 80, w: 562, h: 1000
  • 9:16 portrait video: x: 10, y: 25, w: 1060, h: 1888

Example

http://api.polyv.net/live/v4/ai/video-produce/create-batch?timestamp=1716107535043&appId=gopl67qi7e&sign=6625340A6017272DF55CD1F5DC42CFCB

// ppt + 无数字人

[
    {
        "videoName": "ppt素材-无数字人",
        "hasDigitalHuman": false,
        "ttsVoiceInfo": {
            "ttsVoiceId": 79,
            "rate": "1.0"
        },
        "fileId": "abdd872ffae85752080989ca505b9525c560fac50fpptVideocommon",
        "subtitleInfo": {
            "enableSubtitle": true
        }
    }
]

// ppt + 有数字人
[
    {
        "videoName": "ppt素材-有数字人",
        "hasDigitalHuman": true,
        "ttsVoiceInfo": {
            "ttsVoiceId": 79,
            "rate": "1.2"
        },
        "fileId": "47023bd9a36fa692770e330a190fa7a9c560fac50fpptVideocommon",
        "subtitleInfo": {
            "enableSubtitle": false
        },
        "digitalHumanInfos": [
            {
                "digitalHumanId": 15,
                "x": "1412",
                "y": "247",
                "w": "467",
                "h": "830"
            }
        ]
    }
]

// 自定义素材 + 无数字人
[
    {
        "videoName": "自定义素材-无数字人",
        "hasDigitalHuman": false,
        "ttsVoiceInfo": {
            "ttsVoiceId": 79,
            "rate": "1.3"
        },
        "subtitleInfo": {
            "enableSubtitle": false
        },
        "materialInfos": [
            {
                "backgroundImage": "https://img.videocc.net/e5f34f7744/html/adv/video-produce/background-image/16_9/img/5landscape/landscape7.jpg",
                "remark": "你好"
            },
            {
                "backgroundImage": "https://img.videocc.net/e5f34f7744/html/adv/video-produce/background-image/9_16/img/3simple/simple21.jpg",
                "remark": "这里是保利威视频创作"
            }
        ]
    }
]

// 自定义素材 + 有数字人 + 全部页素材的数字人大小位置都一样
[
    {
        "videoName": "自定义素材-有数字人",
        "hasDigitalHuman": true,
        "ttsVoiceInfo": {
            "ttsVoiceId": 79,
            "rate": "1.3"
        },
        "subtitleInfo": {
            "enableSubtitle": false
        },
        "materialInfos": [
            {
                "backgroundImage": "https://img.videocc.net/e5f34f7744/html/adv/video-produce/background-image/16_9/img/5landscape/landscape7.jpg",
                "remark": "你好"
            },
            {
                "backgroundImage": "https://img.videocc.net/e5f34f7744/html/adv/video-produce/background-image/16_9/img/5landscape/landscape7.jpg",
                "remark": "这里是保利威视频创作"
            }
        ],
        "digitalHumanInfos": [
            {
                "digitalHumanId": 15,
                "x": "1412",
                "y": "247",
                "w": "467",
                "h": "830"
            }
        ]
    }
]

// 自定义素材 + 有数字人 + 自定义数字人显示和数字人大小位置
[
    {
        "videoName": "有数字人-素材-000000000",
        "hasDigitalHuman": true,
        "ttsVoiceInfo": {
            "ttsVoiceId": 79,
            "rate": "1.3"
        },
        "subtitleInfo": {
            "enableSubtitle": false
        },
        "materialInfos": [
            {
                "backgroundImage": "https://img.videocc.net/e5f34f7744/html/adv/video-produce/background-image/16_9/img/5landscape/landscape7.jpg",
                "remark": "你好"
            },
            {
                "backgroundImage": "https://img.videocc.net/e5f34f7744/html/adv/video-produce/background-image/16_9/img/5landscape/landscape7.jpg",
                "remark": "这里是保利威视频创作"
            },
            {
                "backgroundImage": "https://img.videocc.net/e5f34f7744/html/adv/video-produce/background-image/16_9/img/5landscape/landscape7.jpg",
                "remark": "感谢您的支持和使用"
            }
        ],
        "digitalHumanInfos": [
            {
                "digitalHumanId": 15,
                "x": "1412",
                "y": "247",
                "w": "467",
                "h": "830"
            },
            {
                "digitalHumanId": null,
                "x": null,
                "y": null,
                "w": null,
                "h": null
            },
            {
                "digitalHumanId": 15,
                "x": "1012",
                "y": "147",
                "w": "367",
                "h": "530"
            }
        ]
    }
]

Response Parameter Description

Parameter Type Description
code Integer Response status code. 200 indicates success, non-200 indicates failure.
status String Response result, determined by business logic. Returns 'success' on success, 'error' on failure.
success Boolean Response result, determined by business logic. Returns true on success, false on failure.
data Boolean Returns true on success. On failure, obtain detailed failure information from the error parameter.
error Object Error information when the status code is not 200. See Error field description
requestId String Request ID, a unique UUID generated for each request. Only for debugging and troubleshooting; should not be tied to business logic.

Response Example

Success Example

{
   "code": 200,
   "status": "success",
   "requestId": "e90aba2c69a24bab894c7f708b853b75.71.17161341126309441",
   "data": true,
   "success": true
}

Error Parameter Description

Parameter Type Description
code Integer Error code, used to identify the specific error cause.
desc String Error description, corresponding to error.code.
联系客服,在线咨询