Build on the Platform.

The EndlessAI Platform API is a REST API that adds videos, scans them, searches frames and answers questions about them. Base URL https://platform.endlessai.com/api/v1. JSON in, JSON out; errors come back as { "error": string }.

Configure a project once, then let it work.

Everything lives in a project: its videos and cameras, what to watch for, and where results go. Set it up in the app — the setup assistant turns a plain description into configuration — and from then on the project works on every video you add, whether it arrives through the app, a camera, cloud storage or this API. The calls below are for when you want to drive it yourself.

Scan on arrival
With auto-scan on, every new video is scanned as soon as it lands — no call needed.
Jobs
Standing questions that run on each video once its processing completes, or on a schedule.
Alerts and updates
Rules in plain words raise alerts, delivered to the chat apps connected to the project.
Webhooks
Signed callbacks to your server when a scan or an agent run finishes or fails — instead of polling. Alerts and job results can go to a webhook channel too. Events

Get a key

  1. Create an account — it takes you straight to the Developers page.
  2. Choose a project and press Create key. The key is shown once. Already signed up? Open Developers.

Project keys (svk_…) reach exactly one project — the right default for a server or an agent.

User tokens (svt_…, sent as Authorization: Bearer) act as you across all your projects and can create projects. Each operation in the reference lists which of the two it accepts.

From a video to an answer, step by step.

  1. 01

    Check your key

    Every call carries the key in X-Api-Key (or as Authorization: Bearer). /me tells you which project the key belongs to.

    export API=https://platform.endlessai.com/api/v1
    export KEY=svk_...
    curl $API/me -H "X-Api-Key: $KEY"
    
    # {"auth_method":"api_key","project_id":"<PROJECT>","user_id":null,"capabilities":"project"}
    export PROJECT=<project_id from the response>
  2. 02

    Add a video

    Give it a public URL — or upload a file as multipart field video. The call returns at once with the video id; the download and preparation continue in the background.

    curl -X POST $API/projects/$PROJECT/videos/upload-from-url \
      -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
      -d '{"url": "https://example.com/dock-cam.mp4"}'
    
    # 202 {"id":"<VIDEO>","status":"pending","message":"Download started. ..."}
    
    # or a local file:
    curl -X POST $API/projects/$PROJECT/videos/upload \
      -H "X-Api-Key: $KEY" -F "video=@dock-cam.mp4"
  3. 03

    Wait for it to be ready

    Poll the video's status every few seconds until it leaves the pending states.

    curl $API/projects/$PROJECT/videos/$VIDEO/status \
      -H "X-Api-Key: $KEY"
  4. 04

    Scan it

    Smart Scan describes what happens in the video, scene by scene, and writes summaries. Send {"dry_run": true} first to see the plan before running it; send an empty body to run it.

    # the plan, before anything runs
    curl -X POST $API/projects/$PROJECT/videos/$VIDEO/smart-scan \
      -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
      -d '{"dry_run": true}'
    
    # run it, then read the result
    curl -X POST $API/projects/$PROJECT/videos/$VIDEO/smart-scan \
      -H "X-Api-Key: $KEY" -H "Content-Type: application/json" -d '{}'
    curl $API/projects/$PROJECT/videos/$VIDEO/smart-scan/summary \
      -H "X-Api-Key: $KEY"
  5. 05

    Search and ask

    Search frames by text, or ask the video agent. Asking returns 202 with a run_id; poll the run (five seconds apart is plenty) until status is complete and read answer. Leave out video_id to ask across the whole project.

    curl "$API/projects/$PROJECT/frames/search?q=forklift" \
      -H "X-Api-Key: $KEY"
    
    curl -X POST $API/projects/$PROJECT/agent/ask \
      -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
      -d '{"question": "When does the first truck arrive?", "video_id": "'$VIDEO'"}'
    # 202 {"run_id":"<RUN>","poll":"/api/v1/projects/<PROJECT>/agent/runs/<RUN>", ...}
    
    curl $API/projects/$PROJECT/agent/runs/$RUN -H "X-Api-Key: $KEY"
    # {"status":"complete","answer":"...", ...}
  6. 06

    Watch the spend

    Work spends tokens from the project's balance. When the balance or the monthly cap runs out, calls that spend return 402.

    # totals for the period
    curl $API/projects/$PROJECT/usage -H "X-Api-Key: $KEY"
    
    # every charge: operation, video, tokens
    curl "$API/projects/$PROJECT/usage/events?limit=50" -H "X-Api-Key: $KEY"

Full reference

Request details, responses, and examples, grouped by area. Browse the documentation.

Webhooks

Signed callbacks when work finishes or content is flagged — see Webhooks.

Prefer an agent?

The same calls are MCP tools. Connect Claude or any MCP client.