Documentation edits made through Mintlify web editor

This commit is contained in:
Dhravya Shah 2025-03-23 20:18:37 -07:00
parent 8931c43295
commit f8dfb87604
17 changed files with 128 additions and 751 deletions

View file

@ -1,3 +1,3 @@
---
openapi: post /v1/add
openapi: post /add
---

View file

@ -1,3 +0,0 @@
---
openapi: post /spaces/create
---

View file

@ -1,3 +1,3 @@
---
openapi: get /user
openapi: get /session
---

View file

@ -1,3 +0,0 @@
---
openapi: get /v1/user/spaces
---

View file

@ -1,3 +0,0 @@
---
openapi: get /v1/integrations/notion/import
---

View file

@ -1,3 +0,0 @@
---
openapi: get /memories
---

View file

@ -1,3 +0,0 @@
---
openapi: get /spaces
---

View file

@ -1,3 +1,3 @@
---
openapi: post /v1/search
openapi: post /search
---

View file

@ -0,0 +1,3 @@
---
openapi: post /fastsearch
---

View file

@ -9,4 +9,4 @@ mode: "center"
- All endpoints have been updated to `/v1` for better versioning
- Improved documentation and examples
- Interactive [API Playground](https://docs.supermemory.ai/api-reference)
</Update>
</Update>

View file

@ -1,59 +0,0 @@
---
title: "How Supermemory works"
description: "A short guide to how Supermemory works"
icon: "toolbox"
---
Supermemory is a hosted service. This means that you don't need to worry about the infrastructure.
but it's still good to know how it works.
![Diagram](https://camo.githubusercontent.com/d6049c13d165a803aa0c6cbee9fc64fd4feafdfe51aecf47fc93c2f18b58e55a/68747470733a2f2f692e6468722e7774662f722f436c6970626f6172645f4a616e5f32302c5f323032355f61745f332e3531e280af504d2e706e67)
Supermemory has three main modules, managed by [turborepo](https://turbo.build):
#### `apps/web`: The main web UI.
![image](https://camo.githubusercontent.com/5113555da016ca2621aac80b13d29dc0cd0aeaafc5296cf090ee1dd33264bf9b/68747470733a2f2f692e6468722e7774662f722f436c6970626f6172645f4a616e5f32302c5f323032355f61745f332e3139254532253830254146504d2e706e67)
Built with:
- [Remix](https://remix.run/)
- [Hono](https://hono.dev/)
- [authkit-remix-cloudflare by Supermemory](https://github.com/supermemory/authkit-remix-cloudflare)
- [Drizzle ORM](https://drizzle.team/)
- [TailwindCSS](https://tailwindcss.com)
- [shadcn-ui](https://ui.shadcn.com)
- And some other amazing open source projects like [Plate](https://platejs.org/) and [vaul](https://vaul.emilkowal.ski/)
- Hosted on [Cloudflare Pages](https://pages.cloudflare.com/)
#### `apps/extension`: Chrome extension
The [chrome extension](https://supermemory.ai/extension) is one of the most important part of the setup, but is not required.This is to easily add pages to your memory.
<img
width="290"
alt="image"
src="https://camo.githubusercontent.com/118b58b867eacccde8a316e6e791a1d095fc82d83489813b9d59549d673becf4/68747470733a2f2f692e6468722e7774662f722f436c6970626f6172645f4a616e5f32302c5f323032355f61745f342e3035e280af504d2e706e67"
/>
> please rate the extension to improve the rating 🙏.
Built with:
- [Extension JS](https://extension.js.org)
- [TailwindCSS](https://tailwindcss.com)
- [React](https://react.dev/)
#### `apps/backend`: This module handles the vector store and AI response generation
This is where the magic happens!
Built with:
- [Cloudflare Workers](https://workers.cloudflare.com/)
- [Postgres + Pgvector with Pgvectorscale](https://github.com/timescale/pgvectorscale)
- [Cloudflare Workflows](https://developers.cloudflare.com/queues/)
- [R2 Object storage](https://developers.cloudflare.com/r2/)
- [Markdowner by Supermemory](https://md.dhr.wtf)
- [Cloudflare KV](https://developers.cloudflare.com/kv)
- [mem0](https://app.mem0.ai)

View file

@ -1,86 +0,0 @@
---
title: "Managing Multi-User Search Results"
description: "Learn how to handle search results for different users in Supermemory"
icon: "users"
---
When building multi-user applications with Supermemory, you'll often need to manage data for different users accessing the same account. Here's everything you need to know about handling multi-user scenarios:
## What are Spaces?
Spaces are Supermemory's way of organizing and separating data for different users or groups. They help you:
- Keep each user's data separate and organized
- Group related content together
- Manage access control efficiently
- Scale your application to multiple users
## How to Use Spaces
**Creating Spaces**
- Spaces are automatically provisioned when you use the `spaces` parameter
- No separate setup or initialization needed
- Example API call:
```bash
curl -X POST https://api.supermemory.ai/v1/add \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "This is the content of my first memory.", "spaces": ["user1", "user2"]}'
```
## Manually Creating Spaces
You can also manually create spaces by using the `/spaces/create` endpoint.
```bash
curl -X POST https://api.supermemory.ai/v1/spaces/create \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spaceName": "user1", "isPublic": false}'
```
Creating a public space will make it globally accessible to all users. By default, spaces are private.
## Retrieving Spaces
You can retrieve all spaces for a user by using the `/spaces` endpoint.
```bash
curl -X GET https://api.supermemory.ai/v1/spaces/list \
-H "Authorization: Bearer YOUR_API_KEY"
```
## Moving a content to a Specific Space
You can move a memory to a specific space by using the `space/addContent` endpoint and specifying the space id and the document id.
```bash
curl -X POST https://api.supermemory.ai/v1/space/addContent \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spaceId": "123", "documentId": "456"}'
```
## Retrieving Content from a Specific Space
You can retrieve content from a specific space by using the `/memories` endpoint and specifying the space id.
```bash
curl -X GET https://api.supermemory.ai/v1/memories \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spaceId": "123"}'
```
This also means that you can augment multiple spaces together to create a more complex search.
```bash
curl -X GET https://api.supermemory.ai/v1/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spaces": ["person", "project", "team"], "query": "my query"}'
```
This will filter only for memories that are in all three spaces - `person`, `project`, and `team`.

View file

@ -0,0 +1,78 @@
---
title: "Managing Multi-User Search Results"
description: "Learn how to handle search results for different users in Supermemory"
icon: "users"
---
When building multi-user applications with Supermemory, you'll often need to manage data for different users accessing the same account.
You might also want filters, like memories from **_multiple users_**, or in a certain **_time range_**, or products within a certain price category.
You can do all this filtering using Supermemory's api.
Here's a quick example
```json [expandable]
{
"AND": [
{
"filterType": "numeric",
"key": "timestamp",
"value": "1742745777",
"negate": false,
"numericOperator": ">"
},
{
"key": "group",
"value": "jira_users",
"negate": false
},
{
"OR": [
{
"key": "team_name",
"value": "engineering",
"negate": false
},
{
"key": "org_name",
"value": "supermemory",
"negate": false
}
]
}
]
}
```
You can compose these conditions together to add filtering:
- `AND`
- `OR`
- `numeric` (greater than / less than)
Here's an example call:
```bash
curl --location 'https://v2.api.supermemory.ai/search' \
--header 'x-api-key: supermemory_RXPx' \
--header 'Content-Type: application/json' \
--data '{
"q": "How to use teamcity to set up a project?",
"limit": 10,
"filters": {
"AND": [
{
"key": "book",
"value": "maths",
"negate": false
},
{
"key": "author",
"value": "r.d. sharma",
"negate": false
}
]
}
}'
```

BIN
apps/docs/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -3,7 +3,7 @@ title: "Introduction"
description: "Supermemory is the Memory API for the AI era."
---
We built [Supermemory](https://supermemory.ai) and scaled the RAG system to 10,000,000+ documents and multiple thousands of users.
We built [Supermemory](https://supermemory.ai) and scaled the RAG system to 10,000,000\+ documents and multiple thousands of users.
We faced challenges. It turns out that building scalable, reliable, production-ready Memory layer is pretty hard.
Introducing the Supermemory API. An _affordable_, _easy-to-use_, and _production-ready_ Memory API for the AI era.
@ -13,15 +13,16 @@ Introducing the Supermemory API. An _affordable_, _easy-to-use_, and _production
src="/images/hero-light.svg"
alt="Hero Light"
/>
<img
className="hidden dark:block"
src="/images/hero-dark.svg"
alt="Hero Dark"
/>
Trusted by Open source [8.5k+ stars](https://git.new/memory), one of the fastest [growing projects in Q3 2024](https://runacap.com/ross-index/q3-2024/), Product of the day on [ProductHunt](https://www.producthunt.com/posts/supermemory).
Trusted by Open source [9k\+ stars](https://git.new/memory), one of the fastest [growing projects in Q3 2024](https://runacap.com/ross-index/q3-2024/), Product of the day on [ProductHunt](https://www.producthunt.com/posts/supermemory).
and thousands of you!
...and thousands of you\\!
## Why Supermemory?
@ -33,24 +34,24 @@ and thousands of you!
<Step title="Let's choose a vector database">
<Warning>
Found a vector database? good luck
- Oh no, it's way too expensive. Time to switch.
- Turns out it's painfully slow. Let's try another.
- Great, now it won't scale. Back to square one.
- The maintenance is a nightmare. Need something else.
</Warning>
</Step>
<Step title="Now for the embedding model">
<Note>
Which one to choose? Unless you have a PhD in AI, good luck figuring out:
- Which model fits your use case
- What are the performance tradeoffs
- How to keep up with new releases
</Note>
</Step>
<Step title="Time to build the memory layer">
<CardGroup cols={2}>
<CardGroup cols="2">
<Card title="Support multimodal">
- Websites: How do you handle JavaScript? What about rate limits?
- PDFs: OCR keeps failing, text extraction is inconsistent
@ -58,7 +59,7 @@ and thousands of you!
- Audio/Video: Transcription costs add up quickly
</Card>
<Card title="Handle everything">
- Multiple languages: Different models for each?
- Multiple languages: Different models for each?
- Various formats to parse: \
• Markdown: Tables break everything \
• HTML: Scripts and styles get in the way \
@ -78,45 +79,33 @@ And in the middle of all this, you're wondering...
If you are not a fan of reinventing the wheel, you can use Supermemory.
<CardGroup cols={2}>
<Card
title="Affordable & Easy to Use"
icon="circle-check"
className="text-emerald-600"
>
<CardGroup cols="2">
<Card title="Affordable & Easy to Use" icon="circle-check">
<div className="text-emerald-700 space-y-1">
- Start for free, scale as you grow - Simple API, deploy in minutes - No
- Start for free, scale as you grow - Simple API, deploy in minutes - No
complex setup or maintenance - Clear, predictable pricing
</div>
</Card>
<Card
title="Ready-made Connectors"
icon="circle-check"
className="text-emerald-600"
>
<Card title="Ready-made Connectors" icon="circle-check">
<div className="text-emerald-700 space-y-1">
- Notion, Google Drive, Slack integration - Web scraping and PDF
- Notion, Google Drive, Slack integration - Web scraping and PDF
processing - Email and calendar sync - Custom connector SDK
</div>
</Card>
<Card
title="Production Ready"
icon="circle-check"
className="text-emerald-600"
>
<Card title="Production Ready" icon="circle-check">
<div className="text-emerald-700 space-y-1">
- Enterprise-grade security - Sub-200ms latency at scale - Automatic
- Enterprise-grade security - Sub-200ms latency at scale - Automatic
failover and redundancy - 99.9% uptime guarantee
</div>
</Card>
<Card
title="Open Source & Trusted"
icon="circle-check"
className="text-emerald-600"
>
<Card title="Open Source & Trusted" icon="circle-check">
<div className="text-emerald-700 space-y-1">
- Open source core - Active community - Regular security audits -
- Open source core - Active community - Regular security audits -
Transparent development
</div>
</Card>
</CardGroup>
@ -127,24 +116,17 @@ Stop reinventing the wheel. Focus on building your product while we handle the m
What can you do with Supermemory?
<CardGroup cols={2}>
<Card
title="Chat with <X> app"
icon="message"
>
<CardGroup cols="2">
<Card title="Chat with <X> app" icon="message">
Quickly built chat apps like:
• Chat with your Twitter bookmarks \
• Interact with your PDF documents \
• Chat with your company documentation \
• Chat with your personal knowledge base
... and more!
... and more\\!
</Card>
<Card
title="Smart search in your apps"
icon="magnifying-glass"
>
<Card title="Smart search in your apps" icon="magnifying-glass">
Search things with AI:
• Product recommendations \
@ -152,12 +134,8 @@ What can you do with Supermemory?
• Document similarity matching \
• Content discovery systems \
• Research paper analysis
</Card>
<Card
title="Assistants and Agents"
icon="chart-line"
>
<Card title="Assistants and Agents" icon="chart-line">
Assistants and Agents:
• Email management \
@ -165,17 +143,14 @@ What can you do with Supermemory?
• Task prioritization \
• Calendar organization \
• Personal knowledge management
</Card>
<Card
title="Import tools and integrations"
icon="toolbox"
>
<Card title="Import tools and integrations" icon="toolbox">
You can contribute to supermemory by making community import tools. Examples:
• Notion \
• <a href="https://www.icloud.com/shortcuts/55f0695258cd46e4aad1aba8a2a7d14b">IOS shortcuts</a> \
• YOUR app / service
• IOS shortcuts
\
• YOUR app / service
</Card>
</CardGroup>
</CardGroup>

File diff suppressed because one or more lines are too long

View file

@ -5,26 +5,18 @@ description: "Start using Supermemory API in under 5 minutes"
To use the Supermemory API, you'll need:
1. An API key (get one by signing up at [supermemory.ai](https://supermemory.ai))
1. An API key (get one by signing up at https://dev.supermemory.ai )
2. Basic understanding of REST APIs
3. A tool to make HTTP requests (like curl, Postman, or your favorite programming language)
<AccordionGroup>
<Accordion icon="key" title="Getting Your API Key">
1. Login into [supermemory.ai](https://supermemory.ai) and click on the "Add Memory" button
<Accordion title="Getting Your API Key" icon="key">
1. Login into https://dev.supermemory.ai and create an organization
2. Create an api key, copy and save it securely.
![Login to Supermemory](/images/setup/1.png)
2. Click on "Integrations" in the navigation menu
![Navigate to Add Memory](/images/setup/2.png)
3. You'll see your API key, you can copy it by clicking on the copy button
![View API Key in Integrations](/images/setup/3.png)
![image.png](/apps/docs/image.png)
Keep your API key secure and never share it publicly. You'll need this key for authenticating all API requests.
</Accordion>
</AccordionGroup>
@ -33,14 +25,14 @@ To use the Supermemory API, you'll need:
All API requests should be made to:
```
https://api.supermemory.ai/v1
https://v2.api.supermemory.ai
```
## Add your first memory
```bash
curl -X POST https://api.supermemory.ai/v1/add \
-H "Authorization: Bearer YOUR_API_KEY" \
curl -X POST https://v2.api.supermemory.ai/add \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "This is the content of my first memory."}'
```
@ -52,24 +44,12 @@ Try it out in the [API Playground](/api-reference/endpoints/add-new-content)
## Search your memories
```bash
curl -X GET https://api.supermemory.ai/v1/search \
curl -X GET https://v2.api.supermemory.ai/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "This is the content of my first memory."}'
-d '{"q": "This is the content of my first memory."}'
```
Try it out in the [API Playground](/api-reference/endpoints/search-content)
## Get your memories
```bash
curl -X GET https://api.supermemory.ai/v1/memories \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
This will return a list of all your memories.
Try it out in the [API Playground](/api-reference/endpoints/list-memories)
That's it! You've now added your first memory and searched for it.
That's it\\! You've now added your first memory and searched for it.