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.

Sign in → Download OpenAPI
Typed SDKs are live: pip install memoryintelligence or npm install @memoryintelligence/sdk. Prefer raw HTTP? Every endpoint below works with any client. Or use the MCP server to give an assistant memory in one command.

At a glance

The whole public surface is fourteen calls. Click any row to jump to its worked example.

Do thisCallWhat you get
Capture a memoryPOST/v1/processa UMO with a receipt
Capture many at oncePOST/v1/batchone UMO per item
Capture from a filePOST/v1/uploada UMO from PDF text
Browse memoriesGET/v1/memoriesa paginated list
Search by meaningPOST/v1/memories/queryranked results (no LLM)
Ask a question (LLM)POST/v1/aska written answer with citations
List answer modelsGET/v1/ask/modelslocal + cloud model IDs
Get one memoryGET/v1/memories/{id}a single UMO
Compare two memoriesPOST/v1/matcha similarity score
Verify provenanceGET/v1/memories/{id}/proofsource, hash, receipt
Introspect a memoryGET/v1/memories/{id}/explainentities and structure
Delete a memoryDEL/v1/memories/{id}a deletion receipt
Check your API keyGET/v1/accountowner, tier, quota
Check the serviceGET/healthstatus, 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.

Header
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"
}
FlatA few responses are not enveloped and return their body directly, with no 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" }
CodeMeansFix
401Missing or invalid API keyCheck the Authorization header and your key.
404No memory with that idConfirm the umo_id from a capture or list call.
422Request body failed validationCheck required fields and types (see each call).
429Rate limitedBack 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.

1
Capture the fact with POST /v1/process. Save the 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."}'
2
Ask a question with POST /v1/memories/query. The answer comes back ranked, with the source 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.

1
Query, and take the top result's umo_id.
2
Verify it with GET /v1/memories/{id}/proof to get the source, content hash, and provenance state.
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.

1
Send an array to POST /v1/batch; each item becomes its own UMO.
curl -X POST $MI_URL/v1/batch -H "Authorization: Bearer $MI_API_KEY" \
  -H "Content-Type: application/json" -d '{"items":[{"content":"..."},{"content":"..."}]}'
2
Browse them with GET /v1/memories.

Honor a delete request

Let a user remove a memory, and keep a receipt that the removal happened.

1
Find the memory with GET /v1/memories.
2
Delete it with DELETE /v1/memories/{id}. The response is a deletion receipt.
curl -X DELETE $MI_URL/v1/memories/$UMO_ID -H "Authorization: Bearer $MI_API_KEY"

Capture

Turn content into structured memory

POST/v1/processalias: POST /v1/memories

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.

Request body
contentstring requiredRaw text to capture. A sentence, transcript, or document. Max 50,000 characters.
sourcestring optionalSource identifier (for example "slack"). Stored for filtering.
timestampISO 8601 optionalOriginal content time. Defaults to now. Affects recency in search.
Request
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"}'
Response 200 · data payload
{
  "umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
  "quality_score": 0.72,
  "created_at": "2026-07-05T19:05:05Z"
}
NoticeContent is structured into a UMO, never stored as a raw blob. Save umo_id to reference the memory later; quality_score (0 to 1) is the pipeline's confidence in the extraction.
POST/v1/batch

Capture many items in one call. Send an array of content items; each becomes its own UMO.

Request
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."}]}'
Response 200
{ "results": [
  { "index": 0, "success": true, "umo_id": "019d..." },
  { "index": 1, "success": true, "umo_id": "019e..." }
] }
NoticeUse batch for seeding or syncing. Each item runs the full pipeline, so responses carry one umo_id per item in order.
POST/v1/upload

Capture from a media file, sent as multipart form data.

Request
curl -X POST https://api.memoryintelligence.io/v1/upload \
  -H "Authorization: Bearer $MI_API_KEY" -F "file=@notes.pdf"
Response 200
{ "umo_id": "019d...", "summary": "Q3 review moved to the 15th.", "quality_score": 0.5 }
NoticePDF text is supported today. Audio and image transcription are coming; until then those files capture their extractable text only.

Recall

Browse, search, and read memories back

GET/v1/memories

A paginated list of the authenticated user's UMOs. Use for browsing, sync, or building a custom UI.

Query parameters
limitinteger optionalMax results. Default 20, max 100.
offsetinteger optionalItems to skip for pagination. Default 0.
sourcestring optionalFilter by source.
Request
curl -s "https://api.memoryintelligence.io/v1/memories?limit=20" \
  -H "Authorization: Bearer $MI_API_KEY"
Response 200
{ "items": [
  { "umo_id": "019d...", "summary": "...", "quality_score": 0.75, "created_at": "..." }
], "total_count": 128, "has_more": true }
NoticePage with limit and offset; total_count tells you how many exist so you know when to stop.
POST/v1/memories/queryalias: POST /v1/search

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.

Request body
querystring requiredYour question or search text.
limitinteger optionalMax results. Default 5.
Request
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}'
Response 200
{ "results": [
  { "umo_id": "019d...", "content_text": "Sarah mentioned a seed round.", "score": 0.88 }
], "total_count": 1, "has_more": false }
NoticeEvery result carries a score and the source umo_id. Pass that umo_id to proof to turn the answer into evidence.
POST/v1/ask

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.)

Request body
questionstring requiredNatural-language question to answer from memory.
modelstring optionalModel 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_keystring optionalYour provider API key, required only for cloud (BYOK) models.
context_sizeinteger optionalHow many memories to pull into context. Default 5.
Request
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"}'
Response 200 · data payload
{
  "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"
}
NoticeLocal models run on MI servers and are free during beta. Cloud models are bring-your-own-key: pass provider_key. Every answer cites the memories it drew from, so you can trace and verify each claim.
GET/v1/ask/models

List the models available to /v1/ask, split into local (free, run on MI) and cloud (bring-your-own-key).

Request
curl -s https://api.memoryintelligence.io/v1/ask/models \
  -H "Authorization: Bearer $MI_API_KEY"
Response 200
{
  "local": [ { "id": "spaceagent", "default": true }, { "id": "mistral" } ],
  "cloud": [ { "id": "openai:gpt-4o-mini", "requires_key": true } ]
}
GET/v1/memories/{id}

Fetch a single UMO by its umo_id.

Request
curl -s https://api.memoryintelligence.io/v1/memories/$UMO_ID \
  -H "Authorization: Bearer $MI_API_KEY"
Response 200
{
  "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
}
NoticeA 404 here means the id is wrong or belongs to another account; keys only see their own memories.
POST/v1/match

Compare two existing memories and get a similarity score plus relationship info. Useful for deduplication, linking related memories, or measuring drift.

Request body
source_ulidstring requiredID of the first memory to compare.
candidate_ulidstring requiredID of the second memory to compare against.
explainboolean optionalInclude a breakdown of why the two matched.
thresholdfloat optionalMatch threshold, 0 to 1. Default 0.5.
Request
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..."}'
Response 200 · data payload
{ "score": 0.78, "similarity": 0.78, "relationship": "related" }
NoticeThe request takes 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

GET/v1/memories/{id}/proof

The receipt for a memory: its source, content hash, and provenance chain, cryptographically verifiable.

Request
curl -s https://api.memoryintelligence.io/v1/memories/$UMO_ID/proof \
  -H "Authorization: Bearer $MI_API_KEY"
Response 200
{
  "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
  }
}
NoticeThis is the difference between "the AI said so" and evidence: the hash lets anyone confirm the memory has not changed since capture.
GET/v1/memories/{id}/explain

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).

Request
curl -s https://api.memoryintelligence.io/v1/memories/$UMO_ID/explain \
  -H "Authorization: Bearer $MI_API_KEY"
Response 200
{
  "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 }
}
NoticeUse explain to see why a memory matched a query, or to debug extraction quality before you trust a source.

Manage

Delete data, and check the service

DEL/v1/memories/{id}

Delete a memory. Returns a deletion receipt so the removal itself is auditable.

Request
curl -X DELETE https://api.memoryintelligence.io/v1/memories/$UMO_ID \
  -H "Authorization: Bearer $MI_API_KEY"
Response 200
{ "forgotten": true, "umo_id": "019d...", "deleted_at": "...", "receipt": "58684dc7..." }
NoticeDeletion is auditable by design: the receipt proves the removal happened, which is what a user or regulator actually needs.
GET/v1/account

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.

Request
curl -s https://api.memoryintelligence.io/v1/account \
  -H "Authorization: Bearer $MI_API_KEY"
Response 200 · data payload
{
  "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 }
}
NoticeIdentity is returned as a UUID. During the free beta, umo_limit and search_limit are null (no enforced quota).
GET/health

Liveness check. No auth required.

Request
curl -s https://api.memoryintelligence.io/health
Response 200
{ "status": "healthy" }
NoticeSafe to poll for uptime; it is the only call that does not require a key.
Need every field and error code? The full, always-current contract is the OpenAPI spec. Hit Copy for LLM to hand it to Claude, ChatGPT, or Cursor and have your agent write the integration.