Quick Start
- TypeScript
- Python
- cURL
Updating Content
UsecustomId to update existing documents or conversations. When you send content with the same customId, Supermemory intelligently processes only what’s new.
Two ways to update:
Option 1: Send only the new contentReplace entire document
To completely replace a document’s content (not append), usememories.update():
Formatting conversations
Format your conversations however you want. Supermemory handles any string format:Upload Files
Upload PDFs, images, and documents directly.- TypeScript
- Python
- cURL
Supported File Types
| Type | Formats | Processing |
|---|---|---|
| Documents | PDF, DOC, DOCX, TXT, MD | Text extraction, OCR for scans |
| Images | JPG, PNG, GIF, WebP | OCR text extraction |
| Spreadsheets | CSV, Google Sheets | Structured data extraction |
| Videos | YouTube URLs, MP4 | Auto-transcription |
Parameters
| Parameter | Type | Description |
|---|---|---|
content | string | Required. Any raw content — text, conversations, URLs, HTML |
customId | string | Recommended. Your ID for the content (conversation ID, doc ID). Enables updates and deduplication |
containerTag | string | Group by user/project. Required for user profiles |
metadata | object | Key-value pairs for filtering (strings, numbers, booleans) |
filterByMetadata | object | Filter which existing memories are used as context during ingestion. See Filtered Writes |
entityContext | string | Context for memory extraction on this container tag. Max 1500 chars. See Customization |
dreaming | "dynamic" | "instant" | Processing mode. Default "dynamic". "instant" processes each document on its own and bills one extra operation. See Processing Modes |
Parameter Details & Examples
Parameter Details & Examples
Content Types:Container Tags:Custom IDs (Recommended):Metadata:
- No nested objects or arrays
- Values: string, number, or boolean only
- Max 1500 characters
- Persists on the container tag
- Combines with org-level filter prompts
Processing Modes
Thedreaming parameter controls how Supermemory turns a document into memories.
"dynamic"(default) — groups related documents together so memories form from coherent, logical units rather than one isolated entry at a time."instant"— processes each document on its own right away, and bills one extra operation per document.
Filtered Writes
By default, when you add content, Supermemory uses all existing memories in the space as context for generating new memories. With filtered writes, you can scope this context to only memories from documents matching specific metadata. This is useful when you have many documents in a space but want new memories to build on top of a specific subset — for example, only memories from a particular source, category, or user.The metadata itself is still written to the document, but the memories will only be built on top of what’s already there matching the filter.
- TypeScript
- Python
- cURL
How it works
WhenfilterByMetadata is provided:
- Profile memories (static context) are filtered to only those from documents matching the metadata
- Similar memories used as context during ingestion are filtered the same way
- The new document’s own metadata is written normally — the filter only affects which existing memories are used as context
filterByMetadata parameter
| Key | Type | Description |
|---|---|---|
filterByMetadata | Record<string, string | number | boolean | string[]> | Key-value pairs to filter existing memories by their source document metadata |
- Scalar values (string, number, boolean) match exactly
- Array values match if any value in the array matches (OR logic)
- Multiple keys are combined with AND logic
Processing Pipeline
When you add content, Supermemory:- Validates your request
- Stores the document and queues for processing
- Extracts content (OCR, transcription, web scraping)
- Chunks into searchable memories
- Embeds for vector search
- Indexes for retrieval
GET /v3/documents/{id}:
Batch Upload
Batch Upload
Process multiple documents with rate limiting:Tips:
- Batch size: 3-5 documents at once
- Delay: 1-2 seconds between requests
- Use
customIdto track and deduplicate
Error Handling
Error Handling
| Status | Error | Cause |
|---|---|---|
| 400 | BadRequestError | Missing required fields, invalid parameters |
| 401 | AuthenticationError | Invalid or missing API key |
| 403 | PermissionDeniedError | Insufficient permissions |
| 429 | RateLimitError | Too many requests or quota exceeded |
| 500 | InternalServerError | Processing failure |
Delete Content
Delete Content
Single delete:Bulk delete by IDs:Bulk delete by container tag:Deletes are permanent — no recovery.
Next Steps
- Search Memories — Query your content
- User Profiles — Get user context
- Organizing & Filtering — Container tags and metadata