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.
No matching documentation. Try a different search.
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"}'import requests
with open("video.mp4", "rb") as f:
resp = requests.post(
f"{BASE}/videos",
headers={"X-Api-Key": API_KEY},
files={"file": ("video.mp4", f, "video/mp4")},
data={"name": "Loading dock"},
)
video_id = resp.json()["videoId"]const res = await fetch(`${BASE}/videos`, {
method: "POST",
headers: { "X-Api-Key": API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({
sourceType: "url",
url: "https://example.com/video.mp4",
name: "Loading dock",
}),
});
const { videoId } = await res.json();// 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"
}