Request API

Submit a video stream for real-time content moderation to detect regulatory and business-specific risks in frames and audio.

Submit a video stream for real-time content moderation to detect regulatory risks and business-specific content in both captured frames and audio segments.

Frame detection identifies: political content, pornography, advertising, violence & terrorism, and other regulatory risks. It can also recognize faces, logos, flora & fauna, and other business-specific content based on your use case.

Audio detection identifies: political content, pornography, advertising, and other regulatory risks. It can also recognize gender, voice timbre, minors, and other business-specific content based on your use case.

API Description

Submit video stream information for moderation. Once stable stream pulling begins, detection results are continuously sent to the specified callback URL.

Requirements

ItemSpecification
ProtocolHTTP or HTTPS
MethodPOST
EncodingUTF-8
FormatAll request and response parameters use JSON

Supported Protocols

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

Callback Mechanism

When the user receives a push result and returns an HTTP status code of 200, the push is considered successful. Otherwise, the system retries (up to the maximum retry count). Retry intervals in seconds: [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60]. After 12 failed attempts, no further retries are made.

Stream Pull Retry Mechanism

To prevent stream pull failures caused by network issues, the ISHUMEI video stream service has a built-in retry mechanism:

  • Standard streams / ZEGO / TRTC / Volcano streams: 12 retries total, each lasting 5 minutes, with intervals of [5, 10, 15, 20, ..., 60] seconds. For example, ISHUMEI first attempts to pull the stream for 5 minutes continuously. If unsuccessful, it waits 5 seconds then pulls for another 5 minutes. If still unsuccessful, it waits 10 seconds then pulls for another 5 minutes, and so on.
  • Agora streams: No retry. The connection is closed after a 5-minute pull timeout.

Timeout

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

Request

Request URL

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

Request Parameters

ParameterTypeRequiredMax LengthDescription
accessKeystringYes20Company key for authentication, provided by ISHUMEI when the service is activated.
eventIdstringYes64Event identifier. The value must be agreed upon with ISHUMEI in advance.
appIdstringYes64Application identifier. This field is strictly validated and the value must be agreed upon with ISHUMEI in advance.
imgTypestringNo64Regulatory detection types for video stream frames. At least one of imgType or imgBusinessType is required. See Image Detection Types.
audioTypestringNo64Regulatory detection types for video stream audio. At least one of audioType or audioBusinessType is required. See Audio Detection Types.
imgBusinessTypestringNo128Business detection types for video stream frames. At least one of imgType or imgBusinessType is required. See business label types for available values.
audioBusinessTypestringNo128Business detection types for video stream audio. At least one of audioType or audioBusinessType is required. See Audio Business Types.
imgCallbackstringYes1024Image callback URL. Frame capture detection results from the video stream are sent to this URL.
audioCallbackstringNo1024Audio callback URL. Audio segment detection results from the video stream are sent to this URL. Required when audio detection is needed.
dataobjectYesRequest data content. Maximum size: 1 MB. See data Object.

Image Detection Types

Combine multiple types with underscores (e.g., POLITY_QRCODE_ADVERT).

ValueDescription
POLITYPolitical content detection
EROTICPornographic & sexually suggestive content detection
VIOLENTViolence, terrorism & prohibited content detection
QRCODEQR code detection
ADVERTAdvertising detection
IMGTEXTRISKImage text violation detection

Audio Detection Types

Combine multiple types with underscores (e.g., POLITY_EROTIC).

ValueDescription
POLITYPolitical content detection
EROTICPornographic content detection
ADVERTAdvertising detection
BANProhibited content detection
VIOLENTViolence & terrorism detection
DIRTYAbusive language detection
ADLAWAdvertising law violation detection
MOANMoaning detection
AUDIOPOLITICALTop leader voiceprint detection
ANTHENNational anthem detection
BANEDAUDIOProhibited songs detection
NONEDo not detect audio

Audio Business Types

Combine multiple types with underscores. To detect timbre, singing, or language, you must also include GENDER.

ValueDescription
SINGSinging detection
LANGUAGELanguage detection (Chinese, English, Cantonese, Tibetan, Uyghur, Korean, Mongolian, Other)
MINORMinor detection
GENDERGender detection
TIMBREVoice timbre detection
VOICEVoice attributes
AUDIOSCENEAudio scene detection
AGEAge detection
APPNAMEApp name detection

data Object

ParameterTypeRequiredMax LengthDescription
streamTypestringYesVideo stream type. See Stream Types.
tokenIdstringYes64User account identifier. Pass the user ID for risk detection of spam, advertising, and other behavioral dimensions.
urlstringNo600URL of the standard video stream to be moderated.
anchorNamestringNoAnchor/host name. Typically used for manual review purposes.
audioDetectStepint32NoAudio moderation step size. Integer from 1–36. A value of 1 skips one 10-second audio segment, 2 skips two, and so on. When not set, all audio content is moderated.
detectFrequencyint32NoFrame capture interval in seconds (1–60). Decimals are rounded down; values less than 1 are treated as 1. Default: 3 seconds.
detectStepint32NoFrame image detection step size. Only one frame per step is actually detected. Value ≥ 1. When not set, all captured frames are moderated.
deviceIdstringNo128ISHUMEI device fingerprint identifier, generated by the ISHUMEI SDK for user behavior analysis.
genderstringNoUser gender. Suggested values: male, female, ambiguity.
imgBusinessDetectStepint32NoImage business label detection step size. Only one frame per step is detected for imgBusinessType. Value ≥ 1. Default: 1 (all frames are checked for business labels).
imgCompareBasestringNo1024Base image URL for face comparison. Required when businessType includes FACECOMPARE. Supported formats: jpg, jpeg, png, webp, gif, tiff, tif, heif. Recommended minimum resolution: 256×256. Animated image formats are not supported for base images.
ipstringNo64Client public IP address for IP-based user behavior analysis.
langstringNoLanguage type for text detection in captured frames and audio segments. Default: zh. See Supported Languages.
levelint32NoUser level. Different interception strategies can be configured per level. See User Levels.
liveCoverstringNoLive stream cover image. Typically used for manual review purposes.
liveTitlestringNoLive stream title. Typically used for manual review purposes.
receiveTokenIdstringNo64Message receiver's tokenId. Alphanumeric string with underscores and hyphens, up to 64 characters.
returnAllImgint32NoControls which frames are returned in callbacks. 0 (default): return only non-pass risk level frames. 1: return all risk level frames.
returnAllTextint32NoControls which audio results are returned in callbacks. 0 (default): return only non-pass risk level audio segments and text. 1: return all risk level audio segments and text.
returnFinishInfoint32NoStream end callback notification. 0 (default): do not send end notification. 1: send end notification when moderation finishes; callback includes statCode.
returnPreAudioint32NoWhether to return the previous audio segment. 1: preAudioUrl contains a 20-second audio link (previous 10s + current 10s) when the current segment is rejected. 0: do not return previous segment info.
returnPreTextint32NoWhether to return the previous audio segment text. 1: content contains 20 seconds of text (previous 10s + current 10s) when the current segment is rejected. 0: do not return previous segment text.
roomstringNo64Live room / game room ID. Different strategies can be applied per room.
streamNamestringNo64Video stream name. Displayed in the dashboard. Recommended to provide.
agoraParamobjectNoAgora recording parameters. Required when streamType is AGORA. See agoraParam.
aliParamobjectNoAlibaba Cloud recording parameters. Required when streamType is ALI. See aliParam.
trtcParamobjectNoTencent TRTC recording parameters. Required when streamType is TRTC. See trtcParam.
volcParamobjectNoVolcano Engine recording parameters. Required when streamType is VOLC. See volcParam.
zegoParamobjectNoZEGO recording parameters. Required when streamType is ZEGO. See zegoParam.
extraobjectNoExtra parameters.
extra.passThroughobjectNo1024Client pass-through field. ISHUMEI does not process this field; it is returned as-is with the result.
acceptLangstringNoLanguage for returned labels. zh (default): Chinese. en: English.

Stream Types

ValueDescription
NORMALStandard stream URL. Supports RTMP, RTMPS, HLS, HTTP, HTTPS protocols.
AGORAAgora moderation.
TRTCTencent TRTC moderation.
ZEGOZEGO moderation.
VOLCVolcano Engine moderation.
ALIAlibaba Cloud moderation.
💰

When using an RTC SDK recording solution, additional recording fees may be incurred on the RTC provider side. Consult the relevant RTC provider for specific pricing.

Supported Languages

ValueLanguage
zhChinese (default)
enEnglish
arArabic
hiHindi
esSpanish
frFrench
ruRussian
ptPortuguese
idIndonesian
deGerman
jaJapanese
trTurkish
viVietnamese
itItalian
thThai
tlFilipino
koKorean
msMalay
autoAutomatic language detection (contact ISHUMEI to enable interception standards)

User Levels

ValueDescription
0Lowest-level user (e.g., newly registered, completely inactive, or level-0 users)
1Lower-level user (e.g., low activity or low-level users)
2Mid-level user (e.g., moderately active or mid-level users)
3Higher-level user (e.g., highly active or high-level users)
4Highest-level user (e.g., paying users, VIP users)

agoraParam Object

Required when streamType is AGORA.

ParameterTypeRequiredMax LengthDescription
appIdstringYes64Application identifier provided by Agora.
channelstringYes64Channel name provided by Agora.
channelProfileint32No32Channel mode. 0 (default): Communication (any user can speak freely). 1: Live broadcast (host and audience roles).
enableH265SupportbooleanNoWhether to support H.265 video stream recording. false (default): do not support. true: support H.265.
enableIntraRequestbooleanNoWhether to enable keyframe requests. Default: true (improves audio/video experience on weak networks). Set to false to enable seeking in single-stream recordings. When true, single-stream recordings cannot seek to specific positions.
subscribeModestringNoSubscription mode. AUTO: automatically subscribe to all streams in the room (default). UNTRUSTED: only subscribe to users in untrustedUserIdList. TRUSTED: subscribe to all users except those in trustedUserIdList.
tokenstringNo64Authentication token for high-security scenarios. See Agora documentation for generation details. Set the token validity period longer than the channel duration. The maximum Agora token validity is 24 hours. For channels lasting longer than 24 hours, set returnFinishInfo to 1 and re-submit the channel with a new token when receiving an end callback (statCode = 1) due to token expiration.
uidint32No6432-bit unsigned integer. Required when token is provided — must match the user ID used to generate the token. This UID must not belong to an actual user in the room.
trustedUserIdListarrayNoTrusted user list. Effective when subscribeMode is TRUSTED. Cannot be empty. ISHUMEI will not subscribe to streams from these users. Comma-separated UID array (e.g., [1,2]), up to 17 users.
untrustedUserIdListarrayNoUntrusted user list. Effective when subscribeMode is UNTRUSTED. Cannot be empty. ISHUMEI will only subscribe to streams from these users. Comma-separated UID array (e.g., [1,2]), up to 17 users.

aliParam Object

Required when streamType is ALI.

ParameterTypeRequiredMax LengthDescription
roomstringYes64Room ID. Must exactly match the channelID used to generate the token. The service pulls and records streams per room. room is the unique identifier — duplicate room values will not trigger duplicate stream pulls.
tokenstringYes64Token for joining the channel. See Alibaba Cloud documentation for generation details. A new token must be generated for each moderation request.
userIdint32No32Alibaba Cloud user account identifier.

trtcParam Object

Required when streamType is TRTC.

ParameterTypeRequiredMax LengthDescription
sdkAppIdint32Yes64SDK App ID provided by Tencent.
strRoomIdstringYes128Room number. Only allows letters (a-zA-Z), digits (0-9), underscores, and hyphens. When both strRoomId and roomId are provided, roomId takes priority.
userIdstringYes32User ID assigned to the recording client. Only allows letters (a-zA-Z), digits (0-9), underscores, and hyphens. Max 32 characters.
userSigstringYes128Authentication signature for the recording userId, equivalent to a login password.
appSceneint32Yes1Application scenario. 0: video call (default). 1: video live broadcast. See Tencent documentation.
demoSencesint32YesRecording type. 2: separate stream recording. 4: mixed stream recording.
roomIdint32No10Room number (1–4294967294). Either roomId or strRoomId is required. When both are provided, roomId takes priority. A maximum of 8 users can be moderated per room.

volcParam Object

Required when streamType is VOLC.

ParameterTypeRequiredMax LengthDescription
appIdstringYes64Application identifier provided by Volcano Engine.
roomIdstringYes128Room number.
tokenstringYes64Authentication signature for the recording userId, equivalent to a login password.
userIdstringYes32User ID assigned to the recording client. Only allows letters (a-zA-Z), digits (0-9), underscores, and hyphens. Max 32 characters.

zegoParam Object

Required when streamType is ZEGO.

ParameterTypeRequiredMax LengthDescription
roomIdstringYes64ZEGO room number.
tokenIdstringYes64ZEGO authentication token (identify_token). See ZEGO documentation for generation details. tokenId is a unique identifier — a new token must be generated for each moderation request.

Response

Response Parameters

ParameterTypeRequiredDescription
requestIdstringYesUnique ISHUMEI request identifier.
codeint32YesResponse code. See Response Codes.
messagestringYesResponse message corresponding to the code. See Response Codes.
detailobjectNoDetail information.
detail.dupRequestIdstringNoDuplicate requestId. Returned when errorcode is 1001 (duplicate stream push). Use this dupRequestId to call the close stream API if the original requestId was not received.
detail.errorcodeint32No1001: duplicate stream push.

Response Codes

CodeMessageDescription
1100SuccessThe request completed successfully.
1901QPS limit exceededThe request rate limit has been exceeded.
1902Invalid parametersOne or more request parameters are invalid.
1903Service failureAn internal service error occurred.
1904Stream count limit exceededThe maximum number of concurrent streams has been reached.
9101Unauthorized operationThe provided accessKey does not have permission for this operation.

Stream Segment Callback Parameters

ℹ️

Parameters other than code, message, and requestId are only guaranteed to be returned when code is 1100.

ParameterTypeRequiredDescription
requestIdstringYesUnique ISHUMEI request identifier.
codeint32YesResponse code. See Response Codes.
messagestringYesResponse message corresponding to the code. See Response Codes.
statCodeint32NoCallback status code. 0: moderation result callback. 1: stream end result callback.
contentTypeint32NoDistinguishes between audio and image callbacks. 1: image callback. 2: audio callback.
auxInfoobjectNoAuxiliary information. Contains the passThrough field from the request data.extra.
auxInfo.passThroughobjectNoClient pass-through field returned as-is.
frameDetailobjectNoFrame image risk details. Returned when risky frames exist or returnAllImg=1. See frameDetail Object.
audioDetailobjectNoAudio segment risk details. Returned when risky segments exist or returnAllText=1. See audioDetail Object.
tokenProfileLabelsarrayNoAccount attribute labels. Returned only when tokenId is provided and the labeling service is enabled. See Token Labels.
tokenRiskLabelsarrayNoAccount risk labels. Returned only when tokenId is provided and the labeling service is enabled. See Token Labels.

frameDetail Object

ParameterTypeRequiredDescription
imgUrlstringYesURL of the captured frame image.
riskLevelstringYesRisk level. PASS: normal, REVIEW: suspicious, REJECT: violation.
riskLabel1stringYesLevel 1 risk label. Returns normal when riskLevel is PASS.
riskLabel2stringYesLevel 2 risk label. Empty when riskLevel is PASS.
riskLabel3stringYesLevel 3 risk label. Empty when riskLevel is PASS.
riskDescriptionstringYesRisk description. Returns "Normal" when riskLevel is PASS. Format: "Level 1: Level 2: Level 3". Returns "Hit custom list" when a user-defined list is matched. For reference only — do not use for programmatic logic.
allLabelsarrayYesList of all risk labels. See Frame allLabels.
auxInfoobjectYesFrame auxiliary information. See Frame auxInfo.
riskDetailobjectYesRisk detail information. See Frame riskDetail.
businessLabelsarrayNoBusiness label list. See Frame businessLabels.

Frame allLabels

Each element in the allLabels array:

ParameterTypeRequiredDescription
riskLevelstringNoRisk level: PASS, REVIEW, or REJECT.
riskLabel1stringNoLevel 1 risk label.
riskLabel2stringNoLevel 2 risk label.
riskLabel3stringNoLevel 3 risk label.
riskDescriptionstringNoRisk description. For reference only — do not use for programmatic logic.
probabilityfloatNoConfidence score between 0 and 1. Higher values indicate greater confidence.
riskDetailobjectNoRisk detail information. See Frame riskDetail.

Frame auxInfo

ParameterTypeRequiredDescription
beginProcessTimeint32YesProcessing start time (13-digit timestamp).
finishProcessTimeint32YesProcessing end time (13-digit timestamp).
detectTypeint32NoWhether the frame was actually detected. Only returned when detectStep is set. 1: frame was detected. 2: frame was not detected.
imgTimestringNoAbsolute timestamp when the frame violation occurred.
roomstringNoRoom number.
similarityDedupint32NoReturned only when the similar frame deduplication feature changes the outer riskLevel from reject/review to pass. Value 1 indicates deduplication was applied.
strUserIdstringNoUser identifier for distinguishing violating users within a room. Unrelated to the request userId. Returned for: ZEGO room-based moderation, TRTC separate stream moderation, VOLC moderation, ALI moderation.
userIdint32NoAgora user account identifier. Only present in separate stream scenarios. This is the actual user ID in the room, unrelated to the request uid.

Frame riskDetail

ParameterTypeRequiredDescription
riskSourceint32YesRisk source: 1000 (no risk), 1001 (text risk), 1002 (visual image risk).
face_numint32NoNumber of faces detected.
person_numint32NoNumber of persons detected.
facesarrayNoNames and positions of politically sensitive individuals in the image. Up to 10 entries (highest probability selected if more than 10). See Face Object.
objectsarrayNoDetected objects/logos with names and positions. See Object Info.
ocrTextobjectNoOCR text content. Present when imgType includes IMGTEXTRISK or ADVERT. Contains text (string): recognized text in the image.
matchedListsarrayNoMatched custom list information. Returned only when a custom list is hit. See Matched Lists.
riskSegmentsarrayNoHigh-risk content segments. Present when political, terrorism, prohibited, competitive, or advertising law content is detected. See Risk Segments.
personsarrayNoPerson names and positions. When "person - multiple persons" label is hit, the array contains multiple elements (up to 10, highest probability selected). See Person Object.

Face Object

ParameterTypeRequiredDescription
idstringNoIdentifier. The same person at the same position has the same ID across different labels. If the same person appears N times, N IDs are assigned.
namestringNoPerson name.
face_ratiofloatNoFace-to-image ratio (0–1). Higher values indicate a larger face proportion.
probabilityfloatNoConfidence score (0–1).
locationarrayNoFace position coordinates [x1, y1, x2, y2] representing the top-left and bottom-right corners. Example: [207, 522, 340, 567] where 207=top-left X, 522=top-left Y, 340=bottom-right X, 567=bottom-right Y.

Object Info

ParameterTypeRequiredDescription
idstringNoObject/logo identifier. The same object at the same position has the same ID across different labels.
namestringNoObject name.
probabilityfloatNoConfidence score (0–1).
qrContentstringNoQR code URL detected in the image.
locationarrayNoObject position coordinates [x1, y1, x2, y2] representing the top-left and bottom-right corners.

Matched Lists

ParameterTypeRequiredDescription
namestringNoName of the matched list.
wordsarrayNoSensitive word information from the matched list.
words[].wordstringNoThe matched sensitive word.
words[].positionarrayNoPosition of the sensitive word.

Risk Segments

ParameterTypeRequiredDescription
segmentstringNoHigh-risk content segment.
positionarrayNoPosition of the high-risk content segment (0-indexed).

Person Object

ParameterTypeRequiredDescription
idstringNoIdentifier. The same person has the same ID across different labels. If the same person appears N times, N IDs are assigned.
person_ratiofloatNoPerson-to-image ratio (0–1). Higher values indicate a larger person proportion.
probabilityfloatNoConfidence score (0–1).
locationarrayNoPerson position coordinates.

Frame businessLabels

Each element in the businessLabels array:

ParameterTypeRequiredDescription
businessLabel1stringYesLevel 1 business label.
businessLabel2stringYesLevel 2 business label.
businessLabel3stringYesLevel 3 business label.
businessDescriptionstringYesBusiness label description. Format: "Level 1: Level 2: Level 3".
probabilityfloatYesConfidence score (0–1).
confidenceLevelint32NoConfidence level (0–2). Higher values indicate greater confidence.
businessDetailobjectNoBusiness label details. May contain face_num, person_num, faces, objects, and persons with the same structure as described in Frame riskDetail.

audioDetail Object

ParameterTypeRequiredDescription
audioUrlstringYesURL of the audio segment.
riskLevelstringYesRisk level: PASS, REVIEW, or REJECT.
riskLabel1stringYesLevel 1 risk label. Returns normal when riskLevel is PASS.
riskLabel2stringYesLevel 2 risk label. Empty when riskLevel is PASS.
riskLabel3stringYesLevel 3 risk label. Empty when riskLevel is PASS.
riskDescriptionstringYesRisk description. For reference only — do not use for programmatic logic.
vadCodeint32YesWhether this is a silent segment. 0: silent. 1: non-silent.
allLabelsarrayYesList of all risk labels. See Audio allLabels.
audioTextstringNoRecognized text content of the current audio segment.
contentstringNoAudio text content. When returnPreText is 1 and the current segment is rejected, contains 20 seconds of text (previous 10s + current 10s). Otherwise, contains only the current segment text.
preAudioUrlstringNoPrevious audio segment URL. When returnPreAudio is 1 and the current segment is rejected, contains a 20-second audio link (previous 10s + current 10s). Otherwise, not returned.
auxInfoobjectNoAudio auxiliary information. See Audio auxInfo.
businessLabelsarrayNoBusiness label list. See Audio businessLabels.

Audio allLabels

Each element in the allLabels array:

ParameterTypeRequiredDescription
riskLevelstringYesRisk level: PASS, REVIEW, or REJECT.
riskLabel1stringYesLevel 1 risk label. Returns normal when riskLevel is PASS.
riskLabel2stringYesLevel 2 risk label. Empty when riskLevel is PASS.
riskLabel3stringYesLevel 3 risk label. Empty when riskLevel is PASS.
riskDescriptionstringYesRisk description. For reference only — do not use for programmatic logic.
riskDetailobjectNoRisk detail information. See Audio riskDetail.

Audio riskDetail

ParameterTypeRequiredDescription
riskSourceint32YesRisk source: 1000 (no risk), 1001 (text risk), 1002 (visual image risk), 1003 (audio voice risk).
audioTextstringNoRecognized text content of this segment.
matchedListsarrayNoMatched custom list information. See Matched Lists.
riskSegmentsarrayNoHigh-risk content segments. See Risk Segments.

Audio auxInfo

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. Returned for: ZEGO room-based moderation, TRTC separate stream moderation, VOLC moderation, ALI moderation.
userIdint32NoAgora user account identifier. Only present in separate stream scenarios.
passThroughobjectNoClient pass-through field returned as-is.

Audio businessLabels

Each element in the businessLabels array:

ParameterTypeRequiredDescription
businessLabel1stringYesLevel 1 business label.
businessLabel2stringYesLevel 2 business label.
businessLabel3stringYesLevel 3 business label.
businessDescriptionstringYesBusiness label description. Format: "Level 1: Level 2: Level 3".
probabilityfloatYesConfidence score (0–1).
confidenceLevelint32NoConfidence level (0–2). Higher values indicate greater confidence.
riskDetailobjectNoRisk detail information. See Audio riskDetail.

Token Labels

Both tokenProfileLabels and tokenRiskLabels share the same structure:

ParameterTypeRequiredDescription
label1stringNoLevel 1 label.
label2stringNoLevel 2 label.
label3stringNoLevel 3 label.
descriptionstringNoLabel description.
timestampint32NoLabel timestamp. 13-digit Unix timestamp in milliseconds.

Stream End Callback Parameters

Returned only when returnFinishInfo is 1.

ParameterTypeRequiredDescription
requestIdstringYesUnique ISHUMEI request identifier.
codeint32YesResponse code. See Response Codes.
messagestringYesResponse message corresponding to the code. See Response Codes.
riskLevelstringYesOverall stream disposition recommendation at the end of moderation. PASS: normal, REVIEW: suspicious, REJECT: violation.
statCodeint32YesCallback status code. 0: moderation result callback. 1: stream end result callback.
contentTypeint32YesDistinguishes callback end type. 1: image moderation end callback. 2: audio moderation end callback.
pullStreamSuccessboolYesWhether stream pulling was successful. true: success. false: failure (no frames were captured successfully).
auxInfoobjectYesAuxiliary information.
auxInfo.streamTimeint32YesStream moderation duration in seconds. Returned on the final callback after the stream ends. Represents the total moderation time (may differ from the actual stream duration if interval-based moderation is used).
requestParamsobjectNoReturns all fields from the request data parameter. Returned when contentType is 2.
detailobjectNoDetail information. Returned when contentType is 1.
detail.requestParamsobjectYesReturns all fields from the request data parameter.

Examples

Request Example

{
  "accessKey": "YOUR_ACCESS_KEY",
  "appId": "defaulttest",
  "audioBusinessType": "SING_LANGUAGE",
  "audioCallback": "http://www.example.com/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.example.com/live/3637778raLSXdOdu.flv"
  },
  "eventId": "VIDEOSTREAM",
  "imgBusinessType": "BODY_FOOD_3CPRODUCTSLOGO",
  "imgCallback": "http://www.example.com/callbackxxx",
  "imgType": "POLITY_EROTIC_ADVERT"
}

Response Example

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

Frame Callback Example

{
  "auxInfo": {
    "passThrough": {
      "passThrough1": "111",
      "passThrough2": "222",
      "passThrough3": "333"
    }
  },
  "code": 1100,
  "contentType": 1,
  "frameDetail": {
    "allLabels": [
      {
        "riskDescription": "Politics: Political: Political",
        "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://example.com/image/frame_1639825248361.jpg",
    "riskDescription": "Politics: Political: Political",
    "riskDetail": {
      "ocrText": {
        "text": "Sample OCR text content"
      },
      "riskSource": 1002
    },
    "riskLabel1": "politics",
    "riskLabel2": "shezheng",
    "riskLabel3": "shezheng",
    "riskLevel": "REJECT"
  },
  "message": "Success",
  "requestId": "1639825145166_vs130_1639825248361471656"
}

Audio Callback Example

{
  "audioDetail": {
    "allLabels": [
      {
        "riskDescription": "Politics: Top leader: Top leader",
        "riskLabel1": "politics",
        "riskLabel2": "yihaolingdao",
        "riskLabel3": "yihaolingdao",
        "riskLevel": "REJECT"
      }
    ],
    "audioText": "Recognized audio text content...",
    "audioUrl": "http://example.com/audio_segment.mp3",
    "auxInfo": {
      "audioEndTime": "2022-10-27 21:08:42",
      "audioStartTime": "2022-10-27 21:08:32",
      "beginProcessTime": 1666876123332,
      "finishProcessTime": 1666876123893,
      "room": "y1123413312ewe24sv2"
    },
    "businessLabels": [],
    "content": "Recognized audio text content including previous and current segments...",
    "preAudioUrl": "http://example.com/audio_segment_pre.mp3",
    "riskDescription": "Politics: Top leader: Top leader",
    "riskDetail": {
      "audioText": "Recognized audio text content...",
      "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.example.com/live/3637778raLSXdOdu.flv"
    }
  },
  "message": "Success",
  "pullStreamSuccess": true,
  "requestId": "5515ce1f9b474a6c4a3d79a8dfcaeaf4",
  "riskLevel": "PASS",
  "statCode": 1
}