Skip to main content

Importing Data

The Ingestion feature lets you import existing documents and web pages directly into Memsolus. Submit a file or a URL, and Memsolus extracts the content, splits it into meaningful chunks, and stores each chunk as an individual memory — ready to search immediately after processing.

Ingestion requires the ingest.write permission on your API key and the Ingest feature enabled on your plan.


Supported Formats

FormatMax file size
PDF20 MB
DOCX20 MB
CSV10 MB
Markdown5 MB
JSON5 MB
Plain text (TXT)5 MB
HTML5 MB
URL (web page)

How to Ingest a File

1

Submit the file

Use a multipart/form-data POST request to submit your file along with the target user and optional categories.

curl -X POST https://api.memsolus.com/v1/memories/ingest \
-H "X-Api-Key: msk_live_..." \
-F "format=PDF" \
-F "workspace_id=ws-uuid-here" \
-F "user_id=user-123" \
-F "categories=finance,reports" \
-F "file=@/path/to/document.pdf"

You receive a job ID in the response:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"format": "PDF",
"status": "PENDING",
"user_id": "user-123",
"categories": ["finance", "reports"],
"memories_created": null,
"created_at": "2026-01-15T10:30:00.000Z"
}
2

Poll for completion

The job is processed asynchronously. Poll the job status until it reaches COMPLETED or FAILED.

curl "https://api.memsolus.com/v1/ingest-jobs/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "X-Api-Key: msk_live_..."
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"format": "PDF",
"status": "COMPLETED",
"memories_created": 34,
"updated_at": "2026-01-15T10:32:00.000Z"
}
3

Search the ingested memories

Once status is COMPLETED, the created memories are searchable immediately.

curl -X POST https://api.memsolus.com/v1/memories/search \
-H "X-Api-Key: msk_live_..." \
-H "Content-Type: application/json" \
-d '{
"query": "quarterly revenue",
"user_id": "user-123",
"categories": ["finance"]
}'

How to Ingest a URL

Submit a public URL instead of a file. Memsolus fetches the page, extracts the text, and creates memories from the content.

curl -X POST https://api.memsolus.com/v1/memories/ingest \
-H "X-Api-Key: msk_live_..." \
-H "Content-Type: multipart/form-data" \
-F "format=URL" \
-F "workspace_id=ws-uuid-here" \
-F "user_id=user-123" \
-F "source_url=https://example.com/article"

Using the SDK

import { Memsolus } from '@memsolus/sdk';
import { readFileSync } from 'fs';

const client = new Memsolus({ apiKey: 'msk_live_...' });

const job = await client.ingest.create({
format: 'PDF',
workspaceId: 'ws-uuid-here',
userId: 'user-123',
file: readFileSync('/path/to/document.pdf'),
categories: ['finance', 'reports'],
});

// Poll until done
const result = await client.ingest.waitForCompletion(job.id);
console.log(`Created ${result.memoriesCreated} memories`);

Job Status

StatusWhat it means
PENDINGJob received, waiting to start
PROCESSINGExtracting and chunking content
COMPLETEDAll memories created and searchable
FAILEDCould not process the file — check the error field for details

A typical 20-page PDF completes in under 30 seconds.


Limits and Notes

  • All memories created by an ingest job share the same user_id and categories you specify
  • If the file is password-protected, encrypted, or corrupt, the job fails with a descriptive error message