REST API
Store and retrieve user memories over HTTP. Authenticate once with your API key, then call from any language or tool.
Base URL
https://api.neuralbase.cloudAuthentication
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_KEYPOST
/v1/memories— Save a memoryPersist 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/memories/search— Semantic searchFind the most relevant memories for a natural-language query using vector similarity. Returns results ranked by relevance.
bash
curl -G "$BASE_URL/v1/memories/search" \
-H "Authorization: Bearer $API_KEY" \
--data-urlencode "query=How does this user like responses?" \
--data-urlencode "userId=user_123" \
--data-urlencode "limit=5"GET
/v1/memories— List memoriesRetrieve 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/:id— Update a memoryOverwrite 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.
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 400 | Bad request — missing or invalid field |
| 404 | Memory not found |
| 413 | Payload too large |
| 429 | Rate limit exceeded |