File Attachments
Send documents, PDFs, and files to LLMs for analysis and processing.Overview
Eden AI V3 LLM endpoints support file attachments, enabling you to:- Analyze PDF documents
- Process text files
- Extract data from structured documents
- Summarize reports and papers
- Answer questions about document content
Supported File Formats
| Format | Extension | OpenAI | Anthropic | Use Cases | |
|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | Reports, invoices, contracts | ||
| Text | .txt | ✓ | ✓ | ✓ | Logs, code, plain text |
| Word | .docx | ✓ | ✓ | ✓ | Documents, reports |
| Rich Text | .rtf | - | ✓ | - | Formatted documents |
File Input Methods
V3 provides three ways to send files to LLMs:1. File Upload (Recommended)
Upload files once, reference multiple times:2. File URL
Use publicly accessible file URLs:3. Base64 File Data
Encode files directly in the request:Common Use Cases
Document Summarization
Extract key points from long documents:Question Answering on Documents
Ask specific questions about document content:Data Extraction
Extract structured data from documents:Contract Analysis
Review legal documents and contracts:Code Review
Analyze code files and provide feedback:Provider Capabilities
OpenAI (GPT-4o, GPT-4-turbo)
Strengths:- Fast document processing
- Good for structured extraction
- Reliable with common formats
- Strong multi-page PDF handling
- Max file size: 512 MB
- Best for text-heavy documents
Anthropic (Claude 3 Family)
Strengths:- Excellent reasoning about documents
- Superior for complex analysis
- Great for legal/technical documents
- Detailed, thoughtful responses
- Max file size: 10 MB (per file)
- Slightly slower than OpenAI
Google (Gemini 1.5)
Strengths:- Massive context window (2GB+ files)
- Best for very large documents
- Fast processing (Flash variant)
- Multi-document analysis
- May be less detailed on complex reasoning
File Management Best Practices
Upload Once, Use Multiple Times
Files uploaded to/v3/upload persist for 7 days:
File Size Optimization
For large files, consider preprocessing:Handling Expiration
Track and refresh expired files:Advanced Patterns
Multi-Document Analysis
Analyze multiple documents together:Conversational Document Analysis
Build multi-turn conversations about documents:Error Handling
Common File Errors
File too large:Robust Error Handling
Next Steps
- Working with Media Files - Complete media guide
- Vision Capabilities - Image analysis
- Upload Files - File management
- Chat Completions - Core LLM features
- Streaming Responses - Handle SSE streams