API docs
Tools

Sandbox

A copy of Ochio that runs on your computer, with a simulated site, drones and sensors behind the real API. Build and test your integration against it before it meets a real site.

What's in it

Everything but the hardware is real: the API, request signing, rules, the safety gate, missions, webhooks, the event log, reports and the MCP server. The drones, the people they find and the site's own sensors are simulated.

The demo site, Demo Depot, is a depot in open country:

ZoneKindSensor
North fence north-fencewatchnorth-fence-pir-01, a motion sensor
East gate east-gatewatcheast-gate-cam-01, a camera
Generator yard generator-yardwatchgenerator-yard-door-01, a door contact
Fuel farm fuel-farmno-flynone

Two drones, drone-1 and drone-2, share a dock in the middle. Three rules decide what happens:

RuleWhenThen
perimeter-motionA medium or higher alert on the north fence or at the east gateInspect, at once
generator-yard-doorAny alert in the generator yardInspect, after a person approves
silent-sensorAny sensor stops checking inInspect, at once

The simulated drones fly straight lines at 12 m/s and 40 m up. Their batteries drain in flight and charge on the dock, and their cameras see any simulated person within 60 m.

Run it

The sandbox runs on macOS and Linux. Ask us for a copy, then install uv once and start it from its folder. The first start takes about a minute and prints two API keys, operator and partner.

Then open http://127.0.0.1:8700 for the sandbox's dashboard, a live map of the site with eight ready-made checks, and http://127.0.0.1:8700/docs to call any endpoint from the browser.

OptionDoes
--sim-speed 5Flies the drones 5 times faster (0.25 to 20).
--port 8800Another port. Default 8700.
--host 0.0.0.0Lets other machines connect. Turn test mode off when you do.
--no-devTurns test mode off: every request needs a key.
--freshStarts from nothing: new keys and an empty log.
--quietStops printing events in the terminal.
Terminal
brew install uv        # once
cd ochio-core
uv run ochio-core      # add --sim-speed 5 for faster drones

Tools

Three helpers come with the sandbox. Run each in its own terminal, from the sandbox's folder.

ToolDoes
uv run ochio-receiverPlays a partner system: subscribes to every event, checks each signature and prints one line per event. --events "mission.*,report.ready" narrows it; --fail 3 fails the first three deliveries so you can watch the retries.
uv run ochio-sensor --id gate-sensor --lat 38.5005 --lon -97.9950Plays an outside sensor at the east gate: registers, checks in every 10 seconds, and on a key press sends a signed alert (m), cuts its power (s), sends a tampered alert (t) or quits (q).
uv run ochio-replay export.ndjson --speed 10Sends the alerts and silences from an export into a fresh sandbox, repeats the approvals, denials and cancels people made, and compares the missions with the recording.

Try these

#TryWhat should happen
1Motion and a person on the north fenceA drone launches at once, sees the person, flies home, and a report appears.
2Cut the east gate camera's powerAbout 20 seconds later the camera is silent and a drone launches.
3Open the generator yard doorThe mission waits. Approve sends a drone; Deny ends it and leaves the alert open.
4Send a drone into the fuel farmFrom the API, the map and Claude alike: refused by outside_no_fly_zones.
5The same alert twice, then version 2duplicate, then updated, and only one mission.
6Run the receiver during check 1Every event prints as verified, ending with report.ready.
7A tampered alert401 invalid_signature, and nothing is created.
8Export, start fresh, replayThe same missions launch again.

Sandbox controls

These endpoints drive the simulation, so you can test your integration's edge cases on demand. They exist only in test mode, and need the admin scope.

Simulate an alert

POST/v1/dev/motion
AccessAPI key · adminSandbox only

A simulated sensor sends an alert, through the same path as a signed one. Optionally, a simulated person appears about 35 m from the sensor, for the drone to find.

Body
sensor_idstringrequired
The sensor that alerts.
typestring
Default motion.
prioritystring
Default high.
alert_idstring
The alert's own id. Default: a new one.
versioninteger
Default 1.
intruderboolean
Also place a simulated person near the sensor. Default false.
Returns

The same answer as Send an alert, plus intruder.

Request
curl -X POST "$OCHIO_URL/v1/dev/motion" \
  -H "Authorization: Bearer $OCHIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sensor_id": "generator-yard-door-01",
    "type": "door_open",
    "priority": "medium"
  }'
Response
{
  "result": "created",
  "alert": {
    "id": "alt_02fcb2845e3a",
    "source": "generator-yard-door-01",
    "source_alert_id": "bench_e0b6c003",
    "version": 1,
    "type": "door_open",
    "priority": "medium",
    "location": {
      "lat": 38.4979,
      "lon": -98.0047
    },
    "zone_id": "generator-yard",
    "status": "responding",
    "mission_id": "msn_7c755ad98d22",
    "mission_history": [
      "msn_7c755ad98d22"
    ],
    "time": "2026-10-19T21:34:46.531Z",
    "title": null,
    "description": null,
    "media_url": null,
    "data": null,
    "received_by": "sensor:generator-yard-door-01",
    "dismissed_by": null,
    "resolved_at": null,
    "created_at": "2026-10-19T21:34:46.531Z",
    "updated_at": "2026-10-19T21:34:46.531Z"
  },
  "mission": {
    "id": "msn_7c755ad98d22",
    "status": "pending_approval",
    "vehicle_id": null
  },
  "rule": {
    "rule_id": "generator-yard-door",
    "outcome": "mission_created",
    "mission_id": "msn_7c755ad98d22",
    "mission_status": "pending_approval"
  },
  "intruder": null
}

Cut or restore a sensor's power

POST/v1/dev/sensors/{sensor_id}/power
AccessAPI key · adminSandbox only

Stops or restarts a simulated sensor's check-ins. With its power off, it turns silent once its check-ins expire.

Path
sensor_idstringrequired
A simulated sensor.
Body
onbooleanrequired
false cuts the power; true restores it.
Returns

power, the sensor's status, and silent_after: when it will turn silent.

Errors
StatusCodeWhen
409not_simulatedThe sensor is real.
Request
curl -X POST "$OCHIO_URL/v1/dev/sensors/east-gate-cam-01/power" \
  -H "Authorization: Bearer $OCHIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "on": false
  }'
Response
{
  "sensor_id": "east-gate-cam-01",
  "power": "off",
  "status": "online",
  "silent_after": "2026-10-19T21:35:01.921Z"
}

Place a simulated person

POST/v1/dev/intruders
AccessAPI key · adminSandbox only

Puts a simulated person on the map for 15 minutes. A drone on scene or on patrol within 60 m sees them.

Body
latnumberrequired
Latitude.
lonnumberrequired
Longitude.
labelstring
Default Person.
Returns

201 with the person: id, position, zone_id, placed_at and expires_at (in Unix seconds).

Request
curl -X POST "$OCHIO_URL/v1/dev/intruders" \
  -H "Authorization: Bearer $OCHIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lat": 38.5007,
    "lon": -97.9953,
    "label": "Person"
  }'
Response
{
  "id": "int_f5a3fe19",
  "lat": 38.5007,
  "lon": -97.9953,
  "label": "Person",
  "zone_id": "east-gate",
  "placed_at": "2026-10-19T21:33:03.881Z",
  "expires_at": 1792446483.8811839
}

Clear simulated people

DELETE/v1/dev/intruders
AccessAPI key · adminSandbox only

Removes every simulated person.

Returns

{"removed": n}.

Request
curl -X DELETE "$OCHIO_URL/v1/dev/intruders" \
  -H "Authorization: Bearer $OCHIO_API_KEY"
Response
{
  "removed": 1
}

Fault a vehicle

POST/v1/dev/vehicles/{vehicle_id}/fault
AccessAPI key · adminSandbox only

Makes a vehicle report a fault. A mission it's flying fails, and it flies home. /clear-fault repairs it; /battery sets its battery, as {"pct": 25}.

Path
vehicle_idstringrequired
The vehicle.
Body
messagestring
The fault, in words. Default Simulated motor fault.
Returns

The vehicle.

Request
curl -X POST "$OCHIO_URL/v1/dev/vehicles/drone-2/fault" \
  -H "Authorization: Bearer $OCHIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Motor 3 overheating"
  }'
Response
{
  "id": "drone-2",
  "name": "Drone 2",
  "type": "quadcopter",
  "model": "Ochio quad (simulated)",
  "adapter": "sim",
  "capabilities": [
    "camera",
    "depth"
  ],
  "home": {
    "lat": 38.499,
    "lon": -98.0007
  },
  "position": {
    "lat": 38.499,
    "lon": -98.0007,
    "alt_m": 0.0
  },
  "heading_deg": 251.4,
  "ground_speed_mps": 0.0,
  "speed_mps": 12.0,
  "range_m": 6000.0,
  "battery_pct": 25.0,
  "status": "fault",
  "ready": false,
  "charging": false,
  "mission_id": null,
  "fault": "Motor 3 overheating",
  "created_at": "2026-10-19T21:30:10.072Z",
  "updated_at": "2026-10-19T21:34:49.559Z"
}

Change the simulation speed

POST/v1/dev/sim-speed
AccessAPI key · adminSandbox only

Flies the drones faster or slower, 0.25 to 20 times. Cooldowns scale with it.

Body
speednumberrequired
The speed, 0.25 to 20.
Returns

{"sim_speed": n}.

Request
curl -X POST "$OCHIO_URL/v1/dev/sim-speed" \
  -H "Authorization: Bearer $OCHIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "speed": 5
  }'
Response
{
  "sim_speed": 5.0
}

Send a tampered alert

POST/v1/dev/tampered-alert
AccessAPI key · adminSandbox only

Signs an alert as a sensor, changes the body after signing, and sends it to POST /v1/alerts, to show that Ochio refuses it.

Body
sensor_idstring
Default north-fence-pir-01.
Returns

What was signed and sent, Ochio's answer (401 invalid_signature), and whether an alert was created.

Request
curl -X POST "$OCHIO_URL/v1/dev/tampered-alert" \
  -H "Authorization: Bearer $OCHIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sensor_id": "north-fence-pir-01"
  }'
Response
{
  "sent": "{\"id\": \"tamper_a56db0a5\", \"source\": \"north-fence-pir-01\", \"type\": \"motion\", \"priority\": \"critical\"}",
  "signed": "{\"id\": \"tamper_a56db0a5\", \"source\": \"north-fence-pir-01\", \"type\": \"motion\", \"priority\": \"low\"}",
  "status": 401,
  "response": {
    "error": {
      "code": "invalid_signature",
      "message": "The signature does not match the body. Nothing was recorded."
    }
  },
  "alerts_before": 3,
  "alerts_after": 3,
  "alert_created": false
}

Read or reset the simulation

GET/v1/dev/state
AccessAPI key · adminSandbox only

GET /v1/dev/state returns the simulation speed, the simulated people, which sensors have power, and every event type. POST /v1/dev/reset clears alerts, missions, detections, reports and simulated people, and puts the fleet back on its dock, fully charged. POST /v1/dev/inject re-sends one exported event; the replay tool uses it.

Returns

The state; {"reset": true} for a reset.

Request
curl "$OCHIO_URL/v1/dev/state" \
  -H "Authorization: Bearer $OCHIO_API_KEY"
Response
{
  "sim_speed": 1.0,
  "intruders": [
    {
      "id": "int_f5a3fe19",
      "lat": 38.5007,
      "lon": -97.9953,
      "label": "Person",
      "zone_id": "east-gate",
      "placed_at": "2026-10-19T21:33:03.881Z",
      "expires_at": 1792446483.8811839
    }
  ],
  "sensor_power": {
    "north-fence-pir-01": true,
    "east-gate-cam-01": true,
    "generator-yard-door-01": true
  },
  "event_types": [
    "alert.received",
    "alert.updated",
    "alert.resolved",
    "alert.dismissed",
    "sensor.registered",
    "sensor.online",
    "sensor.silent",
    "sensor.recovered",
    "sensor.removed",
    "rule.suppressed",
    "mission.created",
    "mission.status_changed",
    "vehicle.status_changed",
    "detection.created",
    "report.ready",
    "webhook.test"
  ]
}