Query a live result

Query available results for URL live streams or RTC tasks. Reading does not consume results; use callbacks for real-time media results.

POSThttps://vsafe.ilivedata.com/api/v1/livevideo/check/result

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.

Request body

Parameter Type Required Description
taskId String Yes The result.taskId from the successful submission response.

The ID below illustrates the format only. Replace it with the ID returned by your own submission under the same project; do not reuse this fixed example.

{
  "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000"
}

URL streams versus RTC

Scenario Response
URL live stream processing Only errorCode/taskId/code=2; no live media items or extra.
URL live stream ended In the current version, normal finalization sets code=0. Processing failure or no usable result can give code=1; unavailable results may also give code=3. Legacy snapshots or incomplete finalization can retain code=2, so this value alone does not prove the stream is still running.
RTC processing Returns accumulated saved detections, possibly code=2/result=0/videoSpams=[]. Does not guarantee all passing items.
RTC ended After finalization, code=1 can accompany moderation detections. Here, 1 does not mean moderation failed.
Task missing The unified live endpoint returns code=3; ID validation/expiry failures use HTTP errors.

Response format

The response body is JSON, with the response header Content-Type: application/json.

Field Type Description
errorCode Integer 0 means request success.
errorMessage String Error message; may be omitted.
taskId String Video moderation task ID.
code Integer Interpret 0/1/2/3 using the table above: normal URL-stream finalization uses 0, while RTC finalization uses 1. Query and per-item callback contexts differ.
result Integer Moderation verdict: 0 pass, 1 suspicious, 2 reject. This field may be absent while processing or after failure; do not interpret its absence as pass.
videoSpams Array Returned evidence list; may be omitted or empty.
extra Object Submitted opaque data; can accompany results but is not guaranteed in status responses.
liveProvider String RTC only: zego/agora/trtc; newer response field.
liveRoomId String RTC only: room/channel ID at the top level.
pullStreamSuccess Boolean Optional. true means image or audio data reached moderation result processing, independently of detections or moderation success. Omitted for older results or when evidence is unavailable; omission does not mean false. Processing URL-stream queries still return status only.

videoSpams[]

These fields describe URL-stream and RTC live result items; RTC-only fields are marked. Fields depend on media type, policy, and processing stage. Omission does not mean zero or pass. Live times are Unix timestamps in milliseconds.

Policy can filter the item list; do not replace the top-level result verdict by recomputing it from that list.

Field Type Description
type Integer 1 image, 2 audio.
result Integer Item verdict: 0 pass, 1 suspicious, 2 reject.
taskId String Parent video task ID.
checkTaskId String Downstream check ID for this item; not a substitute for the video taskId, and may be missing on failure.
beginTime Integer Item start time as a Unix timestamp in milliseconds.
endTime Integer Item end time as a Unix timestamp in milliseconds.
url String Image/audio evidence URL, possibly omitted by policy; audio can also have a URL.
text String Recognized text of the matched audio subsegment; may be omitted for voiceprint matches or absent transcripts.
audioText String Optional. Full transcript of the current recorded audio segment, including passing content when available; does not replace text. Omitted when unavailable; an empty string is preserved.
ocr String[] Optional. OCR text from the current image, preserving recognition order.
vpr Boolean Audio voiceprint match indicator, when supplied by the downstream check.
speaker String Optional. Speaker label for the current audio subsegment, passed through from audio moderation for URL streams and RTC. It is not the RTC publisher ID and must not replace liveUserId.
tags Array Moderation categories, defined below.
labels Array Image labels, defined below.
code Integer Processing status. 1 can mean an item failed, not that the live task ended.
duration Integer Media duration in milliseconds; can be 0 and is not total task duration.
checkDuration Integer May appear in live item callbacks: item start time minus moderation start time, in milliseconds. Not delivery latency; not guaranteed in queries.
segmentUrl String Recorded evidence URL. May be video in segment mode; direct-media/RTC modes do not guarantee a video segment.
language String Detected audio language.
liveStreamId String RTC only: source stream ID of this item.
liveUserId String RTC only: actual publisher ID; omitted for mixed audio or unknown sources, never substituted with the room-joining account.

tags[]

Field Type Description
tag Integer Primary category code; see Category codes. Audio can also return audio-specific categories.
tagName / tagNameEn String Category names in Chinese and English, when supplied.
level Integer 0 normal, 1 suspected, 2 abnormal.
subTags Array An array of subcategories, not a single object.
confidence Double Optional. Moderation confidence passed through unchanged; not universally a 0–1 probability. No value is invented when absent.
wordList String[] Optional. Words matched by this primary category; subcategory matches remain in subTags[].wordList.

subTags[]

Field Type Description
subTag Integer Subcategory code.
subTagName / subTagNameEn String Subcategory names in Chinese and English.
wordList String[] Match details; may be empty.

labels[]

Field Type Description
id Integer Image label ID.
name String Label name.
score Integer Model score; range depends on the model, not universally a 0–1 probability.

Full transcripts and compatibility

audioText covers the recorded audio segment identified by the current url, not the whole session or room. When a segment contains multiple matched subsegments, each evidence item can carry the same full transcript; beginTime/endTime/text/speaker still describe its own matched subsegment. RTC transcripts, speaker labels, and liveUserId stay associated with their respective media segments and are not concatenated across publishers.

  • With the project’s incremental callback mode for all checked media, passing audio segments can also carry audioText. Other modes still send detections only. This mode is a project setting, not a submission parameter.
  • Queries and saved results still contain detections only and do not guarantee recovery of all passing transcripts. Save the corresponding callbacks promptly if you need passing-segment transcripts.
  • These fields are compatible extensions and can be missing in older results. Clients should tolerate unknown and omitted fields; omission does not mean zero, retrieval failure, or a passing verdict. VOD fields remain governed by the VOD documentation.

RTC identity fields and version compatibility

The current result structure uses top-level liveProvider (zego/agora/trtc) and liveRoomId, plus per-item liveStreamId/liveUserId. URL streams do not return RTC identity. A room can contain multiple publishers.

Previous field location Current field location
roomId、videoSpams[].liveRoomId、videoSpams[].zegoRoomId liveRoomId
videoSpams[].liveProvider liveProvider
videoSpams[].zegoStreamId videoSpams[].liveStreamId
videoSpams[].zegoUserId videoSpams[].liveUserId

These identity fields belong to the newer response contract; confirm the deployed version before relying on them. Clients handling historical responses can prefer new fields and fall back to old fields when absent; new versions do not guarantee emitting old fields. Request roomId/channelId/strRoomId/userId/uid meanings are unchanged. Never replace an unknown publisher with the business user or recording account.

Response examples

URL live stream processing

{
  "errorCode": 0,
  "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
  "code": 2
}

URL live stream finalized with no detections

{
  "errorCode": 0,
  "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
  "code": 0,
  "result": 0,
  "videoSpams": []
}

RTC processing with no detections yet

{
  "errorCode": 0,
  "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
  "code": 2,
  "result": 0,
  "videoSpams": [],
  "liveProvider": "trtc",
  "liveRoomId": "room-10001"
}

RTC finalized with detections

{
  "errorCode": 0,
  "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
  "code": 1,
  "result": 2,
  "liveProvider": "trtc",
  "liveRoomId": "room-10001",
  "videoSpams": [
    {
      "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
      "type": 1,
      "result": 2,
      "beginTime": 1791763205000,
      "endTime": 1791763205000,
      "duration": 0,
      "url": "https://media.example.com/evidence/frame.jpg",
      "tags": [
        {
          "tag": 130,
          "level": 2,
          "confidence": 0.92,
          "wordList": [
            "matched screen text"
          ]
        }
      ],
      "liveStreamId": "publisher-10001",
      "liveUserId": "publisher-10001",
      "ocr": [
        "matched screen text"
      ]
    },
    {
      "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
      "type": 2,
      "result": 2,
      "beginTime": 1791763207000,
      "endTime": 1791763208000,
      "duration": 5000,
      "url": "https://media.example.com/evidence/audio.wav",
      "text": "matched content",
      "audioText": "Normal introduction, matched content, normal ending.",
      "speaker": "speaker-1",
      "tags": [
        {
          "tag": 130,
          "level": 2,
          "confidence": 0.92,
          "wordList": [
            "matched content"
          ]
        }
      ],
      "liveStreamId": "publisher-10002",
      "liveUserId": "publisher-10002"
    }
  ],
  "pullStreamSuccess": true
}

Task missing

{
  "errorCode": 0,
  "taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000",
  "code": 3
}

Live timestamps are Unix milliseconds. Item-callback checkDuration belongs inside videoSpams[]; stream-closed checkDuration belongs inside its own result and has a different meaning.

Retention

Errors

See Error codes and handling; handle HTTP status, errorCode, task/result status code, and moderation verdict result separately.