Supported Formats
Attachments can be sent in the following ways:- Base64 encoded data: For files you have locally or want to upload directly
- Remote URLs: For files hosted on the web that the AI can access
Using URLs
Using Base64
Multiple Attachments
You can send multiple attachments in a single request:Attachment Object Structure
| Property | Type | Required | Description | 
|---|---|---|---|
| file | string | Yes | The file data as base64 string or URL | 
| mimeType | string | No | The MIME type of the file (e.g., “image/png”, “application/pdf”). Auto-detected, but helps the AI understand the file type. | 
Supported MIME Types
Common MIME types that work well with AI models:Images
- image/jpeg- JPEG images
- image/png- PNG images
- image/gif- GIF images
- image/webp- WebP images
- image/svg+xml- SVG images
Documents
- application/pdf- PDF documents
- text/plain- Plain text files
- text/markdown- Markdown files
- application/msword- Word documents
- application/vnd.openxmlformats-officedocument.wordprocessingml.document- Word documents (.docx)
Data
- application/json- JSON files
- text/csv- CSV files
- application/xml- XML files

