Authorizations
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.
Try our new Claude Code Skill to automatically integrate Hyperspell into your project
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const vaultListResponse of client.vaults.list()) {
console.log(vaultListResponse.collection);
}{
"items": [
{
"collection": "<string>",
"document_count": 123
}
],
"next_cursor": "<string>"
}This endpoint lists all collections, and how many documents are in each collection.
All documents that do not have a collection assigned are in the null collection.
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const vaultListResponse of client.vaults.list()) {
console.log(vaultListResponse.collection);
}{
"items": [
{
"collection": "<string>",
"document_count": 123
}
],
"next_cursor": "<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.
Was this page helpful?