Skip to main content
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
  }'
{
  "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.

Request

Headers

Authorization
string
required
Bearer token with your API key
Content-Type
string
required
application/json

Body

text
string
required
The memory content to store. Max 100,000 characters.
title
string
Optional display title for the memory.
type
string
default:"user"
Memory type. One of: user, knowledge, hive.
  • user: Personal memory for the calling user
  • knowledge: Shared knowledge base entry (admin/owner only)
  • hive: Workspace-wide shared memory (admin/owner only)
collection
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.
infer
boolean
default:"true"
If true, the memory service extracts structured facts and preferences via LLM inference.
metadata
object
Optional metadata to attach to the memory. Filterable at search time.

Response

success
boolean
True on success
data
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
  }'
{
  "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,000charactersoftext.A500charmemorycosts0.0001 per 1,000 characters** of `text`. A 500-char memory costs 0.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:
HeaderMeaning
x-credit-balanceYour wallet balance after this charge
x-credit-chargedAmount charged for this specific request
x-billing-txUUID of the audit row (for refunds/support)
See Pricing & Billing for the full rate card and refund policy.

Error responses

StatusCodeMeaning
400Missing or invalid text field
402INSUFFICIENT_CREDITSWallet balance is lower than the ingest charge. Response body includes details.required, details.available, and details.shortfall.
403POLICY_DENYRole is not allowed to create memories (viewer)
503MEMORY_INFRA_NOT_READYThe memory layer is still being provisioned for this workspace (usually only on first use). Retry in ~10s.
503MEMORY_UNREACHABLEThe memory service is temporarily unavailable. Request is queued for retry and the charge is automatically refunded.

Checking status

Poll GET /memory/:id/status to check if a memory has been fully processed. Statuses: pending, processing, ready, failed.