blob: 7b3c37d30bc476982a67fd8e5945c65551176cf4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
---
title: "Getting Started"
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))
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

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>
## Base URL
All API requests should be made to:
```
https://api.supermemory.ai/v1
```
## Add your first memory
```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."}'
```
This will add a new memory to your Supermemory account.
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 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "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.
|