PerciaDocs
percia.ai Open app

Docs Get started

Quickstart

Add a video, create a watch, get an alert. Five minutes, with curl, JavaScript, Python and CLI.

You will give Percia a video, tell it what to look for, and read the alert it sends. You need a Percia account and one short video file at a public https address (or a phone or laptop to use as a camera).

In the app the same three steps look like this. If you prefer clicks to code, you can stop here and use the app.

The three steps in the Percia app: 1 add a camera, 2 describe the goal, 3 get an alert with a pictureThe three steps in the Percia app: 1 add a camera, 2 describe the goal, 3 get an alert with a picture

The rest of this page does the same with the API.

1. Sign in and make an API key#

  1. Sign in at playground.percia.ai (email, Google, GitHub or Apple). Every account gets 10 free camera-minutes a month, no card.
  2. Open the API keys page in the app, create a key with the scopes watches:read, watches:write, events:read and cameras:write, and copy it. It is shown once. Keys look like pk_live_....
export PERCIA_API_KEY=pk_live_...
export BASE=https://playground.percia.ai/api
curl -sS "$BASE/whoami" -H "Authorization: Bearer $PERCIA_API_KEY"

whoami answers with the account the key belongs to. A 401 means the key is wrong.

2. Pick a source#

# Percia fetches a public https video (mp4, mov, webm or mkv) itself.
curl -sS -X POST "$BASE/uploads/from-url" -H "Authorization: Bearer $PERCIA_API_KEY" \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com/clip.mp4"}'
# -> {"uploadId":"...","source":"percia-file://<uploadId>", ...}

Keep the value you get: percia-file://<uploadId>, percia-cam://<cameraId>, or your public link. That is the sourceUrl. A video file plays once and the watch ends when the video does.

3. Create a watch#

Leave notify out and the alert goes to your account email. To send it to your own server, add "notify": {"type":"webhook","target":"https://..."} (see Events and webhooks).

curl -sS -X POST "$BASE/watches/owned" -H "Authorization: Bearer $PERCIA_API_KEY" \
  -H 'content-type: application/json' \
  -d '{"sourceUrl":"percia-file://UPLOAD_ID","goal":"A person is walking in the frame"}'

The answer is 201 with the watch id and status: "active". A new watch shows judging.state: "starting" for up to four minutes until its first frames arrive. That is normal.

The goal is read by Percia before the watch is made. If it is too vague you get 422 clarification_needed with a question and nothing is created (see Watches and goals).

4. Read the alert#

When the goal becomes true, Percia emails you (or posts to the destinations you attached). To read the same events from code:

curl -sS "$BASE/watches/WATCH_ID/events?limit=20" -H "Authorization: Bearer $PERCIA_API_KEY"

Each event has the time, a reason written by the vision model, a confidence from 0 to 1, and a keyframe you can fetch.

5. Clean up#

curl -sS -X DELETE "$BASE/watches/WATCH_ID" -H "Authorization: Bearer $PERCIA_API_KEY"

Deleting needs the watches:delete scope on the key.

Next#

Stuck? Ask in the Percia Discord or email support@percia.ai. This page as Markdown: quickstart.md.

© 2026 PerciaPerciaOpen the appStatusDiscordSupportTermsPrivacyllms.txt