Skip to content

API Endpoints Detailed ​

This page provides a practical endpoint-level index grouped by service. Authentication and payload specifics should be validated against runtime code and source docs.

Coordinator (mesh-auth required) ​

MethodPathPurpose
GET/statusservice status and readiness summary
GET/health/runtimeruntime health details
GET/identitycoordinator identity metadata
GET/mesh/peerscurrent mesh peers
POST/mesh/register-peerregister mesh peer
POST/mesh/ingestingest mesh gossip payload
GET/agent-mesh/models/availablediscover model offers in mesh
POST/agent-mesh/models/requestsubmit model request offer
GET/agent-mesh/models/request/:offerIdinspect model request status
POST/agent-mesh/connectestablish peer-direct tunnel/token
POST/agent-mesh/acceptaccept peer-direct tunnel offer
POST/agent-mesh/relayrelay payload through tunnel
POST/agent-mesh/closeclose peer-direct tunnel
POST/agent-mesh/direct-work/offeroffer direct work to peer
POST/agent-mesh/direct-work/acceptaccept direct work
POST/agent-mesh/direct-work/resultreturn direct work result
GET/agent-mesh/direct-work/auditaudit direct-work history
GET/ledger/snapshotcurrent ledger snapshot
POST/ledger/verifyverify ledger integrity
GET/economy/price/currentcurrent price epoch
POST/economy/price/proposesubmit price proposal
POST/economy/price/consensusrun consensus over proposals
POST/economy/payments/intentscreate payment intent
POST/economy/payments/intents/:intentId/confirmadmin only (x-admin-token): re-check settlement with the Lightning node; body txRef is ignored; 402 invoice_unpaid if unpaid
POST/economy/payments/webhooksettlement hint from the Lightning node/processor; HMAC-signed (see below)
POST/economy/payments/reconcilereconcile pending intents (node is checked before any intent is expired)
GET/economy/issuance/rolling/:accountIdrolling issuance/account view
GET/economy/issuance/quorum/:epochIdquorum state for issuance epoch
POST/economy/issuance/anchorpublish/advance issuance anchor
GET/economy/issuance/anchorslist issuance anchors
POST/economy/issuance/reconcilereconcile issuance state
GET/economy/issuance/currentcurrent issuance state
GET/economy/issuance/historyissuance history
GET/stats/network/summarynetwork-wide user, node, and live agent counts
GET/stats/projections/summaryfederated stats summary
POST/stats/anchors/anchor-latestupdate latest stats anchor
GET/stats/anchors/verifyverify stats anchor/finality
GET/mesh/capabilitiesfederated capability summaries
POST/credits/ble-syncsync offline BLE credit transactions

Control Plane ​

MethodPathPurpose
GET/network/summarynetwork capacity and health summary
GET/network/coordinatorscoordinator discovery feed
POST/network/modeset network mode
GET/agentslist agents
POST/agents/:agentId/approvalapprove/reject agent
POST/coordinators/:coordinatorId/approvalapprove/reject coordinator
GET/security/blacklistview blacklist entries
GET/security/blacklist/auditblacklist audit chain
POST/orchestration/install-modeltrigger model installation orchestration

Portal ​

MethodPathPurpose
GET/portalportal UI
POST/auth/signupcreate account
POST/auth/loginauthenticate account
POST/auth/logoutterminate session
GET/auth/oauth/:provider/startbegin OAuth flow
GET/auth/oauth/:provider/callbackOAuth callback
GET/auth/verify-emailverify email token
POST/auth/resend-verificationresend verify email
POST/auth/passkey/register/optionspasskey registration options
POST/auth/passkey/register/verifypasskey registration verify
POST/auth/passkey/login/optionspasskey login options
POST/auth/passkey/login/verifypasskey login verify
POST/nodes/enrollenroll new node
GET/dashboard/summaryaccount dashboard summary
GET/portal/coordinator-opscoordinator operations dashboard
GET/wallet/onboardingwallet bootstrap flow
POST/wallet/onboarding/acknowledgewallet backup acknowledgement

Inference Service ​

MethodPathPurpose
GET/healthservice health
POST/decomposedecomposition and inference request
POST/model/swapswap active model
GET/model/statuscurrent model and health
GET/model/listinstalled and available models
GET/model/pull/progressactive model download progress

Models ​

Mesh-token authentication required.

MethodPathPurpose
GET/models/availableaggregated model availability from capability gossip

GET /models/available ​

Returns an array of models currently available across the mesh, assembled from coordinator capability gossip summaries.

Auth: mesh token (MESH_AUTH_TOKEN or COORDINATOR_MESH_TOKEN)

Response:

json
[
  {
    "model": "qwen2.5:7b",
    "paramSize": 7,
    "agentCount": 12,
    "avgLoad": 0.34
  }
]
FieldTypeDescription
modelstringModel tag (e.g. qwen2.5:7b)
paramSizenumberParameter size in billions
agentCountnumberNumber of agents currently serving this model
avgLoadnumberAverage load across serving agents (0.0 -- 1.0)

IDE Provider ​

MethodPathPurpose
GET/modelsmodel discovery for IDE integration
GET/model/pull/progressactive model download progress

Coordinator (public, no auth) ​

MethodPathPurpose
POST/portal/chatstreaming chat completion for portal/desktop (system prompt injected server-side)
GET/model/pull/progressactive model download progress

GET /model/pull/progress ​

Returns the current state of an active Ollama model download, or {"status":"idle"} when no download is in progress. Available on the coordinator (:4301), inference service (:4302), and IDE provider (:4304).

Response (download in progress):

json
{
  "model": "qwen2.5:7b",
  "status": "pulling",
  "progressPct": 42,
  "completed": 1887436800,
  "total": 4494627840,
  "startedAtMs": 1708900000000
}

Response (idle):

json
{ "status": "idle" }
FieldTypeDescription
modelstringModel tag being downloaded
statusstring"pulling", "error", or "idle"
progressPctnumberDownload progress 0--100
completednumberBytes downloaded so far
totalnumberTotal bytes expected
startedAtMsnumberUnix timestamp (ms) when download started
errorstring?Error message if status is "error"

Response Schemas ​

GET /stats/network/summary ​

Requires x-mesh-token header. Returns aggregate counts from the portal database combined with live coordinator state.

json
{
  "timestamp": 1708900000000,
  "users": { "total": 5, "verified": 3 },
  "nodes": {
    "enrolled": 8,
    "approved": 6,
    "active": 2,
    "agents": 5,
    "coordinators": 3
  },
  "live": {
    "agentsConnected": 1,
    "queueDepth": 0,
    "activeTunnels": 0,
    "modelsAvailable": 2
  }
}
  • users and nodes are null when the portal is unreachable.
  • live is always present and derived from in-memory coordinator state.

Cross-reference ​

Payment webhook signature ​

POST /economy/payments/webhook requires:

  • x-mesh-token: the coordinator mesh token (same as other coordinator routes).
  • x-payment-signature: sha256=<hex> — lowercase hex HMAC-SHA256 of the raw request body bytes, keyed with PAYMENT_WEBHOOK_SECRET. Compute it over the exact bytes you send (no re-serialization).

Example (sender side):

bash
body='{"invoiceRef":"lnbc1..."}'
sig="sha256=$(printf '%s' "$body" | openssl dgst -sha256 -hmac "$PAYMENT_WEBHOOK_SECRET" -hex | sed 's/^.* //')"
curl -X POST "$COORDINATOR/economy/payments/webhook" \
  -H 'content-type: application/json' -H "x-mesh-token: $MESH_AUTH_TOKEN" \
  -H "x-payment-signature: $sig" --data "$body"

Responses: 503 payment_webhook_not_configured (no secret set), 401 webhook_signature_required (missing/bad signature), 404 intent_not_found. The body is only a hint: fields like settled/txRef are ignored and credits are granted only if the Lightning node reports the invoice as paid.