Skip to main content
POST
Start Video Stream Moderation
Product: Visual Intelligence — Live Video Content Moderation Use case: Real-time NSFW / violence / logo detection on a live video stream (RTMP/RTSP), results pushed to your callback every 5s Mode: Server-Pull (you give us a stream URL → we pull → results to your callback) Host: https://mavi-backend.memories.ai/serve/api/v2 Auth: Authorization: sk-mavi-... (no Bearer prefix)
Access Required: To use this API endpoint, please contact us at contact@memories.ai to enable stream processing features for your account.
This endpoint starts real-time video stream processing for content moderation and logo detection. The stream is automatically segmented every 5 seconds, with results sent via webhook callbacks.
Pricing:The pricing varies based on the features enabled:Content Moderation + Logo Detection:
  • Base rate: $2.00/hour
  • Example (FPS=2): 3.00/hour(3.00/hour (0.00417 per 5-second segment)
Content Moderation Only:
  • Base rate: $1.50/hour
  • Example (FPS=2): 2.25/hour(2.25/hour (0.00313 per 5-second segment)
Logo Detection Only:
  • Base rate: $1.50/hour
  • Example (FPS=2): 2.25/hour(2.25/hour (0.00313 per 5-second segment)
Where:
  • duration: Video duration in seconds (5 seconds per segment)
  • fps: Frames per second
  • Charges occur at start (pre-charge for one segment) and per segment processed

Supported Protocols

  • RTMP (Recommended)
  • RTSP

Key Features

  • ✅ Real-time stream processing
  • ✅ Automatic 5-second segmentation
  • ✅ Asynchronous webhook callbacks
  • ✅ Content moderation (adult content, violence, etc.)
  • ✅ Logo detection and tracking
  • ✅ Automatic resource management

Code Example

Response

Returns the task information for the started video stream.

Request Parameters

Response Parameters

Callback Response Parameters

Callbacks are sent to your configured webhook URL every time a 5-second segment is processed.

Status Codes

Callback Flow

Important Notes

  • Webhook Configuration: Configure your webhook URL in user settings before using this API
  • No callback parameter needed: The system uses a unified asynchronous callback mechanism
  • Automatic segmentation: Every 5 seconds triggers a callback
  • Pre-charge mechanism: Balance is checked and pre-charged at start
  • Per-segment charging: Each processed segment is charged immediately
  • Auto-stop on insufficient balance: Stream automatically stops if balance is insufficient (status 402)
  • Concurrent stream limit: Each user has a maximum concurrent stream limit
  • Retry mechanism: Failed callbacks are automatically retried

Rate Limiting

  • Maximum concurrent streams: Each user can run N concurrent stream tasks (video + audio combined)
  • Capacity check: Returns status 16 if server capacity is reached
  • Balance check: Returns HTTP 402 if insufficient balance at start

Authorizations

Authorization
string
header
required

Body

application/json
url
string
required

Video stream URL (supports RTMP/RTSP)

Example:

"rtmp://example.com/live/stream"

enable_content_moderation
boolean
default:false

Enable content moderation

enable_logo_detection
boolean
default:false

Enable logo detection

fps
integer
default:1

Frames per second to process

Required range: x >= 1
max_logos
integer
default:5

Maximum number of logos to detect (1-50)

Required range: 1 <= x <= 50

Response

Stream started successfully

code
string
Example:

200

message
string
Example:

"success"

data
object