Skip to main content
The NSP daemon exposes a REST and WebSocket API on http://127.0.0.1:7842. All endpoints except GET /health are prefixed with /substrate/v1 and require an API key. You interact with this API from any HTTP client, the official Python SDK, or directly from an AI agent’s tool calls.

Base URL

The daemon binds to the loopback address by default. You cannot reach it over the public network unless you configure a reverse proxy — this is intentional. All endpoint paths (except /health) share the /substrate/v1 prefix.

Authentication

Pass your API key in the X-Substrate-Key request header on every call:
If auth_enabled is false in /health, you may omit the header. For the WebSocket endpoint (/watch), pass the key as a key query parameter instead, since not all WebSocket clients support custom headers at the upgrade phase.
Generate and revoke API keys from the Nelieo platform dashboard. Keys are scoped to your daemon instance — they are not global credentials.

Endpoint Summary

Content Type

Send Content-Type: application/json on all POST requests. Every response body is application/json. Requests that omit the content-type header on POST routes return 400 Bad Request.

Request IDs

Every response — including errors — includes an X-Request-Id header containing a time-ordered unique identifier:
Include this value whenever you file a bug report or open a support ticket. The daemon logs every request with its ID, so the support team can correlate your report with the exact trace.

Common HTTP Response Codes

Error Response Format

All error responses use a consistent JSON envelope. Parse the error.code field programmatically; use error.message for human-readable context:
error.code
string
Machine-readable error identifier. Use this in switch / match logic. Examples: not_found, rate_limited, verification_failed, probe_timeout, missing_verify_expression.
error.message
string
Human-readable description of what went wrong and, where possible, how to fix it.
error.request_id
string
The same value sent in the X-Request-Id response header. Always include this in bug reports.

Authentication Example