h-cam B1280

h-cam B1280 Camera API

Quick Start

Confirm the product and firmware identity, start continuous acquisition, then fetch a JPEG:

curl http://CAMERA_IP/api/v1/info
curl -X POST http://CAMERA_IP/api/v1/camera/acquisition/continuous/start
curl -o frame.jpg http://CAMERA_IP/api/v1/frames/latest

The API root at /api/v1 is the canonical route-discovery document. The canonical camera-state read is GET /api/v1/camera.

Endpoint Index

Service

MethodPathSuccessUse
GET/api/v1200 application/jsonReturns API version 1.0 and the closed link map for public HTTP resources.
GET/api/v1/info200 application/jsonReturns product, firmware Git SHA, chip, network identity, and feature flags.
GET/api/v1/health200 application/jsonReturns overall health, warnings, faults, uptime, and heap telemetry.
GET/api/v1/time200 application/jsonReturns compact monotonic time plus coherent PTP quality and scheduling readiness.
GET/api/v1/system200 application/jsonReturns boot identity, reset reason, uptime, and silicon temperature.
POST/api/v1/system/reboot200 application/jsonSchedules a reboot after an optional bounded delay.
GET/200 text/htmlServes the built-in browser control and status document.

Network

MethodPathSuccessUse
GET/api/v1/network200 application/jsonReturns the active network state, last confirmed persistent configuration, any pending change, mDNS state, recovery state, and discovery settings.
PATCH/api/v1/network200 application/json / 200 application/json / 202 application/jsonValidates or applies DHCP or static IPv4 configuration, optionally staging a confirmable address change.
POST/api/v1/network/confirm200 application/jsonConfirms a staged network configuration using its config_id.
POST/api/v1/network/rollback202 application/json / 200 application/jsonRolls back a staged network configuration using its config_id.
UDPudp:discovery200 application/jsonDiscovers cameras with the canonical JSON broadcast exchange on UDP port 39590.

Camera

MethodPathSuccessUse
GET/api/v1/camera200 application/jsonReturns the canonical grouped camera state: acquisition, pipeline timing, latest frame, output, and frame-buffer counts.
GET/api/v1/camera/capabilities200 application/jsonReturns the installed AR0144 sensor descriptor and immutable pipeline, timing, preview, trigger, network, and feature capabilities.
GET/api/v1/camera/config200 application/jsonReturns current sensor-backed configuration and timing readback.
PATCH/api/v1/camera/config200 application/jsonApplies mutable pipeline, sensor timing/control, JPEG, and ISP configuration fields.
GET/api/v1/camera/acquisition200 application/jsonReturns acquisition mode and retained-frame buffer state.
POST/api/v1/camera/acquisition/continuous/start200 application/jsonStarts continuous free-run acquisition.
POST/api/v1/camera/acquisition/triggered/start200 application/jsonStarts software-trigger-ready acquisition.
POST/api/v1/camera/acquisition/stop200 application/jsonStops acquisition.
POST/api/v1/camera/acquisition/flush200 application/jsonFlushes retained JPEG frames.

Trigger

MethodPathSuccessUse
GET/api/v1/camera/trigger200 application/jsonReturns software-trigger readiness, compact PTP quality, output state, visible trigger slots, and the earliest admission times.
POST/api/v1/camera/trigger/schedule200 application/jsonSchedules a monotonic or PTP software-trigger output and can optionally wait for its associated frame.
POST/api/v1/camera/trigger/cancel200 application/jsonCancels a retained future scheduled trigger using its required trigger_id.

Frames and Streams

MethodPathSuccessUse
GET/api/v1/frames/latest/meta200 application/jsonReturns common metadata for the latest retained frame.
GET/api/v1/frames/latest200 image/jpegReturns the latest retained JPEG with retained timing headers.
GET/api/v1/frames/next200 image/jpegWaits for and returns the next retained JPEG after a required boot-scoped frame cursor.
GET/api/v1/frames/{frame_id}/meta200 application/jsonReturns common metadata for a retained frame by public frame ID.
GET/api/v1/frames/{frame_id}200 image/jpegReturns a retained JPEG by public frame ID.
GET/api/v1/preview.mjpg307 application/jsonValidates preview query parameters and redirects to the direct MJPEG server.
GET/api/v1/events200 text/event-streamStreams retained system, frame, and terminal error events using SSE.
GET/stream.mjpg200 multipart/x-mixed-replaceStreams multipart MJPEG directly from TCP port 81.

Metrics

MethodPathSuccessUse
GET/api/v1/metrics200 application/jsonReturns grouped camera, preview, trigger, and system telemetry.

Debug Diagnostics

MethodPathSuccessUse
GET/debug/runtime200 application/jsonReturns internal task, resource, service, lifecycle, and coherent PTP diagnostics.
GET/debug/time200 application/jsonReturns the complete coherent PTP diagnostic projection used by qualification tools.
GET/debug/camera/sensor200 application/jsonReturns camera-task sensor registers, AR0144 diagnostics, sensor-read timing, and raw-slot ownership.

Endpoints

Each endpoint section lists its accepted query string, request body, response statuses, success schemas, examples, and endpoint-specific behavior.

Service

GET /api/v1

Returns API version 1.0 and the closed link map for public HTTP resources.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json discovery.api_root
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: discovery.api_root

200 success response: discovery.api_root
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "api_version": {
      "const": "1.0"
    },
    "links": {
      "type": "object",
...
Example
Request
curl 'http://CAMERA_IP/api/v1'
Response
{
  "api_version": "1.0",
  "links": {
    "info": "/api/v1/info",
    "health": "/api/v1/health",
    "network": "/api/v1/network",
    "time": "/api/v1/time",
    "system": "/api/v1/system",
    "camera": "/api/v1/camera",
...

GET /api/v1/info

Returns product, firmware Git SHA, chip, network identity, and feature flags.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json discovery.info
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: discovery.info

200 success response: discovery.info
{
  "additionalProperties": false,
  "properties": {
    "api_version": {
      "const": "1.0"
    },
    "capabilities": {
      "additionalProperties": false,
      "properties": {
...
Example
Request
curl 'http://CAMERA_IP/api/v1/info'
Response
{
  "model": "esp32-p4-ar0144-camera",
  "api_version": "1.0",
  "firmware": {
    "name": "esp32_p4_ar0144_camera",
    "idf_version": "v5.5.4",
    "git_sha": "744a7161b3d9626f11475fc40408620ca6b85fc3-dirty",
    "build_time": "Aug  4 2026 16:06:26"
  },
...

GET /api/v1/health

Returns overall health, warnings, faults, uptime, and heap telemetry.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json discovery.health
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: discovery.health

200 success response: discovery.health
{
  "additionalProperties": false,
  "properties": {
    "faults": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
...
Example
Request
curl 'http://CAMERA_IP/api/v1/health'
Response
{
  "state": "ok",
  "uptime_ms": 21451,
  "faults": [],
  "warnings": [],
  "heap": {
    "internal_free_bytes": 147591,
    "internal_min_free_bytes": 139023,
    "psram_free_bytes": 13067500,
...

GET /api/v1/time

Returns compact monotonic time plus coherent PTP quality and scheduling readiness.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json discovery.time
400bad_requestapplication/json common.product_error
503time_unavailableapplication/json common.product_error
Success Response Schemas

200 success response: discovery.time

200 success response: discovery.time
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "common.schema.json#/$defs/common.boot_id"
    },
    "mono_ns": {
      "type": "string",
...
Example
Request
curl 'http://CAMERA_IP/api/v1/time'
Response
{
  "boot_id": "00000000-0000-4000-8000-000000000002",
  "mono_ns": "1700000000000000000",
  "ptp": {
    "ns": "1700000000000000000",
    "state": "acquiring",
    "epoch": null,
    "generation": 1,
    "grandmaster_id": "grandmaster-1",
...

GET /api/v1/system

Returns boot identity, reset reason, uptime, and silicon temperature.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json system.response
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: system.response

200 success response: system.response
{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "common.schema.json#/$defs/common.boot_id"
    },
    "reset_reason": {
      "enum": [
        "unknown",
...
Example
Request
curl 'http://CAMERA_IP/api/v1/system'
Response
{
  "uptime_s": 52,
  "boot_id": "00000000-0000-4000-8000-000000000002",
  "reset_reason": "software",
  "temperature_c": 36.2
}

POST /api/v1/system/reboot

Schedules a reboot after an optional bounded delay.

Query String

No query string is accepted.

Request Body

Body schema: system.reboot.request

{
  "additionalProperties": false,
  "properties": {
    "delay_ms": {
      "maximum": 10000,
      "minimum": 0,
      "type": "integer"
    }
  },
...
Response Statuses
StatusResultContentSchemas
200successapplication/json system.reboot.response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
503unavailableapplication/json common.product_error
Success Response Schemas

200 success response: system.reboot.response

200 success response: system.reboot.response
{
  "additionalProperties": false,
  "properties": {
    "delay_ms": {
      "minimum": 0,
      "type": "integer"
    },
    "ok": {
      "const": true
...
Example
Request
curl -X POST -H 'Content-Type: application/json' --data '{"delay_ms":250}' 'http://CAMERA_IP/api/v1/system/reboot'
Response
{
  "ok": true,
  "rebooting": true,
  "delay_ms": 250
}

GET /

Serves the built-in browser control and status document.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successtext/html web.root_html_response
Success Response Schemas

200 success response: web.root_html_response

200 success response: web.root_html_response
{
  "additionalProperties": false,
  "properties": {
    "body": {
      "type": "string"
    },
    "content_type": {
      "type": "string"
    }
...
Example
Request
curl 'http://CAMERA_IP/'
Response
{
  "status": 200,
  "content_type": "text/html; charset=utf-8",
  "headers": {
    "content-type": "text/html; charset=utf-8"
  },
  "document_kind": "html"
}

Network

GET /api/v1/network

Returns the active network state, last confirmed persistent configuration, any pending change, mDNS state, recovery state, and discovery settings.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json network.response
400bad_requestapplication/json common.product_error
503network_unavailableapplication/json common.product_error
Success Response Schemas

200 success response: network.response

200 success response: network.response
{
  "additionalProperties": false,
  "properties": {
    "active": {
      "additionalProperties": false,
      "properties": {
        "dns": {
          "items": {
            "type": "string"
...
Example
Request
curl 'http://CAMERA_IP/api/v1/network'
Response
{
  "hostname": "camera-example-1",
  "state": "dhcp_bound",
  "mdns_name": "camera-example-1.local",
  "mac": "02:00:00:00:00:01",
  "link_up": true,
  "speed_mbps": 100,
  "full_duplex": true,
  "mode": "dhcp",
...

PATCH /api/v1/network

Validates or applies DHCP or static IPv4 configuration, optionally staging a confirmable address change.

Query String

No query string is accepted.

Request Body

Body schema: network.patch.request

{
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "const": "dhcp"
          }
...
Response Statuses
StatusResultContentSchemas
200validatedapplication/json network.patch.validate_response
200appliedapplication/json network.response
202pendingapplication/json network.response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
409network_change_pendingapplication/json common.product_error
409address_conflictapplication/json common.product_error
409network_busy_conflictapplication/json common.product_error
503busyapplication/json common.product_error
503network_busy_unavailableapplication/json common.product_error
503network_unavailableapplication/json common.product_error
500internal_errorapplication/json common.product_error
503unavailableapplication/json common.product_error
Success Response Schemas

200 validated response: network.patch.validate_response

200 applied response: network.response

202 pending response: network.response

200 validated response: network.patch.validate_response
{
  "additionalProperties": false,
  "properties": {
    "candidate": {
      "additionalProperties": false,
      "properties": {
        "hostname": {
          "type": "string"
        },
...
Example

Validate Baseline Network

Request
curl -X PATCH -H 'Content-Type: application/json' --data '{"mode":"dhcp","hostname":"camera-example-1"}' 'http://CAMERA_IP/api/v1/network'
Response
{
  "valid": true,
  "candidate": {
    "mode": "dhcp",
    "hostname": "camera-example-1",
    "static_ipv4": null
  }
}

Stage Temporary Hostname For Confirm

Request
curl -X PATCH -H 'Content-Type: application/json' --data '{"mode":"dhcp","hostname":"camera-example-2","apply":true,"confirm_timeout_ms":30000}' 'http://CAMERA_IP/api/v1/network'
Response
{
  "hostname": "camera-example-1",
  "state": "dhcp_bound",
  "mdns_name": "camera-example-1.local",
  "mac": "02:00:00:00:00:01",
  "link_up": true,
  "speed_mbps": 100,
  "full_duplex": true,
  "mode": "dhcp",
...

Stage Temporary Hostname For Rollback

Request
curl -X PATCH -H 'Content-Type: application/json' --data '{"mode":"dhcp","hostname":"camera-example-2","apply":true,"confirm_timeout_ms":30000}' 'http://CAMERA_IP/api/v1/network'
Response
{
  "hostname": "camera-example-1",
  "state": "dhcp_bound",
  "mdns_name": null,
  "mac": "02:00:00:00:00:01",
  "link_up": true,
  "speed_mbps": 100,
  "full_duplex": true,
  "mode": "dhcp",
...

POST /api/v1/network/confirm

Confirms a staged network configuration using its config_id.

Query String

No query string is accepted.

Request Body

Body schema: network.confirm.request

{
  "additionalProperties": false,
  "properties": {
    "config_id": {
      "maxLength": 36,
      "minLength": 1,
      "type": "string"
    }
  },
...
Response Statuses
StatusResultContentSchemas
200successapplication/json network.response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
409confirm_not_readyapplication/json common.product_error
409confirm_not_reachableapplication/json common.product_error
409no_pending_configapplication/json common.product_error
409network_busy_conflictapplication/json common.product_error
503busyapplication/json common.product_error
503network_busy_unavailableapplication/json common.product_error
503network_unavailableapplication/json common.product_error
500internal_errorapplication/json common.product_error
503unavailableapplication/json common.product_error
Success Response Schemas

200 success response: network.response

Example
Request
curl -X POST -H 'Content-Type: application/json' --data '{"config_id":"config-2"}' 'http://CAMERA_IP/api/v1/network/confirm'
Response
{
  "hostname": "camera-example-2",
  "state": "dhcp_bound",
  "mdns_name": null,
  "mac": "02:00:00:00:00:01",
  "link_up": true,
  "speed_mbps": 100,
  "full_duplex": true,
  "mode": "dhcp",
...

POST /api/v1/network/rollback

Rolls back a staged network configuration using its config_id.

Query String

No query string is accepted.

Request Body

Body schema: network.rollback.request

{
  "additionalProperties": false,
  "properties": {
    "config_id": {
      "maxLength": 36,
      "minLength": 1,
      "type": "string"
    }
  },
...
Response Statuses
StatusResultContentSchemas
202rollback_startedapplication/json network.rollback.response
200successapplication/json network.response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
409no_pending_configapplication/json common.product_error
409network_busy_conflictapplication/json common.product_error
503busyapplication/json common.product_error
503network_busy_unavailableapplication/json common.product_error
503network_unavailableapplication/json common.product_error
500internal_errorapplication/json common.product_error
503unavailableapplication/json common.product_error
Success Response Schemas

202 rollback_started response: network.rollback.response

200 success response: network.response

202 rollback_started response: network.rollback.response
{
  "additionalProperties": false,
  "properties": {
    "rollback_started": {
      "const": true
    },
    "config_id": {
      "maxLength": 36,
      "minLength": 1,
...
Example
Request
curl -X POST -H 'Content-Type: application/json' --data '{"config_id":"config-4"}' 'http://CAMERA_IP/api/v1/network/rollback'
Response
{
  "rollback_started": true,
  "config_id": "config-4"
}

UDP udp:discovery

Discovers cameras with the canonical JSON broadcast exchange on UDP port 39590.

Query String

No query string is accepted.

Request Body

Body schema: discovery.udp.request

{
  "$ref": "#/$defs/discovery.udp.generic_camera.request"
}
Response Statuses
StatusResultContentSchemas
200successapplication/json discovery.udp.response
Success Response Schemas

200 success response: discovery.udp.response

200 success response: discovery.udp.response
{
  "$ref": "#/$defs/discovery.udp.generic_camera.response"
}
Example
Request
UDP port 39590 request
{
  "type": "esp32_p4.discover",
  "protocol": "esp32-p4-discovery",
  "version": 1
}
Response
{"type":"esp32_p4.discovery","protocol":"esp32-p4-discovery","version":1,"product_class":"camera","model":"esp32-p4-ar0144-camera","git_sha":"744a7161b3d9626f11475fc40408620ca6b85fc3-dirty","api_version":"1.0","boot_id":"00000000-0000-4000-8000-000000000002","mac":"02:00:00:00:00:01","hostname":"camera-example-1","effective_hostname":"camera-example-1","network_mode":"dhcp","confirmed_config_id":"config-3","pending_config_id":null,"mdns_name":"camera-example-1.local","mdns_publication_phase":"running","mdns_observation_stale":false,"mdns_renamed":false,"ipv4":"192.0.2.1","netmask":"255.255.255.0","gateway":"192.0.2.1","dns":[],"requires_link_local_host_route":false,"link_local_network":null,"base_url":"http://camera-example-1","link_up":true,"recovery_active":false,"ptp_sync_state":"synchronized","ptp_clock_readable":true,"ptp_synchronized":true,"last_failure":"pending_reboot_rollback","recovery_reason":null,"uptime_ms":59833,"http_port":80,"udp_port":39590}

Camera

GET /api/v1/camera

Returns the canonical grouped camera state: acquisition, pipeline timing, latest frame, output, and frame-buffer counts.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json camera.camera
400bad_requestapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
503sensor_read_failedapplication/json common.product_error
503sensor_state_unsupportedapplication/json common.product_error
500sensor_readback_mismatchapplication/json common.product_error
Success Response Schemas

200 success response: camera.camera

200 success response: camera.camera
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "state": {
      "enum": [
        "idle",
        "acquiring_continuous",
        "trigger_ready",
...
Example
Request
curl 'http://CAMERA_IP/api/v1/camera'
Response
{
  "state": "idle",
  "acquisition": null,
  "pipeline": {
    "mode": "raw10_1280x800",
    "width": 1280,
    "height": 800,
    "period_us": {
      "configured": 16811,
...

GET /api/v1/camera/capabilities

Returns the installed AR0144 sensor descriptor and immutable pipeline, timing, preview, trigger, network, and feature capabilities.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json camera.capabilities
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: camera.capabilities

200 success response: camera.capabilities
{
  "additionalProperties": false,
  "properties": {
    "features": {
      "additionalProperties": false,
      "properties": {
        "auto_exposure": {
          "type": "boolean"
        },
...
Example
Request
curl 'http://CAMERA_IP/api/v1/camera/capabilities'
Response
{
  "sensor": {
    "model": "ar0144",
    "shutter": "global",
    "color": false,
    "native_width": 1280,
    "native_height": 800,
    "interface": "mipi_csi_2",
    "lanes": 2
...

GET /api/v1/camera/config

Returns current sensor-backed configuration and timing readback.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json camera.config
400bad_requestapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
503sensor_read_failedapplication/json common.product_error
503sensor_state_unsupportedapplication/json common.product_error
500sensor_readback_mismatchapplication/json common.product_error
Success Response Schemas

200 success response: camera.config

200 success response: camera.config
{
  "additionalProperties": false,
  "properties": {
    "frame_period_max_us": {
      "minimum": 1,
      "type": "integer"
    },
    "frame_period_min_us": {
      "minimum": 1,
...
Example
Request
curl 'http://CAMERA_IP/api/v1/camera/config'
Response
{
  "pipeline_mode": "raw10_1280x800",
  "frame_period_us": 16811,
  "frame_period_min_us": 16811,
  "frame_period_max_us": 1332187,
  "max_actual_exposure_duration_ns": 16771516,
  "timing_source": "mode_default",
  "sensor_test_pattern_enabled": false,
  "exposure": {
...

PATCH /api/v1/camera/config

Applies mutable pipeline, sensor timing/control, JPEG, and ISP configuration fields.

Query String

No query string is accepted.

Request Body

Body schema: camera.config.patch.request

{
  "additionalProperties": false,
  "properties": {
    "frame_period_us": {
      "maximum": 2147483647,
      "minimum": 1,
      "type": "integer"
    },
    "isp_bayer_denoise_enabled": {
...
Response Statuses
StatusResultContentSchemas
200successapplication/json camera.config_patch
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
409already_runningapplication/json common.product_error
501unsupportedapplication/json common.product_error
503unavailableapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
503sensor_read_failedapplication/json common.product_error
503sensor_state_unsupportedapplication/json common.product_error
500sensor_readback_mismatchapplication/json common.product_error
Success Response Schemas

200 success response: camera.config_patch

200 success response: camera.config_patch
{
  "additionalProperties": false,
  "properties": {
    "applied": {
      "type": "object"
    },
    "config": {
      "additionalProperties": false,
      "properties": {
...
Example
Request
curl -X PATCH -H 'Content-Type: application/json' --data '{"sensor_test_pattern_enabled":true}' 'http://CAMERA_IP/api/v1/camera/config'
Response
{
  "ok": true,
  "applied": {
    "sensor_test_pattern_enabled": true
  },
  "config": {
    "pipeline_mode": "raw10_1280x800",
    "frame_period_us": 16811,
    "frame_period_min_us": 16811,
...

GET /api/v1/camera/acquisition

Returns acquisition mode and retained-frame buffer state.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json acquisition.state
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: acquisition.state

200 success response: acquisition.state
{
  "additionalProperties": false,
  "properties": {
    "active_acquisition_mode": {
      "anyOf": [
        {
          "enum": [
            "continuous",
            "triggered"
...
Example
Request
curl 'http://CAMERA_IP/api/v1/camera/acquisition'
Response
{
  "state": "trigger_ready",
  "active_acquisition_mode": "triggered",
  "buffer_capacity": 10,
  "buffered_frames": 2,
  "dropped_frames": 0
}

POST /api/v1/camera/acquisition/continuous/start

Starts continuous free-run acquisition.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json acquisition.start_response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
409already_runningapplication/json common.product_error
503unavailableapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success response: acquisition.start_response

200 success response: acquisition.start_response
{
  "additionalProperties": false,
  "properties": {
    "ok": {
      "const": true
    },
    "state": {
      "enum": [
        "acquiring_continuous",
...
Example
Request
curl -X POST 'http://CAMERA_IP/api/v1/camera/acquisition/continuous/start'
Response
{
  "ok": true,
  "state": "acquiring_continuous"
}

POST /api/v1/camera/acquisition/triggered/start

Starts software-trigger-ready acquisition.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json acquisition.start_response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
409already_runningapplication/json common.product_error
503unavailableapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success response: acquisition.start_response

Example
Request
curl -X POST 'http://CAMERA_IP/api/v1/camera/acquisition/triggered/start'
Response
{
  "ok": true,
  "state": "trigger_ready"
}

POST /api/v1/camera/acquisition/stop

Stops acquisition.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json acquisition.stop_response
400bad_requestapplication/json common.product_error
503unavailableapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success response: acquisition.stop_response

200 success response: acquisition.stop_response
{
  "additionalProperties": false,
  "properties": {
    "ok": {
      "const": true
    },
    "state": {
      "const": "idle"
    }
...
Example
Request
curl -X POST 'http://CAMERA_IP/api/v1/camera/acquisition/stop'
Response
{
  "ok": true,
  "state": "idle"
}

POST /api/v1/camera/acquisition/flush

Flushes retained JPEG frames.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json acquisition.flush_response
400bad_requestapplication/json common.product_error
503unavailableapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success response: acquisition.flush_response

200 success response: acquisition.flush_response
{
  "additionalProperties": false,
  "properties": {
    "flushed_frames": {
      "minimum": 0,
      "type": "integer"
    },
    "ok": {
      "const": true
...
Example
Request
curl -X POST 'http://CAMERA_IP/api/v1/camera/acquisition/flush'
Response
{
  "ok": true,
  "flushed_frames": 0
}

Trigger

GET /api/v1/camera/trigger

Returns software-trigger readiness, compact PTP quality, output state, visible trigger slots, and the earliest admission times.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json trigger.state
400bad_requestapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success response: trigger.state

200 success response: trigger.state
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "can_schedule": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "trigger": {
...
Example
Request
curl 'http://CAMERA_IP/api/v1/camera/trigger'
Response
{
  "can_schedule": {
    "trigger": false,
    "ptp": false,
    "synchronized": false
  },
  "ptp": {
    "state": "acquiring",
    "epoch": null,
...

POST /api/v1/camera/trigger/schedule

Schedules a monotonic or PTP software-trigger output and can optionally wait for its associated frame.

Choosing The Scheduled Instant

Prefer exposure_start_time_ns for scheduled image capture because it expresses the required sensor exposure instant directly. The camera derives an earlier output-pulse target by subtracting trigger.qualified_trigger_to_exposure_start_latency_ns from the requested exposure-start time. Use trigger_output_time_ns only when the required instant is specifically when the camera asserts the software-trigger output pulse.

The two fields are mutually exclusive and use the domain selected by timestamp_domain. The resulting frame retains the actual exposure start separately as frame.exposure.start_ns.

Query String

No query string is accepted.

Request Body

Body schema: trigger.schedule.request

{
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "required": [
          "timeout_ms"
        ]
      },
...
Response Statuses
StatusResultContentSchemas
200successapplication/json trigger.schedule.response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
409already_runningapplication/json common.product_error
410stale_frame_cursorapplication/json common.product_error; common.error_details.stale_frame_cursor
503frame_publisher_unavailableapplication/json common.product_error; common.error_details.frame_publisher_unavailable
503trigger_id_exhaustedapplication/json common.product_error; common.error_details.trigger_id_exhausted
503replacement_schedule_failedapplication/json common.product_error; common.error_details.replacement_schedule_failed
409timestamp_domain_unavailableapplication/json common.product_error; common.error_details.time_quality_unavailable
409synchronization_unavailableapplication/json common.product_error; common.error_details.time_quality_unavailable
503unavailableapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
500internal_errorapplication/json common.product_error
504trigger_wait_timeoutapplication/json common.product_error; common.error_details.trigger_wait_timeout
504command_timeoutapplication/json common.product_error
Success Response Schemas

200 success response: trigger.schedule.response

200 success response: trigger.schedule.response
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "trigger": {
      "$ref": "common.schema.json#/$defs/common.trigger_summary"
    },
    "superseded": {
      "anyOf": [
...
Example

Asap Trigger

Request
curl -X POST -H 'Content-Type: application/json' --data '{"target":"asap","wait_for_frame":false,"request_id":"request-1"}' 'http://CAMERA_IP/api/v1/camera/trigger/schedule'
Response
{
  "trigger": {
    "id": 1,
    "state": "scheduled",
    "request_id": "request-1",
    "basis": "asap",
    "timing": {
      "domain": "monotonic",
      "requested_output_ns": null,
...

Future Trigger For Cancel

This is the preferred exposure-start form derived from the bundle's equivalent live output-time example. The request and timing-basis fields below are a coherent documentation projection, not a second live capture.

Request
curl -X POST -H 'Content-Type: application/json' --data '{"timestamp_domain":"ptp","require_synchronized":true,"wait_for_frame":false,"request_id":"request-2","exposure_start_time_ns":"1700000000001469000"}' 'http://CAMERA_IP/api/v1/camera/trigger/schedule'
Response
{
  "trigger": {
    "id": 2,
    "state": "scheduled",
    "request_id": "request-2",
    "basis": "exposure_start",
    "timing": {
      "domain": "ptp",
      "requested_output_ns": null,
...

Trigger With Frame

Request
curl -X POST -H 'Content-Type: application/json' --data '{"target":"asap","wait_for_frame":true,"timeout_ms":5000,"request_id":"request-3"}' 'http://CAMERA_IP/api/v1/camera/trigger/schedule'
Response
{
  "trigger": {
    "id": 3,
    "state": "frame_ready",
    "request_id": "request-3",
    "basis": "asap",
    "timing": {
      "domain": "monotonic",
      "requested_output_ns": null,
...

POST /api/v1/camera/trigger/cancel

Cancels a retained future scheduled trigger using its required trigger_id.

Query String

No query string is accepted.

Request Body

Body schema: trigger.cancel.request

{
  "additionalProperties": false,
  "properties": {
    "trigger_id": {
      "maximum": 9007199254740991,
      "minimum": 1,
      "type": "integer"
    }
  },
...
Response Statuses
StatusResultContentSchemas
200successapplication/json trigger.cancel.response
400bad_requestapplication/json common.product_error
404trigger_not_retainedapplication/json common.product_error; common.error_details.trigger_not_retained
503unavailableapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success response: trigger.cancel.response

200 success response: trigger.cancel.response
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "changed": {
      "type": "boolean"
    },
    "trigger": {
      "$ref": "common.schema.json#/$defs/common.trigger_summary"
...
Example
Request
curl -X POST -H 'Content-Type: application/json' --data '{"trigger_id":2}' 'http://CAMERA_IP/api/v1/camera/trigger/cancel'
Response
{
  "changed": true,
  "trigger": {
    "id": 2,
    "state": "canceled",
    "request_id": "request-2",
    "basis": "trigger_output",
    "timing": {
      "domain": "ptp",
...

Frames and Streams

GET /api/v1/frames/latest/meta

Returns common metadata for the latest retained frame.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json frames.metadata_response
400bad_requestapplication/json common.product_error
404not_foundapplication/json common.product_error; common.retained_frame_window_details
Success Response Schemas

200 success response: frames.metadata_response

200 success response: frames.metadata_response
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "frame": {
      "$ref": "common.schema.json#/$defs/common.frame"
    }
  },
  "required": [
...
Example
Request
curl 'http://CAMERA_IP/api/v1/frames/latest/meta'
Response
{
  "frame": {
    "id": 2,
    "time": {
      "ns": "1700000000301767720",
      "domain": "ptp",
      "state": "synchronized",
      "epoch": "1",
      "generation": 1
...

GET /api/v1/frames/latest

Returns the latest retained JPEG with retained timing headers.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successimage/jpeg streams.frame.jpeg_headers
400bad_requestapplication/json common.product_error
404not_foundapplication/json common.product_error; common.retained_frame_window_details
Success Response Schemas

200 success headers: streams.frame.jpeg_headers

200 success headers: streams.frame.jpeg_headers
{
  "additionalProperties": true,
  "allOf": [
    {
      "if": {
        "properties": {
          "x-exposure-timestamp-valid": {
            "const": "true"
          }
...
Example
Request
curl 'http://CAMERA_IP/api/v1/frames/latest'
Response
{
  "status": 200,
  "content_type": "image/jpeg",
  "headers": {
    "cache-control": "no-store",
    "x-camera-boot-id": "00000000-0000-4000-8000-000000000002",
    "x-frame-status-flags": "0",
    "x-camera-configuration-generation": "2",
    "content-type": "image/jpeg",
...

GET /api/v1/frames/next

Waits for and returns the next retained JPEG after a required boot-scoped frame cursor.

Query String

Query schema: frames.next.query

{
  "additionalProperties": false,
  "properties": {
    "after_frame_id": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "timeout_ms": {
...
Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successimage/jpeg streams.frame.jpeg_headers
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
404future_frame_cursorapplication/json common.product_error; common.error_details.future_frame_cursor
410stale_frame_cursorapplication/json common.product_error; common.error_details.stale_frame_cursor
504timeoutapplication/json common.product_error; common.error_details.timeout
503frame_publisher_unavailableapplication/json common.product_error; common.error_details.frame_publisher_unavailable
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success headers: streams.frame.jpeg_headers

Example
Request
curl 'http://CAMERA_IP/api/v1/frames/next?timeout_ms=5000&after_frame_id=1'
Response
{
  "status": 200,
  "content_type": "image/jpeg",
  "headers": {
    "cache-control": "no-store",
    "x-camera-boot-id": "00000000-0000-4000-8000-000000000002",
    "x-frame-status-flags": "0",
    "x-camera-configuration-generation": "2",
    "content-type": "image/jpeg",
...

GET /api/v1/frames/{frame_id}/meta

Returns common metadata for a retained frame by public frame ID.

Path Parameters
Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json frames.metadata_response
400bad_requestapplication/json common.product_error
400invalid_frame_idapplication/json common.product_error; common.error_details.invalid_frame_id
422invalid_configapplication/json common.product_error
404future_frame_cursorapplication/json common.product_error; common.error_details.future_frame_cursor
404frame_not_retainedapplication/json common.product_error; common.error_details.frame_not_retained
410stale_frame_cursorapplication/json common.product_error; common.error_details.stale_frame_cursor
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success response: frames.metadata_response

Example
Request
curl 'http://CAMERA_IP/api/v1/frames/1/meta'
Response
{
  "frame": {
    "id": 1,
    "time": {
      "ns": "1700000000000000000",
      "domain": "ptp",
      "state": "synchronized",
      "epoch": "1",
      "generation": 1
...

GET /api/v1/frames/{frame_id}

Returns a retained JPEG by public frame ID.

Path Parameters
Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successimage/jpeg streams.frame.jpeg_headers
400bad_requestapplication/json common.product_error
400invalid_frame_idapplication/json common.product_error; common.error_details.invalid_frame_id
422invalid_configapplication/json common.product_error
404future_frame_cursorapplication/json common.product_error; common.error_details.future_frame_cursor
404frame_not_retainedapplication/json common.product_error; common.error_details.frame_not_retained
410stale_frame_cursorapplication/json common.product_error; common.error_details.stale_frame_cursor
500internal_errorapplication/json common.product_error
Success Response Schemas

200 success headers: streams.frame.jpeg_headers

Example
Request
curl 'http://CAMERA_IP/api/v1/frames/1'
Response
{
  "status": 200,
  "content_type": "image/jpeg",
  "headers": {
    "cache-control": "no-store",
    "x-camera-boot-id": "00000000-0000-4000-8000-000000000002",
    "x-frame-status-flags": "0",
    "x-camera-configuration-generation": "2",
    "content-type": "image/jpeg",
...

GET /api/v1/preview.mjpg

Validates preview query parameters and redirects to the direct MJPEG server.

Query String

Query schema: preview.query

{
  "additionalProperties": false,
  "properties": {
    "frame_period_us": {
      "maximum": 1000000,
      "minimum": 1000,
      "type": "integer"
    }
  },
...
Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
307successapplication/json streams.preview.redirect_contract; preview.redirect_response
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
503frame_publisher_unavailableapplication/json common.product_error; common.error_details.frame_publisher_unavailable
Success Response Schemas

307 success contract: streams.preview.redirect_contract

307 success response: preview.redirect_response

307 success contract: streams.preview.redirect_contract
{
  "additionalProperties": false,
  "properties": {
    "body": {
      "$ref": "preview.schema.json#/$defs/preview.redirect_response"
    },
    "headers": {
      "additionalProperties": true,
      "properties": {
...
307 success response: preview.redirect_response
{
  "additionalProperties": false,
  "properties": {
    "redirect": {
      "const": true
    }
  },
  "required": [
    "redirect"
...
Example
Request
curl 'http://CAMERA_IP/api/v1/preview.mjpg?frame_period_us=16811'
Response
{
  "status": 307,
  "content_type": "application/json",
  "headers": {
    "content-type": "application/json",
    "location": "http://camera-example-1:81/stream.mjpg?frame_period_us=16811"
  }
}

GET /api/v1/events

Streams retained system, frame, and terminal error events using SSE.

Query String

Query schema: events.query

{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/events.boot_id"
    }
  },
  "type": "object"
}
Request Headers

Header schema: events.request_headers

{
  "additionalProperties": true,
  "properties": {
    "last-event-id": {
      "$ref": "#/$defs/events.safe_u53_decimal_or_zero"
    }
  },
  "type": "object"
}
Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successtext/event-stream events.system_event,events.frame_event,events.error_event,events.stale_event_cursor,events.sse_capacity_exceeded,events.event_publisher_unavailable; streams.sse.headers
400bad_requestapplication/json common.product_error
422invalid_configapplication/json common.product_error
503busyapplication/json common.product_error
503frame_publisher_unavailableapplication/json common.product_error; common.error_details.frame_publisher_unavailable
Success Response Schemas

200 success event: events.system_event

200 success event: events.frame_event

200 success event: events.error_event

200 success event: events.stale_event_cursor

200 success event: events.sse_capacity_exceeded

200 success event: events.event_publisher_unavailable

200 success headers: streams.sse.headers

200 success event: events.system_event
{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/events.boot_id"
    },
    "state": {
      "enum": [
        "ok",
...
200 success event: events.frame_event
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "frame": {
      "$ref": "common.schema.json#/$defs/common.public_id"
    },
    "time": {
      "$ref": "common.schema.json#/$defs/common.time_point"
...
200 success event: events.error_event
{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/events.boot_id"
    },
    "code": {
      "const": "frame_publisher_unavailable"
    },
...
200 success event: events.stale_event_cursor
{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/events.boot_id"
    },
    "code": {
      "const": "stale_event_cursor"
    },
...
200 success event: events.sse_capacity_exceeded
{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/events.boot_id"
    },
    "client_limit": {
      "const": 3
    },
...
200 success event: events.event_publisher_unavailable
{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/events.boot_id"
    },
    "code": {
      "const": "event_publisher_unavailable"
    },
...
200 success headers: streams.sse.headers
{
  "additionalProperties": true,
  "properties": {
    "cache-control": {
      "pattern": "no-store",
      "type": "string"
    },
    "connection": {
      "const": "keep-alive"
...
Example
Request
curl 'http://CAMERA_IP/api/v1/events?boot_id=00000000-0000-4000-8000-000000000002'
Response
id: 3
event: frame
data: {"frame":3,"time":{"ns":"1699999993014336920","domain":"ptp","state":"acquiring","epoch":null,"generation":1},"mode":"raw10_1280x800"}

GET /stream.mjpg

Streams multipart MJPEG directly from TCP port 81.

Query String

Query schema: preview.query

Request Body

No JSON request body is accepted.

Success Response Schemas

200 success headers: streams.mjpeg.headers

200 success part headers: streams.mjpeg.frame_part_headers

200 success terminal part headers: streams.mjpeg.error_part_headers

200 success terminal response: common.frame_publisher_stream_error

200 success headers: streams.mjpeg.headers
{
  "additionalProperties": true,
  "properties": {
    "cache-control": {
      "pattern": "no-store",
      "type": "string"
    },
    "content-type": {
      "pattern": "multipart/x-mixed-replace",
...
200 success part headers: streams.mjpeg.frame_part_headers
{
  "additionalProperties": true,
  "properties": {
    "content-length": {
      "pattern": "^[1-9][0-9]*$",
      "type": "string"
    },
    "content-type": {
      "const": "image/jpeg"
...
200 success terminal part headers: streams.mjpeg.error_part_headers
{
  "additionalProperties": true,
  "properties": {
    "content-length": {
      "pattern": "^[1-9][0-9]*$",
      "type": "string"
    },
    "content-type": {
      "const": "application/json"
...
Example
Request
curl 'http://CAMERA_IP:81/stream.mjpg?frame_period_us=16811'
Response
{
  "status": 200,
  "content_type": "multipart/x-mixed-replace;boundary=esp32p4frame",
  "headers": {
    "connection": "close",
    "cache-control": "no-store, max-age=0",
    "pragma": "no-cache",
    "x-preview-frame-period-us": "16811",
    "x-requested-frame-period-us": "16811",
...

Metrics

GET /api/v1/metrics

Returns grouped camera, preview, trigger, and system telemetry.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json metrics.response
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: metrics.response

200 success response: metrics.response
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "camera": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mode": {
...
Example
Request
curl 'http://CAMERA_IP/api/v1/metrics'
Response
{
  "camera": {
    "mode": "raw10_1280x800",
    "measured_period_us": 0,
    "publisher": {
      "latest_frame": 4,
      "state": "available"
    },
    "frames": {
...

Debug Diagnostics

GET /debug/runtime

Returns internal task, resource, service, lifecycle, and coherent PTP diagnostics.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json debug.runtime
400bad_requestapplication/json common.product_error
Success Response Schemas

200 success response: debug.runtime

200 success response: debug.runtime
{
  "additionalProperties": false,
  "properties": {
    "schema_version": {
      "const": 1,
      "type": "integer"
    },
    "heap": {
      "additionalProperties": false,
...
Example
Request
curl 'http://CAMERA_IP/debug/runtime'
Response
{
  "schema_version": 1,
  "ptp_time_quality": {
    "domain": "ptp",
    "clock_readable": true,
    "sync_state": "synchronized",
    "synchronized": true,
    "readiness_epoch": "2",
    "clock_mapping_generation": 2
...

GET /debug/time

Returns the complete coherent PTP diagnostic projection used by qualification tools.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json debug.time
400bad_requestapplication/json common.product_error
503time_unavailableapplication/json common.product_error
Success Response Schemas

200 success response: debug.time

200 success response: debug.time
{
  "additionalProperties": false,
  "properties": {
    "device_time_ns": {
      "pattern": "^(0|[1-9][0-9]*)$",
      "type": "string"
    },
    "boot_id": {
      "minLength": 1,
...
Example
Request
curl 'http://CAMERA_IP/debug/time'
Response
{
  "boot_id": "00000000-0000-4000-8000-000000000002",
  "timestamp_domain": "ptp",
  "device_time_ns": "1700000000000000000",
  "monotonic_time_ns": "1700000007578828000",
  "ptp_time_ns": "1700000007578862720",
  "time_quality": {
    "domain": "ptp",
    "clock_readable": true,
...

GET /debug/camera/sensor

Returns camera-task sensor registers, AR0144 diagnostics, sensor-read timing, and raw-slot ownership.

Query String

No query string is accepted.

Request Body

No JSON request body is accepted.

Response Statuses
StatusResultContentSchemas
200successapplication/json debug.camera_sensor
400bad_requestapplication/json common.product_error
409invalid_stateapplication/json common.product_error
503busyapplication/json common.product_error
504timeoutapplication/json common.product_error
500internal_errorapplication/json common.product_error
503sensor_read_failedapplication/json common.product_error
503sensor_state_unsupportedapplication/json common.product_error
500sensor_readback_mismatchapplication/json common.product_error
Success Response Schemas

200 success response: debug.camera_sensor

200 success response: debug.camera_sensor
{
  "additionalProperties": false,
  "properties": {
    "ar0144_diagnostics": {
      "additionalProperties": true,
      "properties": {
        "chip_id": {
          "minimum": 0,
          "type": "integer"
...
Example
Request
curl 'http://CAMERA_IP/debug/camera/sensor'
Response
{
  "ptp_time_quality": {
    "domain": "ptp",
    "clock_readable": true,
    "sync_state": "synchronized",
    "synchronized": true,
    "readiness_epoch": "2",
    "clock_mapping_generation": 2
  },
...

Shared Contracts

Common Schemas

common.boot_id

{
  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
  "type": "string"
}

common.error_time_quality

{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "domain": {
          "const": "monotonic"
        },
...

common.exposure

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "start_ns": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$"
    },
    "end_ns": {
...

common.frame

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
...

common.frame_publisher_stream_error

{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/common.boot_id"
    },
    "code": {
      "const": "frame_publisher_unavailable"
    },
...

common.frame_trigger

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
...

common.frame_trigger_timing

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "domain": {
      "enum": [
        "monotonic",
        "ptp"
      ]
...

common.git_sha

{
  "pattern": "^[0-9a-f]{40}(?:-dirty)?$",
  "type": "string"
}

common.mac

{
  "pattern": "^(?!00:00:00:00:00:00$)[0-9a-f][02468ace](?::[0-9a-f]{2}){5}$",
  "type": "string"
}

common.path.frame_id.semantic

{
  "type": "integer",
  "minimum": 1,
  "maximum": 9007199254740991
}

common.path.frame_id.wire

{
  "type": "string",
  "pattern": "^[1-9][0-9]*$",
  "maxLength": 16,
  "description": "Canonical positive decimal wire lexeme; the paired semantic schema enforces the safe-integer maximum."
}

common.product_model

{
  "const": "esp32-p4-ar0144-camera"
}

common.ptp_quality

{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "state": {
          "const": "unavailable"
        },
...

common.public_id

{
  "maximum": 9007199254740991,
  "minimum": 1,
  "type": "integer"
}

common.public_id_or_zero_sentinel

{
  "maximum": 9007199254740991,
  "minimum": 0,
  "type": "integer"
}

common.time_point

{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ns": {
          "type": "string",
          "pattern": "^(0|[1-9][0-9]*)$"
...

common.trigger_summary

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
...

common.trigger_timing

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "domain": {
      "enum": [
        "monotonic",
        "ptp"
      ]
...

Frame And Stream Timing Headers

JPEG responses include boot and configuration lineage plus retained frame timing in X-Camera-Boot-Id, X-Camera-Configuration-Generation, X-Frame-Status-Flags, and the X-Frame-* timing headers. Exposure and trigger admission use the corresponding X-Exposure-* and X-Trigger-Admission-* headers. Nullable correlation headers are omitted.

MJPEG parts carry frame ID, timestamp and domain, clock readability, synchronization state, and conditional epoch and mapping-generation headers.

Connection Capacity

If public HTTP-session capacity is occupied, the first overflow connection receives 503 Service Unavailable, a JSON busy error, Cache-Control: no-store, and Connection: close. This pre-route response is distinct from cause-specific busy errors returned by an endpoint.

Busy response
{"error":{"code":"busy","message":"Maximum HTTPD public session clients are already connected.","retryable":true,"details":{}}}

Errors

JSON API errors use a top-level error object. Clients should branch on the HTTP status and error.code, not on human-readable messages. Endpoint status tables link each error response to its exact schema.

common.error_details.frame_not_retained

{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/common.boot_id"
    },
    "frame_id": {
      "maximum": 9007199254740991,
      "minimum": 1,
...

common.error_details.frame_publisher_unavailable

{
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "boot_id": {
          "$ref": "#/$defs/common.boot_id"
        },
        "frame_publisher_status": {
...

common.error_details.future_frame_cursor

{
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "after_frame_id": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
...

common.error_details.invalid_frame_id

{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/common.boot_id"
    },
    "frame_id": {
      "maximum": 9007199254740991,
      "minimum": 0,
...

common.error_details.replacement_schedule_failed

{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/common.boot_id"
    },
    "burned_replacement_trigger_id": {
      "maximum": 9007199254740991,
      "minimum": 1,
...

common.error_details.stale_frame_cursor

{
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "after_frame_id": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
...

common.error_details.time_quality_unavailable

{
  "additionalProperties": false,
  "properties": {
    "reason": {
      "enum": [
        "timestamp_domain_unavailable",
        "synchronization_unavailable"
      ]
    },
...

common.error_details.timeout

{
  "additionalProperties": false,
  "properties": {
    "after_frame_id": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "boot_id": {
...

common.error_details.trigger_id_exhausted

{
  "additionalProperties": false,
  "properties": {
    "active_trigger_id": {
      "maximum": 9007199254740991,
      "minimum": 1,
      "type": "integer"
    },
    "boot_id": {
...

common.error_details.trigger_not_retained

{
  "additionalProperties": false,
  "properties": {
    "boot_id": {
      "$ref": "#/$defs/common.boot_id"
    },
    "reason": {
      "const": "trigger_not_retained"
    },
...

common.error_details.trigger_wait_timeout

{
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "failure_stage": {
          "const": "trigger_frame_pipeline"
        },
        "trigger_id": {
...

common.product_error

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "code": {
...

common.retained_frame_window_details

{
  "additionalProperties": false,
  "properties": {
    "newest_retained_frame_id": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "oldest_retained_frame_id": {
...

streams.direct_mjpeg.json_error_headers

{
  "additionalProperties": true,
  "properties": {
    "cache-control": {
      "pattern": "no-store",
      "type": "string"
    },
    "content-length": {
      "pattern": "^(0|[1-9][0-9]*)$",
...

streams.direct_mjpeg.plain_error_response

{
  "additionalProperties": false,
  "properties": {
    "body": {
      "minLength": 1,
      "type": "string"
    },
    "headers": {
      "additionalProperties": true,
...
About Us
By using this website, you agree to our Terms and Conditions and Privacy Policy