mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-12 03:48:08 +00:00
Some checks failed
Publish Agent Framework Python / publish (push) Has been cancelled
Publish AI SDK / publish (push) Has been cancelled
Publish Cartesia SDK Python / publish (push) Has been cancelled
Publish OpenAI SDK Python / publish (push) Has been cancelled
Publish Pipecat SDK Python / publish (push) Has been cancelled
Publish Tools / publish (push) Has been cancelled
New shared snippet with the npx supermemory@latest migrate command, placed on the tools 3.0 guide, the four integration pages, the API reference overview and namespaces page, the ten migration sub pages, and the agents page. The migration guide keeps the command first and folds the paste-in prompt into an accordion; the --prompt variant is gone from the examples.
48 lines
1.6 KiB
Text
48 lines
1.6 KiB
Text
---
|
|
title: "API reference"
|
|
sidebarTitle: "Overview"
|
|
description: "Documents, search, profiles, lists, memories, namespaces, and organization settings in the latest Supermemory API"
|
|
icon: "/icons/hugeicons/plug-socket.svg"
|
|
---
|
|
|
|
import MigrateCli from "/snippets/migrate-cli.mdx";
|
|
|
|
v5 makes namespace scope explicit in the URL and consolidates overlapping legacy operations.
|
|
|
|
```text
|
|
https://api.supermemory.ai
|
|
/ns/{namespace}/document
|
|
/ns/{namespace}/search
|
|
/ns/{namespace}/profile
|
|
/ns/{namespace}/list/{type}
|
|
/ns/{namespace}/memories
|
|
/namespaces
|
|
/organization
|
|
```
|
|
|
|
<MigrateCli legacy="v3 or v4" guideHref="/migration/api-v5" guideLabel="v5 migration guide" />
|
|
|
|
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
|
|
npm i supermemory
|
|
```
|
|
|
|
```ts
|
|
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>
|