Send files and images as attachments with your requests.
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. |
image/jpeg
- JPEG imagesimage/png
- PNG imagesimage/gif
- GIF imagesimage/webp
- WebP imagesimage/svg+xml
- SVG imagesapplication/pdf
- PDF documentstext/plain
- Plain text filestext/markdown
- Markdown filesapplication/msword
- Word documentsapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
- Word documents (.docx)application/json
- JSON filestext/csv
- CSV filesapplication/xml
- XML files