Ingestion API | OpenMemory
API reference for ingesting documents and URLs into OpenMemory.
Ingestion API
[!NOTE] This reference is for the Backend Server API. For Standalone Mode, use
ingest(mem, path).
Ingest text, PDFs, or web pages into memory.
Endpoint
POST /ingest
Request Body
interface IngestRequest {
text?: string;
file?: File; // Multipart upload
url?: string;
metadata?: Record<string, any>;
}
Example: Ingest URL
curl -X POST http://localhost:8080/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_api_key" \
-d '{
"url": "https://example.com/article",
"metadata": { "source": "web" }
}'
Example: Ingest File
curl -X POST http://localhost:8080/ingest \
-H "Authorization: Bearer your_api_key" \
-F "file=@./document.pdf"