API Reference
Simple, powerful, RESTful.
Two core endpoints: ingest and context. Everything else is optional.
Authentication
All requests require a Bearer token. Include your API key in the Authorization header.
curl https://api.m3mory.ai/v1/status \ -H "Authorization: Bearer m3m_sk_..."Base URL: https://api.m3mory.ai
Rate Limits
Rate limits are applied per API key. When exceeded, you will receive a 429 response.
Free
30/min
Pro
120/min
Scale
10,000/min
Enterprise
Custom
Memory Ingestion
/v1/ingestExtract and store memories from a conversation.
Request Body
{ "agentId": "my-assistant", "userId": "user_123", "messages": [ { "role": "user", "content": "I just moved to Bristol" }, { "role": "assistant", "content": "Welcome to Bristol!" } ]}Response
{ "memoriesCreated": 1, "entitiesExtracted": 2, "edgesCreated": 1, "processingMs": 842}Context Retrieval
/v1/contextRetrieve relevant context for an ongoing conversation. Returns a text block ready for your system prompt.
Request Body
{ "agentId": "my-assistant", "userId": "user_123", "messages": [ { "role": "user", "content": "Where do I live?" } ], "tokenBudget": 2000}Response
{ "text": "## What you know about user_123\n- Lives in Bristol (moved recently)\n- ...", "memoriesUsed": 4, "tokensUsed": 847, "retrievalMs": 312}Search
/v1/searchSearch memories with filters. Returns raw memory objects.
Request Body
{ "agentId": "my-assistant", "userId": "user_123", "query": "Bristol", "limit": 10, "categories": ["location", "preference"]}Response
{ "memories": [ { "id": "mem_abc123", "content": "User moved to Bristol", "category": "location", "score": 0.94, "createdAt": "2026-03-20T10:30:00Z" } ], "total": 1}Memory CRUD
/v1/memoriesList memories with pagination and filters.
Response
{ "memories": [...], "total": 1423, "page": 1, "pageSize": 50}/v1/memories/:idGet a specific memory by ID.
Response
{ "id": "mem_abc123", "content": "User moved to Bristol", "category": "location", "entities": ["Bristol"], "createdAt": "2026-03-20T10:30:00Z", "lastAccessed": "2026-03-20T11:00:00Z"}/v1/memories/:idDelete a specific memory. Permanent.
Response
{ "deleted": true }Account
/v1/statusGet account status, usage, and limits.
Response
{ "plan": "pro", "memoriesStored": 14203, "storageUsedMb": 412, "storageLimitMb": 2048, "requestsToday": 847, "rateLimitPerMin": 120, "tokensUsed": 1243000, "tokenLimit": 5000000, "searchesUsed": 4210, "searchLimit": 100000}Error Codes
400Bad request. Check your request body.401Invalid or missing API key.403API key does not have access to this resource.404Resource not found.429Rate limit exceeded. Back off and retry.500Internal server error. Contact support.