Polyv Help Center

Help Center

Query Intelligent Subtitle Link

Updated: 2024-04-22 19:18:32

Interface Description

1、查询视频字幕的链接(需先创建智能字幕任务)
2、接口支持https协议

Interface URL

https://api.polyv.net/vod/v4/smart-subtitle/subtitle-link/get

Request Method

GET

Interface Constraints

  1. The interface supports both HTTP and HTTPS. HTTPS is recommended for security. There is a frequency limit on interface calls. See details

Request Parameter Description

  • URL Parameters
Parameter Required Type Description
appId true String Live streaming appId. You can view your live streaming appId and appSecret in "Cloud VOD" -> "Settings" -> "API Interface".
timestamp true Long Millisecond-level timestamp of the current time, valid within 30 minutes.
vid true String Video vid.
sign true String Signature, 32-character uppercase MD5 value. See MD5 signature generation rules

Response Parameter Description

Parameter Type Description
code Integer Response status code. 200 indicates success, non-200 indicates failure. See global error description
status String Response status text.
requestId String Unique request identifier. If the interface call fails, provide this ID to customer service for troubleshooting.
success boolean true indicates successful call, false indicates failure.
data List Subtitle data returned on success. See data field description
error Object Description information when the interface call fails. See error field description

data Field Description

Parameter Type Description
taskId Long Subtitle task ID.
link String Subtitle link.
vid String Video vid.

error Field Description

Parameter Type Description
code Integer Error code. See return error code list
desc String Error description. See return error code list

Return Error Code List

code desc Description
10002 Signature error Signature error. Please check if the interface sign parameter has been generated correctly.
10003 Timestamp expired Timestamp expired.
20003 application not found. appId does not exist. Please check if the appId value is passed correctly.

Response Example

Success Example

{
  "code": 200,
  "status": "success",
  "requestId": "f813d5d2359743028b6648e54ade1bf1.60.16801640807450383",
  "data": [
    {
      "taskId": 1120,
      "link": "https://img.videocc.net/usrt/xxxxxxxxx.srt",
      "vid": "c560fac50feda7d3128030f0e71e8c7a_c"
    },
    {
      "taskId": 1271,
      "link": "https://img.videocc.net/usrt/xxxxxxxxx.srt",
      "vid": "c560fac50fa69535f18f0347140cbf75_c"
    }
  ],
  "success": true
}

Error Example

Timestamp Expired

{
    "code": 400,
    "status": "error",
    "error": {
        "code": 10003,
        "desc": "时间戳过期"
    },
    "success": false
}

Signature Error

{
    "code": 403,
    "status": "error",
    "error": {
        "code": 10002,
        "desc": "签名错误"
    },
    "success": false
}
联系客服,在线咨询
在线咨询