Skip to main content

Run your first scan

1

Get a key

Sign in at thesapientcompany.com, open Settings → API, and create a sk_live_ key. See Authentication for details.
2

Submit a scan

POST your content to /api/v1/scans. You get back a scan object with a scan_id and a status of queued.
curl https://www.thesapientcompany.com/api/v1/scans \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "input": { "type": "video", "video_url": "https://yourcdn.com/ad.mp4" } }'
# → { "scan_id": "mary_run_abc123", "status": "queued", "lenses": [ … ] }
3

Poll for the result

Poll GET /api/v1/scans/{scan_id} until status is complete. The completed scan holds the per-second timeline (each lens scored second by second), detected moments, and a plain-English summary.
curl https://www.thesapientcompany.com/api/v1/scans/mary_run_abc123 \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# → { "scan_id": "mary_run_abc123", "status": "complete", "timeline": [ … ], "summary": "…" }