Skip to content

Health & Metrics

Use these endpoints to check whether a daemon is reachable and to diagnose stream performance.

Health

http
GET /api/health

Example:

json
{
  "ok": true,
  "serverId": "2e640c5a06a9b732",
  "advertiseHost": "192.168.1.50",
  "hostId": "5163434b8c5e3fa4",
  "hostName": "Dj-MacBook-Pro",
  "httpPort": 4310,
  "serverKind": "launchAgent",
  "timestamp": 1714094761.234,
  "videoCodec": "auto",
  "lowLatency": false,
  "realtimeStream": true,
  "localStreamFps": 60,
  "streamQuality": {
    "profile": "full"
  },
  "webRtc": {
    "iceServers": [{ "urls": ["stun:stun.l.google.com:19302"] }],
    "iceTransportPolicy": "all"
  }
}

Important fields:

FieldMeaning
okServer is alive
serverIdStable identity for the current daemon token
advertiseHostHost/IP the daemon advertises for non-local clients
hostIdStable hashed identity for the Mac hardware host
hostNameLocal host name for grouping LAN/Tailscale/Bonjour URLs
httpPortPort serving UI and API
serverKindlaunchAgent, workspace, foreground, or standalone
videoCodecRequested codec mode: auto, hardware, or software
streamQualityActive stream profile and limits
webRtcICE settings the browser should use

When auth is required, the 401 JSON body still includes serverId, advertiseHost, hostId, hostName, httpPort, and serverKind so native clients can group endpoints before pairing.

Metrics

http
GET /api/metrics

Useful fields:

FieldWhat to look for
latest_first_frame_msFirst-frame startup time
frames_dropped_serverServer dropping stale frames to stay current
keyframe_requestsStream refresh or recovery activity
active_streamsOpen browser streams
encoders[].encoder.overloadStatenominal, strained, or overloaded
client_streamsRecent browser decoder and render reports

If overloadState is overloaded or dropped frames keep increasing, lower stream quality or restart with software encoding:

sh
simdeck daemon restart --video-codec software --stream-quality low

Submit Client Stats

Custom clients can report their own stream stats:

http
POST /api/client-stream-stats
Content-Type: application/json

{
  "clientId": "browser-ABC",
  "kind": "viewport",
  "udid": "9D7E5BB7-...",
  "codec": "h264",
  "decodedFps": 59.7,
  "droppedFps": 0.0,
  "latestRenderMs": 6.2
}

Required fields are clientId and kind.

Read only the client buffer:

http
GET /api/client-stream-stats

Released under the Apache-2.0 License.