Docs
Three calls. Portable memory.
Signup, write, query. No SDK to install — just standard HTTP. Drop it into Cursor, Claude Code, or any backend.
1. Get an API key
Use the dashboard at /signup or call the API directly:
curl -X POST https://nostrmind.com/v1/auth/signup \
-H "content-type: application/json" \
-d '{"email":"[email protected]","plan":"pro"}'
You'll get back an apiKey (prefixed nmk_) and your account npub. Store the key in your password manager.
2. Write a memory
curl -X POST https://nostrmind.com/v1/memory/write \
-H "authorization: Bearer nmk_..." \
-H "content-type: application/json" \
-d '{"text":"User prefers dark mode","tags":["ui-pref"],"idempotencyKey":"mem-001"}'
idempotencyKey is optional but recommended. We dedupe on it and on the content hash.
3. Query memory
curl -X POST https://nostrmind.com/v1/memory/query \
-H "authorization: Bearer nmk_..." \
-H "content-type: application/json" \
-d '{"query":"what theme does the user prefer","topK":3}'
API reference
| Method | Path | Purpose |
|---|---|---|
| GET | /health | Liveness probe |
| POST | /v1/auth/signup | Create account & managed key |
| POST | /v1/api-keys | Create new API key (auth required) |
| POST | /v1/memory/write | Write a memory |
| POST | /v1/memory/query | Vector search over your memory |
| POST | /v1/memory/sync | Pull new events from relays |
| GET | /v1/memory/status | Account & backup status |
| GET | /v1/relays/health | Per-relay health metrics |
| POST | /v1/memory/export | Export all signed events |
| POST | /v1/memory/backup | Create encrypted server snapshot (Pro+) |
| POST | /v1/memory/restore | Restore latest snapshot (Pro+) |
| POST | /v1/keys/export | Export your managed nsec |
Authentication
All /v1 endpoints except /v1/auth/signup require Authorization: Bearer nmk_.... Keys are scoped: memory:write, memory:query, memory:sync, memory:backup. The default key has all four.
Errors
JSON shape: {"error":"message"} with HTTP status. 401 missing/invalid key, 402 plan upgrade required, 403 scope missing, 404 not found, 409 duplicate, 5xx server error.