> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memory.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 — including the remote
> MCP endpoint and its OAuth flow, which are served on both hostnames. If that is
> what your code already uses, nothing needs to change. `api.anonalabs.com` is
> simply the recommended host for new integrations.

Every endpoint returns errors in a single envelope. See [Errors](https://docs.memory.anonalabs.com/api-reference/errors.md).

## Data plane

Runtime memory operations. See [Authentication](https://docs.memory.anonalabs.com/api-reference/authentication.md) 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](https://docs.memory.anonalabs.com/api-reference/memories.md) |
| `POST /v1/record/batch` | Bulk-ingests up to 100 memories in one call. Always async, returns a `job_id`. | [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md) |
| `GET /v1/spaces/{space_id}/jobs/{job_id}` | Status of an async ingestion job. Free, consumes no credits. | [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md) |
| `DELETE /v1/spaces/{space_id}/jobs/{job_id}` | Cancels the queued parts of an async ingestion job. Free, consumes no credits. | [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md) |
| `POST /v1/retrieve` | Semantic and keyword search over a space. Returns ranked memories with entities and event time. | [Retrieve](https://docs.memory.anonalabs.com/api-reference/retrieve.md) |
| `POST /v1/reason` | Cross-memory synthesis: asks a question and reasons over everything in the space. | [Reason](https://docs.memory.anonalabs.com/api-reference/reason.md) |
| `GET /v1/spaces/{space_id}/memories` | Lists stored memories, filtered by `type`, `state`, scope, or text `q`, with pagination. | [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md) |
| `GET /v1/spaces/{space_id}/memories/{memory_id}/history` | Change history for a memory: what it said before, and when it changed. | [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md) |
| `PATCH /v1/spaces/{space_id}/memories/{memory_id}` | Edits a memory, or reversibly retires and restores it (`state`). | [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md#edit-or-retire-a-memory) |
| `DELETE /v1/spaces/{space_id}/memories/{memory_id}` | Deletes a memory. | [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md) |
| `POST /v1/spaces/{space_id}/documents` | Uploads files. Their content is parsed, chunked, and made searchable. | [Documents](https://docs.memory.anonalabs.com/api-reference/documents.md) |
| `GET /v1/spaces/{space_id}/documents` · `GET` `DELETE .../documents/{document_id}` | Lists, inspects, and deletes ingested documents. | [Documents](https://docs.memory.anonalabs.com/api-reference/documents.md) |
| `GET /v1/spaces/{space_id}/graph` | The entity graph built from the space, as nodes and co-occurrence edges. | [Graph](https://docs.memory.anonalabs.com/api-reference/graph.md) |
| `GET /v1/spaces/{space_id}/entities` · `GET .../entities/{entity_id}` | Lists entities, and one entity with its observations. | [Graph](https://docs.memory.anonalabs.com/api-reference/graph.md) |
| `GET /v1/receipts/{request_id}` | The context receipt a retrieve or proxy call built, for audit. | [Context receipts](https://docs.memory.anonalabs.com/api-reference/context-receipts.md) |
| `GET /v1/models` | The LLM catalog: every selectable model with its credit rates. | [Model selection](https://docs.memory.anonalabs.com/api-reference/model-selection.md) |
| `GET` `POST /v1/spaces/{space_id}/models` and `GET` `PATCH` `DELETE .../models/{model_id}`, plus `/refresh`, `/clear`, `/history` | Memory models: standing syntheses the space keeps up to date. | [Memory models](https://docs.memory.anonalabs.com/api-reference/models.md) |
| `GET` `PUT` `DELETE /v1/spaces/{space_id}/profile` | The space's mission and disposition dials: what it is for, and how it weighs what it is told. Write is owner-only. Free. | [Memory models](https://docs.memory.anonalabs.com/api-reference/models.md#space-profile) |
| `GET /v1/spaces/{space_id}/users/{user_id}/profile` · `POST .../users/{user_id}/ask` | A per-user profile, and questions about one user. | [User profiles](https://docs.memory.anonalabs.com/api-reference/user-profiles.md) |
| `POST /v1/chat/completions` | OpenAI-compatible chat that auto-retrieves relevant memories into the prompt, and stores the turn back. Supports streaming. | [Chat](https://docs.memory.anonalabs.com/api-reference/chat.md) |
| `POST /v1/responses` | The same memory wrapper in the OpenAI Responses API shape. | [Responses](https://docs.memory.anonalabs.com/api-reference/responses.md) |
| `POST /v1/messages` | The same memory wrapper in the Anthropic Messages shape. | [Messages](https://docs.memory.anonalabs.com/api-reference/messages.md) |
| `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](https://docs.memory.anonalabs.com/api-reference/chat.md#space-defaults) |
| `GET` `PUT` `DELETE /v1/spaces/{space_id}/extraction-settings` | Per-space extraction overrides: how much detail a write keeps (`mode`), plus `guidance` added to the standard rules and a `custom_prompt` that replaces them. Free. | [Extraction settings](https://docs.memory.anonalabs.com/api-reference/extraction-settings.md) |
| `GET` `PUT` `DELETE /v1/spaces/{space_id}/reason-settings` | Per-space defaults for `reason`: which model answers, and how deeply it looks. Free. | [Model selection](https://docs.memory.anonalabs.com/api-reference/model-selection.md) |
| `GET` `POST /v1/spaces/{space_id}/rules` · `PATCH` `DELETE .../rules/{rule_id}` | Rules every answer from the space must follow: standing instructions that override what the memories say. Owner-only. Free. | [Spaces](https://docs.memory.anonalabs.com/api-reference/spaces.md#rules) |
| `POST /mcp` | Remote MCP endpoint. Tools: `record`, `retrieve`, `list_spaces`, `reason`, `get_profile`, `get_model`, `get_user_profile`. | [MCP](https://docs.memory.anonalabs.com/mcp-integration.md) |
| `GET /v1/usage/me` | Credits and rate limit remaining for the calling API key. | [Usage](https://docs.memory.anonalabs.com/api-reference/usage.md) |
| `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](https://docs.memory.anonalabs.com/api-reference/webhooks.md) |

> **Try it out: record and retrieve a memory**
>
> ```bash cURL 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."
>   }'
>
> 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?"
>   }'
> ```
>
> ```python Python theme={null}
> from anona import AnonaClient
>
> client = AnonaClient(api_key="anona_live_YOUR_KEY")
>
> client.record(
>     space_id="demo-space",
>     content="The user prefers dark mode and replies in Spanish.",
> )
>
> results = client.retrieve(
>     space_id="demo-space",
>     query="What language does the user prefer?",
> )
> ```
>
> ```typescript TypeScript theme={null}
> import { Anona } from "@anona-labs/memory";
>
> const anona = new Anona({ apiKey: "anona_live_YOUR_KEY" });
>
> await anona.record({
>   spaceId: "demo-space",
>   content: "The user prefers dark mode and replies in Spanish.",
> });
>
> const results = await anona.retrieve({
>   spaceId: "demo-space",
>   query: "What language does the user prefer?",
> });
> ```
>
> See [Memories](https://docs.memory.anonalabs.com/api-reference/memories.md) and [Retrieve](https://docs.memory.anonalabs.com/api-reference/retrieve.md) for the full request and response shapes.

## 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](https://docs.memory.anonalabs.com/api-reference/organization.md) |
| `GET /v1/spaces` · `POST /v1/spaces` | Lists and creates memory spaces. `POST` takes an optional `space_type` that starts the space off with a mission, extraction guidance and two memory models. | [Spaces](https://docs.memory.anonalabs.com/api-reference/spaces.md) |
| `GET /v1/space-types` | The space types `POST /v1/spaces` accepts, and what each one sets up. Needs no API key, and is free. | [Spaces](https://docs.memory.anonalabs.com/api-reference/spaces.md#space-types) |
| `GET /v1/spaces/{id}` · `DELETE /v1/spaces/{id}` | Fetches and deletes a space. | [Spaces](https://docs.memory.anonalabs.com/api-reference/spaces.md) |
| `GET /v1/spaces/{id}/members` · `POST .../members/invite` · `DELETE .../members/{member_id}` · `GET .../slack-invites` | Space membership. | [Spaces](https://docs.memory.anonalabs.com/api-reference/spaces.md) |
| `GET /v1/api-keys` · `POST /v1/api-keys` · `DELETE /v1/api-keys/{id}` | Manages API keys. | [API Keys](https://docs.memory.anonalabs.com/api-reference/api-keys.md) |
| `GET /v1/projects` · `POST /v1/projects` | Manages projects. | [Organization](https://docs.memory.anonalabs.com/api-reference/organization.md) |
| `GET /v1/members/me` · `GET /v1/members` · `POST /v1/members/invite` · `DELETE /v1/members/{id}` | The signed-in member, and organization member management. | [Organization](https://docs.memory.anonalabs.com/api-reference/organization.md) |
| `GET /v1/invitations/pending` · `POST /v1/invitations/accept` · `POST /v1/invitations/decline` | Space invitations waiting on the signed-in person. | [Organization](https://docs.memory.anonalabs.com/api-reference/organization.md#space-invitations) |
| `POST /v1/spaces/{id}/exports` · `GET .../exports` · `GET .../exports/{job_id}/download` | Exports everything a space holds as a downloadable bundle. Session-only, owner-gated. | [Export](https://docs.memory.anonalabs.com/guides/export.md) |
| `GET /v1/usage` · `GET /v1/usage/breakdown` | Organization usage, and a per-operation breakdown. | [Usage](https://docs.memory.anonalabs.com/api-reference/usage.md) |
| `GET /v1/billing` · `POST /v1/billing/upgrade` | Views the plan, and changes to a free tier. | [Billing](https://docs.memory.anonalabs.com/api-reference/billing.md) |
| `POST /v1/billing/checkout` · `POST /v1/billing/portal` · `POST /v1/billing/cancel` | Stripe checkout, billing portal, and cancellation. | [Billing](https://docs.memory.anonalabs.com/api-reference/billing.md) |

> **Try it out: list spaces and check usage**
>
> ```bash cURL theme={null}
> curl https://api.anonalabs.com/v1/spaces \
>   -H "Authorization: Bearer anona_live_YOUR_KEY"
>
> curl https://api.anonalabs.com/v1/usage/me \
>   -H "Authorization: Bearer anona_live_YOUR_KEY"
> ```
>
> ```python Python theme={null}
> from anona import AnonaClient
>
> client = AnonaClient(api_key="anona_live_YOUR_KEY")
>
> spaces = client.list_spaces()
> usage = client.get_usage()
> ```
>
> ```typescript TypeScript theme={null}
> import { Anona } from "@anona-labs/memory";
>
> const anona = new Anona({ apiKey: "anona_live_YOUR_KEY" });
>
> const spaces = await anona.listSpaces();
> const usage = await anona.getUsage();
> ```
>
> See [Spaces](https://docs.memory.anonalabs.com/api-reference/spaces.md) and [Usage](https://docs.memory.anonalabs.com/api-reference/usage.md) for the full request and response shapes.

> [!NOTE]
>
> Account sign-in (`/auth/...`) and MCP OAuth (`/oauth/...`) are browser flows used by the
> dashboard and by MCP clients. See [Authentication](https://docs.memory.anonalabs.com/api-reference/authentication.md) and
> [MCP](https://docs.memory.anonalabs.com/mcp-integration.md) rather than calling them directly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.