Source: https://mnemoverse.com/docs/api/getting-started
Content revision: 29aab8c26bd59d5f8abe91247350dc16463b9250b97d0fc7234adedf8569b2fa
Updated: 2026-11-17T22:02:07Z

# Getting Started

Get your first memory stored and queried in 2 minutes.

For ChatGPT, start with the [published Mnemoverse Memory plugin](https://mnemoverse.com/docs/api/chatgpt#install-the-published-plugin): browser sign-in, no API key. The steps below are for direct REST API access.

## 1. Get Your API Key

Sign up at [console.mnemoverse.com](https://console.mnemoverse.com/sign-up?utm_source=docs&utm_medium=cta&utm_campaign=api-getting-started) to get a free API key. Free tier: 1,000 queries/day, no credit card required.

Your API key starts with `mk_` and looks like: `mk_live_a1b2c3d4e5f6...`

### Check your API key

Before the key goes into a config, ask the API whether it accepts it. Both forms ask for the key at a masked prompt and never pass it as a command argument, so it lands neither in your shell history nor in the process list.

macOS, Linux, Git Bash:
```bash
printf 'Mnemoverse API key: '; read -rs KEY; echo
printf 'X-Api-Key: %s\n' "$KEY" | curl -s -H @- https://core.mnemoverse.com/api/v1/memory/stats; unset KEY
```

Windows PowerShell 5.1 and PowerShell 7:
```powershell
$k = [Net.NetworkCredential]::new('', (Read-Host 'Mnemoverse API key' -AsSecureString)).Password
try { (Invoke-WebRequest https://core.mnemoverse.com/api/v1/memory/stats -Headers @{ 'X-Api-Key' = $k } -UseBasicParsing).Content }
catch { if ($_.ErrorDetails.Message) { $_.ErrorDetails.Message } else { (New-Object IO.StreamReader($_.Exception.Response.GetResponseStream())).ReadToEnd() } }; Remove-Variable k
```

| The output contains | What it means |
|---|---|
| JSON that includes `"total_atoms"` | The key works. |
| `"code":"UNAUTHORIZED"` with a `"reason"` | The API refused the key and says why: `placeholder_key`, `malformed_key`, `invalid_key`, `revoked_key` or `missing_key`. [Reasons for a 401](https://mnemoverse.com/docs/api/reference#reasons-for-a-401) says what each one means. |

In the JSON, `reason` sits inside the `details` object, next to `details.keys_url`, the console page where keys are created. The `message` is written for a person and its wording can change, so a script should branch on `details.reason`.

**Connecting Claude, ChatGPT, or an editor instead?**
Those tools have their own setup — see [Agent Setup](https://mnemoverse.com/docs/api/agent-setup). If a tool asks for an **MCP server URL**, that URL is `https://mcp.mnemoverse.com/mcp`. The `core.mnemoverse.com/api/v1` URLs below are the REST API for curl/SDK calls, not an MCP endpoint. Agents built on A2A frameworks reach the same memory through the [A2A endpoint](https://mnemoverse.com/docs/api/a2a).

## 2. Store a Memory

```bash
curl -X POST https://core.mnemoverse.com/api/v1/memory/write \
  -H "X-Api-Key: mk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Retry with exponential backoff fixed the timeout issue",
    "concepts": ["retry", "backoff", "timeout"],
    "domain": "engineering"
  }'
```

Response:

```json
{
  "stored": true,
  "atom_id": "550e8400-e29b-41d4-a716-446655440000",
  "importance": 0.85,
  "reason": "novel insight — high knowledge delta"
}
```

The write gate gives each write a novelty score against the nearest memory already stored in the same domain, and refuses the write when that score is below 0.1: `stored` is then `false`, and `reason` names the score and the threshold. That refuses more than exact repeats: a write very close in meaning to a stored memory is refused too, even when its wording differs. The number in `importance` is that novelty score; the gate does not judge how important or how true a memory is. To replace a stored memory rather than add a near-copy of it, write with `supersedes` ([what to do when `stored` is `false`](https://mnemoverse.com/docs/api/reference#post-memory-write)); in a shared room only a write indistinguishable from one already there is refused.

## 3. Query Memories

```bash
curl -X POST https://core.mnemoverse.com/api/v1/memory/read \
  -H "X-Api-Key: mk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "how to handle timeouts?",
    "top_k": 5
  }'
```

Response:

```json
{
  "items": [
    {
      "atom_id": "550e8400-e29b-41d4-a716-446655440000",
      "content": "Retry with exponential backoff fixed the timeout issue",
      "relevance": 0.92,
      "similarity": 0.87,
      "valence": 0.0,
      "importance": 0.85,
      "source": "semantic",
      "concepts": ["retry", "backoff", "timeout"],
      "domain": "engineering",
      "metadata": {}
    }
  ],
  "episodic_hit": false,
  "query_concepts": ["timeout", "handling"],
  "expanded_concepts": ["timeout", "handling", "retry", "backoff"],
  "search_time_ms": 12.5
}
```

Notice `expanded_concepts`: the search widened "timeout" to "retry" and "backoff", concepts your stored memories connect it to.

## 4. Report Outcomes

When a memory was useful (or not), report it:

```bash
curl -X POST https://core.mnemoverse.com/api/v1/memory/feedback \
  -H "X-Api-Key: mk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "atom_ids": ["550e8400-e29b-41d4-a716-446655440000"],
    "outcome": 1.0,
    "query_concepts": ["timeout", "handling"]
  }'
```

Rating a recalled memory as helpful or misleading re-ranks what comes back next. The rating moves the memory's `valence` field (outcome polarity from -1 to 1, returned on every read result), which scales its `relevance` on later reads (see [`POST /memory/read`](https://mnemoverse.com/docs/api/reference#post-memory-read)). The stored text does not change.

## 5. Check Stats

```bash
curl https://core.mnemoverse.com/api/v1/memory/stats \
  -H "X-Api-Key: mk_live_YOUR_KEY"
```

```json
{
  "total_atoms": 1,
  "episodes": 1,
  "prototypes": 0,
  "singletons": 0,
  "hebbian_edges": 3,
  "episodic_fingerprints": 0,
  "domains": ["engineering"],
  "avg_valence": 0.8,
  "avg_importance": 0.85
}
```

## Next Steps

- [Agent Setup](https://mnemoverse.com/docs/api/agent-setup) — connect any AI tool (local MCP with a key, or one-click OAuth connector)
- [Install by host](https://mnemoverse.com/docs/api/install-by-host): step-by-step setup for each supported app
- [Make Your Agent Use Memory](https://mnemoverse.com/docs/api/agent-memory): the standing instruction that makes your agent read and write memory without being reminded, and how to confirm the tools work first
- [Claude Code](https://mnemoverse.com/docs/api/claude) — give the Claude CLI persistent memory
- [Claude Desktop, Web & Mobile](https://mnemoverse.com/docs/api/claude-apps) — the Claude apps (Desktop / web / mobile)
- [Cursor, VS Code & Devin Desktop (Windsurf)](https://mnemoverse.com/docs/api/editors) — editor integrations
- [ChatGPT](https://mnemoverse.com/docs/api/chatgpt) — the published plugin and alternative custom setups
- [Python SDK](https://mnemoverse.com/docs/api/python-sdk) — `pip install mnemoverse` for scripts and backends
- [API Reference](https://mnemoverse.com/docs/api/reference) — full endpoint documentation
- [Rooms](https://mnemoverse.com/docs/api/rooms) — shared memory across accounts for agent teams
- [Security](https://mnemoverse.com/docs/api/security) — how we isolate and protect your data
