Skip to main content

OpenClaw Heartbeat

The endpoint the OpenClaw daemon posts to on each heartbeat. It records gateway health and token usage for the connection the key is bound to. You normally don’t call this yourself — the daemon does — but it’s documented here for reference and debugging.
Requires a usage-ingestion API key scoped to the OpenClaw connection (generated when the connection is created — see OpenClaw setup).

Headers

string
required
Bearer ops_... — must be a usage-ingestion key for this connection.

Body

string
required
Heartbeat type emitted by the daemon.
object
required
Gateway health: status (healthy / unhealthy), latencyMs, version.
object
Host signals, e.g. gatewayPidAlive.
object
Usage for the period: period totals (inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens, requestCount, estimatedCostUsd, startedAt, endedAt) and an optional byModel breakdown.
Ingestion is idempotent — retrying the same heartbeat is safe and won’t double-count. When a byModel entry omits estimatedCostUsd, Opsmatic prices the token counts server-side using its pricing table.