Skip to main content
POST
/
v1
/
scans
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" },
    "model": "mary",
    "lenses": ["attention", "purchase_intent", "manipulation"],
    "granularity": "second",
    "options": {
      "include_reasons": true,
      "include_benchmark": true,
      "include_raw": true,
      "include_fmri": false
    },
    "webhook_url": "https://yourapp.com/hooks/sapient"
  }'
{
  "scan_id": "mary_run_mq7c8f31_jad6o8tl",
  "status": "queued",
  "lenses": ["attention", "purchase_intent", "manipulation"]
}
Submit a piece of content (a video, audio track, page URL, or raw text) and Sapient runs it through the brain model, returning a queued scan you poll (or receive on a webhook_url). The completed scan is a per-second timeline: every lens you ask for, scored second by second, with optional per-second raw brain-network values, benchmarks, reasons, and detected moments. Pick the lenses you care about and the model to run, either mary (default) or qualia. Completed scans are priced per model: $0.50 for Mary, $1.00 for Qualia (see pricing).

Body Parameters

input
object
required
The content to analyze.
model
string
default:"mary"
Which brain model to run: mary (default, $0.50/scan) or qualia (the video specialist, $1.00/scan). Omit the field to use Mary. qualia requires a video URL input. See Models.
lenses
string[]
Which lenses to score. Any subset of the seven: attention, purchase_intent, manipulation, emotion, cognitive_effort, memory, surprise. Defaults to the top three. Unknown values are ignored.
granularity
string
default:"second"
The timeline resolution. Per-second is the default and the only resolution today.
options
object
Toggles for what the completed scan includes.
webhook_url
string
If set, Sapient POSTs the completed scan to this URL once it finishes. Best-effort; polling is always available as a fallback.

Response

scan_id
string
The scan identifier, e.g. mary_run_mq7c8f31_jad6o8tl. Use it to poll for the result.
status
string
queued on submit. Later transitions to processing, then complete (or error).
lenses
string[]
The normalized lens list this scan will score. It echoes your request, deduped and defaulted.
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" },
    "model": "mary",
    "lenses": ["attention", "purchase_intent", "manipulation"],
    "granularity": "second",
    "options": {
      "include_reasons": true,
      "include_benchmark": true,
      "include_raw": true,
      "include_fmri": false
    },
    "webhook_url": "https://yourapp.com/hooks/sapient"
  }'
{
  "scan_id": "mary_run_mq7c8f31_jad6o8tl",
  "status": "queued",
  "lenses": ["attention", "purchase_intent", "manipulation"]
}