The Platform API

Project key API

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

Project key API

A short set of calls scoped to the project your key belongs to — no project ID in the path. Add videos, images and text, then check their status and moderation result. Requires a project key (svk_).

GET/api/v1/meCheck your credential

Check your credential

Shows who the request runs as. project_id is set for a project key, user_id for a user token. Works with any credential.

{
    "auth_method": "api_key",
    "project_id": "PROJECT_ID",
    "user_id": null,
    "capabilities": "project"
  }
POST/api/v1/videosAdd a video and start its analysis

Add a video and start its analysis

Upload a file (multipart field file) or send JSON with sourceType: "url" and a url. Use sourceType: "rtsp" to add a live RTSP or HLS camera. Optional: name, includeInQA (default true). Returns 201.

To make retries safe, send your own external_id with a source_id: a repeat returns the existing video with duplicate: true, and a different content_hash for the same ID returns 409.

# Upload a file
  curl -X POST https://platform.endlessai.com/api/v1/videos \
    -H "X-Api-Key: YOUR_KEY" \
    -F "file=@/path/to/video.mp4" \
    -F "name=Loading dock"

  # Add from a URL
  curl -X POST https://platform.endlessai.com/api/v1/videos \
    -H "X-Api-Key: YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"sourceType": "url", "url": "https://example.com/video.mp4"}'
// Response (201 Created)
  {
    "videoId": "VIDEO_ID",
    "projectId": "PROJECT_ID",
    "status": "pending",
    "sourceType": "offline"
  }
GET/api/v1/videos/:videoId/statusGet a video's processing status

Get a video's processing status

Poll until status is completed. processing lists the progress of each processing step, or is null when none is available.

{
    "videoId": "VIDEO_ID",
    "status": "completed",
    "includeInQA": true,
    "processing": { "status": "completed", "progress": 100, "tasks": [ ... ] }
  }
DELETE/api/v1/videos/:videoIdDelete a video

Delete a video

Removes the video and cancels any processing still queued.

POST/api/v1/mediaAdd an image or text for moderation

Add an image or text for moderation

Upload a file (multipart field file), send inline text (up to 200 KB), or send sourceType: "url" with a url. For a URL without a file extension, add mediaType (image or text). Videos go to POST /videos instead.

role: content (default, moderated), or knowledge / reference (described and used as context, never moderated).

// Request
  { "text": "Message body to check", "name": "ticket-4812.txt" }

  // Response (201 Created)
  {
    "mediaId": "MEDIA_ID",
    "projectId": "PROJECT_ID",
    "mediaType": "text",
    "status": "uploaded",
    "analysisQueued": true
  }
GET/api/v1/media/:mediaId/statusGet a media item's processing status

Get a media item's processing status

status moves from uploaded to processing, then analyzed (no moderation needed), completed or error. decision is set once moderated is true.

{
    "mediaId": "MEDIA_ID",
    "mediaType": "image",
    "role": "content",
    "status": "completed",
    "analyzed": true,
    "moderated": true,
    "decision": "flag",
    "error": null
  }
GET/api/v1/media/:mediaId/moderationGet a media item's moderation result

Get a media item's moderation result

decision is allow, flag or ban. A human review, when recorded, takes priority and appears in human_review. status stays pending until moderation has run.

{
    "mediaId": "MEDIA_ID",
    "mediaType": "image",
    "status": "completed",
    "decision": "flag",
    "confidence": 82,
    "reasoning": "A weapon is visible in the foreground.",
    "flags": ["weapons"],
    "categories_scanned": ["weapons", "violence", "nudity"],
    "human_review": null,
    "completedAt": "2026-10-02T09:00:12.000Z"
  }