Submit a live task
Update:
Submit a URL live stream or a ZEGO, Agora, or TRTC room/channel for moderation. Project policy determines whether images, audio, or both are checked.
POSThttps://vsafe.ilivedata.com/api/v1/livevideo/check/submit
Request format
Send a UTF-8 encoded JSON body.
Request header
Required
Description
Content-Type
Yes
application/json; charset=UTF-8
Accept
Recommended
application/json
For authentication headers and signing rules, see Request signature in the Help Center. Use the submitting project when querying or stopping a task.
Live video requirements
- Supported input types: URL streams and RTC rooms/channels; BASE64 is not supported
- Supported streaming protocols: rtp, rtmp, rtmps, mmsh, mmst, hls, http, tcp, https (subject to the conditions below). For hls, use an http/https playlist URL
- Protocol conditions: rtp requires a media payload that can be identified without an additional SDP session description; tcp must carry an automatically detectable media container. Validate network and port accessibility in the deployment and stream reception for both protocols before use. The API does not accept srtp decryption parameters, so direct access to encrypted srtp streams is not currently supported
- Stream URL requirements: Use a directly accessible stream URL or HLS playlist URL, not a player web page. Keep the URL and its authorization valid throughout moderation; both HLS playlists and media segments must be accessible
- Media requirements: Video tracks must be decodable; audio tracks must also be decodable when audio moderation is required. Processing depends on the audio/video codecs in the stream, not just the protocol or URL suffix
- RTC requirements: ZEGO, Agora, and TRTC are supported. Supply provider and room/channel parameters in
data, with valid joining credentials as required by the provider authentication settings. The moderation account must be able to join and subscribe to the audio/video being moderated
Request body
Parameter
Type
Required
Description
video
String
Conditional
Required for URL streams; use the top-level URL. See “Live video requirements” above for supported protocols and their conditions. Omit for RTC; data.url does not replace video for URL streams.
frequency
Integer
No
Frame interval, 1–60 seconds. Defaults to project settings, or 5 seconds when unset.
segmentSeconds
Integer
No
Audio/recording segment interval, 1–60 seconds. When frequency is supplied, defaults to it; an explicit value must be at least frequency and an integer multiple of it. If frequency is omitted, both use project settings; this field alone does not override them.
liveDirectMedia
Boolean
No
URL streams only: true directly produces images/audio without recording video segments. Omitted or false follows project policy and does not force the mode off.
data
Object
Conditional
Required for RTC; contains streamType and its provider parameters. Supply RTC configuration inside data.
strategyId
String
No
Moderation strategy; defaults to DEFAULT.
lang
String
No
Audio language; omitted or empty means auto. Supported languages
alternativeTags
Integer[]
No
Additional moderation categories: 100,110,120,130,140,150,160,170,180,190,900,999. This is not the full list of output categories.
userId
String
No
Business end-user ID; keep within 32 characters. Does not select an RTC stream or publisher.
userIP
String
No
End-user IP.
did
String
No
Device ID.
dtype
String
No
Device type: 1 iPhone, 2 Android, 3 iPad, 4 Windows Phone, 5 PC, 6 Web, 7 WAP.
callbackRegion
String
No
Callback region: cn/us/eu/ap. The task region takes precedence; this is a fallback when the task region cannot be obtained.
callbackUrl
String
No
HTTP/HTTPS receiver URL; overrides project callback settings only together with a nonblank callbackSecretKey.
callbackSecretKey
String
No
Callback signing secret shared with the receiver. An incomplete URL/secret pair falls back to project settings.
extra
Object
No
Opaque JSON object with at most 20 key/value pairs. May be returned with results; status-only responses can omit it.
RTC moderation scope
data.streamType
Parameter object
Moderation scope
ZEGO
data.zegoParam
Moderates the specified streamId, or discovers room streams when omitted.
AGORA
data.agoraParam
Subscribes to remote channel audio/video. Selecting a publisher with streamId is not supported; omit it.
TRTC
data.trtcParam
Records remote room users. Selecting a publisher with streamId is not supported; omit it.
RTC userId/uid identifies the moderation account that joins the room, not a target publisher. Result liveUserId identifies the actual media publisher. Server-side Agora integration is separate from the client-side Agora plugin; do not mix their protocols.
ZEGO — data.zegoParam
Parameter
Type
Required
Description
accessToken
String
No
ZEGO room token, according to the room authentication settings.
roomId
String
Yes
Room or channel identifier.
userId
String
No
Account used by the moderation service to join the room; not a publisher filter.
streamId
String
No
Specific stream to moderate; omit for room mode.
idleTimeMillis
Integer
No
SDK audio-idle setting in milliseconds, default 300000; distinct from room-idle logout.
mixAudio
Boolean
No
Defaults to false for separate audio streams. true mixes room audio; mixed audio has no individual liveUserId.
enableVad
Boolean
No
Defaults to false; true filters silent audio and can change segment counts and callback timing.
firstFrameBlackFilter
Boolean
No
Defaults to false; true filters black frames during initial startup.
AGORA — data.agoraParam
Parameter
Type
Required
Description
appId
String
Yes
Agora application ID.
accessToken
String
No
Agora channel token, according to the channel authentication settings.
channelId
String
Yes
Room or channel identifier.
userId
String
Yes
Account used by the moderation service to join the room; not a publisher filter.
idleTimeMillis
Integer
No
Wait with no remote channel users, in milliseconds; omitted or nonpositive values use 300000.
Agora currently does not support the mixAudio, enableVad, or firstFrameBlackFilter request switches; omit them.
TRTC — data.trtcParam
Parameter
Type
Required
Description
sdkAppId
String
Yes
TRTC application ID as a positive integer string.
userSig
String
Yes
TRTC UserSig for the joining account specified by uid.
strRoomId
String
Yes
Room identifier; a value parsed as a positive integer uses a numeric TRTC room, otherwise a string room.
uid
String
Yes
Account used by the moderation service to join the room; not a publisher filter.
idleTimeMillis
Integer
No
Wait with no active recording users, in milliseconds; omitted defaults to 300000, positive values enable the timeout. Prefer an explicit positive value.
enableVad
Boolean
No
Defaults to false; true filters silent audio and can change segment counts and callback timing.
firstFrameBlackFilter
Boolean
No
Defaults to false; true filters black frames during initial startup.
Repeated submissions
While the existing task deduplication record remains valid, URL streams reuse a task by project + strategy + URL; RTC uses project + provider + room/channel, excluding strategy and stream ID. Repeated submissions return the existing task ID and do not update its token, policy, sampling, or callback settings. To change settings, stop the original task and wait for completion/cleanup before submitting again. Use result.taskId from the response body.
Request examples
URL live stream
{
"video": "https://media.example.com/live.m3u8",
"frequency": 5,
"segmentSeconds": 10,
"liveDirectMedia": true,
"extra": {
"bizId": "live-10001"
}
}
ZEGO
{
"frequency": 5,
"segmentSeconds": 10,
"data": {
"streamType": "ZEGO",
"zegoParam": {
"roomId": "room-10001",
"userId": "audit-10001",
"streamId": "stream-10001",
"accessToken": "replace-with-provider-token",
"mixAudio": false,
"idleTimeMillis": 300000
}
},
"callbackUrl": "https://callback.example.com/video-check",
"callbackSecretKey": "replace-with-callback-secret",
"extra": {
"bizId": "rtc-10001"
}
}
AGORA
{
"frequency": 5,
"segmentSeconds": 10,
"data": {
"streamType": "AGORA",
"agoraParam": {
"appId": "replace-with-agora-app-id",
"channelId": "channel-10001",
"userId": "audit-10001",
"accessToken": "replace-with-provider-token",
"idleTimeMillis": 300000
}
},
"callbackUrl": "https://callback.example.com/video-check",
"callbackSecretKey": "replace-with-callback-secret",
"extra": {
"bizId": "rtc-10001"
}
}
TRTC
{
"frequency": 5,
"segmentSeconds": 10,
"data": {
"streamType": "TRTC",
"trtcParam": {
"sdkAppId": "1400000001",
"strRoomId": "room-10001",
"uid": "audit-10001",
"userSig": "replace-with-provider-user-sig",
"idleTimeMillis": 300000
}
},
"callbackUrl": "https://callback.example.com/video-check",
"callbackSecretKey": "replace-with-callback-secret",
"extra": {
"bizId": "rtc-10001"
}
}
All credentials and addresses are placeholders. Provider credentials must remain valid for room entry and ongoing moderation, with permission to receive the required media.
Response format
The response body is JSON, with the response header Content-Type: application/json.
Field
Type
Description
errorCode
Integer
0 means accepted, not that moderation has completed.
errorMessage
String
Error message; normally omitted on success.
result.taskId
String
Task ID for queries, stopping, and callback correlation.
result.result
Integer
0 means submission succeeded; not a moderation verdict.
{
"errorCode": 0,
"result": {
"taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
"result": 0
}
}
Save result.taskId from the actual response. The example ID cannot be reused in subsequent requests.
Errors
See Error codes and handling; handle HTTP status, errorCode, task/result status code, and moderation verdict result separately.
Submit a URL live stream or a ZEGO, Agora, or TRTC room/channel for moderation. Project policy determines whether images, audio, or both are checked.
https://vsafe.ilivedata.com/api/v1/livevideo/check/submitRequest format
Send a UTF-8 encoded JSON body.
| Request header | Required | Description |
|---|---|---|
Content-Type |
Yes | application/json; charset=UTF-8 |
Accept |
Recommended | application/json |
For authentication headers and signing rules, see Request signature in the Help Center. Use the submitting project when querying or stopping a task.
Live video requirements
- Supported input types: URL streams and RTC rooms/channels; BASE64 is not supported
- Supported streaming protocols: rtp, rtmp, rtmps, mmsh, mmst, hls, http, tcp, https (subject to the conditions below). For hls, use an http/https playlist URL
- Protocol conditions: rtp requires a media payload that can be identified without an additional SDP session description; tcp must carry an automatically detectable media container. Validate network and port accessibility in the deployment and stream reception for both protocols before use. The API does not accept srtp decryption parameters, so direct access to encrypted srtp streams is not currently supported
- Stream URL requirements: Use a directly accessible stream URL or HLS playlist URL, not a player web page. Keep the URL and its authorization valid throughout moderation; both HLS playlists and media segments must be accessible
- Media requirements: Video tracks must be decodable; audio tracks must also be decodable when audio moderation is required. Processing depends on the audio/video codecs in the stream, not just the protocol or URL suffix
- RTC requirements: ZEGO, Agora, and TRTC are supported. Supply provider and room/channel parameters in
data, with valid joining credentials as required by the provider authentication settings. The moderation account must be able to join and subscribe to the audio/video being moderated
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
video |
String | Conditional | Required for URL streams; use the top-level URL. See “Live video requirements” above for supported protocols and their conditions. Omit for RTC; data.url does not replace video for URL streams. |
frequency |
Integer | No | Frame interval, 1–60 seconds. Defaults to project settings, or 5 seconds when unset. |
segmentSeconds |
Integer | No | Audio/recording segment interval, 1–60 seconds. When frequency is supplied, defaults to it; an explicit value must be at least frequency and an integer multiple of it. If frequency is omitted, both use project settings; this field alone does not override them. |
liveDirectMedia |
Boolean | No | URL streams only: true directly produces images/audio without recording video segments. Omitted or false follows project policy and does not force the mode off. |
data |
Object | Conditional | Required for RTC; contains streamType and its provider parameters. Supply RTC configuration inside data. |
strategyId |
String | No | Moderation strategy; defaults to DEFAULT. |
lang |
String | No | Audio language; omitted or empty means auto. Supported languages |
alternativeTags |
Integer[] | No | Additional moderation categories: 100,110,120,130,140,150,160,170,180,190,900,999. This is not the full list of output categories. |
userId |
String | No | Business end-user ID; keep within 32 characters. Does not select an RTC stream or publisher. |
userIP |
String | No | End-user IP. |
did |
String | No | Device ID. |
dtype |
String | No | Device type: 1 iPhone, 2 Android, 3 iPad, 4 Windows Phone, 5 PC, 6 Web, 7 WAP. |
callbackRegion |
String | No | Callback region: cn/us/eu/ap. The task region takes precedence; this is a fallback when the task region cannot be obtained. |
callbackUrl |
String | No | HTTP/HTTPS receiver URL; overrides project callback settings only together with a nonblank callbackSecretKey. |
callbackSecretKey |
String | No | Callback signing secret shared with the receiver. An incomplete URL/secret pair falls back to project settings. |
extra |
Object | No | Opaque JSON object with at most 20 key/value pairs. May be returned with results; status-only responses can omit it. |
RTC moderation scope
data.streamType |
Parameter object | Moderation scope |
|---|---|---|
ZEGO |
data.zegoParam |
Moderates the specified streamId, or discovers room streams when omitted. |
AGORA |
data.agoraParam |
Subscribes to remote channel audio/video. Selecting a publisher with streamId is not supported; omit it. |
TRTC |
data.trtcParam |
Records remote room users. Selecting a publisher with streamId is not supported; omit it. |
RTC userId/uid identifies the moderation account that joins the room, not a target publisher. Result liveUserId identifies the actual media publisher. Server-side Agora integration is separate from the client-side Agora plugin; do not mix their protocols.
ZEGO — data.zegoParam
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken |
String | No | ZEGO room token, according to the room authentication settings. |
roomId |
String | Yes | Room or channel identifier. |
userId |
String | No | Account used by the moderation service to join the room; not a publisher filter. |
streamId |
String | No | Specific stream to moderate; omit for room mode. |
idleTimeMillis |
Integer | No | SDK audio-idle setting in milliseconds, default 300000; distinct from room-idle logout. |
mixAudio |
Boolean | No | Defaults to false for separate audio streams. true mixes room audio; mixed audio has no individual liveUserId. |
enableVad |
Boolean | No | Defaults to false; true filters silent audio and can change segment counts and callback timing. |
firstFrameBlackFilter |
Boolean | No | Defaults to false; true filters black frames during initial startup. |
AGORA — data.agoraParam
| Parameter | Type | Required | Description |
|---|---|---|---|
appId |
String | Yes | Agora application ID. |
accessToken |
String | No | Agora channel token, according to the channel authentication settings. |
channelId |
String | Yes | Room or channel identifier. |
userId |
String | Yes | Account used by the moderation service to join the room; not a publisher filter. |
idleTimeMillis |
Integer | No | Wait with no remote channel users, in milliseconds; omitted or nonpositive values use 300000. |
Agora currently does not support the mixAudio, enableVad, or firstFrameBlackFilter request switches; omit them.
TRTC — data.trtcParam
| Parameter | Type | Required | Description |
|---|---|---|---|
sdkAppId |
String | Yes | TRTC application ID as a positive integer string. |
userSig |
String | Yes | TRTC UserSig for the joining account specified by uid. |
strRoomId |
String | Yes | Room identifier; a value parsed as a positive integer uses a numeric TRTC room, otherwise a string room. |
uid |
String | Yes | Account used by the moderation service to join the room; not a publisher filter. |
idleTimeMillis |
Integer | No | Wait with no active recording users, in milliseconds; omitted defaults to 300000, positive values enable the timeout. Prefer an explicit positive value. |
enableVad |
Boolean | No | Defaults to false; true filters silent audio and can change segment counts and callback timing. |
firstFrameBlackFilter |
Boolean | No | Defaults to false; true filters black frames during initial startup. |
Repeated submissions
While the existing task deduplication record remains valid, URL streams reuse a task by project + strategy + URL; RTC uses project + provider + room/channel, excluding strategy and stream ID. Repeated submissions return the existing task ID and do not update its token, policy, sampling, or callback settings. To change settings, stop the original task and wait for completion/cleanup before submitting again. Use result.taskId from the response body.
Request examples
URL live stream
{
"video": "https://media.example.com/live.m3u8",
"frequency": 5,
"segmentSeconds": 10,
"liveDirectMedia": true,
"extra": {
"bizId": "live-10001"
}
}
ZEGO
{
"frequency": 5,
"segmentSeconds": 10,
"data": {
"streamType": "ZEGO",
"zegoParam": {
"roomId": "room-10001",
"userId": "audit-10001",
"streamId": "stream-10001",
"accessToken": "replace-with-provider-token",
"mixAudio": false,
"idleTimeMillis": 300000
}
},
"callbackUrl": "https://callback.example.com/video-check",
"callbackSecretKey": "replace-with-callback-secret",
"extra": {
"bizId": "rtc-10001"
}
}
AGORA
{
"frequency": 5,
"segmentSeconds": 10,
"data": {
"streamType": "AGORA",
"agoraParam": {
"appId": "replace-with-agora-app-id",
"channelId": "channel-10001",
"userId": "audit-10001",
"accessToken": "replace-with-provider-token",
"idleTimeMillis": 300000
}
},
"callbackUrl": "https://callback.example.com/video-check",
"callbackSecretKey": "replace-with-callback-secret",
"extra": {
"bizId": "rtc-10001"
}
}
TRTC
{
"frequency": 5,
"segmentSeconds": 10,
"data": {
"streamType": "TRTC",
"trtcParam": {
"sdkAppId": "1400000001",
"strRoomId": "room-10001",
"uid": "audit-10001",
"userSig": "replace-with-provider-user-sig",
"idleTimeMillis": 300000
}
},
"callbackUrl": "https://callback.example.com/video-check",
"callbackSecretKey": "replace-with-callback-secret",
"extra": {
"bizId": "rtc-10001"
}
}
All credentials and addresses are placeholders. Provider credentials must remain valid for room entry and ongoing moderation, with permission to receive the required media.
Response format
The response body is JSON, with the response header Content-Type: application/json.
| Field | Type | Description |
|---|---|---|
errorCode |
Integer | 0 means accepted, not that moderation has completed. |
errorMessage |
String | Error message; normally omitted on success. |
result.taskId |
String | Task ID for queries, stopping, and callback correlation. |
result.result |
Integer | 0 means submission succeeded; not a moderation verdict. |
{
"errorCode": 0,
"result": {
"taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
"result": 0
}
}
Save result.taskId from the actual response. The example ID cannot be reused in subsequent requests.
Errors
See Error codes and handling; handle HTTP status, errorCode, task/result status code, and moderation verdict result separately.