# ChainMemory API > ChainMemory is a portable, cryptographically verifiable AI memory layer. > Save AI conversations from any platform and recall them from any other. > All memories are anchored on the ChainMemory L1 blockchain for verification. ## Core endpoints - [GET /v1/memory/context](https://api.chainmemory.ai/v1/memory/context): Returns user's recent AI memory in a format consumable by any LLM. Auth via x-api-key header. Query params: limit (default 10, max 50), verified_only (boolean). - [GET /v1/memory/context/expanded](https://api.chainmemory.ai/v1/memory/context/expanded): Same as above but with full memory list. limit default 50, max 200. - [POST /v1/memory](https://api.chainmemory.ai/v1/memory): Save a new memory. Used by the ChainMemory Chrome extension and integrations. - [POST /v1/verify-memory](https://api.chainmemory.ai/v1/verify-memory): Public verification endpoint. Confirms a memory is anchored on chain without exposing private content. - [POST /v1/keys](https://api.chainmemory.ai/v1/keys): Generate a new API key and wallet. - [POST /v1/memories/:id/trust](https://api.chainmemory.ai/v1/memories/:id/trust): Owner governance of memory trust (approve/quarantine). Quarantined memories are excluded from all agent-facing outputs. - [GET /v1/memory/:id/forensics](https://api.chainmemory.ai/v1/memory/:id/forensics): Full verifiable timeline of a memory (birth, trust, reads, injections, anchoring). - [POST /v1/project/:name/state/rollback](https://api.chainmemory.ai/v1/project/:name/state/rollback): Append-only verifiable restore of project state to a prior anchored version. ## Authentication All memory operations require an x-api-key header: ``` x-api-key: aic_<48 hex chars> ``` Get a key via POST /v1/keys (no auth required for key creation). ## Response format All responses are JSON. Errors return JSON (never HTML) with an "error" field and appropriate HTTP status code. ## Verification Every anchored memory includes a verification block with: - batch_root: Merkle root of the batch - block_number: ChainMemory L1 block where the checkpoint was anchored - tx_hash: transaction hash of the anchor - explorer_link: public verification URL Anyone can independently verify a memory using the verify-memory endpoint or by querying the CheckpointAnchor smart contract directly. ## MCP integration A Model Context Protocol server is published as chainmemory-mcp on npm. Compatible with Claude Desktop, Cursor, Continue.dev, and other MCP clients. ## Project - Website: https://chainmemory.ai - Explorer: https://explorer.chainmemory.ai - Documentation: https://docs.chainmemory.ai - npm: https://www.npmjs.com/package/chainmemory-mcp - Source: https://github.com/chaelynet