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 response = await client.memories.addBulk({ items: [{ text: '...' }] });
console.log(response.count);{
"count": 123,
"items": [
{
"source": "collections",
"resource_id": "<string>",
"status": "pending"
}
],
"success": true
}Adds multiple documents to the index in a single request.
All items are validated before any database operations occur. If any item fails validation, the entire batch is rejected with a 422 error detailing which items failed and why.
Maximum 100 items per request. Each item follows the same schema as the single-item /memories/add endpoint.
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
const response = await client.memories.addBulk({ items: [{ text: '...' }] });
console.log(response.count);{
"count": 123,
"items": [
{
"source": "collections",
"resource_id": "<string>",
"status": "pending"
}
],
"success": true
}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.
Request schema for bulk memory ingestion.
List of memories to ingest. Maximum 100 items.
1 - 100 elementsShow child attributes
Was this page helpful?