REST API · v1
API Reference
Capture, recall, and verify Unified Memory Objects over a small REST API. Below: a map of every call, four use cases you can paste into a terminal, and a worked request and response for each endpoint. Base URL https://api.memoryintelligence.io.
At a glance
The whole public surface is fourteen calls. Click any row to jump to its worked example.
| Do this | Call | What you get |
|---|---|---|
| Capture a memory | POST/v1/process | a UMO with a receipt |
| Capture many at once | POST/v1/batch | one UMO per item |
| Capture from a file | POST/v1/upload | a UMO from PDF text |
| Browse memories | GET/v1/memories | a paginated list |
| Search by meaning | POST/v1/memories/query | ranked results (no LLM) |
| Ask a question (LLM) | POST/v1/ask | a written answer with citations |
| List answer models | GET/v1/ask/models | local + cloud model IDs |
| Get one memory | GET/v1/memories/{id} | a single UMO |
| Compare two memories | POST/v1/match | a similarity score |
| Verify provenance | GET/v1/memories/{id}/proof | source, hash, receipt |
| Introspect a memory | GET/v1/memories/{id}/explain | entities and structure |
| Delete a memory | DEL/v1/memories/{id} | a deletion receipt |
| Check your API key | GET/v1/account | owner, tier, quota |
| Check the service | GET/health | status, no auth |
Authentication
Every request needs your API key as a bearer token. Get one from the developer portal (free during beta). Keep it server-side; never ship it in client code.
Authorization: Bearer mi_sk_beta_your_key_here
Response envelope
Most responses are wrapped in a consistent envelope. Read your payload from data; keep request_id for support. The worked examples below show the data payload only.
{
"status": "success",
"data": { /* endpoint payload, shown below per call */ },
"request_id": "req_8f3f...",
"timestamp": "2026-07-05T19:05:05Z"
}
data wrapper: GET /v1/memories/{id} (single retrieve), DELETE /v1/memories/{id} (forget), GET /health, and every error response (see below). For those, read the fields off the top level.Errors
Errors are not enveloped. They return a flat body with a single detail field and the matching HTTP status code — there is no "status": "error" wrapper. The common ones:
{ "detail": "Invalid API key" }
| Code | Means | Fix |
|---|---|---|
| 401 | Missing or invalid API key | Check the Authorization header and your key. |
| 404 | No memory with that id | Confirm the umo_id from a capture or list call. |
| 422 | Request body failed validation | Check required fields and types (see each call). |
| 429 | Rate limited | Back off and retry; contact us to raise limits. |
Use cases to try
Four short flows you can paste into a terminal. Set your key first: export MI_KEY="mi_sk_...".
Give an agent memory
Capture a fact once, then ask about it later and get an answer that cites its source.
umo_id it returns.curl -X POST $MI_URL/v1/process -H "Authorization: Bearer $MI_API_KEY" \ -H "Content-Type: application/json" -d '{"content":"We ship releases on Tuesdays."}'
umo_id.curl -X POST $MI_URL/v1/memories/query -H "Authorization: Bearer $MI_API_KEY" \ -H "Content-Type: application/json" -d '{"query":"when do we ship?"}'
Prove where an answer came from
Turn a recall into an auditable claim by verifying the source memory's provenance.
umo_id.curl $MI_URL/v1/memories/$UMO_ID/proof -H "Authorization: Bearer $MI_API_KEY"
Bulk-load a knowledge base
Seed many memories in one call, then browse them.
curl -X POST $MI_URL/v1/batch -H "Authorization: Bearer $MI_API_KEY" \ -H "Content-Type: application/json" -d '{"items":[{"content":"..."},{"content":"..."}]}'
Honor a delete request
Let a user remove a memory, and keep a receipt that the removal happened.
curl -X DELETE $MI_URL/v1/memories/$UMO_ID -H "Authorization: Bearer $MI_API_KEY"
Capture
Turn content into structured memory
Turn raw content into a Unified Memory Object. Runs the pipeline (capture, normalize, extract, enrich, parse, embed, validate) and returns the new UMO with a quality score and a provenance receipt.
| content | string required | Raw text to capture. A sentence, transcript, or document. Max 50,000 characters. |
| source | string optional | Source identifier (for example "slack"). Stored for filtering. |
| timestamp | ISO 8601 optional | Original content time. Defaults to now. Affects recency in search. |
curl -X POST https://api.memoryintelligence.io/v1/process \ -H "Authorization: Bearer $MI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"content":"Sarah proposed provenance hashing for the deck.","source":"meeting-notes"}'
{
"umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
"quality_score": 0.72,
"created_at": "2026-07-05T19:05:05Z"
}
umo_id to reference the memory later; quality_score (0 to 1) is the pipeline's confidence in the extraction.Capture many items in one call. Send an array of content items; each becomes its own UMO.
curl -X POST https://api.memoryintelligence.io/v1/batch \ -H "Authorization: Bearer $MI_API_KEY" -H "Content-Type: application/json" \ -d '{"items":[{"content":"First note."},{"content":"Second note."}]}'
{ "results": [
{ "index": 0, "success": true, "umo_id": "019d..." },
{ "index": 1, "success": true, "umo_id": "019e..." }
] }
umo_id per item in order.Capture from a media file, sent as multipart form data.
curl -X POST https://api.memoryintelligence.io/v1/upload \ -H "Authorization: Bearer $MI_API_KEY" -F "file=@notes.pdf"
{ "umo_id": "019d...", "summary": "Q3 review moved to the 15th.", "quality_score": 0.5 }
Recall
Browse, search, and read memories back
A paginated list of the authenticated user's UMOs. Use for browsing, sync, or building a custom UI.
| limit | integer optional | Max results. Default 20, max 100. |
| offset | integer optional | Items to skip for pagination. Default 0. |
| source | string optional | Filter by source. |
curl -s "https://api.memoryintelligence.io/v1/memories?limit=20" \ -H "Authorization: Bearer $MI_API_KEY"
{ "items": [
{ "umo_id": "019d...", "summary": "...", "quality_score": 0.75, "created_at": "..." }
], "total_count": 128, "has_more": true }
limit and offset; total_count tells you how many exist so you know when to stop.Semantic search: run a natural-language query and get back raw ranked UMOs, each with a citation to the source. No LLM is involved. For a written, synthesized answer instead, use POST /v1/ask. Naming note: the SDK verb mi.ask() maps to this endpoint (search), not to POST /v1/ask.
| query | string required | Your question or search text. |
| limit | integer optional | Max results. Default 5. |
curl -X POST https://api.memoryintelligence.io/v1/memories/query \ -H "Authorization: Bearer $MI_API_KEY" -H "Content-Type: application/json" \ -d '{"query":"What do I know about funding?","limit":5}'
{ "results": [
{ "umo_id": "019d...", "content_text": "Sarah mentioned a seed round.", "score": 0.88 }
], "total_count": 1, "has_more": false }
score and the source umo_id. Pass that umo_id to proof to turn the answer into evidence.Ask a question and get a written answer synthesized by an LLM, grounded in your memories and returned with inline citations. This is distinct from /v1/memories/query, which returns raw ranked results with no LLM. (The SDK's mi.ask() calls query, not this endpoint.)
| question | string required | Natural-language question to answer from memory. |
| model | string optional | Model ID. Default spaceagent (MI flagship, local, free). Other local: llama3.2, mistral, qwen2.5-coder. Cloud (BYOK): openai:gpt-4o-mini, openai:gpt-4o, anthropic:claude-3-5-sonnet-20241022. |
| provider_key | string optional | Your provider API key, required only for cloud (BYOK) models. |
| context_size | integer optional | How many memories to pull into context. Default 5. |
curl -X POST https://api.memoryintelligence.io/v1/ask \ -H "Authorization: Bearer $MI_API_KEY" -H "Content-Type: application/json" \ -d '{"question":"What did Sarah propose?","model":"spaceagent"}'
{
"answer": "Sarah proposed provenance hashing for the deck [1].",
"citations": [
{ "index": 1, "umo_id": "019d...", "title": "Meeting notes", "snippet": "Sarah proposed...", "similarity": 0.88 }
],
"confidence": 0.82,
"method": "spaceagent",
"question_type": "factual"
}
provider_key. Every answer cites the memories it drew from, so you can trace and verify each claim.List the models available to /v1/ask, split into local (free, run on MI) and cloud (bring-your-own-key).
curl -s https://api.memoryintelligence.io/v1/ask/models \ -H "Authorization: Bearer $MI_API_KEY"
{
"local": [ { "id": "spaceagent", "default": true }, { "id": "mistral" } ],
"cloud": [ { "id": "openai:gpt-4o-mini", "requires_key": true } ]
}
Fetch a single UMO by its umo_id.
curl -s https://api.memoryintelligence.io/v1/memories/$UMO_ID \ -H "Authorization: Bearer $MI_API_KEY"
{
"umo_id": "019d...",
"summary": "Sarah proposed provenance hashing for the deck.",
"entities": [ { "text": "Sarah", "type": "PERSON" } ],
"svo_triples": [ { "subject": "Sarah", "verb": "PROPOSE", "object": "provenance hashing" } ],
"topics": [ { "name": "deck" } ],
"quality_score": 0.72
}
404 here means the id is wrong or belongs to another account; keys only see their own memories.Compare two existing memories and get a similarity score plus relationship info. Useful for deduplication, linking related memories, or measuring drift.
| source_ulid | string required | ID of the first memory to compare. |
| candidate_ulid | string required | ID of the second memory to compare against. |
| explain | boolean optional | Include a breakdown of why the two matched. |
| threshold | float optional | Match threshold, 0 to 1. Default 0.5. |
curl -X POST https://api.memoryintelligence.io/v1/match \ -H "Authorization: Bearer $MI_API_KEY" -H "Content-Type: application/json" \ -d '{"source_ulid":"019d...","candidate_ulid":"019e..."}'
{ "score": 0.78, "similarity": 0.78, "relationship": "related" }
source_ulid and candidate_ulid — the IDs of two memories you already captured. score/similarity run 0 to 1.Verify
Prove and introspect what a memory is
The receipt for a memory: its source, content hash, and provenance chain, cryptographically verifiable.
curl -s https://api.memoryintelligence.io/v1/memories/$UMO_ID/proof \ -H "Authorization: Bearer $MI_API_KEY"
{
"valid": true,
"hash_chain_valid": true,
"first_published": "2026-07-05T19:05:05Z",
"audit_proof": {
"content_hash": "024580fe...",
"semantic_hash": "29825202...",
"verification_mode": "cryptographic",
"chain_tampered": false
}
}
A plain-language explanation of what the pipeline pulled out and why a memory matched. The raw entities and relationships live on the UMO itself (see retrieve).
curl -s https://api.memoryintelligence.io/v1/memories/$UMO_ID/explain \ -H "Authorization: Bearer $MI_API_KEY"
{
"human": {
"summary": "Sarah proposed provenance hashing for the deck.",
"key_reasons": [ "Extracted 2 entities", "Identified 1 relationship (SVO triple)" ]
},
"audit": { "verification_mode": "cryptographic", "reproducible": true }
}
Manage
Delete data, and check the service
Delete a memory. Returns a deletion receipt so the removal itself is auditable.
curl -X DELETE https://api.memoryintelligence.io/v1/memories/$UMO_ID \ -H "Authorization: Bearer $MI_API_KEY"
{ "forgotten": true, "umo_id": "019d...", "deleted_at": "...", "receipt": "58684dc7..." }
Status for the calling API key: its owner, plan tier, and quota limits. Authenticated with the API key itself — use it to confirm a key works and which account it belongs to.
curl -s https://api.memoryintelligence.io/v1/account \ -H "Authorization: Bearer $MI_API_KEY"
{
"account": { "user_id": "019d...", "workspace_id": null },
"key": { "key_id": "key_...", "tier": "beta", "status": "active" },
"plan": { "tier": "beta", "umo_limit": null, "search_limit": null, "beta": true }
}
umo_limit and search_limit are null (no enforced quota).Liveness check. No auth required.
curl -s https://api.memoryintelligence.io/health
{ "status": "healthy" }