tencent cloud

Chat

제품 소개
제품 개요
Basic Concepts
응용 시나리오
기능 소개
계정 시스템
사용자 정보 및 관계망
메시지 관리
그룹 시스템
Official Account
Audio/Video Call
사용 제한
구매 가이드
과금 개요
요금 안내
Purchase Instructions
Renewal Guide
연체 안내
Refund Policy
다운로드 센터
SDK & Demo 소스 코드
업데이트 로그
시나리오 솔루션
Live Streaming Setup Guide
AI Chatbot
대규모 엔터테인먼트 협업 커뮤니티
Discord 구현 가이드
IM을 게임에 통합하는 방법
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
클라이언트 APIs
SDK API(Web)
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
서버 APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
콘솔 가이드
New Console Introduction
애플리케이션 생성 및 업그레이드
기본 설정
기능 설정
계정 관리
그룹 관리
Official Channel Management
콜백 설정
모니터링 대시보드
Viewing Guide for Resource Packages
Real-Time Monitor
개발 보조 툴
액세스 관리
Advanced Features
FAQ
uni-app FAQs
구매
SDK 관련 질문
계정 인증
사용자 정보 및 관계망
메시지
그룹
라이브 방송 그룹
닉네임 및 프로필 사진
협약 및 인증
Service Level Agreement
컴플라이언스 인증
IM 정책
개인 정보 보호 정책
데이터 개인 정보 보호 및 보안 계약
에러 코드
문의하기

On-demand Batch Moderation

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-03-09 14:10:08

Overview

Once Content Understanding is enabled, you can proactively invoke this REST API from your application backend to submit batches of text and image content for moderation. For audio and video moderation, see Synchronous Moderation.

API Call Instructions

Request URL Example

https://xxxxxx/v4/im_msg_audit/batch_content_moderation?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json

Query Parameters

The table below lists only parameters relevant to this API call. For details on additional parameters, see the REST API Overview.
Parameter
Description
xxxxxx
Only supported in Singapore. Use the dedicated domain for the region where your SDKAppID is located:
Singapore: adminapisgp.im.qcloud.com
Other data centers are not supported.
v4/im_msg_audit/batch_content_moderation
API endpoint.
sdkappid
SDKAppID assigned by the Chat console when creating the application.
identifier
Must be an app administrator account. For more information, see App Administrator.
usersig
Signature generated by the app administrator account. For instructions, see Generate UserSig.
random
Enter a random 32-bit unsigned integer, range 0 - 4294967295.
contenttype
Request format; must be json.

Rate Limit

Maximum of 200 requests per second.

Request Example

{
"AuditName":"Group",
"Contents":[
{
"ContentId":0,
"ContentType":"Text",
"Content":"abc123"
},
{
"ContentId":1,
"ContentType":"Text",
"Content":"abc1234"
},
{
"ContentId":2,
"ContentType":"Image",
"Content":"https://www.simple.com/1.jpg"
},
{
"ContentId":3,
"ContentType":"Text",
"Content":"tttcccc"
}
],
"ExtSender":"sender_xx",
"ExtReceiver":"receiver_yy"
}

Request Fields

Field
Type
Required
Description
AuditName
String
Required
Specifies the moderation configuration.
For general configurations: C2C / Group / UserInfo / GroupInfo / GroupMemberInfo / RelationChain
For custom configurations: Custom Moderation Configuration ID.
Custom moderation configurations must be created in the console. The proactive moderation API uses the custom configuration ID as the value for AuditName, directing moderation to the corresponding scenario.
Contents
Array
Required
Array of items for batch moderation, supports up to 10 content items per batch.
ContentId
Integer
Required
Unique content identifier. Each item in the array must have a distinct ContentId.
ContentType
String
Required
Type of content to moderate. Allowed values: Text/Image for batch moderation. For audio and video.
Content
String
Required
Content to be moderated. Maximum size: 8KB. For files, provide the corresponding URL. For images, maximum size is 5MB.
ExtSender
String
Optional
Sender identifier. Can be left blank, or filled with Chat UserID or a custom sender identifier. If provided, enables filtering and analysis in the Content Understanding console.
ExtReceiver
String
Optional
Receiver identifier. Can be left blank, filled with Chat UserID/GroupID, or a custom receiver identifier. If provided, enables filtering and analysis in the Content Understanding console.

Response Example

{
"ActionStatus": "OK",
"ErrorCode": 0,
"ErrorInfo": "",
"AuditResults": [
{
"ErrorCode": 0,
"ErrorInfo": "",
"ContentId": 0,
"Result": "Block",
"Score": 99,
"Label": "Polity",
"SubLabel": "ChinesePresident",
"Keywords": [
"abc",
"mnt"
],
"RequestId": "c442f95e-35b9-47d7-8e01-3f9d644965fd"
},
{
"ErrorCode": 0,
"ErrorInfo": "",
"ContentId": 1,
"Result": "Pass",
"Score": 0,
"Label": "Normal",
"SubLabel": "",
"RequestId": "bf422ad2-cb2e-40cb-9b81-5936305c7b41"
},
{
"ErrorCode": 0,
"ErrorInfo": "",
"ContentId": 2,
"Result": "Block",
"Score": 97,
"Label": "Porn",
"SubLabel": "SexualBehavior",
"RequestId": "1ad85364-2bc1-454e-86bf-bbf1cc41fdff"
},
{
"ErrorCode": 0,
"ErrorInfo": "",
"ContentId": 3,
"Result": "Pass",
"Score": 0,
"Label": "Normal",
"SubLabel": "",
"RequestId": "ff7dad79-cb0c-4bea-aa99-1815b4de7591"
}
]
}

Response Fields

Field
Type
Description
ActionStatus
String
Request processing result:
OK: Success.
FAIL: Failure.
ErrorCode
Integer
Error code:
0: Success.
Non-zero: Failure.
ErrorInfo
String
Detailed error information.
AuditResults
Array
Array containing batch moderation results.
ContentId
Integer
Content identifier, matches ContentId in request.
RequestId
String
Unique moderation identifier.
Result
String
Moderation recommendation for text/image: Pass/Review/Block.
Keywords
Array
Keywords detected when content violates policy. May be empty if detected by the model.
Score
Integer
Malicious score for text/image moderation, range 0–100. Higher scores indicate greater severity.
Label
String
Category label assigned to content: Normal/Polity/Porn/Illegal/Abuse/Terror/Ad/Sexy/Composite.
SubLabel
String
Secondary category assigned to content.

Error Codes

Unless a network error occurs (such as a 502 error), this API always returns HTTP status code 200. Actual error codes and messages are provided in the ErrorCode and ErrorInfo fields of the response body.
For common error codes (60000–79999), see Error Codes.
Private error codes for this API:
Error Code
Description
60003
Invalid request parameters.
60020
Content Understanding service not enabled.
60022
Internal request error. Please contact support.
93000
Submitted content exceeds the maximum size limit of 8KB.
93001
Internal request error. If retrying does not resolve the issue, please contact support.
93005
Batch moderation API only supports text and image moderation.
93006
Batch moderation API timeout. Timeout is 5 seconds.
93007
Duplicate ContentId values are not supported in batch moderation API.
93008
Batch moderation API supports a maximum of 10 content items per request.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백