SPM — StellarPath Memory Operating System Docs

Data plane API

Published Last reviewed Applies to SPM-Polaris

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:

Request receipts are a proxy feature. See Provider Proxy API.

Use endpoints

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.

Next