File Handling & Uploads
Savant supports multiple ways to work with files — from inline attachments in messages to the server-side file storage API for large-file multimodal processing.File Upload Methods
| Method | Best For | Max Size | How It Works |
|---|---|---|---|
| Inline text | Small text files (< 100KB) | ~100KB | Sent as text in the message body |
| Inline base64 | Small binary files (< 20MB) | ~20MB | Base64-encoded in the message body |
| File storage API | Large files (up to 2GB) | 2GB | Uploaded to model provider, referenced by URI |
| Artifact upload | Session-scoped storage | 20MB | Stored in-memory, accessible via tools |
Inline File Attachments
Send files directly as A2ADataPart content in your POST /send message, or via the REST API:
Text Files
Binary Files (Base64)
File Storage API
For large files or when you want native multimodal processing:Step 1: Upload the File
Via API:Step 2: Reference in a Message
Artifact Uploads
Artifacts are session-scoped file storage. Agents can access artifacts using theread_artifact tool.
Upload
Response
Supported Artifact Types
| Category | MIME Types |
|---|---|
| Images | image/jpeg, image/png, image/gif, image/webp |
| Documents | application/pdf |
| Data | text/plain, text/csv, application/json |
How Files Reach the Agent
When files are included in a message, they become Content Parts in the agent conversation:| Attachment Type | Part Type |
|---|---|
| Text content | text part (with filename header) |
| Base64 data | inlineData part (native multimodal) |
| File storage URI | fileData part (fastest, no tool calls needed) |
| Artifact ref | text part (agent uses read_artifact tool to access) |
