Skip to main content
POST
memory.document.add

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$

Body

application/json
namespace
string
required

Which set of documents to work on: an id you choose per user, project or tenant (letters, digits, "_", ":", "-", at most 83 characters). Use the same value across the memory capabilities.

Required string length: 1 - 83
Pattern: ^[a-zA-Z0-9_:-]+$
content
string
required

What to remember: text itself, or a public http(s) URL to a page or file that should be read and remembered. At most 1000000 characters.

Required string length: 1 - 1000000
id
string

Your own stable id for this document (at most 255 characters). Adding again under the same id appends the new information and only processes what is new, so long-lived loops stay cheap. The id is how memory.document.get, memory.document.update and memory.document.delete can name the document later.

Required string length: 1 - 255
metadata
object

Your own labels for the document, e.g. { "source": "crm" }.

date
string

When the content is from, ISO 8601 (e.g. 2026-01-15).

Maximum string length: 40
mode
enum<string>
default:learn

"learn" (default) builds durable memories from the content over time; "retrieve" only makes the content itself searchable, which is cheaper per token.

Available options:
learn,
retrieve
processing
enum<string>
default:batch

"batch" (default) waits for related documents and processes them as one group; "instant" processes this document right away and costs an extra fee per document.

Available options:
batch,
instant
supportingContext
string

Guidance for what matters in this content, e.g. "Focus on decisions, dates and owners." At most 1500 characters.

Required string length: 1 - 1500

Response

The result

status
enum<string>
required

Where the document is right after this call: usually "queued" (processing started) or "done" (nothing new to learn). Poll memory.document.get for progress.

Available options:
unknown,
queued,
extracting,
chunking,
embedding,
indexing,
done,
failed
id
string

The document's id: the one you sent, or one generated for you. Pass it to memory.document.get, update and delete; memory.documents.list shows it too.

ref
string

Reference to what this call created. Pass it as ref to memory.document.get, memory.document.update, memory.document.delete.