Video Streaming Moderation

Video Streaming API is for identifying visual risks or business labels of live streaming.

Video Streaming Moderation

DeepCleer Video Streaming Moderation continuously moderates a live video source — a public stream URL or a recorded RTC channel — and pushes per-frame and per-audio-segment results to your callback URLs as they're produced. Frame detection covers political content, pornography, sexually suggestive content, advertising, violence and terrorism, prohibited content, QR codes, and image-text violations; it can also recognize faces, logos, flora and fauna, and other business-specific content. Audio detection covers political content, pornography, advertising, prohibited content, violence, abuse, advertising-law violations, moaning, top-leader voiceprint, national anthem, and prohibited songs; it can also identify speaker gender, age, timbre, language, audio scene, singing, minor speakers, and human-voice authenticity.

The video streaming surface is exposed through two complementary endpoints. One opens the moderation task and starts the stream pull; the other closes it. They share the same authentication envelope and requestId lifecycle.

API Description

Choose an endpoint based on which side of the moderation lifecycle you're acting on:

  • Request API — submit a stream (public URL or RTC channel binding) for moderation. DeepCleer maintains the pull, captures frames at your configured cadence, segments the audio track, and continuously delivers per-frame and per-audio-segment moderation results to the callback URLs you specify until the stream ends naturally or you stop the task.
  • Close Stream API — notify the server to terminate an in-progress moderation task before it ends naturally. Releases stream-pull resources and (when stream-end notification was enabled on the original Request) triggers the final stream-end callback to your callback URL.

Both endpoints share the canonical request envelope (accessKey / appId / eventId for Request; accessKey for Close) and operate on the same requestId — the identifier returned by the Request API is the key you pass to the Close API.

Endpoints at a Glance

EndpointPathDelivery ModelResult Returned Via
Request API/videostream/v4Asynchronous (continuous frame + audio-segment callbacks)HTTP POST to your callback URLs — separate deliveries for frames and audio segments, plus a stream-end callback when stream-end notification is enabled
Close Stream API/finish_videostream/v4Synchronous (control-plane acknowledgement)HTTP response body — acknowledges the close request was accepted

When to Use Which

Request API

Use when:

  • You have a live video stream — a public rtmp / http / hls URL, or an RTC channel from Agora, Zego, TRTC, Volcengine, or Aliyun — that you want DeepCleer to moderate continuously.
  • You can host one or more public HTTPS endpoints to receive callback deliveries (frame and audio callbacks can be routed to the same URL or to separate URLs).
  • You need per-frame and per-segment moderation as the stream is produced, not after it has ended.

The Request endpoint accepts the stream descriptor (with provider-specific *Param objects when using an RTC SDK), capture configuration, and the detection types you want to apply to frames and audio. The synchronous response is an acknowledgement only — it confirms that DeepCleer has accepted the moderation task and contains the requestId you'll need for any later Close Stream call. Frame results and audio-segment results are dispatched to your callback URL(s) using a contentType discriminator (1 for frames, 2 for audio) so a single endpoint can route on the field if you've consolidated them. A callback URL is required for the Request endpoint — without one there is no way to receive results.

Close Stream API

Use when:

  • The upstream live room has ended on your side and you want to release DeepCleer stream-pull resources immediately.
  • You no longer need moderation results for a stream that's still being pulled.
  • The original Request returned a duplicate-submission dupRequestId and you need to close the duplicate before resubmitting.

The Close Stream endpoint is fully synchronous: it acknowledges that the close request was accepted. Once accepted, DeepCleer stops pulling the stream and (when stream-end notification was enabled on the original Request) delivers a final stream-end callback to the original callback URL.

Lifecycle

┌─────────────────────────────────────────────────────────────────────────┐
│  1. Client → POST /videostream/v4 (Request API)                         │
│     ↓                                                                   │
│  2. DeepCleer → 200 OK { requestId } (synchronous ack)                  │
│     ↓                                                                   │
│  3. DeepCleer pulls the stream, captures frames, segments audio         │
│     ↓                                                                   │
│  4a. DeepCleer → POST {callback}      { contentType: 1, frameDetail, statCode: 0 }   (loops)   │
│  4b. DeepCleer → POST {audioCallback} { contentType: 2, audioDetail, statCode: 0 }   (loops)   │
│     ↓                                                                   │
│  5a. Stream ends naturally OR                                           │
│  5b. Client → POST /finish_videostream/v4 { requestId }                 │
│     ↓                                                                   │
│  6. DeepCleer → POST {callback} { auxInfo, statCode: 1 }                │
│     (only when stream-end notification was enabled on the Request)      │
└─────────────────────────────────────────────────────────────────────────┘