Upload documents to automatically extract and store memories from their content.
curl -X POST 'https://api.memsync.ai/integrations/files' \
-H 'X-API-Key: YOUR_API_KEY' \
-F 'file=@document.pdf' \
-F 'category=learning' \
-F 'extract_mode=comprehensive'
Request Parameters
Document file to process. Supported formats: PDF, DOCX, TXT, MD, HTML
Default category for extracted memories. One of: identity
, career
, interests
, relationships
, health
, finance
, learning
, travel
, productivity
, private
Extraction strategy. Options: comprehensive
, smart
, highlights
, summary
Maximum size of text chunks for processing (characters)
Overlap between chunks to maintain context
Whether to automatically categorize extracted memories
Additional metadata for the document
Source or origin of the document
Custom tags for the document
When the document was created
Response
Unique identifier for the file integration
Name of the uploaded file
Size of the uploaded file in bytes
Processing status: uploaded
, processing
, completed
, error
Statistics about the extraction processShow Extraction Statistics
Number of pages in the document
Total characters extracted
Number of text chunks created
Number of memories extracted
Categories detected in the content
List of extracted memories (if processing is complete)
Unique identifier for the extracted memory
Calculated importance score
Source page number in document
ISO 8601 timestamp when upload was initiated
ISO 8601 timestamp when processing completed
{
"integration_id": "file_int_456def",
"filename": "research_paper.pdf",
"file_size": 2458697,
"status": "completed",
"extraction_stats": {
"total_pages": 15,
"text_length": 45678,
"chunks_created": 23,
"memories_extracted": 12,
"categories_detected": ["learning", "career", "interests"]
},
"memories": [
{
"memory_id": "mem_789ghi",
"content": "The study demonstrates that machine learning algorithms can improve medical diagnosis accuracy by 23% when trained on diverse datasets.",
"category": "learning",
"importance": 0.87,
"page_number": 3
}
],
"created_at": "2024-01-15T16:30:00Z",
"completed_at": "2024-01-15T16:32:15Z"
}
Extracts memories from all significant text passages, creating detailed memories for each section.
Uses AI to identify the most important passages and concepts, creating focused memories.
Extracts only key insights, findings, and actionable information.
Creates a single comprehensive memory summarizing the entire document.
Supported File Types
- Text extraction from standard PDFs
- OCR for scanned documents
- Preserves page structure and formatting
- Full text extraction
- Maintains document structure
- Extracts embedded content
- Direct text processing
- Markdown formatting recognition
- Fast processing
- Content extraction from HTML
- Removes navigation and ads
- Focuses on main content
Error Responses
Invalid file or parameters{
"error": "Unsupported file type",
"code": "INVALID_FILE_TYPE",
"supported_types": ["pdf", "docx", "txt", "md", "html"]
}
File too large{
"error": "File size exceeds limit",
"code": "FILE_TOO_LARGE",
"max_size_mb": 50,
"file_size_mb": 75
}