curl -X POST https://api.60db.ai/memory/ingest \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "User prefers vegetarian food, lactose intolerant",
"title": "Dietary preferences",
"type": "user",
"infer": true
}'
const response = await fetch('https://api.60db.ai/memory/ingest', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: "User prefers vegetarian food, lactose intolerant",
title: "Dietary preferences",
type: "user",
infer: true,
}),
});
const data = await response.json();
import requests
response = requests.post(
"https://api.60db.ai/memory/ingest",
headers={
"Authorization": "Bearer your-api-key",
"Content-Type": "application/json",
},
json={
"text": "User prefers vegetarian food, lactose intolerant",
"title": "Dietary preferences",
"type": "user",
"infer": True,
},
)
data = response.json()
{
"success": true,
"data": {
"collection_id": "user_abc123",
"collection_label": "Personal Memories",
"memory_type": "user",
"total_queued": 1,
"results": [
{
"id": "mem_01HV8K2X3N4P5Q6R7S8T9U",
"status": "pending",
"message": "Memory queued for processing"
}
]
}
}
Memory & RAG
Ingest Memory
Store a memory (user, knowledge, or hive) in a collection
POST
/
memory
/
ingest
curl -X POST https://api.60db.ai/memory/ingest \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "User prefers vegetarian food, lactose intolerant",
"title": "Dietary preferences",
"type": "user",
"infer": true
}'
const response = await fetch('https://api.60db.ai/memory/ingest', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: "User prefers vegetarian food, lactose intolerant",
title: "Dietary preferences",
type: "user",
infer: true,
}),
});
const data = await response.json();
import requests
response = requests.post(
"https://api.60db.ai/memory/ingest",
headers={
"Authorization": "Bearer your-api-key",
"Content-Type": "application/json",
},
json={
"text": "User prefers vegetarian food, lactose intolerant",
"title": "Dietary preferences",
"type": "user",
"infer": True,
},
)
data = response.json()
{
"success": true,
"data": {
"collection_id": "user_abc123",
"collection_label": "Personal Memories",
"memory_type": "user",
"total_queued": 1,
"results": [
{
"id": "mem_01HV8K2X3N4P5Q6R7S8T9U",
"status": "pending",
"message": "Memory queued for processing"
}
]
}
}
Store a new memory in your workspace. Memories are processed asynchronously — the response returns immediately with a pending memory ID that you can poll for status.
See Pricing & Billing for the full rate card and refund policy.
Request
Headers
string
required
Bearer token with your API key
string
required
application/json
Body
string
required
The memory content to store. Max 100,000 characters.
string
Optional display title for the memory.
string
default:"user"
Memory type. One of:
user, knowledge, hive.user: Personal memory for the calling userknowledge: Shared knowledge base entry (admin/owner only)hive: Workspace-wide shared memory (admin/owner only)
string
Collection ID to store the memory in. Defaults to the caller’s personal collection.
For team collections, pass the collection_id returned from
POST /memory/collections.boolean
default:"true"
If true, the memory service extracts structured facts and preferences via LLM inference.
object
Optional metadata to attach to the memory. Filterable at search time.
Response
boolean
True on success
object
Example
curl -X POST https://api.60db.ai/memory/ingest \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "User prefers vegetarian food, lactose intolerant",
"title": "Dietary preferences",
"type": "user",
"infer": true
}'
const response = await fetch('https://api.60db.ai/memory/ingest', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: "User prefers vegetarian food, lactose intolerant",
title: "Dietary preferences",
type: "user",
infer: true,
}),
});
const data = await response.json();
import requests
response = requests.post(
"https://api.60db.ai/memory/ingest",
headers={
"Authorization": "Bearer your-api-key",
"Content-Type": "application/json",
},
json={
"text": "User prefers vegetarian food, lactose intolerant",
"title": "Dietary preferences",
"type": "user",
"infer": True,
},
)
data = response.json()
{
"success": true,
"data": {
"collection_id": "user_abc123",
"collection_label": "Personal Memories",
"memory_type": "user",
"total_queued": 1,
"results": [
{
"id": "mem_01HV8K2X3N4P5Q6R7S8T9U",
"status": "pending",
"message": "Memory queued for processing"
}
]
}
}
Billing
This endpoint is billed at **0.0001per1,000characters∗∗of‘text‘.A500−charmemorycosts0.00005; a 5,000-char memory costs $0.0005. The charge is deducted upfront from the workspace owner’s wallet, and automatically refunded if the request fails. Response headers — every successful request returns:| Header | Meaning |
|---|---|
x-credit-balance | Your wallet balance after this charge |
x-credit-charged | Amount charged for this specific request |
x-billing-tx | UUID of the audit row (for refunds/support) |
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | — | Missing or invalid text field |
| 402 | INSUFFICIENT_CREDITS | Wallet balance is lower than the ingest charge. Response body includes details.required, details.available, and details.shortfall. |
| 403 | POLICY_DENY | Role is not allowed to create memories (viewer) |
| 503 | MEMORY_INFRA_NOT_READY | The memory layer is still being provisioned for this workspace (usually only on first use). Retry in ~10s. |
| 503 | MEMORY_UNREACHABLE | The memory service is temporarily unavailable. Request is queued for retry and the charge is automatically refunded. |
Checking status
PollGET /memory/:id/status to check if a memory has been fully processed. Statuses: pending, processing, ready, failed.