Polyv Help Center

Help Center

Query Channel Audio Moderation Settings (Requires Activation)

Updated: 2026-06-26 16:04:48

API Description

1、查询频道音频审核设置
2、接口支持https协议
3、按账号开通版本返回配置:账号 audioModerationFunctionEnable 为 Y(金融版)或 AI(大模型版)即视为已开通音频审核;未开通(N、空或其他值)返回错误码 1041。返回对象为合并结构,金融版与大模型版字段同时返回,调用方按账号版本取用即可

API URL

http://api.polyv.net/live/v4/channel/audio-moderation/get

Online API Call

Request Method

GET

API Constraints

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

Request Parameter Description

Parameter Required Type Description
appId true String Account appId [See Get Secret Key]
channelId true String Channel ID
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not 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]
timestamp true String Current 13-digit millisecond timestamp, valid for 3 minutes

Example

http://api.polyv.net/live/v4/channel/audio-moderation/get?appId=gga8efhn0h&sign=A172F9012D17020EEB0BF343492FB26D&channelId=3791474&timestamp=1678087256825

Response Parameter Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine the basic response status
data Object [See Data Parameter Description]
error Object Error information when status code is not 200 [See Error Parameter Description]
requestId String Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, should not be tied to business logic
status String Response result, determined by business logic. Returns "success" on success, "error" on failure
success Boolean Whether the response was successful

Data Parameter Description

Parameter Type Description
badwordEnabled String Banned words toggle, Y/N
channelId Integer Channel ID
customRule String Custom moderation rule (LLM version, takes effect as moderation rule when llmAuditEnabled=Y)
illegalNotify Object Violation notification configuration [See IllegalNotify Parameter Description]
llmAuditEnabled String LLM moderation toggle, Y/N (LLM version)
moderationEnabled String Moderation toggle, Y/N
moderationStrategy String Moderation strategy (Finance version)
easy: Loose moderation strategy
normal: General moderation strategy
strict: Strict moderation strategy
userId String POLYV user ID, consistent with the POLYV official website. Retrieval path: Official website -> Login -> Live Streaming (Development Settings)

The response is a merged structure: Finance version accounts will also return LLM version fields (llmAuditEnabled, customRule, illegalNotify.notifyLevel, etc., may be empty). LLM version accounts will also return moderationStrategy (default "easy", does not participate in LLM version moderation). Callers should use the corresponding fields based on the account's activated version.

IllegalNotify Parameter Description

Parameter Type Description
assistantEnabled String Assistant notification, Y/N
monitorEnabled String Monitor notification, Y/N
notifyLevel String Notification level for receiving alerts (LLM version)
all: All risk items
medium_plus: Medium risk and above
high_only: High risk items only
notifyUrl String External notification URL (LLM version); empty indicates external notification is not enabled. When set, violation events will be pushed to this URL
platformEnabled String Platform notification, Y/N
talentEnabled String Host notification, Y/N

Error Parameter Description

Parameter Type Description
code Integer Error code, used to determine the specific error reason
desc String Error description, corresponding to error.code

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. The HttpUtil.java and LiveSignUtil.java in the test cases are included in the downloaded file.

It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 查询频道音频审核设置
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void audioModerationGetTest() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String appId = super.appId;
    String appSecret = super.appSecret;
    String timestamp = String.valueOf(System.currentTimeMillis());

    //业务参数
    String url = "http://api.polyv.net/live/v4/channel/audio-moderation/get";
    String channelId = "";

    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("channelId", channelId);
    requestMap.put("timestamp", timestamp);

    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));

    String response = HttpUtil.get(url, requestMap);

    log.info("测试查询频道音频审核设置成功:{}", response);
    //do somethings

}

Response Example

For global system error descriptions, see Global Error Description

Finance Version Success Example

{
  "code": 200,
  "status": "success",
  "requestId": "414afeb28f1c4f0ca17e1c3c1e39d247.10285.16780871639086817",
  "data": {
    "userId": "4bcae48f78",
    "channelId": 3791474,
    "moderationEnabled": "Y",
    "moderationStrategy": "normal",
    "badwordEnabled": "N",
    "llmAuditEnabled": "N",
    "customRule": "",
    "illegalNotify": {
      "monitorEnabled": "Y",
      "talentEnabled": "Y",
      "assistantEnabled": "Y",
      "platformEnabled": "Y"
    }
  },
  "success": true
}

LLM Version Success Example

{
  "code": 200,
  "status": "success",
  "requestId": "414afeb28f1c4f0ca17e1c3c1e39d247.10285.16780871639086817",
  "data": {
    "userId": "4bcae48f78",
    "channelId": 3791474,
    "moderationEnabled": "Y",
    "moderationStrategy": "easy",
    "badwordEnabled": "Y",
    "llmAuditEnabled": "Y",
    "customRule": "禁止主播引导观众添加微信、QQ等社交账号进行私下交易;禁止主播在直播中提及其他竞品平台名称;禁止主播使用攻击性语言。",
    "illegalNotify": {
      "monitorEnabled": "Y",
      "talentEnabled": "N",
      "assistantEnabled": "Y",
      "platformEnabled": "N",
      "notifyUrl": "https://example.com/audio-moderation/callback",
      "notifyLevel": "medium_plus"
    }
  },
  "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
    "error": {
        "code": 20001,
        "desc": "application not found."
    },
    "success": false
}

Account not activated for audio moderation (audioModerationFunctionEnable is N, empty, or other values), returns error code 1041

{
    "code": 400,
    "status": "error",
    "requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
    "error": {
        "code": 1041,
        "desc": "账号未开启音频审核功能"
    },
    "success": false
}
联系客服,在线咨询