Try our new Claude Code Skill to automatically integrate Hyperspell into your project
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
const memory = await client.memories.get('resource_id', { source: 'reddit' });
console.log(memory.resource_id);{
"source": "reddit",
"resource_id": "<string>",
"type": "<string>",
"title": "<string>",
"metadata": {
"created_at": "2023-11-07T05:31:56Z",
"indexed_at": "2023-11-07T05:31:56Z",
"last_modified": "2023-11-07T05:31:56Z",
"status": "pending",
"events": [
{
"message": "<string>",
"type": "error",
"time": "2023-11-07T05:31:56Z"
}
],
"url": "<string>"
},
"data": [
"<unknown>"
],
"memories": [
"<string>"
]
}Retrieves a document by provider and resource_id.
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
const memory = await client.memories.get('resource_id', { source: 'reddit' });
console.log(memory.resource_id);{
"source": "reddit",
"resource_id": "<string>",
"type": "<string>",
"title": "<string>",
"metadata": {
"created_at": "2023-11-07T05:31:56Z",
"indexed_at": "2023-11-07T05:31:56Z",
"last_modified": "2023-11-07T05:31:56Z",
"status": "pending",
"events": [
{
"message": "<string>",
"type": "error",
"time": "2023-11-07T05:31:56Z"
}
],
"url": "<string>"
},
"data": [
"<unknown>"
],
"memories": [
"<string>"
]
}API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.
reddit, notion, slack, google_calendar, google_mail, box, dropbox, google_drive, github, vault, web_crawler, trace Successful Response
Response model for the GET /memories/get endpoint.
reddit, notion, slack, google_calendar, google_mail, box, dropbox, google_drive, github, vault, web_crawler, trace The type of document (e.g. Document, Website, Email)
Show child attributes
The structured content of the document
Summaries of all memories extracted from this document
Was this page helpful?