Skip to main content

Operational Pipeline

The ingestion API operates on an asynchronous, event-driven model.\

Requests are validated and acknowledged immediately (202 Accepted), then offloaded to a background worker queue. The data undergoes a specific transformation sequence before becoming searchable:
  1. Shift-Left Temporal Resolution: The pipeline scans source.content for relative time references (e.g., “next Friday”, “in three days”). These are resolved into absolute ISO 8601 timestamps at the moment of ingestion, creating a deterministic temporal index.
  2. Semantic Enrichment: The system applies bidirectional expansion, injecting implicit context (themes, synonyms) to maximize vector overlap.
  3. Dual-Write Persistence: Data is synchronously committed to both the Metadata Store and Vector Database.
  4. Centroid Calibration: Finally, the user’s semantic centroid is recalculated to reflect the new memory distribution, influencing future adaptive search modes.
Memory ingestion pipeline

Text ingest (API)

Submit a text-based memory payload.

Payload schema (text)

FieldTypeStatusDescription
source.typeStringREQUIREDMust be text.
source.contentStringREQUIREDThe raw text to ingest. This field is parsed for automatic relative date resolution (Shift-Left).
userContextStringOPTIONALAdditional meta-context (e.g., “Slack Message”, “Email from CEO”) used to guide the enrichment engine.
curl -X POST "https://api.memorymodel.dev/v1/ingest" \
  -H "Content-Type: application/json" \
  -H "x-memory-cluster-access-key: sk_live_..." \
  -H "x-end-user-id: user_123" \
  -d '{
    "source": {
      "type": "text",
      "content": "The project deadline has been moved to next Friday."
    },
    "userContext": "Slack message from Project Manager"
  }'
Include x-end-user-id to track the end-user identity. This header is required in multi‑user setups; if your cluster is single‑user, you can use a simple identifier like user_123.
Response (text)
{
  "status": "Accepted",
  "jobId": "job_1700000000000_user_123"
}

Image ingest (API)

Submit an image for multimodal processing. The system extracts visual features and semantic context, integrating them into the memory graph alongside text nodes.

Payload schema (image)

FieldTypeStatusDescription
imageDataStringREQUIREDBase64-encoded image string.
userContextStringOPTIONALContext to anchor the visual analysis (e.g., “Screenshot of error logs”).
curl -X POST "https://api.memorymodel.dev/v1/ingest/image"  \
  -H "Content-Type: application/json" \
  -H "x-memory-cluster-access-key: sk_live_..." \
  -H "x-end-user-id: user_123" \
  -d '{
    "imageData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
    "userContext": "Screenshot of the error message"
  }'
For large images, ensure your client supports large payloads. The imageData field must be a valid Base64 string (with or without the data URI prefix).
Response (image)
{
  "status": "Accepted",
  "jobId": "img_job_1700000000000_user_123",
  "previewUrl": "https://storage.googleapis.com/..."
}
The previewUrl must point to a valid storage bucket and object. Invalid bucket names will return an error from the storage provider.