Nodes

      

    Nodes call this periodically to report they are alive and available.

    Active node operators should call this endpoint every 60 seconds to maintain their online status. The heartbeat updates the node's last-seen timestamp and endpoint URL in the off-chain database. Nodes that miss heartbeats for more than 2 minutes are considered offline.

    Endpoint

    POST/api/nodes/heartbeat

    Headers

    KeyValueRequired
    Content-Typeapplication/jsonRequired

    Request Body

    FieldTypeRequiredDescription
    addressstringRequiredNode's Ethereum address (0x-prefixed, 40 hex chars).
    endpointstringRequiredCurrent inference endpoint URL.
    timestampnumberRequiredCurrent Unix timestamp (seconds).
    gpuTiernumberOptionalGPU tier (1, 2, or 3).
    signaturestringOptionalSigned message for verification.

    Response

    FieldTypeDescription
    receivedbooleanWhether the heartbeat was accepted.
    nextPingInnumberRecommended seconds until next heartbeat.
    serverTimestringServer ISO timestamp for clock sync.

    Example Usage

    Request

    {
      "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
      "endpoint": "https://node1.compressnode.com/inference",
      "timestamp": 1711500000,
      "gpuTier": 2
    }

    Response

    {
      "ok": true,
      "data": {
        "received": true,
        "nextPingIn": 60,
        "serverTime": "2026-03-27T12:30:00.000Z"
      }
    }