client.add() for text and URLs, client.documents.uploadFile() for actual files. See Add Memories to learn how to ingest content via the API.
Text Content
Raw text, conversations, notes, or any string content.URLs & Web Pages
Send a URL and Supermemory fetches, extracts, and indexes the content.Documents
uploadFile, not add — pass a stream, not base64:
Microsoft Office
Word, Excel, and PowerPoint files upload the same way — Supermemory detects the type from the file itself:Google Workspace
Automatically handled via Google Drive connector:- Google Docs
- Google Sheets
- Google Slides
Code & Markdown
Both are plain text, so they go throughadd like any other string content — no file upload needed:
Images
fileType: "image" and mimeType are both required so Supermemory knows exactly how to process it:
Audio & Video
Video has a dedicatedfileType; audio is uploaded the same way and detected from the file itself:
Structured Data
JSON and CSV are text — stringify and send them throughadd(), no file upload needed.
JSON
CSV
File Upload
For any binary file, useuploadFile — it accepts a stream, not base64:
fs access? uploadFile also accepts a web File, a fetch Response, or the SDK’s toFile helper:
Auto-Detection
add() tells URLs and plain text apart on its own — no extra flag needed:
uploadFile detects type from the file itself in most cases. fileType only exists to force specific processing — and it’s required (along with mimeType) for images and video.
Content Limits
Typical processing time: text is near-instant; PDFs take 1-5s; images 2-10s; video 10s+; webpages 1-3s. Text content is chunked at the sentence level with a 2-sentence overlap between chunks.
Next Steps
Add Memories
Upload content via the API
Super RAG
How content is chunked and indexed