apps/docs/memory-api/features/auto-multi-modal.mdx
supermemory is natively multi-modal, and can automatically detect the content type of the document you are adding.
We use the best of breed tools to extract content from URLs, and process it for optimal memory storage.
supermemory automatically detects the content type of the document you're adding. Simply pass your content to the API, and supermemory will handle the rest.
<Tabs> <Tab title="How It Works"> The content detection system analyzes: - URL patterns and domains - File extensions and MIME types - Content structure and metadata - Headers and response types </Tab> <Tab title="Best Practices"> <Accordion title="Content Type Best Practices" defaultOpen icon="sparkles"> 1. **Type Selection** - Use `note` for simple text - Use `webpage` for online content - Use native types when possible 2. **URL Content**
- Send clean URLs without tracking parameters
- Use article URLs, not homepage URLs
- Check URL accessibility before sending
</Accordion>
All you need to do is pass the content to the /documents endpoint:
curl https://api.supermemory.ai/v3/documents \
--request POST \
--header 'Authorization: Bearer SUPERMEMORY_API_KEY' \
-d '{"content": "https://example.com/article"}'
await client.add.create({
content: "https://example.com/article",
});
client.add.create(
content="https://example.com/article"
)
supermemory supports a wide range of content formats to ensure versatility in memory creation:
<Grid cols={2}> <Card title="Text Content" icon="document-text"> - `note`: Plain text notes and documents - Directly processes raw text content - Automatically chunks content for optimal retrieval - Preserves formatting and structure </Card> <Card title="Web Content" icon="globe"> - `webpage`: Web pages (just provide the URL) - Intelligently extracts main content - Preserves important metadata (title, description, images) - Extracts OpenGraph metadata when available- `tweet`: Twitter content
- Captures tweet text, media, and metadata
- Preserves thread structure if applicable
- `google_doc`: Google Documents
- Seamlessly integrates with Google Docs API
- Maintains document formatting and structure
- Auto-updates when source document changes
- `notion_doc`: Notion pages
- Extracts content while preserving Notion's block structure
- Handles rich text formatting and embedded content
- `video`: Video content
- Transcription and content extraction
- Key frame analysis
| Content Type | Max Size |
|---|---|
| Text/Note | 1MB |
| 10MB | |
| Image | 5MB |
| Video | 100MB |
| Web Page | N/A |
| Google Doc | N/A |
| Notion Page | N/A |
| Tweet | N/A |
| Content Type | Processing Time |
|---|---|
| Text/Note | Almost instant |
| 1-5 seconds | |
| Image | 2-10 seconds |
| Video | 10+ seconds |
| Web Page | 1-3 seconds |
| Google Doc | N/A |
| Notion Page | N/A |
| Tweet | N/A |