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:
- 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.
- Semantic Enrichment: The system applies bidirectional expansion, injecting implicit context (themes, synonyms) to maximize vector overlap.
- Dual-Write Persistence: Data is synchronously committed to both the Metadata Store and Vector Database.
- Centroid Calibration: Finally, the user’s semantic centroid is recalculated to reflect the new memory distribution, influencing future adaptive search modes.
Text ingest (API)
Submit a text-based memory payload.
Payload schema (text)
| Field | Type | Status | Description |
|---|
source.type | String | REQUIRED | Must be text. |
source.content | String | REQUIRED | The raw text to ingest. This field is parsed for automatic relative date resolution (Shift-Left). |
userContext | String | OPTIONAL | Additional 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)
| Field | Type | Status | Description |
|---|
imageData | String | REQUIRED | Base64-encoded image string. |
userContext | String | OPTIONAL | Context 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.