Skip to main content

Overview

You can send files to your agent by including them as base64-encoded parts in the request.

File Part Structure

Fields

  • type - Always "file" for file uploads
  • name - Filename (e.g., "data.csv", "image.png")
  • mimeType - MIME type (e.g., "text/csv", "image/png", "application/pdf")
  • base64 - Base64-encoded file content

Complete Example

Encoding Files to Base64

With Python

With Bash

With JavaScript

Supported File Types

Your agent can receive any file type. Common examples:
  • Text files - .txt, .csv, .json, .md
  • Images - .png, .jpg, .gif, .webp
  • Documents - .pdf, .docx, .xlsx
  • Code files - .py, .js, .html, .css
The maximum file size depends on your deployment configuration and API limits.

Multiple Files

You can send multiple files in a single request:

Next Steps