The API
Two endpoints and one shape of answer. The SDKs wrap all of it, and this page is what goes over the wire.
Endpoints
| WS /v1/stream | Live audio and video. You send frames, and an event comes back for every 20 to 100 ms. |
|---|---|
| POST /v1/analyze | A file: audio, video, an image or a PDF. One result comes back, or is posted to your webhook. |
Opening a stream
The first message is JSON and says what you want. Everything you send after it is media.
{
"schema_version": "1.0.0",
"mode": "shadow",
"preset": null,
"models": ["voice-auth-8k", "multi-speaker", "prosody-qa"],
"policy_profile": "balanced_default",
"media": {
"audio": { "codec": "pcm_s16le", "sample_rate": 16000, "channels": 1 }
}
}| Field | What it holds |
|---|---|
| schema_version | The version of this contract. Every event carries it back. |
| mode | shadow only reports: an answer that takes longer than 15 ms is dropped, and the stream carries on. enforce is for when your product acts on the verdict. |
| models | The models to run, by ID. Name one or several. |
| preset | In place of models: a ready-made list for one product, such as voice_guard. |
| policy_profile | The thresholds that turn readings into a verdict. Start with balanced_default. |
| media | What you are about to send: the codec of the audio or the video, with its sample rate or frame rate. |
Sending media
Media goes as binary frames, never as base64. Each frame starts with nine bytes that say what it is and when it was captured.
| Byte 0 | The kind of frame: 0x01 audio, 0x02 video. |
|---|---|
| Bytes 1 to 8 | The time of the frame in microseconds: an unsigned 64-bit integer, little-endian. |
| The rest | The frame itself. 20 ms of audio is 640 bytes as 16 kHz PCM, or 160 bytes as 8 kHz μ-law. |
The event
One comes back for every 20 to 100 ms of the stream. This one is from a call with three models named.
{
"schema_version": "1.0.0",
"session_id": "ses_01MFVOICE01",
"delivery_mode": "live_stream",
"pts_ms": 1420,
"mode": "shadow",
"runtime_ms": 4.1,
"engine_bundle": "2026.12-stable",
"engine_bundle_hash": "sha256:9f3a81c4e20b7d12",
"models": {
"voice-auth-8k": {
"human_prob": 0.14,
"spoof_type": "neural_vocoder",
"calibrated_band": "high_risk"
},
"multi-speaker": {
"active_speakers": 1,
"second_speaker_whisper": 0.03,
"crosstalk": 0.02
},
"prosody-qa": { "mos": 4.1, "aec_echo": 0.01, "read_cadence": 0.78 }
},
"fused_verdict": "challenge",
"reason_codes": [
{
"code": "VOCODER_PHASE_ARTIFACT_8KHZ",
"severity": "critical",
"confidence": 0.86
}
]
}| Field | What it holds |
|---|---|
| session_id | The stream or the file the event belongs to. |
| delivery_mode | How the request ran: cloud_batch, live_stream, browser_webgpu or self_hosted_container. |
| pts_ms | Where in the stream the event is, in milliseconds. Empty for a file read as a whole. |
| runtime_ms | How long the models took to produce it. |
| engine_bundle | The model pack that answered, with its hash in engine_bundle_hash. |
| models | One reading for each model you named. A model's own page lists its fields. |
| fused_verdict | The readings taken together, as one verdict from the list below. |
| recommended_action | With a challenge, what to ask of the person. Left out when there is nothing to do. |
| reason_codes | What was seen: a code, how severe it is and how sure the model is. |
| artifacts | Signed addresses of what was made: redacted_media_url, tamper_heatmap_url and audit_certificate_url. Each expires. |
Verdicts
Readings are calibrated, so the same number means the same thing next month, and you can tie an action to each verdict.
| pass | Nothing to act on. |
|---|---|
| redact_pass | Redaction is done, and no frame had to be withheld. |
| telemetry_ok | Readings only, such as gaze or hands, with nothing to judge. |
| flag_segment | A stretch of the media is marked for a closer look. |
| challenge | Ask the person for proof that they are live. The event says how in recommended_action. |
| review | Send it to a person to look at. |
| high_risk_tamper | A photo or a document shows strong signs of editing. Hold what depends on it. |
| block | Stop the call, or refuse the file. |
| fail_open_timeout | In shadow mode the answer was late and was dropped. The stream carried on. |
Files
Send the file itself as multipart/form-data, or the address of one in your own storage, with models and mode. Name a webhook_url to have the result posted to you.
result = client.analyze(
file="receipt.pdf",
models=["doc-forensics"],
webhook_url="https://example.com/milliframe",
)The result has the same models, fused_verdict and reason_codes as an event, and adds what belongs to the model.
| Model | What its result adds |
|---|---|
| visual-auth | The edited regions of a photo as polygons, and a heatmap to lay over it at tamper_heatmap_url. |
| doc-forensics | The lines and the places that give the document away, with the reason for each. |
| pii-video, pii-audio | The redacted video or audio at redacted_media_url, and a count of what was removed. |
| Any model | A signed PDF of the result at audit_certificate_url. A later change to it shows. |
Batch jobs
A long recording, or the address of one in your own storage, runs as a job. Models that list a batch price cost about 30% less this way, and the output is deleted on the timer you set.
job = client.analyze(
file="s3://your-bucket/session_042.mp4",
models=["pii-video", "hands-3d-60hz"],
webhook_url="https://example.com/milliframe",
output_ttl_sec=3600,
)| Field | What it holds |
|---|---|
| job_id | The name of the job, to ask for its status later. |
| status | queued, processing, completed or failed, and expired once the output has been deleted. A long file also passes through chunking and stitching. |
| output_ttl_sec | How long the output is kept after the job is done: from five minutes to 24 hours. |
| webhook_url | Where the finished job is posted. Without one, ask for the job by its ID. |
| artifacts | Signed addresses that expire with the output: events_jsonl_url for the events of the whole file, and the same three as in an event. |
Presets
A preset names every model in a recipe, so the request stays the same when a model is added to it.
| Preset | For | Models |
|---|---|---|
| voice_guard | Voice agents, dialers and phone AI | call-screener-8k, voice-auth-8k, multi-speaker, prosody-qa, pii-audio, sound-events-rt, affect-av, watermark-8k |
| robotics_embodied | Robotics, wearables and physical AI | pii-video, pii-audio, hands-3d-60hz, gaze-60hz, screen-ocr-fast, hand-object-contact, body-pose-3d, ego-depth-fast |
| exam_integrity | Hiring, exams and live identity | visual-auth, voice-auth-8k, lip-sync, gaze-60hz, multi-speaker, face-mesh-60hz, sound-events-rt, prosody-qa |
| claim_forensics | Returns, claims and computer use | visual-auth, doc-forensics, screen-ocr-fast, pii-video |
| dubbing_qc | Dubbing, avatars and media | lip-sync, face-mesh-60hz, hands-3d-60hz, prosody-qa, screen-ocr-fast, body-pose-3d, affect-av, matte-60hz, music-slop-auth |
| research_accessibility | Research, health, fitness and accessibility | gaze-60hz, hands-3d-60hz, face-mesh-60hz, multi-speaker, sound-events-rt, pii-video, pii-audio, body-pose-3d, affect-av |
Versions
schema_version changes only when this contract does. The models themselves are updated every month behind the same IDs, so your code does not change, and each event says which pack answered in engine_bundle.