diff options
| author | Dhravya Shah <[email protected]> | 2025-03-23 20:18:37 -0700 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2025-03-23 20:18:37 -0700 |
| commit | f8dfb87604583a21840eaca2dd5542d77f5a8463 (patch) | |
| tree | 92502017e6661584e7692c2ad84d587c32136961 /apps/docs | |
| parent | Merge branch 'main' of github.com:supermemoryai/supermemory (diff) | |
| download | supermemory-f8dfb87604583a21840eaca2dd5542d77f5a8463.tar.xz supermemory-f8dfb87604583a21840eaca2dd5542d77f5a8463.zip | |
Documentation edits made through Mintlify web editor
Diffstat (limited to 'apps/docs')
| -rw-r--r-- | apps/docs/api-reference/endpoints/add-new-content.mdx | 2 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/create-space.mdx | 3 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/get-current-user.mdx | 2 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/get-user-spaces.mdx | 3 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/import-notion-content.mdx | 3 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/list-memories.mdx | 3 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/list-spaces.mdx | 3 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/search-content.mdx | 2 | ||||
| -rw-r--r-- | apps/docs/api-reference/endpoints/search-fast.mdx | 3 | ||||
| -rw-r--r-- | apps/docs/changelog/overview.mdx | 2 | ||||
| -rw-r--r-- | apps/docs/essentials/architecture.mdx | 59 | ||||
| -rw-r--r-- | apps/docs/essentials/distinguishing-users.mdx | 86 | ||||
| -rw-r--r-- | apps/docs/essentials/metadata-filtering.mdx | 78 | ||||
| -rw-r--r-- | apps/docs/image.png | bin | 0 -> 79915 bytes | |||
| -rw-r--r-- | apps/docs/introduction.mdx | 87 | ||||
| -rw-r--r-- | apps/docs/openapi.json | 501 | ||||
| -rw-r--r-- | apps/docs/quickstart.mdx | 42 |
17 files changed, 128 insertions, 751 deletions
diff --git a/apps/docs/api-reference/endpoints/add-new-content.mdx b/apps/docs/api-reference/endpoints/add-new-content.mdx index 6bee3091..5ffab854 100644 --- a/apps/docs/api-reference/endpoints/add-new-content.mdx +++ b/apps/docs/api-reference/endpoints/add-new-content.mdx @@ -1,3 +1,3 @@ --- -openapi: post /v1/add +openapi: post /add ---
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/create-space.mdx b/apps/docs/api-reference/endpoints/create-space.mdx deleted file mode 100644 index 775d8786..00000000 --- a/apps/docs/api-reference/endpoints/create-space.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /spaces/create ----
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/get-current-user.mdx b/apps/docs/api-reference/endpoints/get-current-user.mdx index fe057b1a..8de39072 100644 --- a/apps/docs/api-reference/endpoints/get-current-user.mdx +++ b/apps/docs/api-reference/endpoints/get-current-user.mdx @@ -1,3 +1,3 @@ --- -openapi: get /user +openapi: get /session ---
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/get-user-spaces.mdx b/apps/docs/api-reference/endpoints/get-user-spaces.mdx deleted file mode 100644 index 8b91a1e0..00000000 --- a/apps/docs/api-reference/endpoints/get-user-spaces.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /v1/user/spaces ----
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/import-notion-content.mdx b/apps/docs/api-reference/endpoints/import-notion-content.mdx deleted file mode 100644 index 14ba2ba6..00000000 --- a/apps/docs/api-reference/endpoints/import-notion-content.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /v1/integrations/notion/import ----
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/list-memories.mdx b/apps/docs/api-reference/endpoints/list-memories.mdx deleted file mode 100644 index 82f2cdf7..00000000 --- a/apps/docs/api-reference/endpoints/list-memories.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /memories ----
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/list-spaces.mdx b/apps/docs/api-reference/endpoints/list-spaces.mdx deleted file mode 100644 index 23f1cee9..00000000 --- a/apps/docs/api-reference/endpoints/list-spaces.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /spaces ----
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/search-content.mdx b/apps/docs/api-reference/endpoints/search-content.mdx index 03788e9c..ea2f8389 100644 --- a/apps/docs/api-reference/endpoints/search-content.mdx +++ b/apps/docs/api-reference/endpoints/search-content.mdx @@ -1,3 +1,3 @@ --- -openapi: post /v1/search +openapi: post /search ---
\ No newline at end of file diff --git a/apps/docs/api-reference/endpoints/search-fast.mdx b/apps/docs/api-reference/endpoints/search-fast.mdx new file mode 100644 index 00000000..e4dd1947 --- /dev/null +++ b/apps/docs/api-reference/endpoints/search-fast.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /fastsearch +---
\ No newline at end of file diff --git a/apps/docs/changelog/overview.mdx b/apps/docs/changelog/overview.mdx index d7d818d9..d9cf59fe 100644 --- a/apps/docs/changelog/overview.mdx +++ b/apps/docs/changelog/overview.mdx @@ -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>
\ No newline at end of file diff --git a/apps/docs/essentials/architecture.mdx b/apps/docs/essentials/architecture.mdx deleted file mode 100644 index c23b74e2..00000000 --- a/apps/docs/essentials/architecture.mdx +++ /dev/null @@ -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. - - - -Supermemory has three main modules, managed by [turborepo](https://turbo.build): - -#### `apps/web`: The main web UI. - - - -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) diff --git a/apps/docs/essentials/distinguishing-users.mdx b/apps/docs/essentials/distinguishing-users.mdx deleted file mode 100644 index 28c7167f..00000000 --- a/apps/docs/essentials/distinguishing-users.mdx +++ /dev/null @@ -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`.
\ No newline at end of file diff --git a/apps/docs/essentials/metadata-filtering.mdx b/apps/docs/essentials/metadata-filtering.mdx new file mode 100644 index 00000000..3ac4e6a7 --- /dev/null +++ b/apps/docs/essentials/metadata-filtering.mdx @@ -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 + } + ] + } +}' +```
\ No newline at end of file diff --git a/apps/docs/image.png b/apps/docs/image.png Binary files differnew file mode 100644 index 00000000..a99caa14 --- /dev/null +++ b/apps/docs/image.png diff --git a/apps/docs/introduction.mdx b/apps/docs/introduction.mdx index 5ed2e1f4..84e6117b 100644 --- a/apps/docs/introduction.mdx +++ b/apps/docs/introduction.mdx @@ -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>
\ No newline at end of file diff --git a/apps/docs/openapi.json b/apps/docs/openapi.json index 1600761c..45d4402f 100644 --- a/apps/docs/openapi.json +++ b/apps/docs/openapi.json @@ -1,500 +1 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Supermemory API", - "version": "1.0", - "description": "API for Supermemory personal knowledge management system" - }, - "servers": [ - { - "url": "https://api.supermemory.ai/v1", - "description": "Supermemory Production API" - } - ], - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer" - } - }, - "schemas": { - "User": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "email": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "profilePictureUrl": { - "type": "string" - }, - "hasOnboarded": { - "type": "boolean" - } - } - }, - "Space": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "isPublic": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "permissions": { - "type": "object", - "properties": { - "canRead": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "isOwner": { - "type": "boolean" - } - } - } - } - }, - "Document": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "content": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } - } - } - }, - "paths": { - "/user": { - "get": { - "summary": "Get current user", - "security": [ - { - "bearerAuth": [] - } - ], - "responses": { - "200": { - "description": "User details", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/spaces": { - "get": { - "summary": "List spaces", - "security": [ - { - "bearerAuth": [] - } - ], - "responses": { - "200": { - "description": "List of spaces", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "spaces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Space" - } - } - } - } - } - } - } - } - } - }, - "/spaces/create": { - "post": { - "summary": "Create space", - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "spaceName": { - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "isPublic": { - "type": "boolean" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Space created" - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/spaces/addContent": { - "post": { - "summary": "Add content to space", - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "spaceId": { - "type": "string" - }, - "documentId": { - "type": "string" - } - }, - "required": ["spaceId", "documentId"] - } - } - } - }, - "responses": { - "200": { - "description": "Content added to space successfully" - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/memories": { - "get": { - "summary": "List memories", - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "name": "start", - "in": "query", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "name": "count", - "in": "query", - "schema": { - "type": "integer", - "default": 10 - } - }, - { - "name": "spaceId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "List of memories", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Document" - } - }, - "total": { - "type": "integer" - } - } - } - } - } - } - } - } - }, - "/chat": { - "post": { - "summary": "Chat with memory assistant", - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "type": "object" - } - }, - "threadId": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Chat response stream", - "content": { - "text/event-stream": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/v1/add": { - "post": { - "summary": "Add new content", - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "content": { - "type": "string", - "minLength": 1 - }, - "spaces": { - "type": "array", - "maxItems": 5, - "items": { - "type": "string" - } - }, - "prefetched": { - "type": "object", - "properties": { - "contentToVectorize": { - "type": "string" - }, - "contentToSave": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "description": { - "type": "string" - }, - "ogImage": { - "type": "string" - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Content added successfully" - }, - "400": { - "description": "Invalid request" - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/search": { - "post": { - "summary": "Search content", - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "minLength": 1 - }, - "limit": { - "type": "number", - "minimum": 1, - "maximum": 50, - "default": 10 - }, - "threshold": { - "type": "number", - "minimum": 0, - "maximum": 1, - "default": 0 - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Search results" - } - } - } - }, - "/user/spaces": { - "get": { - "summary": "Get user spaces", - "security": [ - { - "bearerAuth": [] - } - ], - "responses": { - "200": { - "description": "List of user spaces" - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/integrations/notion/import": { - "get": { - "summary": "Import Notion content", - "security": [ - { - "bearerAuth": [] - } - ], - "responses": { - "200": { - "description": "Stream of import progress", - "content": { - "text/event-stream": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "Unauthorized" - } - } - } - } - }, - "security": [ - { - "bearerAuth": [] - } - ] -}
\ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Supermemory API","description":"best memory api on 🌍","version":"2.0.0"},"servers":[{"url":"http://localhost:3000","description":"Local Server"},{"url":"https://v2.api.supermemory.ai","description":"Production Server"}],"paths":{"/add":{"post":{"responses":{"200":{"description":"Memory added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"postAdd","tags":["Memory Management"],"parameters":[],"description":"Add a new memory with content and metadata","request":{"body":{"description":"Memory content and metadata","content":{"application/json":{"schema":{}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"spaceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"}},"required":["content"]}}}}}},"/update/{id}":{"put":{"responses":{"200":{"description":"Memory updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"putUpdateById","tags":["Memory Management"],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"description":"Update an existing memory","request":{"params":{"description":"Memory ID","schema":{}},"body":{"description":"Updated memory content","content":{"application/json":{"schema":{}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"spaceIds":{"type":"array","items":{"type":"string"}}},"required":["content"]}}}}}},"/delete/{id}":{"delete":{"responses":{"200":{"description":"Memory deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"deleteDeleteById","tags":["Memory Management"],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"description":"Delete a memory","request":{"params":{"description":"Memory ID","schema":{}}}}},"/search":{"post":{"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"chunks":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"isRelevant":{"type":"boolean"}},"required":["content","isRelevant"]}},"score":{"type":"number"}},"required":["documentId","chunks","score"]}}},"required":["results"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"postSearch","tags":["Search"],"parameters":[],"description":"Search through documents with metadata filtering","request":{"body":{"description":"Search parameters","content":{"application/json":{"schema":{}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1},"limit":{"type":"integer","exclusiveMinimum":0,"default":10},"filters":{"anyOf":[{"type":"object","properties":{"OR":{"type":"array","items":{}},"AND":{"type":"array","items":{}}}},{"type":"object","additionalProperties":{}}]},"chunkSize":{"type":"integer","exclusiveMinimum":0,"default":3},"minScore":{"type":"number","minimum":0,"maximum":1,"default":0.5}},"required":["q"]}}}}}},"/fastsearch":{"get":{"responses":{"200":{"description":"Fast search results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"similarity":{"type":"number"}},"required":["id","content","similarity"]}}},"required":["results"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"getFastsearch","tags":["Search"],"parameters":[{"in":"query","name":"q","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"type":"string","pattern":"^\\d+$"},"required":false}],"description":"Fast, lossy search using quantized embeddings","request":{"query":{"description":"Search parameters","schema":{}}}}}},"components":{"schemas":{}}}
\ No newline at end of file diff --git a/apps/docs/quickstart.mdx b/apps/docs/quickstart.mdx index 7b3c37d3..87dc84ec 100644 --- a/apps/docs/quickstart.mdx +++ b/apps/docs/quickstart.mdx @@ -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. -  - - 2. Click on "Integrations" in the navigation menu - -  - - 3. You'll see your API key, you can copy it by clicking on the copy button - -  +  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.
\ No newline at end of file |