---
title: "Public API v1"
description: "The stable, versioned API for scripts and integrations — what it covers, what \"stable\" means, and how it changes over time."
url: https://vigiora.com/docs/developers/api-v1
updated: 2026-12-04T12:50:27.000Z
---

# Public API v1

> The stable, versioned API for scripts and integrations — what it covers, what "stable" means, and how it changes over time.

**API v1** is the public API of every Vigiora server, at `/api/v1`. Use it for scripts, integrations and generated client libraries: list and manage cameras and their AI services, look up camera models in the camera catalogue, take snapshots and frames from the recordings, steer PTZ cameras and manage their presets, check and fix a camera's clock, read and acknowledge alerts, manage alert rules, find and protect recordings, export clips and share them, keep saved pictures and clips in a library, receive live events and signed webhooks, read the Guardian log and the Briefing, find objects on a camera or in a photo, count people with Analytics, read floor plans or have the AI draw one from a description, compose AI views of the cameras, read, translate and summarise transcripts, use and control Home Assistant's devices, set up Zigbee and pair, name and manage IoT devices, survey the Bluetooth devices nearby, name a camera from its picture, read the errors the web app reported, manage users, sites, rooms and settings, export or import the configuration, find devices on the server's local network, and run the setup wizard's health check and camera detection. AI assistants can use the same operations through the built-in [MCP server](https://vigiora.com/docs/developers/mcp).

It is built for stability: one consistent style, scoped API keys, and a promise that nothing you rely on is removed or changed within v1.

## What v1 covers

| Area | What you can do |
| --- | --- |
| **Cameras** | List, add, change, enable or disable cameras (one by one or up to 100 at once), turn AI on or off, get a live JPEG snapshot, and ask the AI to analyse a camera now. From 1.6.10: every camera setting, its AI services and their settings, reference frames, audio and stream health, and object recognition on a frame. From 1.6.13: signed live video (HLS) and snapshot links, and speaking through a camera's speaker. |
| **PTZ** | Move, stop and go to presets on pan/tilt/zoom cameras. From 1.6.20: save, rename, move and delete presets. |
| **Camera clocks** | Read a camera's own clock against the server's, fix it, and set the time zone it should be in. New in 1.6.20 (API 1.45.0). |
| **Alerts** | List alerts and detections, get their snapshot, acknowledge or unacknowledge them, and send alerts from your own sensors. Recognised faces and their photos. From 1.6.10: alert rules, deleting alerts, a camera's detection events with the add-ons' reports, object tracks, people counts and motion levels. From 1.6.11: a person rule can wait for the object detector to confirm. From 1.6.13: the unacknowledged-alert summary and room alert rules. |
| **Recordings** | List recorded segments, read a camera's coverage timeline, play a segment, and protect or unprotect it. From 1.6.10: a still frame at any recorded moment, the days with recordings and an alert's recording. |
| **Clips** | Export a clip of up to 30 minutes, download it, list your clips, and create or revoke public share links. |
| **Library** | Save pictures and clips on the server in folders and albums, upload your own, play an album through, and share a saved item or an album. New in 1.6.20 (API 1.52.0). |
| **Events** | A live event stream (Server-Sent Events) with resume, and the event log of the last 7 days. New in 1.6.5 (API 1.2.0). |
| **Webhooks** | Admins subscribe URLs to event types. Deliveries are signed, tested, retried and logged. New in 1.6.5. |
| **Guardian** | The Guardian log (what the AI saw and heard), search by meaning, and Guardian chat. New in 1.6.6 (API 1.4.0). From 1.6.10: each entry's frame, clip and detections, conversations, speech transcripts, the Briefing, AI Live, and describing an uploaded image. From 1.6.11: whether a person detector watched the clip, and the alerts it held back. From 1.6.13: delete, restore and purge moments, why the picture was chosen, the clip's time range and pre-roll, and the room feed. |
| **Sites, rooms, layouts, system** | Read sites, rooms and layouts; the server's status and component health. New in 1.6.6. From 1.6.10: create, change and delete sites, rooms, speakers, layouts and layout sequences; the dashboard, mesh, update, plan and remote access status; the vigiora-clients fleet. From 1.6.11: camera speakers played by the server itself. |
| **Users and settings** | Admins list, add, change and delete users, list groups, and set the recording defaults for new cameras. New in 1.6.6. From 1.6.10: groups, faces and how long add-on reports are kept. |
| **Analytics** | Counting lines, zones and areas; counts in and out, occupancy, dwell time and heatmaps. New in 1.6.13 (API 1.15.0). From 1.6.16: queues, parking bays, speed, busy hours, paths, alert rules and door displays. See [Analytics](https://vigiora.com/docs/ai/analytics). |
| **Floor plans** | Plans with their image, the cameras, speakers, rooms and areas placed on them, the live state, and where a camera is. New in 1.6.13 (API 1.23.0). |
| **Home Assistant and IoT** | Install, update and connect Home Assistant, and use its devices in Vigiora (selection, commands, triggers, rule actions, room signals and the action log). New in 1.6.13 (API 1.21.0 to 1.25.0). From 1.6.16: several Home Assistant instances. From 1.6.19: Zigbee set-up and the IoT devices list. From 1.6.20: control an entity (lights, covers, locks…) and survey the Bluetooth devices nearby. |
| **Things** | Every device in one model with capabilities, state, commands and CloudEvents envelopes on the event stream. New in 1.6.13 (API 1.18.0). |
| **Configuration** | Admins export the whole configuration as one JSON file and import it again. New in 1.6.6. |
| **Network** | Scan the server's local network, list devices with their maker, find the current IP of a MAC address, and move a camera to its new address. New in 1.6.7 (API 1.5.0). See [Network tools](https://vigiora.com/docs/developers/network-tools). |
| **Setup** | Run the health check and its safe fixes, detect a camera's streams from its login, add detected cameras, read and mark the setup checklist, and get the suggested AI cameras. New in 1.6.8 (API 1.7.0). |
| **Camera discovery** | Turn the automatic network scan on or off, scan now, and list or ignore the new cameras it found. New in 1.6.8. |
| **API keys** | Create keys with scopes, list and revoke them (signed-in users only). |
| **Me** | Check who a credential is and which scopes it has, and its human-in-the-loop policy for AI agents (from 1.6.9). From 1.6.13: `GET /server`, the server's identity and features. |

The full list, generated from the server's OpenAPI description, is in the [API reference](https://vigiora.com/docs/developers/api-reference). To try it, start with the [Quickstart](https://vigiora.com/docs/developers/api-quickstart).

## Base address

All paths start with `/api/v1`. Use whichever address reaches your server:

| From | Base address |
| --- | --- |
| Anywhere | `https://yourname.vigiora.com` (your site address) |
| Your local network | `http://192.0.2.10:8080` (the server's LAN address) |

Every server also serves its own OpenAPI 3.1 description at `/api/v1/openapi.yaml` and `/api/v1/openapi.json`. Use it with any OpenAPI viewer or client generator. The description of the current release is also public on this site, without a key: [/openapi.json](https://vigiora.com/openapi.json) and [/openapi.yaml](https://vigiora.com/openapi.yaml).

## The stability promise

Within v1, changes are **additive only**:

- New operations, new optional parameters and request fields.
- New response fields. **Ignore fields you don't know.**
- New values in enums documented as open (for example a camera's `status`). Treat unknown values as "other".
- New error codes.

Nothing is removed, renamed or made stricter within v1: no operation, field, parameter or enum value disappears, no type gets narrower, no new required field or parameter appears, and no operation needs a broader scope than before. The server's test suite checks every change against the last released v1 description to enforce this.

## Versioning and deprecation

- The version is in the path. A breaking change ships as `/api/v2`, side by side with v1.
- The API has its own version number, `1.<minor>.<patch>`, separate from the server's. Additive changes raise the minor version. The OpenAPI description's `info.version` says which API version a server serves (API 1.30.0 at the time of writing, from server 1.6.16).
- When an operation or field is deprecated, it is marked `deprecated` in the description, and responses carry `Deprecation` and `Sunset` headers and a `Link: <…>; rel="deprecation"` header. It keeps working for **at least 12 months** (or two major server releases, whichever is longer) and is only removed in a new major version, never within v1.

## /api stays internal

The web app talks to the server through `/api`. That API is **internal**: it follows the web app and can change in any release. It is still described at `/api/openapi.yaml`, and existing API keys keep working on it exactly as before. For anything you want to keep working after updates, use `/api/v1`. See [Internal API](https://vigiora.com/docs/developers/rest-api).

## Phase 2: events, webhooks and protected recordings

Server 1.6.5 adds API 1.2.0, all additive:

- **Events**: `GET /api/v1/events/stream` (Server-Sent Events, resumable with `Last-Event-ID`) and `GET /api/v1/events` (the log). Scope `events:read`.
- **Webhooks**: `/api/v1/webhooks` with signed deliveries, a test send, retries, a delivery log and redeliver. Scopes `webhooks:read` and `webhooks:write`, admins only. Delivery is at least once. See [Webhooks and events](https://vigiora.com/docs/developers/webhooks-and-events).

### Protect recordings

`POST /api/v1/recordings/{id}/actions/protect` marks a recording so it is never deleted by retention, and `.../actions/unprotect` lifts that (a recording past its camera's retention goes at the next sweep). Both need the `recordings:write` scope and operator permission on the camera.

- Protected recordings may use at most **20% of the recordings disk**. Past that, protect answers `409 protect_limit`.
- On a critically low disk it answers `507 disk_low`. Protections you already have stay.
- Deleting an alert never removes the file of a protected recording.

## Phases 3 and 4: Guardian, users, settings and configuration

Server 1.6.6 adds API 1.4.0, all additive:

- **Read-outs**: `/sites`, `/rooms`, `/layouts`, `/system/status` and `/system/health` (scope `settings:read`), `/faces` (`alerts:read`), `/guardian/entries` and `/guardian/search` (`guardian:read`), `/users` and `/groups` (`users:read`, admins).
- **Guardian chat and analysis**: `POST /guardian/chat` asks Guardian a question, and `POST /cameras/{camera_id}/actions/analyze` runs one AI analysis now (`guardian:write`). Both use AI credits and have their own rate limits; see [Conventions](https://vigiora.com/docs/developers/api-conventions#rate-limits).
- **Bulk camera changes**: `POST /cameras/actions/bulk-update` turns `enabled`, `recording_enabled` or `ai_enabled` on or off for up to 100 cameras, with a result per camera.
- **Alerts from your own systems**: `POST /alerts` adds an alert on one of your cameras, with a `source` that names the system (filter with `GET /alerts?source=`). It shows up in lists, the Briefing, events and webhooks like the server's own alerts.
- **Users**: admins create, change and delete users (`users:write`). The last enabled admin can't be demoted, disabled or deleted (`409 conflict`), and every change is written to the audit log.
- **Settings**: `GET` and `PATCH /settings` hold the recording defaults that new cameras get. Existing cameras keep their own values.

### Configuration export and import

`GET /api/v1/config/export` (admins) returns the settings, sites, cameras, alert rules, rooms, layouts and outputs as one JSON document. Users, recordings and alerts are not included.

- Camera passwords and SRT passphrases are `REDACTED` by default. With `include_secrets=true` they are encrypted instead, with a passphrase you send in the `X-Export-Passphrase` header (at least 12 characters). That needs the `admin` scope and an admin user. The passphrase is never stored: keep it, or the encrypted values can't be restored.
- Every export is written to the audit log and sends a `config.exported` event.

`POST /api/v1/config/import` (the `admin` scope) applies such a document:

- **Dry run first**: `dry_run=true` returns the list of changes without applying anything.
- **All or nothing**: any invalid object, a wrong passphrase or a plan limit refuses the whole document, with every problem listed in `details.errors`.
- **Nothing is deleted**: objects are matched by id, a field that is absent keeps its stored value, and objects missing from the document stay as they are. Importing the same document twice changes nothing.
- **Retention reductions need confirmation**: lowering a camera's `retention_days` deletes older recordings, so it needs `allow_retention_reduction=true`.

From version 1.6.16 (API 1.27.0), the document also holds the [floor plans](https://vigiora.com/docs/using/floor-plans) with their items. `GET /config/export?format=bundle` returns a zip with the document and the plan images, and `POST /config/import` accepts that zip (`Content-Type: application/zip`, at most 256 MiB), so a whole site, plans included, moves to another server in one file.

## Network tools

Server 1.6.7 adds API 1.5.0, all additive:

- **Scan and devices**: `POST /network/actions/scan` scans the server's private subnets (allowlisted camera ports, optional ONVIF), `GET /network/scans/{scan_id}` polls it, and `GET /network/devices` lists what was found, with `vendor`, `has_port` and `unassigned` filters.
- **Lookup**: `GET /network/lookup?mac=` finds the IP a MAC has now (`?ip=` the reverse).
- **Relocate**: `POST /cameras/{camera_id}/actions/relocate` moves a camera to its MAC's new address, with `dry_run`. It is refused while the old address still answers (`old_address_alive`) or when the new address doesn't answer with the camera's MAC (`mac_mismatch`).
- **New scope** `network:read`, for admins and operators only. Scans send traffic on the LAN, so it is not part of read-only access. On a hosted server, or in Docker without host networking, the tools answer `409 network_unavailable`.

See [Network tools](https://vigiora.com/docs/developers/network-tools) for examples and the "camera changed IP" recipe.

## Setup wizard and camera discovery

Server 1.6.8 adds API 1.7.0, all additive. Everything the [setup wizard](https://vigiora.com/docs/getting-started/setup-wizard) does is in the API:

- **Health check**: `GET /setup/diagnostics` runs the 10 checks (`disk`, `clock`, `ports`, `cloud`, `go2rtc`, `ffmpeg`, `gpu`, `lan`, `dns`, `updates`), each `ok`, `warn`, `fail` or `skip` with a plain explanation and a `fix`: `auto` (an `action_id`) or `manual` (steps for the server's platform). `?cached=true` returns the last report. `POST /setup/diagnostics/actions/fix` runs one of `restart_go2rtc`, `check_updates` or `resync_cloud` (admins, `settings:write`, at most once every 20 seconds per fix).
- **Camera probe**: `POST /cameras/actions/detect` takes a camera's `ip`, `username` and `password` (and optionally its `vendor` and RTSP `port`) and finds its streams: ONVIF first, then the maker's known RTSP paths. It answers within about 20 seconds with `ok`, the stream URLs **without credentials**, codec, size, frame rate, a JPEG thumbnail and a `detection_id` (30 minutes, yours only), or `ok: false` with `failure.code` (`auth_failed`, `onvif_auth_failed`, `rtsp_closed`, `unreachable`, `no_stream`, `timeout`), a message and a hint. `POST /cameras/actions/detect-batch` does the same for up to 32 addresses with one login (poll `GET /cameras/detect-batches/{batch_id}`), and `POST /cameras/actions/add-detected` creates the cameras, so camera passwords never pass through your client.
- **Lockout protection**: the probe stops at the first refused login and doesn't send the same login to that camera again for 30 minutes. After 3 refused logins in 30 minutes it sends that camera no login at all: `429 rate_limited` with `details.reason: camera_login_budget` and `Retry-After`. Every detection carries `attempts_left` (0–3): warn the user when it drops.
- **Checklist**: `GET /setup/checklist` lists `health`, `cameras`, `recording`, `ai_cameras`, `notifications`, `phone_app` and `claude_connector` as `done`, `skipped` or `pending`; `PATCH /setup/checklist` marks items (admins). `GET /setup/ai-camera-suggestions` ranks the cameras for the plan's AI cameras (2 are free during the promotion).
- **Automatic scan**: `GET` and `PATCH /network/auto-scan` (`enabled`, `interval_minutes` of 15, 30, 60, 180 or 720), `POST /network/auto-scan/actions/run` (scan now, `network:read`), `GET /network/candidates` (new cameras with `confidence` `high`, `medium` or `low` and a `hint` for possible cameras) and `POST /network/candidates/{candidate_id}/actions/dismiss`. New cameras are announced with the `network.camera_found` event. On a hosted server the scan is always off.
- **Camera status**: `status` can now be `standby` (not recording, nobody watching; not a fault), and `camera.online` and `camera.offline` follow the camera's health. See [Webhooks and events](https://vigiora.com/docs/developers/webhooks-and-events#events).

The detection, scan and checklist operations are also [MCP](https://vigiora.com/docs/developers/mcp) tools.

## Human in the loop for AI agents

Server 1.6.9 adds API 1.8.0, all additive: `GET /agent-policy` (any credential) says whether AI agents using this credential must ask the user before risky operations, and lists them in `confirm_operations`; `GET` and `PATCH /settings/agents` read and set the server setting (admins change it); `PATCH /api-keys/{key_id}` sets a key's own choice (`inherit`, `on` or `off`). Operations that need approval are marked `x-vigiora-confirm` in the OpenAPI description. REST calls are never prompted: the [MCP server](https://vigiora.com/docs/developers/mcp) enforces it. See [Human in the loop](https://vigiora.com/docs/developers/human-in-the-loop).

## API 1.9 to 1.11: the rest of the app

Server 1.6.10 adds API 1.9.0 to 1.11.0, all additive: 156 new operations, so almost everything the web app does is now in v1. Writes that matter are confirm operations for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop) (the [API reference](https://vigiora.com/docs/developers/api-reference) marks each one).

### Alert rules

- **Guardian rules**: `GET /alert-rules` and `GET`/`POST /cameras/{camera_id}/alert-rules`, then `GET`, `PATCH` and `DELETE /alert-rules/{alert_rule_id}` and `.../actions/enable` or `disable`. A rule is a sentence the AI checks each analysed clip (`video_rule`) or transcript (`audio_rule`) against. See [Alert rules](https://vigiora.com/docs/ai/alert-rules).
- **Label alert rules**: `GET`/`POST /cameras/{camera_id}/label-alert-rules` and `/label-alert-rules/{label_alert_rule_id}` turn a detector label (`person`, `car`, an object you asked for…) into alerts. `GET /cameras/{camera_id}/labels` lists the labels the camera's detectors produced.
- **Smart-motion rules**: `/cameras/{camera_id}/motion-rules` and `/motion-rules/{motion_rule_id}`, a line to cross or a zone to enter.
- Scopes `alerts:read` and `alerts:write` (admins and operators). A rule on a camera without AI is still created, with `warnings: ["ai_not_enabled"]` (or `no_motion_trigger` when motion detection is off). E-mail recipients are set in the web app only, never with a key. Changes send the `alert_rule.created`, `alert_rule.updated` and `alert_rule.deleted` [events](https://vigiora.com/docs/developers/webhooks-and-events#events).

### Camera settings and AI services

- `PATCH /cameras/{camera_id}` now takes every camera setting: the sub stream, the ONVIF address, the AI and speech settings, and `guardian_use_detections` (see [Guardian add-on context](#guardian-add-on-context)). `client_id` and `hardware_id` need a user session.
- `GET /cameras/{camera_id}/ai-services` lists every AI service with whether it is on for the camera, its settings (`config`, `config_fields`) and warnings. `POST .../ai-services/{ai_service_id}/actions/enable` or `disable` switches one, and `PATCH .../ai-services/{ai_service_id}` changes its settings, for example the prompts of object recognition.
- `POST /cameras/{camera_id}/actions/enable-ai` also switches on motion detection when the camera has no motion trigger, and says so in `services_enabled`.
- Camera tools: the reference frame (`GET`, `DELETE` and `.../reference-frame/actions/capture`), `POST .../actions/compare` and `.../actions/read-plates` (`guardian:write`), audio level and status (from 1.115, with today's speech figures in `speech_today`), stream pipeline health, current objects, hardware id, and `GET /cameras/available-streams`.

### Frames from recordings and the Guardian frame and clip

- `GET /cameras/{camera_id}/frame?at=` (`recordings:read`, viewers too) returns the picture closest to `at` from the recordings, as JPEG or PNG, with `width`, `quality`, `stream` and `download`. `X-Vigiora-Frame-Time` is the frame's time. No footage then is `404 no_recording`, with the nearest recorded moments before and after. At most 30 a minute per credential. Through the relay a frame is a still image: it doesn't count against the free plan's remote video allowance.
- `GET /guardian/entries/{entry_id}/frame` (`guardian:read`) is the picture Guardian stored with an entry: the moment of the clip that shows the event best. `GET /guardian/entries/{entry_id}/clip` is the short clip it analysed (MP4).
- Entries are now plain text in your language (`lang` or `Accept-Language`), with every language in `descriptions`, and `occurred_at` and `created_at`.

### Sites, groups, layouts, faces, rooms and speakers

- Sites (`settings:write`), groups (`users:write`, admins), layouts and layout sequences (`settings:write`): create, change and delete.
- Faces: `PATCH` and `DELETE /faces/{face_id}` name and delete a face (the `admin` scope, admins, audited); `GET /alerts/{alert_id}/face-photo` is an alert's face crop.
- Rooms and speakers: create, change and delete rooms and speakers (`cameras:write`), a room's speakers and stock list, and `POST /rooms/{room_id}/actions/speak`, `.../play-audio` and `.../move-ptz` (`cameras:control`). A room's AI Live: start, stop, cards, digest and feedback (`guardian:write`).

### Briefing, conversations and transcripts

- `GET /briefing`, `/briefing/feed` and `/briefing/recap` (`guardian:read`) are the dashboard's [Briefing](https://vigiora.com/docs/using/briefing). Mark items reviewed with `POST /briefing/items/{briefing_item_token}/actions/mark-reviewed`. `POST /briefing/recap/actions/refresh` writes a new recap (uses AI credits).
- Guardian conversations: list, start, rename, delete and read their messages.
- `GET /guardian/transcripts`: what the cameras' microphones heard.
- Camera AI Live sessions (`/ai-live/sessions`), people counts (`/counts`), motion levels (`/motion`), an alert's recording (`GET /alerts/{alert_id}/recording`), deleting an alert, recording days, share links (`GET /shares`) and clip preflight.

### System, fleet and admin operations

- System (`settings:read`): AI status, dashboard, objects and their history, and for admins mesh, edge, plan, cloud plan, update and remote access. `POST /system/update/actions/check` checks for an update now (admins).
- vigiora-clients (`cameras:read` and `cameras:write`, admins and operators): list, status history, restart, update, resync cameras, install ffmpeg, add a camera on a client's network, remove.
- `GET` and `PATCH /settings` also hold `hal_events_retention_days`, how long HAL reports are kept (1 to 365 days, default 30).
- **User session only** (never an API key, never an MCP tool): costs, billing, connected apps, add-on instances (the Add-ons page, formerly HAL), external AI tools and switching remote access.

## API 1.12 to 1.14: speakers, person confirmation and presence

Server 1.6.11 adds API 1.12.0 to 1.14.0. All changes are additive: there are no new operations, only new fields.

- **Camera speakers played by the server (1.12.0).** On `POST /outputs`, `client_id` is now optional for a camera speaker (`kind: "camera_backchannel"`): `null`, `""` or leaving it out means this server plays the audio through its own video service, using the camera's two-way audio. That works for a camera the server streams itself (one with no vigiora-client). For a camera behind a vigiora-client, the client still plays it. `PATCH /outputs/{output_id}` accepts `client_id` for camera speakers: a vigiora-client's id, or `null` (or `""`) for this server. For a `usb` or `cast` speaker it stays required and can't be changed (`400 validation_error`). See [Speakers](https://vigiora.com/docs/admin/speakers-outputs#camera-speakers-played-by-the-server).
- **Person alerts confirmed by the object detector (1.13.0).** Alert rules have `require_detector_confirmation` (boolean, default `true`, on create and `PATCH`). It applies to rules about people (their name or video rule names a person, someone, an intruder…) on a camera with a person-capable object detector. If that detector was running for the whole clip and saw no person, the rule doesn't alert. Without such a detector, or when it wasn't running, the rule alerts as before. See [Alert rules](https://vigiora.com/docs/ai/alert-rules#only-alert-when-the-object-detector-also-sees-a-person).
- **Guardian entries (1.13.0 and 1.14.0)** have three new fields:
  - `detector_checked` (boolean): a person-capable detector watched the camera for the whole clip, so an entry without a `person` detection means it saw nobody. The AI was told so.
  - `unconfirmed_alerts`: the person rules (`alert_rule_id`, `name`) the AI matched on this clip that didn't alert because the detector saw no person. Empty when there are none.
  - `person_present_seconds` (1.14.0): how long a person was in view, from 2 seconds before to 2 seconds after the clip, according to the detector's presence report. `0` means the detector watched the whole clip and nobody was in view. `null` when no detector that reports presence covered the clip.

```json
{
  "id": 714,
  "camera_id": 3,
  "description": "The driveway is empty; sunlight and shadows move across the ground.",
  "detections": [],
  "detector_checked": true,
  "unconfirmed_alerts": [ { "alert_rule_id": 1, "name": "person at the gate" } ],
  "person_present_seconds": 0
}
```

## API 1.15 to 1.25: Analytics, floor plans, Home Assistant and more

Server 1.6.13 adds API 1.15.0 to 1.25.0, all additive: 89 new operations (347 in all) and seven new scopes. Writes are confirm operations for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop), as the [API reference](https://vigiora.com/docs/developers/api-reference) marks them. `GET /server` lists the optional features a server has in `features`, so an integration can check before it calls them.

### Live video and snapshot links

`POST /cameras/{camera_id}/actions/stream-url` (`cameras:read`) returns a short-lived **signed link** to the camera's live video, for players that can't send an API key, such as Home Assistant, VLC or a browser `<video>`:

```bash
curl -s -X POST https://yourname.vigiora.com/api/v1/cameras/3/actions/stream-url \
  -H "Authorization: Bearer vgk_xxxxxxxx_xxxxxxxxxxxxxxxx" -H "Content-Type: application/json" \
  -d '{"ttl_seconds":600,"quality":"sub"}'
```

```json
{
  "camera_id": 3,
  "hls_url": "/api/v1/media/<token>/stream.m3u8",
  "rtsp_url": null,
  "webrtc": null,
  "quality": "sub",
  "format": "mpegts",
  "expires_at": "2026-11-03T10:10:00Z",
  "ttl_seconds": 600
}
```

- The link is **HLS only**. `hls_url` is relative to the server's address. `rtsp_url` and `webrtc` are always `null`.
- `ttl_seconds` is 60 to 3600 (default 600). Ask for a new link before `expires_at`. `quality` is `main` (default) or `sub`. `format` is `mpegts` (default) or `fmp4`, which H.265 cameras need.
- The link carries no credential. It stops working at once when the key that made it is revoked or expires, its user is disabled, or the user loses the camera.
- The server proxies its own stream, so the camera's address and password are never exposed. No stream on this server answers `503 stream_unavailable`.
- At most 60 links a minute and 6000 media requests a minute per credential. Every link is written to the audit log.

`POST /cameras/{camera_id}/actions/snapshot-url` does the same for a still image (`/api/v1/media/<token>/image`). The media routes (`/media/...`) are not MCP tools.

### Motion, presence and signed links in events

- `motion.started` (the first real motion) and `motion.ended` (30 seconds without motion) come from motion detection.
- `presence.changed` (`label`, `present`, `reason`) comes from the object detector's presence reports, including `reason: detector_silent` when a detector stops while someone is in view.
- `guardian.event` now carries `has_frame`, `has_clip`, `detections`, `detector_checked`, `person_present_seconds` and `person_present`. `alert.created` carries `has_snapshot`.
- Events on the stream and in the log carry `data.snapshot_url` with `snapshot_url_expires_at`: a signed image link, valid 15 minutes, made for each reader. Webhooks don't get them.

See [Webhooks and events](https://vigiora.com/docs/developers/webhooks-and-events#events).

### Camera speak, server identity and alert summary

- `POST /cameras/{camera_id}/actions/speak` (`text`, `volume` 0–1) speaks through the camera's own speaker (`cameras:control`, admins and operators). No speaker is `404`; a camera whose speaker check found no two-way audio is `422 speaker_not_supported`. At most 12 a minute per credential.
- `GET /server` (any credential) is the server's stable `id`, `name`, `site_address`, `version`, `edition`, `timezone`, `api_version` and `features`. It holds no secrets.
- `GET /alerts/summary` (`alerts:read`) counts the unacknowledged alerts in total, by severity and by camera, with `latest_at` and `latest_id`. Poll it to notice new alerts cheaply. It counts only the cameras the caller may view.

### Things: one model for every device

The **Things** model describes every device in one shape, for integrations such as Home Assistant or an MQTT bridge:

- `GET /thing-capabilities` is the catalogue: each capability (`video_stream`, `snapshot`, `motion`, `presence`, `alert`, `recording`, `ai_guardian`, `ai_mode`, `ptz`, `speak`, `occupancy`, `counter`, `onoff`, `lock`…) with its state schema, its commands and its events. Each command names the operation it runs, its scope, roles and `hitl` class.
- `GET /things` and `GET /things/{thing_id}` (`cameras:read`) list the server, cameras, microphones, speakers, rooms and Analytics areas you may see, with their capabilities and current state. `?kind=` filters. Home Assistant devices shared with Vigiora also appear, as `kind: external` with ids like `ha:light.porch`; they also need `devices:read`.
- `POST /things/{thing_id}/commands/{capability}.{command}` runs the one existing operation behind the command, with its checks, rate limits and audit. It is not an MCP tool: agents call the operations themselves, so human in the loop applies.
- `GET /events/stream?format=things` sends events as CloudEvents 1.0 envelopes, with types like `vigiora.motion.started` and the thing as `subject`.

See [Things and MQTT](https://vigiora.com/docs/home-assistant/things-and-mqtt) for an example.

### Rooms: AI mode and room alert rules

- A room has `ai_mode`: `live`, `guardian` or `both`, plus `ai_live_classic`, `ai_live_coalesce_seconds` (default 10) and `ai_live_keepalive_seconds` (default 300) for its event-driven AI Live. See [Rooms](https://vigiora.com/docs/using/rooms).
- `GET`/`POST /rooms/{room_id}/alert-rules` and `GET`, `PATCH`, `DELETE /rooms/{room_id}/alert-rules/{alert_rule_id}` manage rules checked on every camera of the room (`alerts:read`, `alerts:write`).
- `GET /rooms/{room_id}/guardian-entries` is the room's Guardian feed.

### Delete and restore moments

- `DELETE /guardian/entries/{entry_id}` and `POST /guardian/entries/actions/delete` (`ids`, up to 200) delete Guardian moments with their clip, frame and the alerts Guardian raised for them (`guardian:write`, admins and operators). Recordings are never deleted.
- Deleted moments go to **Recently deleted**: `GET /guardian/trash`, `GET /guardian/trash/{entry_id}/frame`, `POST /guardian/trash/actions/restore` (puts them back with the same ids) and `POST /guardian/trash/actions/purge` (admins). They are purged automatically after `retention_days` (default 7, 1–90): `GET` and `PATCH /guardian/trash/settings` (changing it needs `settings:write`, admins).
- A moment covered by a protected recording answers `409 entry_protected`. One covered by a clip export or public share link answers `409 entry_shared`; an admin can delete it anyway with `force=true`, which revokes the links.
- The bulk delete answers `{succeeded, failed}` with a code per failed id. The `guardian_trash` feature in `GET /server` says the server has it.

### Better pictures and clips

- Guardian entries have `frame_time`, `frame_reason` (`best_detection`, `presence` or `default`) and `frame_box`: when and why the picture was chosen, and the box of the subject in it.
- Entries also have `clip_start`, `clip_end` and `clip_reason`: the clip's time range. Clips now start a few seconds **before** the motion (the pre-roll), and are widened when the detectors saw the subject just outside them.
- The pre-roll is set for the server with `GET` and `PATCH /guardian/clips/settings` (`preroll_seconds`, 0–10, default 3; changing it needs `settings:write`, admins), and per camera with the camera's `guardian_clip_preroll_sec` (`null` uses the server value).
- Two one-off backfills, admins only, never run on their own: `POST /guardian/entries/actions/recompute-frames` re-chooses the picture of recent entries, and `POST /guardian/entries/actions/recompute-clips` re-cuts their clips from the recordings. Run them with `dry_run: true` first:

```bash
curl -s -X POST https://yourname.vigiora.com/api/v1/guardian/entries/actions/recompute-clips \
  -H "Authorization: Bearer vgk_xxxxxxxx_xxxxxxxxxxxxxxxx" -H "Content-Type: application/json" \
  -d '{"days":7,"camera_id":3,"dry_run":true}'
```

The answer counts the entries `examined`, `updated`, `covered` (the subject is already in the clip), `no_evidence`, `no_recording`, `unchanged` and `failed`, and lists them. A second run changes nothing. Run `recompute-frames` after `recompute-clips` so the picture follows the new clip.

### Analytics

[Analytics](https://vigiora.com/docs/ai/analytics) has 19 operations with the scopes `analytics:read` and `analytics:write`:

- **Set up:** `/analytics/lines`, `/analytics/zones` and `/analytics/areas` (list, create, change, delete), and `GET` and `PATCH /cameras/{camera_id}/analytics` for a camera's analytics settings. Lines and zones use image coordinates from 0 to 1. Crossing a line from the right of a→b to its left counts "in".
- **Read:** `GET /analytics/counts` (in and out through an area's entrance lines, one line or a camera, with an optional `step` series), `/analytics/occupancy` (how many are in each area now), `/analytics/dwell` (time spent in zones) and `/analytics/heatmap` (a 64 × 36 grid of passes or stops).
- **Correct:** `POST /analytics/areas/{analytics_area_id}/actions/set-occupancy`.
- Periods take `from` and `to` (a local time without an offset is in the server's time zone) or `period` (`today`, `yesterday`, `this_week`…). Counts are kept in 15-minute buckets. When `covered_pct` is under 100, the detector was not watching the whole period: say so when you report the numbers.

```bash
curl -s "https://yourname.vigiora.com/api/v1/analytics/counts?area_id=1&period=today&step=1h" \
  -H "Authorization: Bearer vgk_xxxxxxxx_xxxxxxxxxxxxxxxx"
```

A camera needs the Analytics add-on and an object detector. Keys from **Settings** → **People and access** → **API keys** without scopes don't get `analytics:read`: use a scoped key or sign-in (see [Authentication and scopes](https://vigiora.com/docs/developers/api-authentication#keys-without-scopes)).

### Floor plans

[Floor plans](https://vigiora.com/docs/using/floor-plans) use the scopes `floorplans:read` and `floorplans:write`:

- `GET /floor-plan-sites`, and `/floor-plans` to list, create, change and delete plans. Upload the image as `multipart/form-data` or as `image_base64` in JSON: PNG or JPEG, at most 18 MB and 40 megapixels. `GET /floor-plans/{floor_plan_id}/image` is the image (not an MCP tool).
- `GET /floor-plans/{floor_plan_id}/items` and `POST .../items/actions/replace` read and replace what is placed on the plan: cameras with their direction, angle and range, speakers, rooms and Analytics areas. Saves carry the plan's `version`; a stale one answers `409 conflict`.
- `GET /floor-plans/{floor_plan_id}/live` is the live state: camera status, recording, unacknowledged alerts of the last 24 hours, and the occupancy of the Analytics areas on the plan.
- `GET /cameras/{camera_id}/locations` says where a camera is, with a plain description such as "faces north-east, covers Reception".

Admins, and operators who manage the site, can change plans. Others see only the devices they may see.

### Home Assistant

The [Home Assistant](https://vigiora.com/docs/home-assistant/overview) operations are under `/integrations/home-assistant`:

- **Install and manage** (admins): `GET /integrations/home-assistant` (status, `settings:read`), `GET .../discovered` (Home Assistant found on the network, `network:read`), and the actions `install`, `connect-existing`, `update`, `update-integration`, `restart` and `uninstall` (`settings:write`). `reveal-owner-password` needs a user session.
- **The bridge** (Home Assistant's devices in Vigiora): `GET .../bridge` and the actions `connect` and `disconnect`; `GET .../entities` and `.../entities/{entity_id}/actions/set-access` (admins choose what is shared: `none`, `read` or `control`); `GET .../devices`, `PATCH .../devices/{entity_id}` (camera and room links) and `POST .../devices/{entity_id}/actions/command`; `.../room-signals/{room_id}`, `.../triggers`, `.../rule-actions/{alert_rule_id}` and `GET .../action-log`. Pending approvals (`.../pending-actions`, approve and deny) need a user session.
- **Scopes:** `devices:read`, `devices:write` and `devices:control`, admins and operators only. A device command that Home Assistant refuses or can't run answers `502 device_failed`. Locks, alarm panels and sirens are **sensitive**: a command needs `acknowledge_sensitive: true`, and over MCP it always asks the person, even with human in the loop off.
- Home Assistant's token is never returned or logged.

### New error codes

`stream_unavailable` (503), `speaker_not_supported` (422), `entry_protected` and `entry_shared` (409) and `device_failed` (502). See [Conventions](https://vigiora.com/docs/developers/api-conventions#error-codes).

## API 1.26 to 1.30: Analytics alerts, door displays, integrations and more

Server 1.6.15 adds API 1.26.0 and server 1.6.16 adds API 1.27.0 to 1.30.0, all additive: 36 new operations (383 in all) and no new scopes. Writes are confirm operations for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop). `GET /server` lists the new optional features in `features`: `mqtt`, `chat_notifications`, `picture_links`, `analytics_queues`, `analytics_bays`, `analytics_alerts` and `analytics_display`.

### Analytics: queues, bays, speed and more

New read operations (`analytics:read`), with the same periods as the other Analytics reads:

- `GET /analytics/queues`: people queuing now and waiting times per queue zone.
- `GET /analytics/bays`: each parking bay free or taken, with the current stay, and stays over the period.
- `GET /analytics/speed`: average and fastest speeds per class on calibrated cameras, with `calibrated` saying whether a camera of the scope has a reference distance.
- `GET /analytics/busy-hours`: a weekday × hour grid, in local time.
- `GET /analytics/flows`: the top 10 flows on a camera, from one line or zone straight to another. `GET /analytics/paths` returns the paths themselves (not an MCP tool).

Zones gain `kind` (`zone`, `queue` or `bay`), `queue_min_wait_sec`, `reserved_schedule` and `max_stay_min`; areas gain `open_hours`; a camera's analytics settings gain `calibration` (two points and `metres`). Schedules use one weekly format: an object keyed `mon` to `sun`, each an array of `["HH:MM","HH:MM"]` local-time windows, the end excluded, an end before the start running past midnight, a missing day closed, and `null` for always. See [Queues, parking and speed](https://vigiora.com/docs/ai/queues-and-parking).

### Analytics alert rules and door displays

- `GET` and `POST /analytics/alert-rules`, and `PATCH` and `DELETE /analytics/alert-rules/{analytics_alert_rule_id}`: rules with a `kind`, exactly one target (`zone_id`, `line_id`, `area_id` or `camera_id`), `params`, a `schedule`, `channels` (`push`, `email`, `webhook`, `telegram`, `line`, `snapshot`), `severity` and `cooldown_sec` (default 300). The kinds and their parameters are in the [API reference](https://vigiora.com/docs/developers/api-reference) and on [Analytics alerts](https://vigiora.com/docs/ai/analytics-alerts).
- `GET /analytics/alert-events`: the history of firings with the measured `value` and the `detection_id` of the alert raised. Alerts carry `source: "analytics"` and a label `analytics:<kind>`; `POST /alerts` refuses `analytics:` and `plate:` labels.
- `GET` and `POST /analytics/displays`, `DELETE /analytics/displays/{analytics_display_id}`: [door displays](https://vigiora.com/docs/ai/door-display). The token and its address are in the answer to the create only. The public page and its JSON are not part of v1.

### Add a camera: device facts and Move to DHCP

- Network scans (`/network/actions/scan`) now ask cameras to identify themselves (SADP, Dahua, ONVIF, SSDP, mDNS). Devices carry `model`, `firmware`, `serial`, `name`, `discovery`, `dhcp`, `activated`, `vendor_class` (`module` for generic Wi-Fi modules), `known_camera_name`, and `ip_conflict` with `conflict_mac`.
- `detect` and `detect-batch` return the camera's `manufacturer`, `model`, `firmware`, `serial`, `ptz`, `audio_in`, `audio_out`, `has_audio`, a `credential_hint` and a `suggested_name`. `add-detected` takes `width`, `height`, `fps`, `hal_objects` and `ai_guardian_enabled` (off unless you set it).
- `POST /network/devices/actions/move-to-dhcp` (admins, `cameras:write`, a confirm operation) switches a camera with an address conflict to DHCP in the background: it answers `202` with a `Location`, and `GET /network/dhcp-moves/{job_id}` follows the steps. See [Move a camera to DHCP](https://vigiora.com/docs/cameras/add-a-camera#move-a-camera-to-dhcp).

### Integrations: MQTT, Telegram and LINE

`GET` and `PATCH /integrations/mqtt`, `/integrations/telegram` and `/integrations/line`, and their `actions/test` (`settings:read` for admins and operators, `settings:write` for admins). Passwords and tokens can be set but are never returned: the answer says `password_set` or `token_set`. The `PATCH` operations refuse `Idempotency-Key`, because they carry secrets. Alert rules and room alert rules gain `telegram_enabled` and `line_enabled`. See [Integrations](https://vigiora.com/docs/admin/integrations).

### Several Home Assistant instances

`/integrations/home-assistant/instances` lists, creates, changes and deletes Home Assistant instances, with `connect`, `disconnect` and `test` actions and each instance's `entities` and `set-access`. The older operations keep working on the first instance. Devices, triggers, rule actions, pending approvals and the action log carry `instance_id` and `instance_name`, and a device of another instance has a key like `2:light.porch`. See [Several Home Assistant instances](https://vigiora.com/docs/home-assistant/bridge#several-home-assistant-instances).

### Webhooks, share links and picture links

- Webhooks carry their newest delivery: `last_delivery_at`, `last_delivery_status` and `last_delivery_code`.
- `DELETE /shares/{share_id}` revokes any share link by its id, including the picture links Telegram and LINE alerts use.

## API 1.31 to 1.33: camera catalogue and floor plans from a description

Server 1.6.17 adds API 1.31.0 to 1.33.1, all additive: 6 new operations (389 in all) and no new scopes. None of them is a confirm operation for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop). `GET /server` lists the new features `camera_catalog` and `floor_plan_describe`, and `camera_catalog_version`.

### The camera catalogue

The server embeds the Vigiora camera catalogue, the data behind [Supported cameras](https://vigiora.com/cameras): brands with their stream address templates, login advice, default ports and hardware address prefixes, and models with whether they stream locally (data licensed CC BY-SA 4.0).

- `GET /cameras/catalog?q=&limit=` (`cameras:read`, admins and operators): a free-text search over brands and models, `q` of 1 to 100 characters, at most 50 results. Each `CameraCatalogEntry` carries `brand_id`, `brand`, `model` (`null` for a brand), `name`, `aliases`, `type`, `rtsp` (`yes`, `no`, `firmware-dependent`, `via-hub` or `model-dependent`), `ptz`, `audio`, `verified`, `source`, `notes`, `credential_hint`, `default_username`, `rtsp_port` and `templates`. Templates keep the literal `{host}` and never carry a login.
- `GET /cameras/catalog/brands`: the brands alone.
- `NetworkDevice.catalog` (scan results) and `CameraDetection.catalog` (`detect`, `detect-batch`) say what the catalogue recognised: a `CameraCatalogMatch` with `matched_by` (`model`, `model_pattern`, `brand`, `oui`, `oui_shared` or `module_hint`), `rtsp`, `verified`, `templates` filled with the device's address, and `likely_brands` for a module maker's prefix. A scanned device gets a `catalog` only when it looks like a camera, so phones get none.
- `detect` and `detect-batch` take `model` (a catalogue `model`, such as `Tapo C230`): that model's templates are tried first, and the user name advice follows the brand. For Hikvision and Dahua, whose ONVIF user can differ, an ONVIF refusal is followed by one try of the model's main stream with the same login: the camera sees the login twice, which the lockout guard counts as two.
- The failure enum gains `no_local_stream`: the catalogue is sure the camera sends video only to the maker's app and cloud. `suggested_name` falls back to the catalogue name.

### Floor plans from a description

For a site with no drawing, the AI draws a schematic plan from words (`floorplans:write`, admins and operators who manage the site; `floorplans:read` to read the layout). Each AI call is charged like a Guardian chat; `503 ai_unavailable` when the server has no AI (`details.reason: not_configured`) or the AI gave no usable plan (`no_usable_plan`), `402 insufficient_credits` when out of credits. See [Describe your plan with AI](https://vigiora.com/docs/using/floor-plans#describe-your-plan-with-ai) for how to write a description.

- `POST /sites/{site_id}/floor-plans/describe` (`description` of 10 to 4000 characters, optional `floor_number` and `name`; idempotent) answers `201` with a `FloorPlanGeneration`: the new `floor_plan` (version 1, `source: ai`), the `layout`, `placed_cameras` and `unplaced_cameras` (names that matched none of your cameras). The whole generation is limited to 60 seconds.
- `POST /floor-plans/{floor_plan_id}/actions/refine` (`instruction` of 2 to 2000 characters; idempotent): the AI gets the current layout, with the cameras where their pins are now, and returns the whole new layout, drawn as a new version of the same plan. Areas and cameras the instruction doesn't mention keep their position, size, relations and camera fields; cameras placed by hand are `pinned` and stay. `400 validation_error` for an uploaded plan.
- `POST /floor-plans/{floor_plan_id}/layout/actions/undo`: back to the layout before the last refine, one level, no AI call; `unplaced_cameras` is the restored layout's.
- `GET /floor-plans/{floor_plan_id}/layout`: `layout` (`null` for an uploaded plan), `can_undo` and the description chat in `turns` (at most 40). With `format=svg` the layout is drawn as an SVG with the cameras and their view (404 for an uploaded plan).
- `FloorPlan.source` is `upload` or `ai`.

The `layout` is in metres, origin at the north-west corner, x east and y south, headings clockwise from north:

- `areas[]`: `id`, `name`, `kind` (`room`, `outdoor`, `corridor`, `garage`, `pool`, `garden`, `other`), `x`, `y`, `w`, `h`, `floor`, and from 1.33.1 the optional `size_m` (`[w, h]` the description gave) and `relations[]` (`{to, kind}` with `kind` one of `behind`, `in_front_of`, `left_of`, `right_of`, `north_of`, `south_of`, `east_of`, `west_of`, `next_to`, `inside`, `across`). The server lays the areas out from the relations rather than trusting the AI's coordinates.
- `openings[]`: `between` (two area ids, or `outside`) and `kind` (`door`, `gate`, `opening`).
- `cameras[]`: `monitor_id` (`null` when it matches none), `name`, `x`, `y`, `heading_deg`, `fov_deg`, and from 1.33.0 the optional `mounted_on` (the area it is fixed to), `looks_at` (the areas it looks at, main one first), `wall`, `facing`, `mention` (which sentence of the description it stands for) and `pinned`.
- `compass` (the plan shows a north arrow) and `notes` (what the AI assumed or could not place).

The stored plan image has no cameras drawn on it: the pins are plan items, as for uploaded plans, so `list_floor_plan_items` and `get_camera_locations` work the same.

## API 1.34 and 1.35: AI views, linked chat answers, AI availability and transcripts

Server 1.6.18 adds API 1.33.2 to 1.35.0, all additive: 11 new operations (400 in all) and no new scopes. One of them, `DELETE /views/{view_id}`, is a confirm operation for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop); composing and refining views and translating and summarising transcripts are reviewed-harmless writes that use AI credits. `GET /server` lists the new features `ai_view` and `transcript_translate`, and carries `ai`, the AI availability.

### AI views

An AI view is what the **AI** mode on **Cameras** shows (see [AI mode](https://vigiora.com/docs/using/monitors-list#ai-mode)): the caller says what to check, the AI answers with a view, and the server resolves it against what the caller can see. Views belong to the caller (`guardian:write` to compose and change, `guardian:read` to list and read; every role).

- `POST /views/actions/compose` (`prompt` of 3 to 2,000 characters; idempotent) answers `201` with the `View`: `id`, `prompt`, `title`, `summary`, `pinned`, the `spec` and the times. The `spec` has `title`, `summary`, `cards[]`, `layout.cols` (1 to 4) and `notes[]`, what the server changed: a name that matched no camera, a camera that cannot show a card, cards over the cap. Each card has a `key` (`c1`, `c2`, …), a `kind` (`live`, `floor_plan`, `alerts`, `faces`, `plates`, `transcript`, `recordings`, `people_count`, `occupancy`, `queue`, `parking` or `heatmap`), `title`, `monitor_ids` (resolved, visible cameras; at most 8 on a live card), `labels`, `params` (`hours` for the event cards, 1 to 168, default 24; `period` for the data cards: `today`, `yesterday`, `last_7_days` or `last_30_days`; `class`, `range` and `layer` for heatmaps; `area_ids`, `zone_ids`, `floor_plan_id`, `date`) and `size` (`s`, `m`, `l`). At most 12 cards, live first.
- `POST /views/{view_id}/actions/refine` (`instruction` of 3 to 2,000 characters; idempotent): the AI gets the current view and returns the whole new one; cards the instruction does not mention are carried over.
- `GET /views` (pinned first, then by last opened; at most 200), `GET /views/{view_id}?open=0|1` (opening moves it to the top of the recent views), `GET /views/suggestions` (three example requests written from the caller's cameras, Analytics and microphones), `PATCH /views/{view_id}` (`pinned`, `title`, `card_keys` to keep only some cards) and `DELETE /views/{view_id}` (a confirm operation).
- The server gives the model a catalogue of the caller's cameras (site, tags, rooms, capabilities: recording, audio, transcript, Analytics, faces, plates), Analytics areas and zones and floor plans, never the video. 30 unpinned views are kept per user; the oldest opened go when more are composed. Each compose or refine is charged like a Guardian chat (feature key `ai_view`); `402 insufficient_credits` when out of credits, `503 ai_unavailable` with `details.reason` (`not_configured`, `no_usable_view`, or a provider reason, see below).
- `GET /detections?label=plate` (internal) and `list_alerts` with `label=plate` now match `plate:<text>` rows like `face` does.

### Linked chat answers and AI availability

- `POST /guardian/chat` (API 1.34.2) answers `{reply, events, refs}`. The `reply` carries a reference token right after the time of every sighting it cites (`[[log:ID]]` for a Guardian entry, `[[det:ID]]` for a detection, `[[t:CAMERA:RFC3339]]` for a moment with no entry of its own, such as something heard or a count), and `refs[]` lists them in order of first use: `token`, `kind`, `id`, `camera_id`, `camera_name`, `at`, `label`, `has_clip`, `has_frame`. Tokens the server could not match to a moment are stripped from the text; a plain clock time with exactly one matching moment gets its token. `GET /guardian/conversations/{conversation_id}/messages` returns the stored `refs` of every answer, with camera names. The model also has a `summarize_period` tool (today, yesterday, last 24 hours, this week, or a range up to 8 days) and *around HH:MM* questions are answered from the 15 minutes either side.
- `GET /server` carries `ai` (API 1.34.1, 1.34.2): `status` (`ok`, `degraded` or `unavailable`), `reason` (`provider_402` out of credit, `provider_429` rate-limited, `provider_5xx` failing, or a cloud reason), `since` (this process's pause), `first_failure_at` (the first refusal of the pause, kept across restarts), `retry_at` (the next probe) and `route` (`gateway`, Vigiora's AI service; `own_key` reserved for a key of your own). While AI is paused, `chat`, `describeCamera`, `composeView`, `refineView`, `describeFloorPlan`, `refineFloorPlan`, `translateTranscript` and `summarizeTranscript` answer `503 ai_unavailable` with `details.reason` and `details.retry_at` instead of calling the provider. See [AI features are paused](https://vigiora.com/docs/getting-started/troubleshooting#ai-features-are-paused).
- Faces (API 1.33.2): a pending face carries `has_crop` and `bbox` (fractions of the frame, `x` and `y` the top-left corner); `GET /faces/{face_id}/crop` serves the face as the face service cut it (`alerts:read`, viewer permission on the camera); `getFacePhoto` is still the whole frame with the box drawn. `DELETE /faces/{face_id}` also takes a pending face (`det-<alert id>`); with `not_a_face=true` the camera's face service ignores that spot for an hour.

### Transcripts

The speech-to-text segments of a camera or microphone, and the tools of the [transcript panel](https://vigiora.com/docs/cameras/audio-and-microphones#read-the-transcripts) (API 1.35.0; `guardian:read` to read, `guardian:write` to translate and summarise; viewer permission on the camera):

- `GET /cameras/{camera_id}/transcript?from&to&limit&cursor`: the segments in `[from, to]` (default the last 24 hours, at most 7 days), oldest first, the newest 2,000 rows, paged with `next_cursor`. Each has `started_at`, `ended_at`, `text`, `language`, `speaker` and `source`. The client joins consecutive segments into passages, as the app does.
- `POST /cameras/{camera_id}/transcript/actions/translate` (`passages[]` of `{id, text}`, at most 50, 2,000 characters each and 20,000 in all; `to` an ISO 639-1 language) answers `{to, data[]}` with a translation per `id`, in one AI call. 45 seconds at most.
- `POST /cameras/{camera_id}/transcript/actions/summarize` (`minutes` 1 to 1,440, `language`) answers `{camera_id, language, summary, from, to, segments}`: 2 to 4 sentences on the speech of the last `minutes`. An empty window gives an empty `summary` and no AI call.
- Both are charged like a Guardian chat, under the feature keys `transcript_translate` and `transcript_summarize`; `402 insufficient_credits`, `503 ai_unavailable`, `429` when too many.

## API 1.36 to 1.41: camera names, Zigbee, IoT devices, rooms on the plan and client errors

Server 1.6.19 adds API 1.36.0 to 1.41.0, all additive: 28 new operations (428 in all) and no new scopes. The Zigbee set-up and pairing window, sharing or hiding a device, forgetting it and removing it from the network are confirm operations for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop); naming a camera, syncing rooms, renaming, reconfiguring and identifying a device and resolving client errors are reviewed-harmless writes. The three built-in add-on services are renamed `hal-video`, `hal-audio` and `hal-live` (API 1.36.1); the old `gemini-*` names are still accepted as input everywhere a service name is sent, and answers carry only the new ones.

### Camera names and unlocking a refused login

- `POST /cameras/actions/suggest-name` (API 1.36.0; `cameras:write`, admins and operators) takes a `camera_id` (its cached snapshot) or the `snapshot_jpeg_base64` of a camera being added, with optional `site_id`, `vendor`, `model`, `ip`, `current_name` and `language`, and answers `{name, room, position, alternatives[], reason, others[]}`: a name of the form "Room – position", in the style and language of the caller's other cameras (`others`), which the model sees with up to six of their latest frames. It renames nothing. Charged like a Guardian chat under the feature key `camera_name`; `503 ai_unavailable` without AI.
- `POST /cameras/actions/detect` and `detect-batch` take `unlock: true` (API 1.36.0): the server forgets that camera's refused credentials and failure budget and sends the login once more. A `429` from the endpoint's own rate limit is not unlockable.

### Zigbee through Home Assistant

For the Home Assistant Vigiora installed (API 1.37.0 and 1.39.0; `settings:read` and `settings:write`, admins):

- `GET /integrations/home-assistant` carries `devices` (the USB serial devices passed into the container), `devices_pending` (plugged in since) and `zigbee` (whether a stick was found and set up, the port and radio type, the last error).
- `POST /integrations/home-assistant/actions/setup-zigbee` (`202`, a job of `action: setup_zigbee`) walks ZHA's own config flow: probe, reuse the network on the stick or form one. Never flashes firmware.
- `POST /integrations/home-assistant/actions/zigbee-permit-join` (`{ieee}` of a router, optional) opens the pairing window for 120 seconds and answers `{duration_seconds, open, until, seconds_left, ieee}`.
- `GET /integrations/home-assistant/zigbee/devices`: `devices[]` with `ieee`, `nwk`, `name`, `user_name`, `manufacturer`, `model`, `power_source`, `lqi`, `rssi`, `available`, `last_seen`, `first_seen_at`, `coordinator`, `can_identify`, its `entities[]` (with `kind`, `state`, `access` and whether Vigiora finds it `useful`), `exposed`, `auto_exposed` and `hidden`, plus the `permit` window and `bridge_connected`; `POST …/zigbee/devices/{zigbee_device_id}/actions/rename` (`{name}`), `reconfigure`, `identify`, `expose`, `unexpose` and `remove`. The coordinator refuses rename, remove and expose with `409`.

### IoT devices

One list of the devices Vigiora knows, from every Home Assistant instance and from the Zigbee network (API 1.39.0 and 1.40.0; `devices:read` and `devices:write`, admins and operators):

- `GET /iot/devices?q&type&source&state&room_id&shared&refresh&limit&cursor`: paged, with `key` (`<instance>:<device>`, the `iot_device_id` of the other operations), `instance_id` and `instance_name`, `name`, `manufacturer`, `model`, `area`, `source` (home_assistant | zigbee) with the `zigbee` facts, `online`, `battery`, `low_battery`, `signal`, `types[]`, `headline[]` (up to three live values, each `{kind, entity_id, value, unit}`), `room_ids`, `managed_room_ids` (from floor-plan pins), `camera_ids`, `shared`, `shared_entities` and `entity_count`. `type` is one of `sensor`, `binary_sensor`, `switch_light`, `lock_cover`, `climate`, `button`, `camera_linked` or `coordinator`; `state` one of `online`, `offline` or `low_battery`.
- `GET /iot/devices/{iot_device_id}`: the device with its `entities[]` (entity id, name, domain, device class, live `state`, `unit`, `last_changed`, `access`, `controllable`, `sensitive`, `signal` with `signal_auto` and `signal_override`, and the `room_ids`, `managed_room_ids`, `camera_ids`, `trigger_ids` and `rule_ids` that use it) and its `floor_plans[]` (plan, pin, the reading it shows, the room it falls in); `GET …/entities` the entities alone.
- `PATCH /iot/devices/{iot_device_id}`: `name` (a Zigbee device is renamed in Home Assistant too), `room_ids`, `camera_ids` and `mappings[]` of `{entity_id, signal}` to override what Vigiora reads an entity as (`door`, `motion`, `occupancy`, `vibration`, `smoke`, `moisture`, `temperature`, `humidity`, `illuminance`, `battery`, `power`, `switch`, `light`, `button`, `lock`, `cover`, `climate`, `unknown`, or `null` for automatic).
- `POST /iot/devices/{iot_device_id}/actions/forget` (drops Vigiora's exposure, links and mapping; Home Assistant keeps the device), `expose`, `unexpose`, `reconfigure`, `identify`, and `remove` (Zigbee only, admins).
- `GET /iot/zigbee`: whether Zigbee is `available` and `configured` on this server, and the pairing window (`permit`: `open`, `until`, `seconds_left`) read live.

### Rooms on the floor plan and device pins

- A `Room` carries `source` (`manual`, `plan` or `virtual`), `floor_plan` (`{id, name, item_id}` for a room drawn on a plan, else `null`), `managed` on each of its `cameras[]` (true for a camera whose pin is inside the outline), `devices[]` (the Home Assistant entity ids that are its signals) and `managed_devices[]` (the ones pinned inside it; API 1.38.0 and 1.40.0). `RoomWrite` takes `source` (`manual` or `virtual`; a plan room's source can't be changed, `400`) and `device_entity_ids` (Home Assistant entities, at most 30; needs the bridge). A `PUT` keeps the managed members.
- `GET /floor-plans/{floor_plan_id}/rooms` (`floorplans:read`) lists the rooms drawn on a plan with their outline item; `POST /floor-plans/{floor_plan_id}/actions/sync-rooms` (`floorplans:write`) recomputes rooms and members from the plan's items, which every items write does on its own, and answers what it changed (`rooms_created`, `rooms_renamed`, `cameras_added`, `cameras_removed`, `devices_added`, `devices_removed`); it is idempotent and reviewed harmless.
- Floor plan items have a new `kind`, `device`, with `device_key` (`<instance>:<device>`) and an optional `entity_id`, the reading the pin shows; `GET /floor-plans/{floor_plan_id}/live` carries each device's live value. A device item inside a room outline makes the device a managed member of that room (its exposed entities become room signals); links made by hand are never removed. The config export carries `source`, `managed` and the device items.

### Client errors

The web app reports uncaught errors to `POST /api/client-errors` (an internal, public endpoint: 10 reports a minute per address signed out, 60 per user signed in; a bearer token names the user). For whoever maintains the server (API 1.41.0; `settings:read` and `settings:write`, admins):

- `GET /system/client-errors?unresolved&since&q&limit&cursor` (unresolved by default, newest last seen first) and `GET /system/client-errors/{client_error_id}`: `id`, `fingerprint`, `message`, `stack`, `component_stack`, `url` (path only), `web_build`, `server_version`, `user_agent`, `user_id` and `role`, `first_seen_at`, `last_seen_at`, `count`, `resolved_at` and `resolved_note`.
- `POST /system/client-errors/{client_error_id}/actions/resolve` (`{note}`, audited), `…/unresolve` and `POST /system/client-errors/actions/resolve-all` (`{note}`, answers `{resolved}`). A resolved cause reported again reopens on its own. At most 2,000 causes are kept.

## API 1.42 to 1.53: Bluetooth, camera clocks, device control, PTZ presets and the library

Server 1.6.20 adds API 1.42.0 to 1.53.0, all additive: 39 new operations (467 in all) and one new scope, `devices:control`. Controlling a device, fixing a camera's clock, setting a Client's time zone, moving or deleting a PTZ preset, deleting a library item or album and running a Bluetooth scan are confirm operations for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop); the reads and the other writes are not. The three built-in add-on services keep the `hal-video`, `hal-audio` and `hal-live` names from 1.6.19.

### Bluetooth

A survey of the Bluetooth devices around the server (API 1.42.0; `devices:read`/`devices:write`, admins and operators; Linux only). Nothing is paired or connected.

- `GET /bluetooth`: whether a scan is possible (`available`, with a `reason` when not), the adapter, the scan settings (also on `GET /settings` as `bluetooth_enabled`, `bluetooth_scan_interval_minutes`, `bluetooth_scan_seconds`), whether a scan runs now, the last and `next_scan_at`, and the device counts.
- `GET /bluetooth/devices`: every device a scan has seen, with what it advertised (name, maker from the SIG company id, services, manufacturer and service data, signal), a `kind`/`label`/`confidence` classification, and `first_seen`, `last_seen`, `seen_count` and `new_today`. Devices that rotate a random address are kept as one entry (`random_address`, `address_changes`).
- `GET /bluetooth/devices/{bluetooth_device_id}`: the device with a `report` (what it is, the data it could provide, how Vigiora could use it, each line with a stable `code` and English `text`).
- `PATCH /bluetooth/devices/{bluetooth_device_id}`: a `note` (≤ 500 chars) and `ignored`. `POST /bluetooth/actions/scan` runs a scan now; `GET /bluetooth/scans` the scan history.

### Camera clocks

A camera keeps its own clock; one that is hours off or stuck in 1970 stamps its events wrongly. Vigiora reads and fixes it (API 1.45.0 to 1.50.0; `cameras:read`/`cameras:write`, admins and operators):

- `GET /cameras/{camera_id}/clock`: the latest check — `status` `ok`, `drift` (`offset_seconds` is the camera's UTC minus the server's), `timezone`, `no_ntp` or `unknown` — with a plain `message`. Read over ONVIF, Hikvision/EZVIZ ISAPI, or Reolink's own API (API 1.48.0, so Reolink cameras need the Reolink app less). Compared with the camera's `site_timezone` (API 1.50.0: the camera's own, its client's, or the server's). A camera behind a Client is read through the client (needs vigiora-client 1.16.0+; an older one answers `unknown`). `refresh=true` checks now.
- `POST /cameras/{camera_id}/actions/set-clock`: sets the camera's clock to the server's UTC now, its time zone to the site zone, and time sync (NTP) on.
- `PATCH /cameras/{camera_id}/clock`: sets (`null` clears) the camera's own site zone, the zone it is compared with and set to. Audited.
- `GET /settings` carries `camera_clock_autofix_enabled`: with it on, the background check (every 6 hours, on add, every 10 min while a clock can't be read) fixes a bad clock on its own.
- `PATCH /clients/{client_id}` (API 1.50.0; `cameras:write`, admins): `timezone_override` for every camera behind a Client (`null` = the zone the client reports, client 1.16.0+). Audited.
- When adding a camera: `POST /cameras/actions/check-clock` and `POST /cameras/actions/set-clock` work on a camera not yet saved.

### PTZ presets

Manage a camera's presets, not only save and go to (API 1.51.0; `cameras:control`, admins and operators):

- `GET /cameras/{camera_id}/ptz/presets/{preset_token}` reads one preset.
- `PATCH …/{preset_token}`: `name` renames it (an empty `name` clears it); `position: "current"` stores the camera's current position into it, keeping the name. Reolink stores the name on the camera; other cameras can't rename without re-saving the position, so Vigiora keeps the name itself (`name_in_vigiora: true`).
- `DELETE …/{preset_token}` removes the preset (ONVIF RemovePreset / Hikvision ISAPI) and the name Vigiora kept for it.

### Control a Home Assistant device

`POST /iot/devices/{iot_device_id}/entities/{entity_id}/actions/set` (API 1.47.0; the new `devices:control` scope, admins and operators) changes one entity as its `control` description allows: `values` sets writable fields (a light's `on`, `brightness_pct`, one colour `rgb`/`hs` or `color_temp_kelvin`; a switch's or siren's `on`; a cover's `position`; a lock's `locked` + `code`; an alarm's `mode` + `code`; a number's `value`; a select's `option`; a notify service's `message`/`title`), or `command` runs one of its `commands` (`open`, `close`, `stop`, `press`, `lock`, `unlock`). Values are checked against the description (`400` with the field) and map to exactly one Home Assistant service. `devices:control` implies `devices:read`; it can't be granted to viewers.

### Library

Keep saved pictures and clips on the server (API 1.52.0; `recordings:read`/`recordings:write`, with `clips:share` for public links):

- **Items:** `GET /library/items` (filter by folder, kind, camera, album…), `POST /library/items` (save a clip export), `GET`/`PATCH`/`DELETE /library/items/{item_id}` (rename, move or annotate), `GET …/media` (the file) and `GET …/thumbnail`, and `POST /library/uploads` to upload a picture or clip. `GET /library/stats` is the storage use.
- **Folders:** `GET`/`POST /library/folders`, `POST /library/folders/actions/move` (rename or move) and `…/actions/delete` (an empty folder).
- **Albums:** `GET`/`POST /library/albums`, `GET`/`PATCH`/`DELETE /library/albums/{album_id}`, `…/actions/add-items`, `remove-items` and `reorder`.
- **Shares:** `POST /library/items/{item_id}/shares` and `POST /library/albums/{album_id}/shares` make public links (`clips:share`).

The item file (`/library/items/{id}/media`) and uploads are signed-media / multipart, so they aren't [MCP tools](https://vigiora.com/docs/developers/mcp).

## API 1.54 to 1.57: PTZ patrols, health reports and camera-speaker alerts

Server 1.6.20 adds API 1.54.0 to 1.58.0, all additive: 30 new operations (497 in all) and no new scopes. Starting, resuming or setting up a patrol, and accepting or deleting one, are confirm operations for [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop); the reads and status are not.

### PTZ patrols

Have a camera walk its presets on its own (API 1.56.0; `cameras:control`, admins and operators). Moves go through the same path as a manual PTZ move, so motion is muted while the camera moves:

- **Patrols:** `GET`/`POST /cameras/{camera_id}/ptz/patrols` (list, create), `GET`/`PATCH`/`DELETE /cameras/{camera_id}/ptz/patrols/{patrol_id}` (read, edit, remove). A patrol is ordered steps (preset, dwell, speed) plus loop/once, random order, a home preset, a schedule, an **On activity** behaviour (`activity_behavior`: `continue`, `pause` or `follow` — API 1.58.0) and pause-after-a-manual-move (default 120 s). `follow` turns the camera toward the motion and holds on it until the scene is quiet, then resumes; the legacy `pause_on_activity` boolean is still accepted and derived.
- **Run it:** `GET …/ptz/patrol` (where a running patrol is: step, next move), and `POST …/ptz/patrol/actions/start`, `stop`, `pause` and `resume`. `GET /ptz/patrols/active` lists the patrols running across all cameras. One patrol runs per camera; a camera behind a Client is refused with the Client's name.
- **Automatic setup:** `POST …/ptz/patrol-scans` starts it (`202`); poll `GET …/ptz/patrol-scans/{scan_id}` through `limits → looking → deciding → proposal`; `GET …/pictures/{picture_id}` reads a scan frame; `…/actions/accept` saves the proposed patrol and `…/actions/cancel` removes the presets the scan added. Vigiora AI labels each view and picks its dwell (AI credits); a manual move stops the scan.

A preset now carries `dwell_seconds` (3–3600, default 10) on `GET`/`PATCH /cameras/{camera_id}/ptz/presets/{preset_token}` — how long a patrol rests at it.

### Daily health report

`GET /system/health` is the server's own hardware check — disks (SMART), temperatures, memory and storage — with a status and plain-language findings (API 1.55.0; admins). `GET /system/health/reports/latest` and `…/reports` read the daily reports, `GET …/inventory` the hardware inventory, `POST …/actions/run` runs a check now, and `GET`/`PATCH …/settings` read and set when it runs. These are read/admin operations, not confirm operations.

### Sound a camera's speaker

`POST /cameras/{camera_id}/actions/speak` says a message through the camera's own speaker — an alert rule uses it to warn on the spot (API 1.54.0; `cameras:control`, admins and operators). A camera with no speaker is `404`.

## Object recognition and add-on reports

In the app these services are now called add-ons (from server 1.7.0). The API keeps the older names, `runners` and the `hal-…` service codes, so nothing you built breaks.

Server 1.6.10 adds object recognition to the API. It runs on an [add-on](https://vigiora.com/docs/ai/hal-services) (**Objects**, service code `hal-objects`), on a machine with an NVIDIA GPU: a preview available on request. Without it, the operations below answer `503 no_detector`.

### Detection events with add-on reports

`GET /cameras/{camera_id}/detection-events` (`alerts:read`) is one feed of everything detected on a camera, oldest first:

- this server's own detections, grouped into events, with `source: "core-ai"`;
- the reports of the add-ons attached to the camera, with `source` and `service` set to the service, for example `hal-objects` or `hal-face`, `confidence` and `bbox` read from the report, and the report itself in `attributes` (when at most 2 KB).

Filter with `source` (repeatable or comma-separated, for example `source=hal-objects`) and `label` (exact, for example `label=black t-shirt`), and `from` and `to`. HAL reports are kept **30 days** by default (the `hal_events_retention_days` setting, 1 to 365), and at most 200,000 per service instance.

### Guardian add-on context

When Guardian analyses a clip, it also gets what the camera's object detectors reported from 5 seconds before to 2 seconds after it. The AI checks these reports against the video: it confirms and adds detail, and never reports what the video contradicts. The summary is short (no extra AI cost) and stored with the entry: the `detections` field of a Guardian entry lists each `label` with `count` (the most seen at once), `max_confidence` and `tracks`, best first. It is empty when nothing was reported, or when the camera's `guardian_use_detections` is off. In the web app the switch is **Use object detections in descriptions**; it is on by default when a detector service is assigned to the camera.

### Find objects in a camera frame

`POST /cameras/{camera_id}/actions/detect-objects` (`cameras:read`, viewers too) finds objects on one frame:

```bash
curl -s -X POST https://yourname.vigiora.com/api/v1/cameras/3/actions/detect-objects \
  -H "Authorization: Bearer vgk_xxxxxxxx_xxxxxxxxxxxxxxxx" -H "Content-Type: application/json" \
  -d '{"prompts":["person","red t-shirt","parcel"]}'
```

```json
{
  "camera_id": 3,
  "objects": [ { "label": "red t-shirt", "confidence": 0.46, "bbox": { "x": 0.42, "y": 0.31, "w": 0.08, "h": 0.12 } } ],
  "frame_time": "2026-11-01T07:37:05Z",
  "model": "open-vocabulary detector",
  "annotated_image_url": "/api/v1/object-images/img_0123456789abcdef0123456789abcdef"
}
```

- Leave out `at` for the live frame, or send `at` (with an offset) for a recorded moment. A recorded moment also needs `recordings:read`.
- `prompts` are what to look for, in plain words: at most 20, 40 characters each. Without them the camera's own list is used. Describe what you look for: `black t-shirt` finds more than `t-shirt`. `min_confidence` defaults to 0.25.
- `bbox` is normalised to the frame (0 to 1, `x` and `y` the top-left corner).
- With `annotate` (on by default), the frame with the boxes drawn is kept for 15 minutes at `annotated_image_url` (`GET /object-images/{image_id}`), for the same credential only.
- It only looks: nothing is stored as a detection, and it is not a confirm operation. At most 20 a minute per credential.
- Errors: `503 no_detector`, `504 detector_timeout` (no answer within 10 seconds), `502 detector_failed`, `422 clip_no_recordings` (no recording at `at`), `503 snapshot_unavailable`.

### Analyse with objects

`POST /cameras/{camera_id}/actions/analyze` takes `include_objects: true` (and optional `prompts`). Object recognition then runs first on three live frames, one a second, its findings are given to the AI as context, and they come back in `objects` (the best detection per label). The entry is written to the Guardian log as usual.

### Analyse an uploaded image

`POST /images/actions/analyze` (`cameras:read`) describes and finds objects in a photo you send:

- `describe` (default true) asks the AI for a short description. It uses AI credits and needs `guardian:write`. `detect` (default true) runs object recognition, with optional `prompts`.
- Send `multipart/form-data` with the file in `image` (the options as form fields, `prompts` comma-separated), or JSON with the image in `image_base64` (a `data:` URL is accepted).
- JPEG, PNG or WebP, at most **10 MB** and **40 megapixels** (`413 payload_too_large`, `415 unsupported_media_type`).
- **The image is never stored.** The server decodes and re-encodes it (dropping its metadata), and only the annotated result, when asked for, is kept in memory for 15 minutes for the same credential.
- At most 6 a minute with `describe`, 20 a minute for detection only.
- **AI agents over MCP** use `image_base64`: an MCP call carries at most 1 MB, so about 750 KB of image. Scale a large photo down first.

```bash
curl -s -X POST https://yourname.vigiora.com/api/v1/images/actions/analyze \
  -H "Authorization: Bearer vgk_xxxxxxxx_xxxxxxxxxxxxxxxx" \
  -F image=@photo.jpg -F prompts="person,backpack"
```

## API 1.92 to 1.95: recording disk, compression and capacity

Server 1.6.28 adds API 1.92.0 to 1.95.0. All changes are additive.

### Recording disk, compression and capacity

- `GET /cameras/{camera_id}/storage` (`cameras:read`, 1.94.0): what a camera uses on disk. It returns `measured` (from the camera's recordings of the last 7 days, `null` until it has 1 hour of them), `estimate` (`bytes_per_day` and its `basis`), the `bytes_per_day` used, `source` (measured or estimate), `retention_days`, `projected_bytes` for that retention and `used_bytes` now.
- `compress_after_days` on `GET` and `PATCH /settings` (1.92.0): `0` is off (the default), `1` to `89` compresses recordings of cameras kept longer than that many days once they are that old. `GET /settings` also returns `compression` with `compressed_count`, `saved_bytes` and `pending_count`. See [Recording and retention](https://vigiora.com/docs/cameras/recording-and-retention#compress-old-recordings).
- `GET /system/capacity` (`settings:read`, 1.95.0) returns the last capacity report and its verdict: how many more cameras the server can take and which limit applies (`disk_write`, `disk_space`, `cpu` or `network`). `POST /system/capacity/actions/check` (`settings:write`, admins and operators) measures now. See [System page](https://vigiora.com/docs/admin/system#recording-compression-and-capacity).

## API 1.97 and 1.98: Guardian triggers and the recording in progress

Server 1.6.29 adds API 1.97.0 and 1.98.0. Both changes are additive.

- Guardian entries (`GET /guardian/entries`, `GET /guardian/entries/{entry_id}` and the `guardian.event` event) carry `trigger` (`motion` or `detection`) and `trigger_label` (1.97.0): what started the analysis, and the detector label (`person`, `car`, `cat`…) when it was a detection, else `null`. Entries made before 1.97.0 read `motion`. Feature flag: `guardian_triggers`.
- `GET /cameras/{camera_id}/timeline` counts the segment still being written up to its last write (1.98.0). Before, the newest footage appeared only when its segment closed, up to 10 minutes late. The span it ends has `in_progress: true`, and its `end` moves forward on the next read. That segment has no recording id yet, so it is not in `GET /recordings` until it closes. Feature flag: `recording_in_progress`.

## API 1.99: find when a part of the picture changed

Server 1.6.30 adds API 1.99.0. The change is additive. Feature flag: `area_search`.

- `POST /cameras/{camera_id}/area-searches` starts a search of the camera's recordings between `from` and `to` (at most 7 days) for the moments when something inside `area` changed. `area` is a rectangle in fractions of the picture (`x`, `y`, `width`, `height`, each 0 to 1, from the top left corner). `sensitivity` is `low`, `medium` (the default) or `high`. The answer is `202` with `status: running`. Scope: `recordings:write`, because it starts work on the server; nothing is stored or changed.
- `GET /cameras/{camera_id}/area-searches/{search_id}` gives `status`, `progress` (0 to 1) and `changes`, which fill in while the search runs. A finding of kind `changed` means the area looks different afterwards; `activity` means something stayed in the area for a while and left it as it was. `across_gap` is `true` for a change that happened while nothing was recorded. A change of the whole picture at once is counted in `lighting_skipped` and not listed.
- `GET /cameras/{camera_id}/area-searches/{search_id}/changes/{change_id}/picture?side=before` (or `side=after`) serves a JPEG of the area at that moment.
- `DELETE /cameras/{camera_id}/area-searches/{search_id}` stops a running search and forgets its result.

Two searches run at a time on a server; beyond that the answer is `429` with `Retry-After`. A result is kept for 30 minutes and lists at most 500 findings. The segment still being recorded is not read. In the app this is **Find changes**; see [Playback](https://vigiora.com/docs/using/playback#find-changes).

## API 1.100: HD clips of the periods with movement

Server 1.6.31 adds API 1.100.0. The change is additive. Feature flag: `hd_on_motion`.

- A camera has a new field, `record_hd_on_motion`, which you can read and set with `PATCH /cameras/{camera_id}`. It has an effect only next to `record_sub_stream`: the camera records its sub-stream all the time and also saves the main stream for every period with movement.
- `GET /cameras/{camera_id}/hd-recordings?from=…&to=…` lists the HD clips that overlap the range (at most 31 days, at most 2000 clips per answer), oldest first. Each has `start_time`, `end_time`, `duration_seconds`, `size_bytes` and a `media_url`. Scope: `recordings:read`.
- `GET /cameras/{camera_id}/hd-recordings/{hd_recording_id}/media` serves the clip as MP4 in H.264, with `Range` requests; `download=true` answers an attachment.
- HD clips cover the same time as the continuous recording, so they are not part of `GET /recordings` or the timeline.
- `POST /clips` and `GET /guardian/entries/{entry_id}/clip` use the HD footage when the HD clips hold the whole window, and the continuous recording otherwise.
- `GET /cameras/{camera_id}/storage` counts the HD clips: `hd_bytes_per_day` is their part of `bytes_per_day`, `hd_source` says whether it is `measured` or an `estimate`, and the query takes `hd_on_motion`.

In the app this is **Record in HD when there is movement**; see [Recording and retention](https://vigiora.com/docs/cameras/recording-and-retention#record-in-hd-when-there-is-movement).

## API 1.101 and 1.102: ONVIF switch and camera order

Server 1.6.33 adds API 1.101.0 and 1.102.0. Both changes are additive.

- **1.101.0:** a camera has a new field, `onvif_enabled` (default `true`), which you can read and set with `PATCH /cameras/{camera_id}`. When it is `false`, Vigiora sends nothing to the camera over ONVIF, and `has_ptz` reads `false` for a camera whose PTZ is driven over ONVIF. PTZ calls for it answer `409 onvif_disabled`. The saved PTZ settings are kept and come back when it is `true` again.
- **1.102.0:** a camera has a new field, `sort_order` (1 is first, `null` when the camera was never ordered), and `GET /cameras` lists the cameras in that order. `POST /cameras/actions/reorder` takes `camera_ids` in the new order and sets one order for the whole server and every user. It needs the `cameras:write` scope and the administrator or operator role. An id the caller cannot view answers `404 not_found` and nothing changes.

In the app these are **Use ONVIF** and **Reorder**; see [PTZ cameras](https://vigiora.com/docs/cameras/ptz#use-onvif) and [Monitors list](https://vigiora.com/docs/using/monitors-list#reorder-the-cameras).

## API 1.103: camera brand, model and shape

Server 1.7.0 adds API 1.103.0. The change is additive. A camera has four new read-only fields:

- `brand`: who made the camera (`Hikvision`, `Reolink` …), or `null` when it is not known yet.
- `model`: the camera's model as the camera reports it (`DS-2CD2047G2-LU`), or `null`.
- `brand_source`: where `brand` comes from, and `null` exactly when `brand` is `null`. `camera` means the camera said so. `catalog` means the camera catalogue recognised it when it was added. `network` means the camera's network hardware address (MAC prefix) is registered to this brand. `network_module` means the prefix belongs to the maker of the camera's network module, so `brand` is that maker and not the camera's brand.
- `body_type`: the shape of the camera's housing, one of `bullet`, `dome`, `turret`, `ptz`, `cube`, `doorbell` or `battery`, or `null` when it is not known. It comes from the catalogue entry for `model`, else `ptz` for a camera that can be moved.

You get them with `GET /cameras` and `GET /cameras/{camera_id}`. You cannot set them: Vigiora asks the cameras on its own network by itself, a few minutes after the server starts and then about daily. In the app this is the **Camera** block on the camera's edit page; see [Camera settings](https://vigiora.com/docs/cameras/camera-settings#camera-brand-and-model).

## API 1.104: add-ons

Server 1.7.1 adds API 1.104.0. The change is additive. Six operations, all for administrators, cover the community add-ons the app shows in **Settings** → **AI and add-ons** → **Add-ons**:

- `GET /addons/catalog` and `GET /addons/catalog/{addon_id}`: the catalogue, with the price, the hardware check against this server and the manifest of one add-on. Needs `settings:read`.
- `GET /addons`: the community add-ons installed on this server, with their state, progress, the permissions they were given and `update_version` when a newer approved version exists. Needs `settings:read`.
- `POST /addons/{addon_id}/install`, `POST /addons/{addon_id}/update` and `DELETE /addons/{addon_id}`: install, update and remove. They need `settings:write` and are on the list of operations AI agents must ask about.

Installing answers `202` at once. Follow `GET /addons` for the progress. An add-on that is paid, suspended, does not fit the hardware or is already installed answers `409 conflict`. An add-on that asks for elevated access (privileged, host network or the graphics card) answers `403 forbidden` with `reason: elevated_access`: install it in the web app, which asks for the admin password again. Installing from a git address (developer mode) is also only in the web app. The four Vigiora add-ons keep `/runners`. See [Community add-ons](https://vigiora.com/docs/ai/hal-services#community-add-ons).

## API 1.105: sirens and Stop all sounds

Server 1.7.3 adds API 1.105.0. The change is additive. Five operations cover the sirens Vigiora sounds and the red **Stop all sounds** button of the app (see [Sounds and sirens](https://vigiora.com/docs/using/alerts#sounds-and-sirens)):

- `GET /sounds/active`: every siren Vigiora started that may still be sounding or is being switched off, with its `state` (`starting`, `sounding`, `self_ending`, `stopping`, `stop_failed`), when its off is due (`stop_by`) and `hushed_until`, the end of the 10-minute pause on automatic sounds. Needs `alerts:read`.
- `POST /sounds/actions/stop-all`: makes everything quiet and answers honestly with `stopped`, `stopping` and `ending` counts. Needs `alerts:read`, open to every role that can see alerts. An admin or operator (with `cameras:control` for a key) also reaches Home Assistant sirens and light effects, and starts the 10-minute pause on automatic sounds. It always answers `200`, also when nothing sounds, and needs no confirmation.
- `POST /cameras/{camera_id}/actions/siren` and `POST /cameras/{camera_id}/actions/stop-siren`: sound and switch off a camera's built-in siren (Reolink and Hikvision cameras on the local network). Starting needs `cameras:control`, is for admins and operators, and is on the list of operations AI agents must ask about. `seconds` defaults to 10. Vigiora plays at most 15 seconds per run and 60 seconds per camera in 10 minutes (`429 rate_limited`). A camera that cannot sound a siren answers `422 speaker_not_supported`, a camera already playing a sound answers `409 conflict`, and so does a camera whose last siren was not confirmed off (`reason: siren_not_off`). Stopping needs `alerts:read` and is always safe.
- `POST /sounds/{sound_id}/actions/dismiss`: say that a siren Vigiora could not switch off is quiet now. Needs `cameras:control`, is for admins and operators, and is on the list of operations AI agents must ask about, because a wrong dismissal leaves a siren sounding with nobody trying to stop it.

Plays from `POST /alert-speaker/actions/test` and the alert speaker's recent plays carry `run_id`, `stop_state` and `stop_attempts`. A Home Assistant `siren.turn_on` through `POST /iot/devices/{iot_device_id}/entities/{entity_id}/actions/set` follows the same limits (`429` with `reason: siren_limit`, `409` with `reason: sounds_paused` or `siren_not_off`). `siren.turn_off` and the stop operations cover these sirens too.

The assistant in the app has the tools `stop_all_sounds`, `stop_siren` and `start_siren`. The first two never ask. `start_siren` is for signed-in admins and operators and asks first while human in the loop is on. Over MCP the tools are `list_active_sounds`, `stop_all_sounds`, `stop_camera_siren`, `start_camera_siren` and `dismiss_sound`; see [MCP](https://vigiora.com/docs/developers/mcp#new-in-173).

## API 1.106: alerts from add-ons

Server 1.7.4 adds API 1.106.0. The change is additive, with no new operation and no new scope:

- `Alert` has a new field `addon`: `{id, name}` of the community add-on that reported the alert, or `null` for every other alert. The server sets it; it cannot be claimed in a request. The alert's `source` is then `addon-<id>`. See [Raising alerts](https://vigiora.com/docs/developers/add-ons#raising-alerts).
- `CameraLabel` has a new field `results_only`. It is `true` for a label of a community add-on that can never raise an alert (the add-on was not given `alerts:write`, the label is not under a prefix it owns, or it is no longer installed): a label alert rule on it never fires. It is `false` for every other label.

Add-ons report with the HAL API (`POST /api/hal/events`, `GET /api/hal/frame`), which is not part of `/api/v1`.

## API 1.107 to 1.115: security, privacy, automations and speech

Server 1.8.0 adds API 1.115.0. Everything below is additive. The operations and their scopes are in the [API reference](https://vigiora.com/docs/developers/api-reference).

### 1.107: two-factor sign-in and signed-in devices

A new **Account** tag. `GET /account/two-factor` shows the caller's two-factor status, and `GET /account/sessions` lists the signed-in devices (scope `account:read`). `DELETE /account/sessions/{session_id}` signs a device out (scope `account:write`). Turning two-factor on or off, making new recovery codes and `POST /account/sessions/actions/revoke-others` need a user session and never work with an API key. OAuth clients (MCP connections) never get the `account:*` scopes. An admin's user session can turn a user's two-factor off with `POST /users/{user_id}/actions/reset-two-factor`. See [Two-factor sign-in](https://vigiora.com/docs/admin/two-factor-sign-in).

### 1.108: privacy masks

`GET` and `POST /cameras/{camera_id}/privacy-masks`, and `GET`, `PATCH` and `DELETE /cameras/{camera_id}/privacy-masks/{mask_id}`. A camera has up to 8 masks. A detection reported with `POST /alerts` and a `bbox` whose centre is inside a mask answers `200` with `dropped: privacy_mask`. See [Privacy masks](https://vigiora.com/docs/cameras/privacy-masks).

### 1.109: timelapse and live share links

`POST /clips` accepts `kind: timelapse` (see [Timelapse and live share links](https://vigiora.com/docs/using/timelapse-and-live-share)). `GET` and `POST /cameras/{camera_id}/live-shares` and `DELETE /cameras/{camera_id}/live-shares/{live_share_id}` manage live share links. They need the scope `clips:share`, which no other scope includes.

### 1.110: detection boxes

`GET /cameras/{camera_id}/detection-boxes?from=&to=` (scope `alerts:read`) returns the boxes that Playback draws over a recording, as fractions of the frame, for a window of at most 5 minutes. A box whose centre is inside a privacy mask is never returned. See [Playback](https://vigiora.com/docs/using/playback#boxes-around-detected-objects).

### 1.111: automations

A new **Automations** tag under `/automations`: list, read, create, change and delete, `actions/run` (with `dry_run`), `actions/rotate-webhook`, `actions/validate`, `actions/import`, the run log at `/automations/{id}/runs`, the blueprint export at `/automations/{id}/blueprint`, the palette at `/automations/node-types` and the ready-made ones at `/automations/blueprints`. Reading needs `devices:read`, changing `devices:write` and running `devices:control`. Confirming sensitive steps (`/automations/{id}/actions/confirm`) is for an admin's user session only. See [Automations](https://vigiora.com/docs/using/automations).

### 1.112: your own AI model

`GET` and `PATCH /system/ai-model`, `POST /system/ai-model/actions/test` and `POST /system/ai-model/actions/list-models`, for admins. The API key is write-only. See [AI model](https://vigiora.com/docs/admin/ai-model).

### 1.113: Guardian chat actions and approvals

`POST /guardian/chat` can now return `pending_actions`: actions Guardian wants to do for an admin or operator that wait for approval (up to 5 minutes). `GET /guardian/pending-actions/{pending_id}` shows one, and `POST …/actions/approve` and `POST …/actions/deny` decide it. Deciding is for user sessions only: an AI agent can never approve its own action. A `409 conflict` with `reason` `pending_action_expired`, `pending_action_decided` or `pending_action_changed` says why an approval was refused. See [Guardian chat](https://vigiora.com/docs/ai/guardian-chat#approve-what-guardian-wants-to-do).

### 1.115: one microphone per room and speech figures

A room has a new setting `speech_microphone`: `auto` (the default), `all` or the id of one camera of the room. It chooses which microphones of the room are sent to speech-to-text. `GET /cameras/{camera_id}/audio-status` now has `room_speech`, which says how the camera's room uses this microphone, and `speech_today` has a new count, `skipped_other_microphone`. Voice matching is paused, so `voice_match_calls` reads 0 and new lines have no voice label. See [One microphone per room](https://vigiora.com/docs/cameras/audio-and-microphones#one-microphone-per-room).

## API 1.116: Playback timeline marks and preview pictures

Three new read operations, used by the [new Playback timeline](https://vigiora.com/docs/using/playback#use-the-timeline):

| Operation | Scope | What it returns |
| --- | --- | --- |
| `GET /timeline/marks?camera_ids=&from=&to=` | `alerts:read` | What happened on 1 to 16 cameras over at most 7 days, folded into marks: detections, add-on reports, Guardian entries and speech. Optional `bucket_seconds` (1 to 86400; the default is the range divided by 240) and `kinds`. Each mark has its `kind`, `start` and `end`, `count`, up to 5 `labels`, `alert`, a representative event (`rep`) with a `thumbnail_url`, and `text`: for Guardian and speech, the first 140 characters. At most 3000 marks; `truncated` says when later ones were cut. |
| `GET /cameras/{camera_id}/previews?from=&to=` | `recordings:read` | The preview pictures of the camera's finished recordings over at most 48 hours, with `ready` and `sprite_url` for each recording. |
| `GET /recordings/{recording_id}/preview` | `recordings:read` | One recording's preview pictures as a single JPEG: one 160 px picture every 10 seconds, 10 per row. The layout is in the `X-Vigiora-Preview-Interval`, `-Columns`, `-Count`, `-Tile-Width` and `-Tile-Height` headers. |

The preview is made on the first request when it does not exist yet. The camera's privacy masks are painted on every picture. Errors: `404 no_preview` (a recording without video, or one still being written), `503 preview_busy` with `Retry-After`, and `503 preview_unavailable` (the masks could not be read, so nothing unmasked is served).

## API 1.117: Recordings search and card actions

Server 1.11.0 adds API 1.117.0: the search behind the [Recordings](https://vigiora.com/docs/using/recordings) page and three actions that act on whole cards.

| Operation | Scope | What it does |
| --- | --- | --- |
| `GET /recordings/events` | `alerts:read` | Every detection and Guardian entry of the cameras you may view, newest first, as cards. Filters: `show`, `labels`, `person`, `plate`, `triggers`, `vehicle_types`, `camera_ids`, `room_ids`, `range` or `from` and `to`, `min_confidence`, `attention` and `q`, plus `limit` and `cursor`. The first page also has `total` and `facets`: the count of each filter value with every other filter applied. Guardian entries also need `guardian:read`; without it only detections are returned. |
| `POST /recordings/cards/actions/acknowledge` | `alerts:write` | Marks every unacknowledged alert of the cards seen. Needs operator permission on the camera. |
| `POST /recordings/cards/actions/delete` | `alerts:write` | Deletes every detection of the cards and its picture for good; recordings are kept. Admins and operators, with operator permission on the camera. |
| `POST /recordings/cards/actions/save` | `recordings:write` | Saves the pictures of the cards into one media library folder. Admins and operators. |

A card stands for repeats of one camera and label: detections of one track each within 10 minutes of the next or, with no track, each within 3 minutes of the next. `count` says how many detections a card stands for, and `pictures` holds up to 20 of their pictures. With `attention=true` every unacknowledged alert is its own card, and the time and `min_confidence` do not apply. The API has no confidence default: the app's page sends `min_confidence=0.5`, so a call without it counts more than the page shows.

The actions take `alert_ids` (at most 100), any detection of each card, usually the card's `id`. The server takes each card as it is now, so a repeat that arrived after the list was read is included. The answer says how many detections were done (`done_count`), with `not_found_ids` for cards you cannot see and `forbidden_ids` for cards on cameras where you lack the permission.

## API 1.119: motion zones

Server 1.13.0 adds API 1.119.0, with feature flag `motion_zones`. `GET` and `POST /cameras/{camera_id}/motion-zones`, and `GET`, `PATCH` and `DELETE /cameras/{camera_id}/motion-zones/{zone_id}`. A camera has up to 8 zones. `GET` and `PATCH /cameras/{camera_id}/motion-zone-settings` read and set the mode, `ignore` or `only`. While [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop) is on, every change asks for confirmation. See [Motion zones](https://vigiora.com/docs/cameras/motion-zones).

## API 1.120: custom branding

Server 1.14.0 adds API 1.120.0, with feature flag `branding`. `GET /branding` (scope `settings:read`) reads the name, the accent colour, the Powered by setting and the logo status. `PATCH /branding` (`settings:write`, admins) changes them. `PUT /branding/logo` uploads a PNG, JPEG or WebP picture of up to 512 KB, and `DELETE /branding/logo` removes it. The logo, the colour and hiding Powered by need the paid option on the account, and a call without it answers `402 limit_reached`. While [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop) is on, every change asks for confirmation. See [Custom branding](https://vigiora.com/docs/admin/branding).

## API 1.121 and 1.122: Vigiora Robot

Server 1.14.2 adds API 1.121.0 and 1.122.0 for the [Vigiora Robot](https://vigiora.com/docs/robots/vigiora-robot-01), a camera with `body_type` robot. `POST /cameras/{camera_id}/robot/actions/stop` (scope `cameras:control`) stops the robot now and cancels any route it is driving. A camera that is not a robot answers `409 not_a_robot`, and `502 ptz_failed` means the robot did not answer. It is safe to call at any time.

`GET /cameras/{camera_id}/robot/patrol` (scope `cameras:read`) reads the AI patrol: whether it runs, the step, the last move and why, how it ended, and, before any run, the defaults with the estimated AI credits. `POST /cameras/{camera_id}/robot/patrol/actions/start` (`cameras:control`) starts it. Send `minutes` (default 5, at most 30) and an optional `goal`. It uses about 1 AI credit per step, with up to 20 steps a minute. It answers `402 insufficient_credits` without credits, `503 ai_unavailable` without AI and `409 conflict` while a patrol runs. `POST /cameras/{camera_id}/robot/patrol/actions/stop` ends it and answers the final status. AI patrol is a preview. While [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop) is on, starting a patrol asks for confirmation.

## API 1.123 and 1.124: robot light, Wi-Fi movement and room scan

Server 1.14.3 adds API 1.123.0 and 1.124.0 for the [Vigiora Robot 01](https://vigiora.com/docs/robots/vigiora-robot-01). Every robot operation answers `409 not_a_robot` for other cameras, `409 robot_unsupported` (or `409 light_unsupported` for the light) when the robot's firmware lacks the feature, and `502 ptz_failed` when the robot does not answer.

- **Light.** `GET /cameras/{camera_id}/robot/light` (scope `cameras:read`) reads the headlight: `on`, `level` (1 to 120) and `remaining_s` before it switches itself off. `POST /cameras/{camera_id}/robot/actions/light` (`cameras:control`) sets it. `on` is required. A light that is on stays lit for `ttl_s` seconds (1 to 600, default 120) at `level` (default 60), so a client that wants it on keeps renewing it. Safe to repeat.
- **Wi-Fi movement.** `GET /cameras/{camera_id}/robot/wifi-motion` (`cameras:read`) reads the movement the robot hears from how people disturb its Wi-Fi signal. `valid` is false while the robot moves, for a second after, and on a route; `warming_up` is true while it learns the room. `history` holds the last 30 scores, oldest first. `PATCH` (`cameras:control`) sets `enabled` and `threshold` (0 = automatic). Movement also arrives as the event `robot.wifi_motion`.
- **Camera on or off.** `POST /cameras/{camera_id}/robot/actions/camera` (`cameras:control`) turns the robot's picture off or back on. A paused robot shows stream status `paused`, not `offline`. The robot also pauses its camera itself while Bluetooth or a deep scan runs (`paused_reason` `ble`, `deep_scan` or `manual`).
- **Room scan.** `POST /cameras/{camera_id}/robot/actions/sense` (`cameras:control`) listens for `seconds` (3 to 10, default 5) and answers the Wi-Fi networks, the Bluetooth devices and the movement it measured. The call lasts about `seconds` + 3 s. The last 20 scans per robot are kept on the server; Wi-Fi and Bluetooth names are never logged. `409 robot_busy` means the robot is moving or on a route.

Wi-Fi movement and the room scan need robot firmware 0.3.0 or newer.

## API 1.125 to 1.129: health, memory, robot Bluetooth and feedback

Server 1.14.4 serves API 1.129.0.

- **Hardware upgrades (1.125.0).** `GET /system/health/upgrades` (scope `settings:read`, admins and operators) answers the upgrade suggestions of the latest health report and the hardware they fit. When memory, the processor or a disk holds the server back, each suggestion has 2 or 3 options from the most convenient to the most "pro", each with a reason, an approximate price in US dollars and an Amazon search link for the exact part (no affiliate tag). `upgrades` is empty when nothing needs upgrading.
- **Disks (1.125.0).** `GET /system/health/disks` (`settings:read`) lists every disk that holds the recordings, the database or the system: free space, the last speed test (write and read in MB/s, the latency of a small saved write), how busy the disk is now, what the cameras write, a speed verdict (`ok`, `warn` or `unknown`) and the space forecast: growth per day and the date the disk is full, or the level it settles at when retention deletes old footage first. `POST /system/health/disks/actions/benchmark` (`settings:write`) runs the speed test now: a 32 MiB file at low I/O priority, deleted afterwards. When the server is busy the test does not run and `bench_skipped` says why.
- **Memory profile (1.126.0).** `GET /system/health` also answers `memory_profile`: `tier` (`normal`, `low` on an 8 GB machine, `tight` under about 5 GB), `low_memory`, `total_bytes`, `summary` and `under_pressure`. It is chosen at start from the machine's memory; there is no setting.
- **Robot Bluetooth (1.127.0).** For the [Vigiora Robot 01](https://vigiora.com/docs/robots/vigiora-robot-01) (scope `cameras:control`): `POST /cameras/{camera_id}/robot/actions/bluetooth-scan` (`seconds` 2 to 15, default 5), `…/actions/find-keyboards` (Bluetooth MIDI keyboards only) and `…/actions/play-melody` (`melody` as text such as `C4:300 E4:300 R:200`, or a built-in melody name, or `notes`; at most 256 notes and 30 s) answer `202` with a job. The robot is offline for about 20 s per job; its stream shows `paused` and no `camera.offline` is sent. Read the result with `GET /cameras/{camera_id}/robot/jobs/{job_id}` after `ready_after_s`. `GET /cameras/{camera_id}/robot/bluetooth` answers the stored last scan and keyboard search (the last 20 per robot), the remembered keyboard, the built-in `melodies` and, while the robot is away, `away.remaining_s`. Errors: `409 robot_busy`, `409 ble_unsupported`, `409 battery_low`, `409 not_a_robot`. The three actions take the robot offline, so AI agents ask first while [human in the loop](https://vigiora.com/docs/developers/human-in-the-loop) is on. Automations get the action **Play a melody on the robot's keyboard**. Bluetooth names and addresses stay on your server.
- **Feedback (1.128.0).** `GET /system/program` (any role) says whether the server is in the Vigiora Feedback Program, its `update_channel` (`early` or `stable`) and whether feedback can be sent (`feedback_ready`). It is read-only: the program is joined and left on vigiora.com. `POST /feedback` sends `text` (up to 4000 characters) and the web app `page` to Vigiora, from a signed-in session only (no API keys or agents); `409` with `details.reason` `not_paired` when the server is not connected to a Vigiora account, `429` after 20 in a day. `GET /feedback` lists what was sent (an admin sees everyone's).

## API 1.134 to 1.144: languages, privacy, quotes, detail zones, robot, access control and camera events

Server 1.17.0 serves API 1.144.0. `GET /server` lists each new feature.

- **User language (1.134.0, `user_language`).** `POST /users` and `PATCH /users/{user_id}` take `language` (one of the 22 app language codes, or `""` for automatic); `GET /users` and `GET /me` return it. See [Language](https://vigiora.com/docs/using/language).
- **Add-ons drive the robot (1.135.0, `addon_robot_control`).** An add-on with the `robot:control` scope and the person's consent calls the robot routes with its own token. `GET /cameras/{camera_id}/robot` answers the robot's state in one read; `GET /addons/{addon_id}/robot-log` lists the add-on's last 100 robot commands and refusals. New error codes: `403 not_allowed` (with `details.reason`) and `423 robot_offline`. See [Driving a Vigiora Robot](https://vigiora.com/docs/developers/add-ons#driving-a-vigiora-robot).
- **Release notes (1.136.0, `release_notes`).** `GET /system/release-notes`, `GET /system/release-notes/{release_id}` and `POST /system/release-notes/actions/mark-seen` (admins, `settings:read`): the notes the **What's new** screen shows. See [Updates](https://vigiora.com/docs/getting-started/updates#whats-new).
- **Roger RACS 5 (1.137.0, `roger_racs5`).** `/roger`: status and settings (the password is never returned), network search, sync, doors and alarm zones with their room and cameras, access events, pending requests, `…/actions/unlock`, `…/actions/grant` and `…/actions/deny` (`devices:control`, audited). Agents always ask a person before unlock and grant. Early access. See [Roger RACS 5](https://vigiora.com/docs/admin/roger-racs5).
- **Detail zones (1.138.0, `detail_zones`).** `GET /floor-plans/{floor_plan_id}/detail-zones` answers each camera's picture width, field of view and where each EN 62676-4 level ends, in metres and plan units. `GET` and `POST /floor-plans/{floor_plan_id}/detail-requirements`, `PATCH` and `DELETE …/{requirement_id}` manage required levels at a point or over an area, with `status` `met`, `not_met` or `unknown`. `GET` and `PATCH /cameras/{camera_id}/field-of-view` correct the field of view (`null` = automatic). See [Detail zones](https://vigiora.com/docs/using/floor-plans#detail-zones).
- **Quote (1.139.0, `quote_export`).** `GET` and `PATCH /quote?site_id=`, `/quote/prices`, `/quote/company` and `/quote/company/logo`, and `GET /quote/export?site_id=&format=pdf|xlsx&lang=` for the file (admins and operators). See [Parts list and quote](https://vigiora.com/docs/admin/parts-list-and-quote).
- **Camera events (1.140.0, `camera_events`).** `GET` and `PATCH /cameras/{camera_id}/camera-events` (`mode` `auto` or `off`), `POST …/actions/check`, `PATCH …/alarm-inputs/{input_id}` and `GET …/log` (`alerts:read`) for a Dahua camera's own detections. Early access. See [Dahua camera events](https://vigiora.com/docs/cameras/dahua-camera-events).
- **Robot added by itself (1.141.0, `robot_claim`).** `GET /network/robots` (`network:read`) lists the robots seen or added; `POST /network/robots/{robot_id}/actions/add` (`cameras:write`) adds a removed robot again, and agents ask first. Cameras have `credential_status` (`password_changed` or `null`); the events `robot.added` and `robot.password_changed` never carry a password. See [Add the robot](https://vigiora.com/docs/robots/vigiora-robot-01#add-the-robot).
- **Install now (1.142.0).** `POST /system/update/actions/install` always installs the newest release: when a newer one than the downloaded update came out, it is downloaded and installed instead. The update status has an optional `installing` field. See [Install an update now](https://vigiora.com/docs/getting-started/updates#install-an-update-now).
- **Privacy (1.143.0, `privacy_toolkit`).** `/privacy`: packs (list, get, preview, apply, remove, history), settings, checks, the notice, legal holds (list, create, get, release) and the footage access log (list, CSV export, delete). A recording under a legal hold cannot be unprotected: `409 legal_hold`. See [Privacy](https://vigiora.com/docs/admin/privacy).
- **Failed requests (1.144.0, `api_error_reports`).** Client errors and error reports have the kind `api_error`, with the redacted request in `detail`. See [Failed requests](https://vigiora.com/docs/admin/error-reports#failed-requests).

## API 1.145 and 1.146: privacy pack countries and camera time zones

Server 1.17.1 serves API 1.146.0. `GET /server` lists each new feature.

- **Privacy pack countries (1.145.0, `privacy_pack_country`).** `GET /privacy/packs?country=` (scope `settings:read`, admins) lists the packs of one country (ISO 3166-1 alpha-2) and the region packs. Each pack has `coverage`: `region` (the EU guidance), `national` or `general_only` (the country's national rules were not yet reviewed). The answer has `suggested_country`, the country the server seems to be in (from its time zone, or from a language spoken in only one pack country), or `null`; use it to preselect a country. See [Privacy](https://vigiora.com/docs/admin/privacy#privacy-packs).
- **Camera time zones (1.146.0, `camera_timezone`).** Cameras have `timezone` (the IANA zone in use, for example `Europe/Madrid`), `timezone_source` (`camera`, `client`, `client_reported` or `server`) and `timezone_override` (the zone a person set, or `null` for automatic). `timezone_override` is written with `PATCH /cameras/{camera_id}`; an unknown zone answers `422 validation_failed`. It is the same setting as the camera clock's zone. Times in the API stay in UTC. See [Camera time zones](https://vigiora.com/docs/cameras/camera-time-zones).

## API 1.147 to 1.150: robot unreachable, second look and room speech

Server 1.17.2 serves API 1.150.0. `GET /server` lists each new feature.

- **Robot that does not answer (1.147.0).** The robot routes (stop, light, Wi-Fi movement settings, camera switch, room scan and the Bluetooth jobs) answer `503 device_unreachable` with `Retry-After` and `details.reason` (`no_answer`, `error` or `auth`) when the Vigiora Robot is off or out of range, instead of `502 ptz_failed`. `GET /cameras/{camera_id}/robot/wifi-motion` is polled by the web app, so it answers `200` with `available` false and `reason` `unreachable` or `auth`. See [When the robot is off or out of range](https://vigiora.com/docs/robots/vigiora-robot-01#when-the-robot-is-off-or-out-of-range).
- **Second look, a beta (1.148.0, `guardian_verify`).** Alert rules have `verify` (`auto`, the default, `always` or `never`), `verify_window_sec` (30 to 300, default 120: how much recording before the analysed clip is checked) and `verify_active` (read only: a match of the rule is checked now). `verify` and `verify_window_sec` are written when a rule is created or updated. **No rule is checked while the server setting `second_look_beta_enabled` is off, which is the default** (see below), whatever `verify` says, and `verify_active` is then false. Alerts have `review` (true for a **To review** notice, whose `severity` is one step below the rule's and which never ran a siren, sound, device action or automation), `verified` (`confirmed`, `unverified` or `null`), `verify_reason` and `context_before`. Guardian entries have `verification`, one item for each rule the AI matched: `confirmed`, `cleared` (no alert; only when the rule's own exception is seen in the earlier recording) or `unverified`, with `cause` (`unsure`, `uncertain`, `no_recording`, `ai_failed`, `timeout` or `ai_unavailable`), the reasons and the checked clip's `clip_from` and `clip_to`. An error never clears. Every change of a rule is written to the audit log. See [The second look](https://vigiora.com/docs/ai/alert-rules#the-second-look-beta).
- **Room speech on cameras (1.149.0, `room_speech_on_cameras`).** A camera's transcript, coverage, summary and timeline speech marks include speech recorded by its room's microphone. Each line names the device (`source_camera_id`, `source_name`), lines heard by two devices are given once, and text from a device you may not view is left out with `speech_hidden_sources` true. `own_only=true` keeps only the camera's own speech, as before. Rooms have `speech_microphone_fallback` (`auto`, the default, `off`, or a camera id of the room as text): what the room does when its microphone stops. The room's `speech_microphone_choice` can then have the mode `off`, with the reason codes `speech_off` and `fallback_down`. The setting is part of the configuration export and import. See [If this microphone stops](https://vigiora.com/docs/cameras/audio-and-microphones#if-this-microphone-stops).
- **Cleared list, second-look test and beta switch (1.150.0).** `GET /recordings/cleared-matches` (scope `guardian:read`; filters `camera_ids`, `from`, `to`, `limit`, `cursor`) lists the matches the second look cleared, newest first, read only, with the rule, the AI's one-line `reason`, `context_before` and where to open the recording. They are not alerts (`is_alert` is always false): never pushed, never counted in the alert bell, and nothing runs for them. `POST /alert-rules/{alert_rule_id}/actions/test-verify` (scope `guardian:write`, admins) runs the second look on a past moment, given as `alert_id` or `at` (a room's rule also needs `camera_id`), and answers `verdict` (`confirmed`, `cleared` or `unsure`), `reason`, `usage` and `estimated_cost_usd`. It raises and changes nothing but uses AI allowance, and is limited to 10 runs a minute. The beta switch is the setting `second_look_beta_enabled` of `GET` and `PATCH /settings` (admins; boolean, `false` by default; labelled **Second look (beta)** in the web app). Room microphone choices have a new state, `site_offline` (reason code `site_offline`): every device of the room is unreachable because the Vigiora Client that delivers them is offline. Nothing is transcribed and no "microphone stopped" notification is sent. See [If this microphone stops](https://vigiora.com/docs/cameras/audio-and-microphones#if-this-microphone-stops).

## API 1.151 to 1.157: camera planner, capacity warnings, robot, live video health and playback errors

Server 1.17.3 serves API 1.157.0. `GET /server` lists each new feature. All changes are additive.

- **Camera mount on floor plans (1.151.0, `floor_plan_mount`).** Camera items of a floor plan have `height_m` (mount height above the floor in metres, 0.1 to 50, or `null`) and `tilt_deg` (degrees down from horizontal, 0 to 90, or `null`). Both are read with `GET /floor-plans/{floor_plan_id}/items`, written with `POST /floor-plans/{floor_plan_id}/items/actions/replace` (a value out of range answers `422 validation_failed`), dropped on other kinds, and part of the configuration export and import. See [Plan where cameras go](https://vigiora.com/docs/using/floor-plans#plan-where-cameras-go).
- **Capacity warnings (1.152.0, `capacity_warnings`).** `GET /system/capacity/warnings` (scope `settings:read`, admins and operators) lists the four warnings the web app shows after cameras are added, in the order `memory`, `disk_space`, `disk_health` and `cpu`, each with `known`, `active`, `shown_at` and the numbers behind it. It is read only and never marks a warning shown. Cameras added through the API get no dialog. See [Warnings after you add cameras](https://vigiora.com/docs/admin/system#warnings-after-you-add-cameras). The setup checklist (`GET /setup/checklist`) has a new item, `vigiora_account`, on self-hosted servers.
- **Robot body (1.153.0, `robot_body`).** The robot summary, `GET /cameras/{camera_id}/robot`, has an optional `body`: the robot's own description of its size and where its camera sits (`width_mm`, `length_mm`, `height_mm`, `camera_height_mm`, `camera_ahead_mm`, `camera_hfov_deg`, `measured`), passed through as the robot sends it. It needs robot firmware 0.5.0 or later.
- **Robots in the network scan (1.154.0 and 1.155.0, `network_scan_robot`, `candidate_robot`).** `NetworkDevice.kind` (`GET /network/devices` and the scan results) and `NetworkCandidate.kind` (`GET /network/candidates`) are `robot` for a Vigiora Robot, with its model in `model`, and `null` for everything else. A robot is still added as a camera. See [Automatic discovery](https://vigiora.com/docs/cameras/automatic-discovery#new-camera-found).
- **Health report when live video cannot start (1.156.0, `health_problem`).** Health reports have a new `trigger`, `problem`: a report run at once because live video could not start for two minutes. Its item `service.live_video` says why and how to fix it. It is mailed and pushed according to the health settings, like the daily check. See [Live video engine](https://vigiora.com/docs/admin/system#live-video-engine).
- **Playback failures in client errors (1.157.0, `playback_error_detail`).** A client error of kind `error` that is a final playback failure of the web player has `detail` with `playback: true` and only these keys: `rung`, `to`, `reason`, `route`, `recording`, `live`, `camera`, `media_error_code`, `media_error_message`, `ready_state`, `network_state`, `current_time`, `duration`, `buffered_end`, `video_width`, `video_height`, `http_status`, `content_type`, `content_range`, `accept_ranges`, `codec` and `can_play`. Text that looks like an address or a token is dropped. Any other `error` has `detail` null. See [Client errors](https://vigiora.com/docs/admin/system#client-errors).

## Coming in later phases

- **SDKs** for TypeScript, Python and Go, generated from the OpenAPI description. Until then, generate a client from `/api/v1/openapi.yaml` yourself.

## Next steps

- [Quickstart](https://vigiora.com/docs/developers/api-quickstart): your first calls with curl.
- [Authentication and scopes](https://vigiora.com/docs/developers/api-authentication)
- [Conventions](https://vigiora.com/docs/developers/api-conventions): errors, pagination, idempotency and rate limits.
- [API reference](https://vigiora.com/docs/developers/api-reference)
- [Network tools](https://vigiora.com/docs/developers/network-tools): scan the LAN and find cameras that changed IP.
- [Add-ons](https://vigiora.com/docs/ai/hal-services): object recognition and the other AI add-ons behind detection events.
- [MCP server](https://vigiora.com/docs/developers/mcp): connect claude.ai, ChatGPT and other AI assistants.
- [Use Vigiora with AI coding agents](https://vigiora.com/docs/developers/ai-agents): the `vigiora-api` skill for Claude Code, Codex and claude.ai ([download the .zip](https://vigiora.com/skills/vigiora-api.zip)), plus `/llms.txt` and markdown copies of every page.

---

Source: https://vigiora.com/docs/developers/api-v1 · Last updated 4 Dec 2026, 12:50 UTC
