The Platform API

Content Moderation

Manage your videos, ask questions, and build applications with the Platform API. Explore the operations below for request details, responses, and examples.

Content Moderation

Check uploaded content against your moderation policy. Returns structured decisions: allow, flag, or ban.

POST/api/v1/projects/:projectId/moderateBetaUpload & moderate content

Upload & moderate content

Beta: this operation may change before it is final.

Accepts multipart file upload or a JSON body with url. Content is queued for a content scan immediately.

File uploads: Content-Type: multipart/form-data, field name file, max 500 MB.

URL submissions: { "url": "https://...", "name": "optional-name" }

// Response (202 Accepted)
{
  "contentId": "uuid-of-video-record",
  "status": "processing",
  "message": "Content queued for moderation analysis"
}
# Upload file for moderation
curl -X POST "https://platform.endlessai.com/api/v1/projects/PROJECT_ID/moderate" \
  -H "X-Api-Key: YOUR_KEY" \
  -F "file=@video.mp4"

# Submit URL for moderation
curl -X POST "https://platform.endlessai.com/api/v1/projects/PROJECT_ID/moderate" \
  -H "X-Api-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/video.mp4"}'
GET/api/v1/projects/:projectId/videos/:videoId/moderationGet moderation result

Get moderation result

Returns the structured moderation result combining the content scan and agent report (if available). Agent decisions take priority over the content scan.

{
  "videoId": "VIDEO_ID",
  "status": "completed",
  "runId": "run-uuid",
  "completedAt": "2026-02-23T10:30:00Z",
  "sceneCount": 12,
  "decision": "flag",
  "confidence": 85,
  "reasoning": "Potentially violent content detected in frames 45-60",
  "flags": [
    {
      "category": "violence",
      "severity": "medium",
      "confidence": 0.85,
      "timestamp": 14.5,
      "frame_index": 45,
      "description": null
    }
  ],
  "categories_scanned": ["violence", "nudity", "hate_speech"],
  "frames_reviewed": 120,
  "escalation": {
    "reviewed": true,
    "verdict": "flag",
    "confidence": 85,
    "frames_reviewed": 12,
    "flagged_categories": ["violence"],
    "matched_rules": ["policy-rule-14"],
    "cost_at": 1240
  },
  "agent_report": { "...if pipeline ran..." }
}

escalation reflects the deeper review pass when one ran: verdict, confidence, matched policy rules, and usage. Divide cost_at by 1,000 to display platform tokens.

GET/api/v1/projects/:projectId/moderation/statsGet moderation statistics

Get moderation statistics

Aggregate counts across all content in the project.

{
  "data": {
    "total": 150,
    "processing": 3,
    "completed": 140,
    "allowed": 120,
    "flagged": 15,
    "banned": 5,
    "pending": 5,
    "error": 2
  }
}
PUT/api/v1/projects/:projectId/videos/:videoId/reviewBetaSubmit review decision

Submit review decision

Beta: this operation may change before it is final.

{
  "decision": "flag",
  "reason": "Suspicious activity at 2:15"
}