Skip to main content
POST
/
memories
/
add
/
bulk
JavaScript
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
}

Authorizations

Authorization
string
header
required

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.

Body

application/json

Request schema for bulk memory ingestion.

items
IngestRequest · object[]
required

List of memories to ingest. Maximum 100 items.

Required array length: 1 - 100 elements

Response

Successful Response

Response schema for successful bulk ingestion.

count
integer
required

Number of items successfully processed

items
DocumentStatusResponse · object[]
required

Status of each ingested item

success
boolean
default:true