# Mem0 Cloud > A hosted agent-memory API shaped like mem0's REST API (an alternative to running mem0 yourself): add conversations, search, list, get and delete memories. No vector database or LLM to run. Memories are private to the secret memory_key you send; kept 365 days. An HTTP API at https://mem0-cloud.saastemly.com, also an MCP server at https://mem0-cloud.saastemly.com/mcp, paid per call: with x402 (USDC on Base; an unpaid call answers 402 Payment Required with the terms, which x402 clients pay automatically), or with prepaid credits or a monthly plan bought by card at https://mem0-cloud.saastemly.com (send the API key as Authorization: Bearer ). ## Endpoints - POST /v3/memories/add ($0.008 per call; 3 free calls a day per caller with the header X-Free-Call: 1; MCP tool "add_memory"): Store memories from a conversation, like mem0's add: an AI model extracts durable facts about the user from the messages (or, with infer=false, stores each message as is), embeds them and saves them privately under your memory_key (a secret string you generate; required). Identical facts are stored once. Needs at least one of user_id, agent_id, app_id, run_id. Memories are kept for 365 days. Returns {event_id, status, results:[{id, memory, event: ADD|NONE}]}. - POST /v3/memories/search ($0.004 per call; 3 free calls a day per caller with the header X-Free-Call: 1; MCP tool "search_memories"): Search your stored memories by meaning, like mem0's search: embeds the query and returns the closest memories with a relevance score from 0 to 1. Only memories stored under the same memory_key (your secret string; required) are searched. filters must name at least one of user_id, agent_id, app_id, run_id. Returns {results:[{id, memory, score, metadata, ...}]}. - GET /v1/memories ($0.002 per call; 3 free calls a day per caller with the header X-Free-Call: 1; MCP tool "get_memories"): Read your stored memories, like mem0's get memory and get all memories. With memory_id: returns that one memory (404 if it is not yours). Without it: returns a page {count, next, previous, results} of the memories matching user_id, agent_id, app_id or run_id (at least one; "*" matches any value), newest first. Requires your memory_key (a secret string you generate): a different key sees nothing. - DELETE /v1/memories ($0.002 per call; 3 free calls a day per caller with the header X-Free-Call: 1; MCP tool "delete_memories"): Delete your stored memories, like mem0's delete memory and delete all memories. With memory_id: deletes that one memory (404 if it is not yours). Without it: deletes up to 200 of your memories matching user_id, agent_id, app_id or run_id (at least one), and says if more remain. Requires your memory_key (a secret string you generate): other keys cannot delete your memories. ## Examples POST https://mem0-cloud.saastemly.com/v3/memories/add ```json { "memory_key": "mk_7f3a9c1e5b2d48a6b0c4e9d1", "user_id": "alice", "messages": [ { "role": "user", "content": "I just moved to San Francisco from New York and I prefer vegetarian food." }, { "role": "assistant", "content": "Got it, I'll remember that." } ], "metadata": { "source": "onboarding" } } ``` POST https://mem0-cloud.saastemly.com/v3/memories/search ```json { "memory_key": "mk_7f3a9c1e5b2d48a6b0c4e9d1", "query": "where does the user live?", "filters": { "user_id": "alice" }, "top_k": 5 } ``` GET https://mem0-cloud.saastemly.com/v1/memories?memory_key=mk_7f3a9c1e5b2d48a6b0c4e9d1&user_id=alice&page=1&page_size=50 DELETE https://mem0-cloud.saastemly.com/v1/memories ```json { "memory_key": "mk_7f3a9c1e5b2d48a6b0c4e9d1", "user_id": "alice" } ``` ## More - [Pricing as JSON](https://mem0-cloud.saastemly.com/v1/pricing) - [OpenAPI description](https://mem0-cloud.saastemly.com/openapi.json) - [x402 discovery manifest](https://mem0-cloud.saastemly.com/.well-known/x402) - [MCP server](https://mem0-cloud.saastemly.com/mcp): Streamable HTTP; add it to an MCP client with the header Authorization: Bearer - [Home page](https://mem0-cloud.saastemly.com/)