Request API

Video stream moderation request API documentation

API Description

This API submits video stream moderation and related information. Once the stream is pulled stably, recognition results are continuously sent via callback to the specified callback address.

API Requirements

ItemSpecification
Communication ProtocolHTTP or HTTPS
Request MethodPOST
Character EncodingUTF-8
Parameter FormatAll request and response parameters use JSON format

Supported Protocols

Standard stream URLs currently support RTMP, RTMPS, HLS, HTTP, and HTTPS protocols, as well as FLV, M3U8, and other formats.

Callback Mechanism

When a user receives a push result and returns an HTTP status code of 200, the push is considered successful. Otherwise, the system retries the push (until the maximum retry count is reached). The retry logic uses intervals of [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60] seconds. After 12 retries, if it still fails, no further retries are attempted.

Stream Pull Retry Mechanism

To prevent stream pull failures caused by network anomalies, the Deepcleer video stream service includes a retry mechanism for failed stream pulls. The specific mechanism is as follows:

  • Standard streams, Zego/Tencent/Volcano streams: A total of 12 retries. Each attempt lasts 5 minutes with intervals of [5, 10, 15, 20, ... 60 seconds]. For example, Deepcleer first attempts continuous stream pulling for 5 minutes. If unsuccessful, it waits 5 seconds and pulls again for another 5 minutes. If still unsuccessful, it waits 10 seconds and pulls for another 5 minutes, and so on.
  • Agora streams: No retries. The connection is closed after a 5-minute stream pull timeout.

Timeout

  • Recommended timeout: 7 seconds
  • Internal processing timeout: 3 seconds with one retry. Normal API response time is within 100ms.

Historical Versions

See Historical Versions.


Request

Request URL

ClusterRequest URLSupported Products
Shanghai Video Stream Clusterhttp://api-videostream-sh.fengkongcloud.com/videostream/v4Chinese video stream
Singapore Video Stream Clusterhttp://api-videostream-xjp.fengkongcloud.com/videostream/v4Chinese video stream, English video stream, Arabic video stream

Request Parameters

ParameterTypeRequiredMax LengthDescription
accessKeystringYes20Company key. Used for permission authentication, provided by Deepcleer upon service activation.
eventIdstringYes64Event identifier. The value must be agreed upon with Deepcleer in advance.
appIdstringYes64Application identifier. This field is strictly validated and must be agreed upon with Deepcleer in advance.
imgTypestringNo64Moderation types for video stream frames. At least one of imgType or imgBusinessType must be provided. Possible values: POLITY — Political content detection, EROTIC — Pornography & sexual content detection, VIOLENT — Terrorism & prohibited content detection, QRCODE — QR code detection, ADVERT — Advertisement detection, IMGTEXTRISK — Image text violation detection. To combine multiple types, join them with underscores, e.g., POLITY_QRCODE_ADVERT for political, QR code, and advertisement detection.
audioTypestringNo64Moderation types for audio in the video stream. At least one of audioType or audioBusinessType must be provided. Possible values: POLITY — Political content detection, EROTIC — Pornographic content detection, ADVERT — Advertisement detection, BAN — Prohibited content detection, VIOLENT — Terrorism detection, DIRTY — Profanity detection, ADLAW — Advertising law, MOAN — Moaning detection, AUDIOPOLITICAL — Top leader voiceprint detection, ANTHEN — National anthem detection, BANEDAUDIO — Prohibited songs, NONE — Do not detect audio. To combine multiple types, join them with underscores, e.g., POLITY_EROTIC for political and pornographic detection.
imgBusinessTypestringNo128Business detection types for video stream frames. At least one of imgBusinessType or imgType must be provided. See business label types for possible values.
audioBusinessTypestringNo128Business detection types for audio in the video stream. At least one of audioBusinessType or audioType must be provided. Possible values: SING — Singing detection, LANGUAGE — Language detection (Chinese, English, Cantonese, Tibetan, Uyghur, Korean, Mongolian, Other), MINOR — Minor detection, GENDER — Gender detection, TIMBRE — Timbre detection, VOICE — Voice attributes, AUDIOSCENE — Audio scene, AGE — Age detection, APPNAME — App name detection. To detect timbre, singing, or language, GENDER must also be included. To combine multiple types, join them with underscores.
imgCallbackstringYes1024Image callback URL. Detection results of captured frames from the video stream are sent to this address.
audioCallbackstringNo1024Audio callback URL. Detection results of audio segments from the video stream are sent to this address. Required when audio detection is enabled.
dataobjectYesRequest data content. Maximum size: 1 MB.

data Object Parameters

ParameterTypeRequiredMax LengthDescription
streamTypestringYesVideo stream type. Possible values: NORMAL — Standard stream URL (supports RTMP, RTMPS, HLS, HTTP, HTTPS protocols), AGORA — Agora moderation, TRTC — Tencent moderation, ZEGO — Zego moderation, VOLC — Volcano Engine moderation, ALI — Alibaba Cloud moderation. Note: When using an RTC SDK recording solution, additional recording fees may be incurred on the RTC side. Consult the relevant RTC provider for specific fees.
tokenIdstringYes64User account identifier. Pass the user ID to enable risk detection for behaviors such as spam and advertising.
urlstringNo600URL of the standard video stream to be detected.
anchorNamestringNoAnchor name. Typically used for manual review.
audioDetectStepint32NoAudio moderation step for the video stream. Unit: segments. Value range: 1–36 (integer). A value of 1 skips one 10-second audio segment, a value of 2 skips two segments, and so on. If not used, all audio content is moderated.
detectFrequencyint32NoFrame capture frequency interval for the video stream. Unit: seconds. Value range: 1–60 seconds. Decimals are rounded down; values less than 1 are treated as 1 second. Default: 3 seconds per frame capture.
detectStepint32NoDetection step for captured frame images. Only one detection per step of captured frames. Value must be ≥ 1. If not used, all captured frames are moderated.
deviceIdstringNo128Deepcleer device fingerprint identifier. Generated by the Deepcleer SDK for user behavior analysis.
genderstringNoUser gender. Suggested values: male, female, ambiguity (gender unknown).
imgBusinessDetectStepint32NoImage business label detection step. Only one imgBusinessType detection per step. Value must be ≥ 1. Default: 1 (all segments are moderated for business labels).
imgCompareBasestringNo1024Base image for comparison. Present when the businessType request parameter contains the FACECOMPARE label. Supports image URL links in the following formats: jpg, jpeg, png, webp, gif, tiff, tif, heif. Recommended minimum image resolution: 256×256. Animated image formats are not currently supported for base images.
ipstringNo64Client public IP address. Used for IP-based user behavior analysis.
langstringNoLanguage type. Specifies the language for text content detection in captured frames and audio segments (default: Chinese). Possible values: zh — Chinese, en — English, ar — Arabic, hi — Hindi, es — Spanish, fr — French, ru — Russian, pt — Portuguese, id — Indonesian, de — German, ja — Japanese, tr — Turkish, vi — Vietnamese, it — Italian, th — Thai, tl — Filipino, ko — Korean, ms — Malay, auto — Automatic language detection (requires Deepcleer to enable the corresponding blocking standard).
levelint32NoUser level. Different blocking strategies can be configured for different user levels. Possible values: 0 — Lowest-level user (e.g., newly registered, completely inactive, or level-0 users), 1 — Lower-level user (e.g., low-activity or low-level users), 2 — Mid-level user (e.g., moderately active or mid-level users), 3 — Higher-level user (e.g., highly active or high-level users), 4 — Highest-level user (e.g., paying users, VIP users).
liveCoverstringNoLive cover image. Typically used for manual review.
liveTitlestringNoLive title. Typically used for manual review.
receiveTokenIdstringNo64Token ID of the message receiver. A string of up to 64 characters consisting of digits, letters, underscores, and hyphens.
returnAllImgint32NoRisk level of returned frame recognition results. Possible values (default: 0): 0 — Return image moderation results with a risk level other than pass. 1 — Return image moderation results for all risk levels.
returnAllTextint32NoRisk level of returned audio recognition results. Possible values (default: 0): 0 — Return audio segments and text content with a risk level other than pass. 1 — Return audio segments and text content for all risk levels.
returnFinishInfoint32NoStream end callback notification. Possible values (default: 0): 1 — Send an end notification when moderation finishes; the callback parameters include a statCode status code. 0 — Do not send an end notification when moderation finishes.
returnPreAudioint32NoWhether to return previous segment information. Possible values: 1 — The returned preAudioUrl field contains a 20-second audio segment link covering the previous 10 seconds and the current 10 seconds. 0 — Do not return previous segment information.
returnPreTextint32NoWhether to return previous segment text information. Possible values: 1 — The returned content field contains 20 seconds of audio segment text covering the previous 10 seconds and the current 10 seconds. 0 — Do not return previous segment text information.
roomstringNo64Live room / game room number. Different strategies can be configured for individual rooms.
streamNamestringNo64Video stream name. Used for display in the backend interface; recommended to pass in.
acceptLangstringNoLanguage type for returned labels. Possible values: zh — Chinese, en — English. Default: Chinese labels.

data.extra Object Parameters

ParameterTypeRequiredMax LengthDescription
passThroughobjectNo1024Customer pass-through field. Deepcleer does not process this field internally; it is returned as-is with the results.

data.agoraParam Object (Required when streamType is AGORA)

ParameterTypeRequiredMax LengthDescription
appIdstringYes64Application identifier provided by Agora.
channelstringYes64Channel name provided by Agora.
channelProfileint32No32Agora recording channel mode. Possible values: 0 — Communication (default). Common for 1-on-1 or group chats where any user in the channel can speak freely. 1 — Live broadcast. Two user roles: host and audience.
enableH265SupportbooleanNoWhether to support H.265 video stream recording. false (default) — Do not support H.265 video stream recording. Remote users in the channel cannot send H.265 video streams. true — Support H.265 video stream recording.
enableIntraRequestbooleanNoWhether to enable keyframe requests. Default: true. This improves the audio/video experience under weak network conditions. To enable seeking in recordings made in individual stream mode, set enableIntraRequest to false. false — Disable keyframe requests. All senders in the channel send keyframes every 2 seconds. When disabled, recordings in individual stream mode support seeking. true — The sender controls whether keyframe requests are enabled. When enabled, recordings in individual stream mode do not support seeking.
subscribeModestringNoSubscription mode. AUTO — Automatically subscribe to all streams in the room (default behavior). UNTRUSTED — Used with untrustedUserIdList to subscribe only to streams from users in the list. In this mode, if the list is empty, a parameter error occurs because no streams can be subscribed. TRUSTED — Used with trustedUserIdList to subscribe only to streams from users NOT in the list. In this mode, if no users outside the trustedUserIdList enter the room within a certain time, Deepcleer will proactively end the moderation.
tokenstringNo64Users with higher security requirements can use a token for authentication. See Agora documentation for generation: https://docs.agora.io/cn/Recording/token_server?platform=CPP. Set the token validity period to exceed the channel duration to prevent stream pull failures due to token expiration. Agora currently supports a maximum token validity of 24 hours. For channels lasting more than 24 hours, handle token expiration as follows: Set returnFinishInfo to 1 in the request parameters. When the callback receives an end notification (statCode is 1) due to an invalid or expired pull token, generate a new token and resubmit the channel for moderation if it still exists and requires continued moderation.
uidint32No64A 32-bit unsigned integer. When a token is present, provide the user ID used to generate the token. Note: This uid must be different from the actual user UIDs in the room — the uid used for server-side recording must not already exist in the room.
trustedUserIdListarrayNoList of trusted users. Effective when subscribeMode is TRUSTED. Must not be empty. Deepcleer will not subscribe to streams from users in this list. Comma-separated UID array, e.g., [1, 2]. Maximum: 17 users.
untrustedUserIdListarrayNoList of untrusted users. Effective when subscribeMode is UNTRUSTED. Must not be empty. Deepcleer will only subscribe to streams from users in this list. Comma-separated UID array, e.g., [1, 2]. Maximum: 17 users.

data.trtcParam Object (Required when streamType is TRTC)

ParameterTypeRequiredMax LengthDescription
sdkAppIdint32Yes64The sdkAppId provided by Tencent.
strRoomIdstringYes128Room number. Only allows letters (a-zA-Z), digits (0-9), underscores, and hyphens. Note: If both strRoomId and roomId are provided, roomId takes priority.
userIdstringYes32The userId assigned to the recording end. Max length: 32 bits. Only allows letters (a-zA-Z), digits (0-9), underscores, and hyphens.
userSigstringYes128Verification signature corresponding to the recording userId, equivalent to a login password.
appSceneint32Yes1Application scene. Possible values: 0 — Video call scene, 1 — Video live broadcast scene. Default: 0. See: https://cloud.tencent.com/document/product/647/79634
demoSencesint32YesRecording type. Possible values: 2 — Individual stream recording, 4 — Mixed stream recording.
roomIdint32No10Room number. Value range: 1–4294967294. One of roomId or strRoomId must be provided. If both have values, roomId takes priority. Note: Currently, a maximum of 8 users can be moderated per room.

data.zegoParam Object (Required when streamType is ZEGO)

ParameterTypeRequiredMax LengthDescription
roomIdstringYes64Zego room number.
tokenIdstringYes64Authentication information provided by Zego. Used to obtain identify_token for login. See Zego documentation for generation: https://doc-zh.zego.im/article/15258. Note: tokenId is a unique identifier. A new token must be generated for each moderation request.

data.volcParam Object (Required when streamType is VOLC)

ParameterTypeRequiredMax LengthDescription
appIdstringYes64Application identifier provided by Volcano Engine.
roomIdstringYes128Room ID.
tokenstringYes64Verification signature corresponding to the recording userId, equivalent to a login password.
userIdstringYes32The userId assigned to the recording end. Max length: 32 bits. Only allows letters (a-zA-Z), digits (0-9), underscores, and hyphens.

data.aliParam Object (Required when streamType is ALI)

ParameterTypeRequiredMax LengthDescription
roomstringYes64Room ID. Must be exactly the same as the channelID used to generate the token. The server pulls and records streams on a per-room basis. room is a unique identifier; duplicate rooms will not result in duplicate stream pulls.
tokenstringYes64Token used for the pull-stream end to join the channel. See documentation for generation: https://help.aliyun.com/zh/live/user-guide/token-based-authentication. A new token must be generated for each moderation submission.
userIdint32No32Alibaba user account identifier.

Response

Response Parameters

ParameterTypeRequiredDescription
requestIdstringYesDeepcleer unique request identifier.
messagestringYesCorresponds to code: 1100 — Success, 1901 — QPS limit exceeded, 1902 — Invalid parameters, 1903 — Service failure, 1904 — Stream count limit exceeded, 9101 — Unauthorized operation.
codeint32Yes1100 — Success, 1901 — QPS limit exceeded, 1902 — Invalid parameters, 1903 — Service failure, 1904 — Stream count limit exceeded, 9101 — Unauthorized operation.
detailobjectNoDetail information.
dupRequestIdstringNoDuplicate requestId. Returned when errorcode is 1001 (duplicate stream submission). For example, if the first request did not receive a response but the audio stream has already started moderation and there is no requestId to close it, you can submit the request again. Upon receiving the duplicate stream message, use the returned dupRequestId to call the close moderation API.
errorcodeint32No1001 — Duplicate stream submission.

Stream Segment Callback Parameters

The following parameters (except code, message, and requestId) are required only when code returns 1100.

ParameterTypeRequiredDescription
requestIdstringYesDeepcleer unique request identifier.
messagestringYesCorresponds to code: 1100 — Success, 1901 — QPS limit exceeded, 1902 — Invalid parameters, 1903 — Service failure, 1904 — Stream count limit exceeded, 9101 — Unauthorized operation.
codeint32Yes1100 — Success, 1901 — QPS limit exceeded, 1902 — Invalid parameters, 1903 — Service failure, 1904 — Stream count limit exceeded, 9101 — Unauthorized operation.
statCodeint32NoCallback status code. Values: 0 — Moderation result callback, 1 — Stream end result callback.
contentTypeint32NoDistinguishes between audio and image callbacks. Possible values: 1 — Image callback, 2 — Audio callback.
auxInfoobjectNoAuxiliary information. Contains the passThrough field from data.extra in the request parameters.
passThroughobjectNoCustomer pass-through field. Deepcleer does not process this field internally; it is returned as-is with the results.

frameDetail — Frame Image Risk Details

Returned when there are risky segments or when returnAllImg=1.

ParameterTypeRequiredDescription
imgUrlstringYesCaptured frame image URL.
riskLevelstringYesRecognition result. Possible values: PASS — Normal, recommended to allow, REVIEW — Suspicious, recommended for manual review, REJECT — Violation, recommended to block.
riskLabel1stringYesPrimary risk label. Returns normal when riskLevel is PASS.
riskLabel2stringYesSecondary risk label. Empty when riskLevel is PASS.
riskLabel3stringYesTertiary risk label. Empty when riskLevel is PASS.
riskDescriptionstringYesLabel description. Returns "Hit custom list" when a user-defined list is matched; returns "Normal" when riskLevel is PASS; otherwise displays as "Primary Label: Secondary Label: Tertiary Label". For reference only — do not use this value for programmatic logic.
allLabelsarrayYesComplete list of risk labels.
riskDetailobjectNoRisk detail information.
auxInfoobjectYesAuxiliary information.
businessLabelsarrayNoBusiness label list.

frameDetail.allLabels Array Elements

ParameterTypeRequiredDescription
riskLevelstringNoRecognition result. Possible values: PASS, REVIEW, REJECT.
riskLabel1stringNoPrimary risk label.
riskLabel2stringNoSecondary risk label.
riskLabel3stringNoTertiary risk label.
riskDescriptionstringNoReturns "Normal" when riskLevel is PASS; otherwise "Primary Label: Secondary Label: Tertiary Label". For reference only.
probabilityfloatNoConfidence score. Value range: 0–1. Higher values indicate greater confidence.

frameDetail.riskDetail Object

ParameterTypeRequiredDescription
riskSourceint32YesRisk source. Possible values: 1000 — No risk, 1001 — Text risk, 1002 — Visual image risk.
face_numint32NoNumber of faces detected.
person_numint32NoNumber of persons detected.
facesarrayNoName and position information of politically sensitive persons in the image. When the face-type-multiface label is matched, the array contains multiple elements (up to 10; if more than 10, the top 10 by probability are selected).
objectsarrayNoObject information. Returns names and positions of identified objects or symbols in the image.
ocrTextobjectNoOCR text content recognized in the image. Present when the imgType request parameter includes IMGTEXTRISK or ADVERT.
matchedListsarrayNoMatched custom list information. Returned only when a customer-defined list is matched.
riskSegmentsarrayNoHigh-risk content segments. Present when the detected image contains political, terrorism, prohibited, competitor, or advertising law violations.
personsarrayNoName and position information of persons in the image. When the "person-multiple persons" label is matched, the array contains multiple elements (up to 10; if more than 10, the top 10 by probability are selected).

frameDetail.riskDetail.faces Array Elements

ParameterTypeRequiredDescription
idstringNoIdentifier. The same person at the same position has the same ID across different labels. If the same person appears n times in the image, n IDs are assigned.
namestringNoPerson name.
face_ratiofloatNoFace ratio. Range: 0–1. Higher values indicate a larger face area.
probabilityfloatNoConfidence score. Range: 0–1. Higher values indicate greater confidence.
locationarrayNoPerson position information. The array has four values representing the top-left and bottom-right coordinates. Example: [207, 522, 340, 567] — 207: top-left x, 522: top-left y, 340: bottom-right x, 567: bottom-right y.

frameDetail.riskDetail.objects Array Elements

ParameterTypeRequiredDescription
idstringNoObject or symbol identifier. The same object at the same position has the same ID across different labels.
namestringNoObject name.
probabilityfloatNoConfidence score. Range: 0–1. Higher values indicate greater confidence.
qrContentstringNoQR code URL recognized in the image.
locationarrayNoObject position information. The array has four values representing the top-left and bottom-right coordinates. Example: [207, 522, 340, 567].

frameDetail.riskDetail.ocrText Object

ParameterTypeRequiredDescription
textstringYesText recognized in the image.

frameDetail.riskDetail.matchedLists Array Elements

ParameterTypeRequiredDescription
namestringNoName of the matched list.
wordsarrayNoSensitive word information from the matched list.

frameDetail.riskDetail.matchedLists.words Array Elements

ParameterTypeRequiredDescription
wordstringNoThe matched sensitive word.
positionarrayNoPosition of the sensitive word.

frameDetail.riskDetail.riskSegments Array Elements

ParameterTypeRequiredDescription
segmentstringNoHigh-risk content segment.
positionarrayNoPosition of the high-risk content segment. Index starts from 0.

frameDetail.riskDetail.persons Array Elements

ParameterTypeRequiredDescription
idstringNoIdentifier. The same person has the same ID across different labels. If the same person appears n times in the image, n IDs are assigned.
person_ratiofloatNoPerson ratio. Range: 0–1. Higher values indicate a larger person area.
probabilityfloatNoConfidence score. Range: 0–1. Higher values indicate greater confidence.
locationarrayNoPerson position coordinates.

frameDetail.auxInfo Object

ParameterTypeRequiredDescription
beginProcessTimeint32YesProcessing start time (13-digit timestamp).
finishProcessTimeint32YesProcessing end time (13-digit timestamp).
detectTypeint32NoIndicates whether the captured frame was actually detected. Possible values (only returned when the detectStep request parameter is set): 1 — The captured frame was detected, 2 — The captured frame was not detected.
imgTimestringNoTime when the captured frame was taken (absolute time of the violation in the video stream).
roomstringNoRoom number.
similarityDedupint32NoAuxiliary parameter. Possible values (only returned when the similar frame deduplication feature changes the outer riskLevel from reject/review to pass; not returned in other cases): 1 — Similar frame deduplication feature is active.
strUserIdstringNoUser identifier for distinguishing violating users within a room. Unrelated to the userId request parameter; this is the individual stream user ID. Returned in the following cases: ZEGO stream moderation by room number, TRTC individual stream moderation, VOLC stream moderation, ALI stream moderation.
userIdint32NoAgora user account identifier. Only present in individual stream scenarios. The returned userId is the actual user ID in the room, unrelated to the uid request parameter.

frameDetail.businessLabels Array Elements

ParameterTypeRequiredDescription
businessLabel1stringYesPrimary business label.
businessLabel2stringYesSecondary business label.
businessLabel3stringYesTertiary business label.
businessDescriptionstringYesBusiness label description in the format "Primary Label: Secondary Label: Tertiary Label".
probabilityfloatYesConfidence score. Range: 0–1. Higher values indicate greater confidence.
confidenceLevelint32NoConfidence level. Range: 0–2. Higher values indicate greater confidence.
businessDetailobjectNoBusiness label details.

frameDetail.businessLabels.businessDetail Object

ParameterTypeRequiredDescription
face_numint32NoNumber of faces detected.
person_numint32NoNumber of persons detected.
facesarrayNoName and position information of politically sensitive persons in the image. Structure is the same as frameDetail.riskDetail.faces.
objectsarrayNoObject information. Structure is the same as frameDetail.riskDetail.objects.
personsarrayNoPerson information. Structure is the same as frameDetail.riskDetail.persons.

audioDetail — Audio Segment Risk Details

Returned when there are risky segments or when returnAllText=1.

ParameterTypeRequiredDescription
audioUrlstringYesAudio segment URL.
riskLevelstringYesRecognition result. Possible values: PASS — Normal, recommended to allow, REVIEW — Suspicious, recommended for manual review, REJECT — Violation, recommended to block.
riskLabel1stringYesPrimary risk label. Returns normal when riskLevel is PASS.
riskLabel2stringYesSecondary risk label. Empty when riskLevel is PASS.
riskLabel3stringYesTertiary risk label. Empty when riskLevel is PASS.
riskDescriptionstringYesLabel description. Returns "Hit custom list" when a user-defined list is matched; returns "Normal" when riskLevel is PASS; otherwise displays as "Primary Label: Secondary Label: Tertiary Label". For reference only — do not use this value for programmatic logic.
vadCodeint32YesWhether the segment is silent. 0 — Silent segment, 1 — Non-silent segment.
allLabelsarrayYesComplete list of risk labels.
riskDetailobjectNoRisk detail information for each segment.
contentstringNoText content recognized from the audio in the video stream. When returnPreText is 1 and the current audio segment is reject, returns 20 seconds of audio segment text (previous 10 seconds + current 10 seconds). Otherwise, returns only the current segment text.
preAudioUrlstringNoPrevious audio segment link. When returnPreAudio is 1 and the current audio segment is reject, returns a 20-second audio segment link (previous 10 seconds + current 10 seconds). Otherwise, not returned.
auxInfoobjectNoAuxiliary information.
businessLabelsarrayNoBusiness label list.

audioDetail.allLabels Array Elements

ParameterTypeRequiredDescription
riskLevelstringYesRecognition result. Possible values: PASS, REVIEW, REJECT.
riskLabel1stringYesPrimary risk label. Returns normal when riskLevel is PASS.
riskLabel2stringYesSecondary risk label. Empty when riskLevel is PASS.
riskLabel3stringYesTertiary risk label. Empty when riskLevel is PASS.
riskDescriptionstringYesRisk description. Returns "Normal" when riskLevel is PASS. Format: "Primary Risk Label: Secondary Risk Label: Tertiary Risk Label". Returns "Hit custom list" when a user-defined list is matched.

audioDetail.riskDetail Object

ParameterTypeRequiredDescription
riskSourceint32YesRisk source. Possible values: 1000 — No risk, 1001 — Text risk, 1002 — Visual image risk, 1003 — Audio voice risk.
audioTextstringNoText content recognized in the segment.
matchedListsarrayNoMatched custom list information. Returned only when a customer-defined list is matched.
riskSegmentsarrayNoHigh-risk content segments. Present when the detection contains political, terrorism, prohibited, competitor, or advertising law violations.

audioDetail.riskDetail.matchedLists Array Elements

ParameterTypeRequiredDescription
namestringNoName of the matched list.
wordsarrayNoSensitive word information from the matched list.

audioDetail.riskDetail.matchedLists.words Array Elements

ParameterTypeRequiredDescription
wordstringNoThe matched sensitive word.
positionarrayNoPosition of the high-risk content segment. Index starts from 0.

audioDetail.riskDetail.riskSegments Array Elements

ParameterTypeRequiredDescription
segmentstringNoHigh-risk content segment.
positionarrayNoPosition of the high-risk content segment. Index starts from 0.

audioDetail.auxInfo Object

ParameterTypeRequiredDescription
audioStartTimestringYesViolation content start time (absolute time).
audioEndTimestringYesViolation content end time (absolute time).
beginProcessTimeint32YesProcessing start time (13-digit timestamp).
finishProcessTimeint32YesProcessing end time (13-digit timestamp).
roomstringNoRoom number.
strUserIdstringNoUser identifier for distinguishing violating users within a room. Unrelated to the userId request parameter; this is the individual stream user ID. Returned in the following cases: ZEGO stream moderation by room number, TRTC individual stream moderation, VOLC stream moderation, ALI stream moderation.
userIdint32NoAgora user account identifier. Only present in individual stream scenarios. The returned userId is the actual user ID in the room, unrelated to the uid request parameter.

audioDetail.businessLabels Array Elements

ParameterTypeRequiredDescription
businessLabel1stringYesPrimary business label.
businessLabel2stringYesSecondary business label.
businessLabel3stringYesTertiary business label.
businessDescriptionstringYesBusiness label description in the format "Primary Label: Secondary Label: Tertiary Label".
probabilityfloatYesConfidence score. Range: 0–1. Higher values indicate greater confidence.
confidenceLevelint32NoConfidence level. Range: 0–2. Higher values indicate greater confidence.
riskDetailobjectNoRisk detail information.

audioDetail.businessLabels.riskDetail Object

ParameterTypeRequiredDescription
riskSourceint32YesRisk source. Possible values: 1000 — No risk, 1001 — Text risk, 1003 — Audio voice risk.
audioTextstringNoText content recognized in the segment.
matchedListsarrayNoMatched custom list information. Returned only when a customer-defined list is matched. Structure is the same as audioDetail.riskDetail.matchedLists.
riskSegmentsarrayNoHigh-risk content segments. Structure is the same as audioDetail.riskDetail.riskSegments.

tokenProfileLabels — Account Attribute Labels

Returned only when tokenId is provided and the label service is enabled.

ParameterTypeRequiredDescription
label1stringNoPrimary label.
label2stringNoSecondary label.
label3stringNoTertiary label.
descriptionstringNoLabel description.
timestampint32NoLabel timestamp. 13-digit Unix timestamp in milliseconds.

tokenRiskLabels — Account Risk Labels

Returned only when tokenId is provided and the label service is enabled.

ParameterTypeRequiredDescription
label1stringNoPrimary label.
label2stringNoSecondary label.
label3stringNoTertiary label.
descriptionstringNoLabel description.
timestampint32NoLabel timestamp. 13-digit Unix timestamp in milliseconds.

Stream End Callback Parameters

Returned only when returnFinishInfo is set to 1.

ParameterTypeRequiredDescription
requestIdstringYesDeepcleer unique request identifier.
messagestringYesCorresponds to code: 1100 — Success, 1901 — QPS limit exceeded, 1902 — Invalid parameters, 1903 — Service failure, 1904 — Stream count limit exceeded, 9101 — Unauthorized operation.
codeint32Yes1100 — Success, 1901 — QPS limit exceeded, 1902 — Invalid parameters, 1903 — Service failure, 1904 — Stream count limit exceeded, 9101 — Unauthorized operation.
riskLevelstringYesOverall stream disposition recommendation returned when the callback ends. Possible values: PASS — Normal, recommended to allow, REVIEW — Suspicious, recommended for manual review, REJECT — Violation, recommended to block.
statCodeint32YesCallback status code. Present when returnFinishInfo is 1. Values: 0 — Moderation result callback, 1 — Stream end result callback.
contentTypeint32YesDistinguishes between audio and image callback end. Possible values: 1 — Image moderation end callback, 2 — Audio moderation end callback.
pullStreamSuccessboolYesWhether the stream pull was successful. Possible values: true — Stream pull succeeded, false — Stream pull failed. The stream pull is considered failed if not even a single captured frame was obtained successfully.
auxInfoobjectYesAuxiliary information.

Stream End auxInfo Object

ParameterTypeRequiredDescription
streamTimeint32YesStream moderation duration. Returned in the last callback after the stream ends. Represents the moderation duration. When interval moderation logic is applied, this may differ from the actual stream duration.
requestParamsobjectNoReturns all fields from the data request parameter. Returned when contentType is 2.
detailobjectNoDetail information. Returned when contentType is 1.

Stream End auxInfo.detail Object

ParameterTypeRequiredDescription
requestParamsobjectYesReturns all fields from the data request parameter

Example

Request Example

{
  "accessKey": "*********",
  "appId": "defaulttest",
  "audioBusinessType": "SING_LANGUAGE",
  "audioCallback": "http://www.xxx.top/callbackxxx",
  "audioType": "POLITY_EROTIC_ADVERT_MOAN",
  "data": {
    "detectFrequency": 10,
    "detectStep": 1,
    "extra": {
      "passThrough": {
        "passThrough1": "111",
        "passThrough2": "222",
        "passThrough3": "333"
      }
    },
    "ip": "123.171.34.4",
    "lang": "zh",
    "returnAllImg": 1,
    "returnAllText": 1,
    "returnPreAudio": 1,
    "returnPreText": 1,
    "room": "5e1854a6a0a79d0001a09bc3",
    "streamType": "NORMAL",
    "tokenId": "123",
    "url": "http://rtmp.xxxx.cn/live/3637778raLSXdOdu.flv"
  },
  "eventId": "VIDEOSTREAM",
  "imgBusinessType": "BODY_FOOD_3CPRODUCTSLOGO",
  "imgCallback": "http://www.xxx.top/callbackxxx",
  "imgType": "POLITY_EROTIC_ADVERT"
}

Return Example

{
  "code": 1100,
  "message": "Success",
  "requestId": "66fb85e3149bb9e13d6c72161cc6c6cf"
}

Frame Capture Callback Example

{
  "auxInfo": {
    "passThrough": {
      "passThrough1": "111",
      "passThrough2": "222",
      "passThrough3": "333"
    }
  },
  "code": 1100,
  "contentType": 1,
  "frameDetail": {
    "allLabels": [
      {
        "riskDescription": "Involvement in politics: Involvement in politics: Involvement in politics",
        "riskLabel1": "politics",
        "riskLabel2": "shezheng",
        "riskLabel3": "shezheng",
        "riskLevel": "REJECT"
      }
    ],
    "auxInfo": {
      "beginProcessTime": 1639825248361,
      "detectType": 1,
      "finishProcessTime": 1639825248809,
      "imgTime": "2021-12-18 19:00:48.375",
      "room": "5e1854a6a0a79d0001a09bc3"
    },
    "businessLabels": [],
    "imgUrl": "http://bj.cos.ap-beijing.xxx.com/image/1639825145166_vs130_1639825248361471656.jpg",
    "riskDescription": "Involvement in politics: Involvement in politics: Involvement in politics",
    "riskDetail": {
      "ocrText": {
        "text": "Page 4 (ban) Page 5 (violence)"
      },
      "riskSource": 1002
    },
    "riskLabel1": "politics",
    "riskLabel2": "shezheng",
    "riskLabel3": "shezheng",
    "riskLevel": "REJECT"
  },
  "message": "Success",
  "requestId": "1639825145166_vs130_1639825248361471656"
}

Audio Clip Callback Example

{
  "audioDetail": {
    "allLabels": [
      {
        "riskDescription": "Political involvement: Leader One: Leader One",
        "riskLabel1": "politics",
        "riskLabel2": "yihaolingdao",
        "riskLabel3": "yihaolingdao",
        "riskLevel": "REJECT"
      }
    ],
    "audioText": "Emphasized in important instructions that vocational education has broad prospects in the new journey of comprehensively building a modern socialist country. General Secretary of the CPC Central Committee and President of the State.",
    "audioUrl": "http://bj-voice-mp3-1251671073.cos.ap-beijing.myqcloud.com/POST_VIDEOSTREAM%2FPOST_VIDEOSTREAM_AUDIO%2FMP3%2F20221027%2Fy28f8a4f1264085b321f12223wqed1121retestpvvvvv44321we12_3.mp3?q-sign-algorithm=sha1&q-ak=AKIDg9LHyOYSAcmfHekZ6NN6XidHflbASUHn&q-sign-time=1666876123%3B1669468123&q-key-time=1666876123%3B1669468123&q-header-list=host&q-url-param-list=&q-signature=f32da45be186fd4a8ed063e499d3f4e0f4f5fc19",
    "auxInfo": {
      "audioEndTime": "2022-10-27 21:08:42",
      "audioStartTime": "2022-10-27 21:08:32",
      "beginProcessTime": 1666876123332,
      "finishProcessTime": 1666876123893,
      "room": "y1123413312ewe24sv2"
    },
    "businessLabels": [],
    "content": "",
    "preAudioUrl": "http://bj-voice-mp3-1251671073.cos.ap-beijing.myqcloud.com/POST_VIDEOSTREAM%2FPOST_VIDEOSTREAM_AUDIO%2FMP3%2F20221027%2Fy28f8a4f1264085b321f12223wqed1121retestpvvvvv44321we12_3_pre.mp3?q-sign-algorithm=sha1&q-ak=AKIDg9LHyOYSAcmfHekZ6NN6XidHflbASUHn&q-sign-time=1666876123%3B1669468123&q-key-time=1666876123%3B1669468123&q-header-list=host&q-url-param-list=&q-signature=449fdcab8a3c11d5132f43f78c61e6663f5c08d6",
    "riskDescription": "Political involvement: Leader One: Leader One",
    "riskDetail": {
      "audioText": "Stressed in important instructions that vocational education has broad prospects in the new journey of comprehensively building a modern socialist country. General Secretary of the CPC Central Committee and President of the State.",
      "riskSource": 1001
    },
    "riskLabel1": "politics",
    "riskLabel2": "yihaolingdao",
    "riskLabel3": "yihaolingdao",
    "riskLevel": "REJECT"
  },
  "code": 1100,
  "contentType": 2,
  "message": "Success",
  "requestId": "y28f8a4f1264085b321f12223wqed1121retestpvvvvv44321we12_3",
  "statCode": 0
}

Stream End Callback Example

{
  "auxInfo": {
    "streamTime": 70
  },
  "code": 1100,
  "contentType": 1,
  "detail": {
    "requestParams": {
      "detectFrequency": 10,
      "detectStep": 1,
      "extra": {
        "passThrough": {
          "passThrough1": "111",
          "passThrough2": "222",
          "passThrough3": "333"
        }
      },
      "ip": "123.171.34.4",
      "lang": "zh",
      "returnAllImg": 1,
      "returnAllText": 1,
      "returnPreAudio": 1,
      "returnPreText": 1,
      "room": "5e1854a6a0a79d0001a09bc3",
      "streamType": "NORMAL",
      "tokenId": "123",
      "url": "http://rtmp.xxxx.cn/live/3637778raLSXdOdu.flv"
    }
  },
  "message": "Success",
  "pullStreamSuccess": true,
  "requestId": "5515ce1f9b474a6c4a3d79a8dfcaeaf4",
  "riskLevel": "PASS",
  "statCode": 1
}