> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Overview

> The full Anona Memory API surface, grouped by data plane and control plane.

The API splits into two planes.

| Plane             | What it covers                                                                                          | Authentication                                  |
| ----------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| **Data plane**    | The memory operations your agent calls at runtime. Metered in credits.                                  | API key: `Authorization: Bearer anona_live_...` |
| **Control plane** | Account, workspace, key, and billing management. Backs the dashboard, and is callable programmatically. | Session token, or an API key where noted        |

**Base URL:** `https://api.anonalabs.com`

<Note>
  `https://memory.anonalabs.com` also works and always will. If that is what your
  code already uses, nothing needs to change. `api.anonalabs.com` is simply the
  recommended host for new integrations. The one exception is the remote MCP
  endpoint, which stays at `https://memory.anonalabs.com/mcp`.
</Note>

Every endpoint returns errors in a single envelope. See [Errors](/api-reference/errors).

## Data plane

Runtime memory operations. See [Authentication](/api-reference/authentication) for how
to pass your API key.

| Method and path                                              | What it does                                                                                                                                                | Reference                                  |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| `POST /v1/record`                                            | Stores a memory. Anona extracts the durable facts and files them in the space. Pass `"async": true` to queue the write and get a `job_id` back immediately. | [Memories](/api-reference/memories)        |
| `POST /v1/record/batch`                                      | Bulk-ingests up to 100 memories in one call. Always async, returns a `job_id`.                                                                              | [Memories](/api-reference/memories)        |
| `GET /v1/spaces/{space_id}/jobs/{job_id}`                    | Status of an async ingestion job. Free, consumes no credits.                                                                                                | [Memories](/api-reference/memories)        |
| `POST /v1/retrieve`                                          | Semantic and keyword search over a space. Returns ranked memories with entities and event time.                                                             | [Retrieve](/api-reference/retrieve)        |
| `POST /v1/reason`                                            | Cross-memory synthesis: asks a question and reasons over everything in the space.                                                                           | [Reason](/api-reference/reason)            |
| `GET /v1/spaces/{space_id}/memories`                         | Lists stored memories, filtered by `type`, `state`, or text `q`, with pagination.                                                                           | [Memories](/api-reference/memories)        |
| `GET /v1/spaces/{space_id}/memories/{memory_id}/history`     | Change history for a memory: what it said before, and when it changed.                                                                                      | [Memories](/api-reference/memories)        |
| `DELETE /v1/spaces/{space_id}/memories/{memory_id}`          | Deletes a memory.                                                                                                                                           | [Memories](/api-reference/memories)        |
| `POST /v1/spaces/{space_id}/documents`                       | Uploads files. Their content is parsed, chunked, and made searchable.                                                                                       | [Documents](/api-reference/documents)      |
| `GET /v1/spaces/{space_id}/graph`                            | The entity graph built from the space, as nodes and co-occurrence edges.                                                                                    | [Graph](/api-reference/graph)              |
| `POST /v1/chat/completions`                                  | OpenAI-compatible chat that auto-retrieves relevant memories into the prompt, and stores the turn back. Supports streaming.                                 | [Chat](/api-reference/chat)                |
| `POST /v1/responses`                                         | The same memory wrapper in the OpenAI Responses API shape.                                                                                                  | [Responses](/api-reference/responses)      |
| `POST /v1/messages`                                          | The same memory wrapper in the Anthropic Messages shape.                                                                                                    | [Messages](/api-reference/messages)        |
| `GET` `PUT` `DELETE /v1/spaces/{space_id}/chat-settings`     | Per-space defaults for the proxy: how many memories to inject, the injected token budget, whether to auto-record. Free.                                     | [Chat](/api-reference/chat#space-defaults) |
| `POST /mcp`                                                  | Remote MCP endpoint. Tools: `record`, `retrieve`, `list_spaces`, `reason`.                                                                                  | [MCP](/mcp-integration)                    |
| `GET /v1/usage/me`                                           | Credits and rate limit remaining for the calling API key.                                                                                                   | [Usage](/api-reference/usage)              |
| `POST` `GET` `PATCH` `DELETE /v1/spaces/{space_id}/webhooks` | Registers an HTTPS endpoint Anona calls when memories are stored or consolidated, instead of polling.                                                       | [Webhooks](/api-reference/webhooks)        |

<Accordion title="Try it out: record and retrieve a memory">
  ```bash Record theme={null}
  curl -X POST https://api.anonalabs.com/v1/record \
    -H "Authorization: Bearer anona_live_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "space_id": "demo-space",
      "content": "The user prefers dark mode and replies in Spanish."
    }'
  ```

  ```bash Retrieve theme={null}
  curl -X POST https://api.anonalabs.com/v1/retrieve \
    -H "Authorization: Bearer anona_live_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "space_id": "demo-space",
      "query": "What language does the user prefer?"
    }'
  ```

  See [Memories](/api-reference/memories) and [Retrieve](/api-reference/retrieve) for the full request and response shapes.
</Accordion>

## Control plane

Account and workspace management. Most of these back the dashboard; the workspace, key,
and usage endpoints are also useful programmatically.

| Method and path                                                                              | What it does                                       | Reference                                   |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------- |
| `GET /v1/orgs/me`                                                                            | Your organization: plan, status, limits.           | [Organization](/api-reference/organization) |
| `GET /v1/spaces` · `POST /v1/spaces`                                                         | Lists and creates memory spaces.                   | [Spaces](/api-reference/spaces)             |
| `GET /v1/spaces/{id}` · `DELETE /v1/spaces/{id}`                                             | Fetches and deletes a space.                       | [Spaces](/api-reference/spaces)             |
| `GET /v1/spaces/{id}/members` · `POST .../members/invite` · `DELETE .../members/{member_id}` | Space membership.                                  | [Spaces](/api-reference/spaces)             |
| `GET /v1/api-keys` · `POST /v1/api-keys` · `DELETE /v1/api-keys/{id}`                        | Manages API keys.                                  | [API Keys](/api-reference/api-keys)         |
| `GET /v1/projects` · `POST /v1/projects`                                                     | Manages projects.                                  | [Organization](/api-reference/organization) |
| `GET /v1/members` · `POST /v1/members/invite` · `DELETE /v1/members/{id}`                    | Manages organization members.                      | [Organization](/api-reference/organization) |
| `GET /v1/usage` · `GET /v1/usage/breakdown`                                                  | Organization usage, and a per-operation breakdown. | [Usage](/api-reference/usage)               |
| `GET /v1/billing` · `POST /v1/billing/upgrade`                                               | Views the plan, and changes to a free tier.        | [Billing](/api-reference/billing)           |
| `POST /v1/billing/checkout` · `POST /v1/billing/portal` · `POST /v1/billing/cancel`          | Stripe checkout, billing portal, and cancellation. | [Billing](/api-reference/billing)           |

<Accordion title="Try it out: list spaces and check usage">
  ```bash List spaces theme={null}
  curl https://api.anonalabs.com/v1/spaces \
    -H "Authorization: Bearer anona_live_YOUR_KEY"
  ```

  ```bash Check usage theme={null}
  curl https://api.anonalabs.com/v1/usage/me \
    -H "Authorization: Bearer anona_live_YOUR_KEY"
  ```

  See [Spaces](/api-reference/spaces) and [Usage](/api-reference/usage) for the full request and response shapes.
</Accordion>

<Note>
  Account sign-in (`/auth/...`) and MCP OAuth (`/oauth/...`) are browser flows used by the
  dashboard and by MCP clients. See [Authentication](/api-reference/authentication) and
  [MCP](/mcp-integration) rather than calling them directly.
</Note>
