Skip to content

Health and metrics

Use these endpoints to check whether the service 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",
  "androidGpu": "host",
  "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 service token
advertiseHostHost/IP the service 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 or standalone
videoCodecRequested codec mode: auto, hardware, or software
androidGpuAndroid emulator renderer mode for SimDeck-owned boots
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
stream_pipeline_resetsEncoder resets after all viewers disconnect
latest_accessibility_snapshot_msMost recent native accessibility duration
max_accessibility_snapshot_msSlowest native accessibility duration
accessibility_snapshot_timeoutsNative accessibility calls that timed out
active_streamsOpen browser streams
encoders[].encoder.overloadStatenominal, strained, or overloaded
androidEncoders[]Android video source kind, videoCodec, and encoder stats
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 service 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": "video/H264/103",
  "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.