import Supermemory from 'supermemory';
const client = new Supermemory({
apiKey: 'My API Key',
});
const memory = await client.memories.get('id');
console.log(memory.id);
{
"connectionId": "conn_123",
"containerTags": [
"user_123",
"project_123"
],
"content": "This is a detailed article about machine learning concepts...",
"createdAt": "1970-01-01T00:00:00.000Z",
"customId": "mem_abc123",
"id": "acxV5LHMEsG2hMSNb4umbn",
"metadata": {
"category": "technology",
"isPublic": true,
"readingTime": 5,
"source": "web",
"tag_1": "ai",
"tag_2": "machine-learning"
},
"ogImage": "https://example.com/image.jpg",
"raw": "This is a detailed article about machine learning concepts...",
"source": "web",
"status": "done",
"summary": "A comprehensive guide to understanding the basics of machine learning and its applications.",
"title": "Introduction to Machine Learning",
"tokenCount": 1000,
"type": "text",
"updatedAt": "1970-01-01T00:00:00.000Z",
"url": "https://example.com/article"
}
Get a memory by ID
import Supermemory from 'supermemory';
const client = new Supermemory({
apiKey: 'My API Key',
});
const memory = await client.memories.get('id');
console.log(memory.id);
{
"connectionId": "conn_123",
"containerTags": [
"user_123",
"project_123"
],
"content": "This is a detailed article about machine learning concepts...",
"createdAt": "1970-01-01T00:00:00.000Z",
"customId": "mem_abc123",
"id": "acxV5LHMEsG2hMSNb4umbn",
"metadata": {
"category": "technology",
"isPublic": true,
"readingTime": 5,
"source": "web",
"tag_1": "ai",
"tag_2": "machine-learning"
},
"ogImage": "https://example.com/image.jpg",
"raw": "This is a detailed article about machine learning concepts...",
"source": "web",
"status": "done",
"summary": "A comprehensive guide to understanding the basics of machine learning and its applications.",
"title": "Introduction to Machine Learning",
"tokenCount": 1000,
"type": "text",
"updatedAt": "1970-01-01T00:00:00.000Z",
"url": "https://example.com/article"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successfully retrieved memory
Memory object
Was this page helpful?