> ## Documentation Index
> Fetch the complete documentation index at: https://supermemory-mtd-v5-docs-sdk-shape.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> Documents, search, profiles, lists, memories, namespaces, and organization settings in the latest Supermemory API

v5 makes namespace scope explicit in the URL and consolidates overlapping legacy operations.

```text theme={null}
https://api.supermemory.ai
  /ns/{namespace}/document
  /ns/{namespace}/search
  /ns/{namespace}/profile
  /ns/{namespace}/list/{type}
  /ns/{namespace}/memories
  /namespaces
  /organization
```

Use the [v5 reference](https://api.supermemory.ai/v5/reference) for the stable v5 API. [`/reference`](https://api.supermemory.ai/reference) always points to the latest public version.

## Install the TypeScript SDK

```bash theme={null}
npm i supermemory
```

```ts theme={null}
import { Supermemory } from "supermemory"

const supermemory = new Supermemory({ apiKey: process.env.SUPERMEMORY_API_KEY })
```

Every SDK call takes one object. `namespace`, path IDs, and query parameters are top-level keys; the JSON body goes under `body`. Each reference page below shows the SDK call next to the equivalent `curl`. There is no v5 Python SDK yet.

<CardGroup cols={2}>
  <Card title="Migrate to v5" icon="arrow-up-right" href="/migration/api-v5">
    Translate every v3/v4 request and response deterministically.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Authenticate with the same bearer API keys used by legacy endpoints.
  </Card>
</CardGroup>


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