Add any type of content to Supermemory - text, files, URLs, images, videos, and more. Everything is automatically processed into searchable memories that form part of your intelligent knowledge graph.

Quick Start

// Add text content
const result = await client.memories.add({
  content: "Machine learning enables computers to learn from data",
  containerTag: "ai-research",
  metadata: { priority: "high" }
});

console.log(result);
// Output: { id: "abc123", status: "queued" }

Key Concepts

New to Supermemory? Read How Supermemory Works to understand the knowledge graph architecture and the distinction between documents and memories.

Quick Overview

  • Documents: Raw content you upload (PDFs, URLs, text)
  • Memories: Searchable chunks created automatically with relationships
  • Container Tags: Group related content for better context
  • Metadata: Additional information for filtering

Content Sources

Add content through three methods:
  1. Direct Text: Send text content directly via API
  2. File Upload: Upload PDFs, images, videos for extraction
  3. URL Processing: Automatic extraction from web pages and platforms

Endpoints

Remember, these endpoints add documents. Memories are inferred by Supermemory.

Add Content

POST /v3/documents Add text content, URLs, or any supported format.
await client.memories.add({
  content: "Your content here",
  containerTag: "project"
});

Upload File

POST /v3/documents/file Upload files directly for processing.
await client.memories.uploadFile({
  file: fileStream,
  containerTag: "project"
});

Update Memory

PATCH /v3/documents/{id} Update existing document content.
await client.memories.update("doc_id", {
  content: "Updated content"
});

Supported Content Types

Documents

  • PDF with OCR support
  • Google Docs, Sheets, Slides
  • Notion pages
  • Microsoft Office files

Media

  • Images (JPG, PNG, GIF, WebP) with OCR

Web Content

  • Twitter/X posts
  • YouTube videos with captions

Text Formats

  • Plain text
  • Markdown
  • CSV files
Refer to the connectors guide to learn how you can connect Google Drive, Notion, and OneDrive and sync files in real-time.

Response Format

{
  "id": "D2Ar7Vo7ub83w3PRPZcaP1",
  "status": "queued"
}
  • id: Unique document identifier
  • status: Processing state (queued, processing, done)

Next Steps