Data plane API
After this page, you can call the data plane API at https://api.spmos.ai with an API key to manage memory.
Authenticate
Send your API key as a bearer token.
Authorization: Bearer spm_live_...
Scopes apply per endpoint:
memory:write:POST /v2/ingest,POST /v2/documentsmemory:read: recall, source reads, audit, stats, usage, and limitsmemory:readplusaudit:GET /v2/purge/{purge_id}/certificatememory:delete:POST /v2/purgememory:partition: endpoints that acceptuser_partition
Request receipts are a proxy feature. See Provider Proxy API.
Use endpoints
- Save memory with
POST /v2/ingestfor up to 12,000 characters, or usePOST /v2/documentsto split a long document. - Recall with
POST /v2/recall. - Read evidence with
POST /v2/sources/read,GET /v2/sources, orPOST /v2/sources/text. - Delete with
POST /v2/purge; fetch its certificate withGET /v2/purge/{purge_id}/certificate. - Audit with
GET /v2/auditor/v2/audit/export. - Read account data with
GET /v2/stats,/v2/usage,/v2/limits, orGET /v2/placement. - Read provider data with
GET /v2/providers/catalogorPOST /v2/providers/probe-models.
Save and recall
curl -sS https://api.spmos.ai/v2/ingest \
-H "Authorization: Bearer $SPM_API_KEY" \
-H "content-type: application/json" \
-d '{"text":"The staging deploy window is Thursday 14:00 UTC.","source_id":"runbook-1"}'
curl -sS https://api.spmos.ai/v2/recall \
-H "Authorization: Bearer $SPM_API_KEY" \
-H "content-type: application/json" \
-d '{"query":"When is the staging deploy window?","top_k":3}'
A supported recall returns an answer and evidence_refs. Otherwise, it returns UNKNOWN and a gate_reason. See Recall verdicts.
Read evidence
Each evidence_refs entry contains a source ID and a signed read token:
{"source_id": "runbook-1", "read_token": "{\"payload\":{...},\"signature\":\"...\"}"}
Send the read_tokens[] values to POST /v2/sources/read. Returned spans carry a signed provenance label; MCP tool reference lists the values.
Read receipts
Every recall and deletion certificate includes a provenance_receipt. It records the outcome and points to the signed document; it does not replace that document.
{
"schema": "spm.provenance.receipt/v1",
"subject": "recall_evidence",
"outcome": "refused",
"request_id": "spm_...",
"signed": "gated-evidence",
"provenance": "unknown"
}
Track readiness
Ingest accepts the source before extraction and indexing finish. Keep source_id and poll GET /v2/sources until it is ready. Repeating identical text with the same source_id is a no-op; changed text replaces the source and reprocesses changed parts.
Separate partitions
user_partition separates end-user spaces. A source is invisible from other partitions, including the empty default partition. Another partition cannot overwrite its source_id.
One ingest holds at most 12,000 characters. Use /v2/documents for longer input. A 429 response includes retry_after_seconds; wait that long before retrying. Traditional and simplified Chinese, and accented and unaccented Latin, compare equal.
Handle errors
See Provider Proxy API for HTTP errors and retry behavior.
Verify
curl -sS -o /dev/null -w '%{http_code}\n' https://api.spmos.ai/v2/stats
Expected: 401 when no API key is sent.