# Mem0 Cloud – Add Memories

> Mem0 Cloud – Add Memories is a paid API for AI agents from mem0-cloud.saastemly.com, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-30).

Extracts and stores durable facts from conversation messages into a private, key-protected memory store tied to a user, agent, app, or run identity.

## Facts

- Endpoint: POST https://mem0-cloud.saastemly.com/v3/memories/add?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mem0-cloud-add-memories-2910fadd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_f_L70_1hEgd_4kqTDDLM3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability mem0-cloud-add-memories-2910fadd -d '<json body>'
```

Example prompt: Remember what the user just told me — they said they're lactose intolerant, prefer morning meetings, and live in Austin — store these facts under memory key 'usr_k9x2mNpQrL4vTz8w' for user_id 'user_42'.

## When to prefer this

Choose this endpoint when you need to persistently capture facts or context from a conversation into a private, key-scoped memory store that can be retrieved later via semantic search. It is ideal when you want AI-powered extraction (infer=true) to distill durable facts from raw dialogue, or when you want verbatim message storage (infer=false). Prefer it over general-purpose databases when you need vector-embedded, semantically searchable memory with identity scoping (user/agent/app/run) and built-in deduplication.

## Known failure modes

- Missing memory_key — returns 400/422, memories cannot be stored without the secret key
- Missing all of user_id, agent_id, app_id, run_id — at least one is required
- Messages payload exceeds 6000 bytes — returns 400
- infer=false with messages exceeding 10 items or 300 chars each — payload rejected
- Invalid or malformed messages format — returns 400
- Payment not attached or insufficient USDC — returns 402
- Network timeout on embedding/model inference step — returns 5xx

## How this service works

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}]}.

## Output

Returns a JSON object with an event_id, a status string, and a results array. Each element in results contains an id (the memory's unique identifier), the memory text as stored, and an event field indicating ADD (newly stored) or NONE (duplicate, not re-stored).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "infer": {
   "type": "boolean",
   "description": "Default true: extract facts with the model. false: store each message verbatim (up to 10 messages of 300 characters)"
  },
  "app_id": {
   "type": "string",
   "description": "Entity: the app (1-128 characters)"
  },
  "run_id": {
   "type": "string",
   "description": "Entity: the session or run (1-128 characters)"
  },
  "user_id": {
   "type": "string",
   "description": "Entity: the user the memories are about (1-128 characters)"
  },
  "agent_id": {
   "type": "string",
   "description": "Entity: the agent the memories belong to (1-128 characters)"
  },
  "excludes": {
   "type": "string",
   "description": "Optional: what not to extract"
  },
  "includes": {
   "type": "string",
   "description": "Optional: what to focus on when extracting"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "role": {
      "type": "string",
      "description": "user, assistant or system"
     },
     "content": {
      "type": "string",
      "description": "The message text"
     }
    }
   },
   "description": "Conversation turns, each {role: user|assistant|system, content: string}; up to 6000 bytes as JSON. A plain string is also accepted (one user message)."
  },
  "metadata": {
   "type": "object",
   "description": "Custom key/value metadata stored with every memory (up to 2000 bytes as JSON)"
  },
  "memory_key": {
   "type": "string",
   "description": "Your secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable."
  },
  "expiration_date": {
   "type": "string",
   "description": "Optional YYYY-MM-DD: the memory is hidden from search and listing after that day (unless show_expired is true)"
  },
  "custom_instructions": {
   "type": "string",
   "description": "Optional extra extraction instructions (with includes and excludes, up to 800 bytes together)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mem0-cloud-add-memories-2910fadd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mem0-cloud.saastemly.com](https://www.zero.xyz/host/mem0-cloud.saastemly.com/llms.txt)
