NeuralBase Docs

REST API

Store and retrieve user memories over HTTP. Authenticate once with your API key, then call from any language or tool.

Base URLhttps://api.neuralbase.cloud

Authentication

Every request must include your API key in the Authorization header as a Bearer token.

bash
BASE_URL=https://api.neuralbase.cloud
API_KEY=nb_live_...

# Include on every request
Authorization: Bearer $API_KEY
POST/v1/memoriesSave a memory

Persist a piece of information tied to a userId. Attach optional metadata for filtering later.

bash
curl -X POST "$BASE_URL/v1/memories" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId":   "user_123",
    "content":  "Prefers short answers",
    "metadata": { "source": "chat" }
  }'
GET/v1/memoriesList memories

Retrieve all stored memories for a user, paginated.

bash
curl -G "$BASE_URL/v1/memories" \
  -H "Authorization: Bearer $API_KEY" \
  --data-urlencode "userId=user_123" \
  --data-urlencode "limit=20"
PATCH/v1/memories/:idUpdate a memory

Overwrite the content of an existing memory by its ID.

bash
curl -X PATCH "$BASE_URL/v1/memories/mem_abc123" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Now prefers very short answers"
  }'

Error codes

All error responses return a JSON body with a message field.

CodeDescription
401Invalid or missing API key
400Bad request — missing or invalid field
404Memory not found
413Payload too large
429Rate limit exceeded