Memory & RAG
Ingest Memory
Store a memory (user, knowledge, or hive) in a collection
POST
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
Bearer token with your API key
application/json
Body
The memory content to store. Max 100,000 characters.
Optional display title for the memory.
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)
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.If true, the memory service extracts structured facts and preferences via LLM inference.
Optional metadata to attach to the memory. Filterable at search time.
Response
True on success
Example
Billing
This endpoint is billed at **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:| 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.