API reference
POST /v1/behavior Live
Probabilities for lying, standing, walking, running, eating, drinking, grooming and unknown, per animal per sampled frame, plus each animal's share of time in each.
The path is /v1/behavior; /v1/behaviour works too. The field inside the JSON is spelled behaviour, as in the full result schema.
Request
Send a video the same way as /v1/analyze (raw bytes, or video_b64 in JSON), with the same options: species, max_seconds, start_s, step_s. Or pass sample to get a stored result of a real run with no video: nothing is metered and the response says "sample": true.
curl -s -X POST "https://vitalsbio-console.pages.dev/api/v1/behavior?sample=cow-lying" \ -H "Authorization: Bearer $VITALSBIO_API_KEY" curl -s "https://vitalsbio-console.pages.dev/api/v1/behavior?species=cattle&max_seconds=20" \ -H "Authorization: Bearer $VITALSBIO_API_KEY" -H "Content-Type: video/mp4" \ --data-binary @barn.mp4
Samples: cow-lying, dog-walk, brangus-herd, paddock, white-horses. This endpoint runs the same model call as /v1/analyze and is metered the same way, by seconds of video. If you need more than one part of the same clip, call /v1/analyze once.
Response
| Field | What it is |
|---|---|
capability | The status of this part: live (passed its locked test), preview, pending or off. Read it before you rely on the numbers. |
sample | true when the answer is a stored result, not a run on your video. |
animals[].top | The behaviour with the largest share over the clip. |
animals[].share | Mean probability of each behaviour over the animal's frames. Sums to 1. |
animals[].frames[].behaviour | The eight probabilities for that frame. |
usage.video_seconds | Seconds of video metered for this call. Also in the X-Vitals-Video-Seconds header. |
request_id, api_version | Also in the X-Request-Id and Vitals-Version headers. |
This is the real answer for sample=cow-lying, cut short:
{
"object": "behavior",
"request_id": "req_Lr0d1sY2rE9q",
"api_version": "2026-11-21",
"schema_version": "biomodel-v0.1",
"capability": {
"id": "behaviour",
"name": "Behaviour",
"status": "live",
"mode": "on",
"label": "Live"
},
"sample": true,
"video": {
"fps": 25,
"width": 1920,
"height": 1080,
"n_frames": 689,
"step_s": 0.2
},
"model": {
"name": "vitals-biomodel",
"version": "biomodel-v0.1"
},
"animals": [
{
"track_id": 1,
"species": "cattle",
"top": "lying",
"share": {
"lying": 0.962,
"standing": 0.038,
"walking": 0,
"running": 0,
"eating": 0,
"drinking": 0,
"grooming": 0,
"unknown": 0
},
"frames": [
{
"t_s": 0,
"frame_index": 0,
"behaviour": {
"lying": 0.893,
"standing": 0.107,
"walking": 0,
"running": 0,
"eating": 0,
"drinking": 0,
"grooming": 0,
"unknown": 0
}
}
]
}
],
"usage": {
"video_seconds": 0
}
}
Errors, limits and headers are the same on every endpoint: see errors and rate limits. For a long video or a camera, see streaming.