chat.pinaivu.ai is the end-user chat product. Unlike the
gateway, end users never hold an API key — they
authenticate by signing each request with a delegate Ed25519 key (derived
from their wallet via the MemWal client SDK). chat-relayer itself is a
second Nautilus-pattern Nitro Enclave, and
holds the shared gateway/coordinator credential on the user’s behalf.
Authentication
No API key. Every request must carrydelegate_pubkey_hex and
signature_hex — an Ed25519 signature over the request’s canonical bytes.
See chat-relayer authentication for the exact
byte format, common client bugs, and a worked example — getting this wrong
is the most common integration failure against this endpoint.
POST /v1/chat
Request:
recalled_facts is informational — surface it in the UI for a “remembered
from earlier” affordance if you like, but it’s already baked into
content.
Two memory layers, both automatic
Nothing extra to send for either — see Memory layers for the full mechanics:- Cross-session — chat-relayer embeds the user’s message, recalls
relevant facts from this
owner_address’s history (scoped per owner — other users’ facts never leak in), and injects them into the prompt. Every turn is analyzed in the background and may add new facts. - Intra-session — as long as the client resends the same
session_idandsession_key, the serving node reconstructs the verbatim recent turns of that specific conversation, even if a different node served the previous turn. Omitsession_idto start a fresh one (e.g. a new tab); reuse it to continue.
Other routes (no auth required)
| Route | Purpose |
|---|---|
GET /health | Liveness |
GET /enclave_health | chat-relayer’s own pubkey + uptime |
GET /get_attestation | Raw NSM attestation document |
What a chat client must persist
| Value | |
|---|---|
| Identity | delegate keypair (from the user’s wallet) |
| Per-session | session_id, session_key |
| Per-account | owner_address, namespace |
Auth scheme walkthrough
Canonical byte format, a reference signing script, and a real worked
request/response pair