Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | --- |
| 2 | title: "Binary Data Support for Proxy Execute" |
| 3 | description: "Proxy execute endpoint now supports binary data for file uploads and downloads" |
| 4 | date: "2025-12-30" |
| 5 | --- |
| 6 | |
| 7 | The `/api/v3/tools/execute/proxy` endpoint now supports binary data for both file uploads and downloads. |
| 8 | |
| 9 | ### File Uploads (`binary_body`) |
| 10 | |
| 11 | To upload a file via the proxy, use the `binary_body` field in your request payload. This supports two approaches: specifying either a URL pointing to the file or providing the base64-encoded content directly. |
| 12 | |
| 13 | #### Upload File via URL |
| 14 | |
| 15 | ```bash |
| 16 | curl --location 'https://backend.composio.dev/api/v3/tools/execute/proxy' \ |
| 17 | --header 'accept: application/json' \ |
| 18 | --header 'x-api-key: <YOUR_API_KEY>' \ |
| 19 | --header 'Content-Type: application/json' \ |
| 20 | --data '{ |
| 21 | "endpoint": "/upload-endpoint", |
| 22 | "method": "POST", |
| 23 | "connected_account_id": "<CONNECTED_ACCOUNT_ID>", |
| 24 | "binary_body": { |
| 25 | "url": "{URL_TO_THE_FILE}" |
| 26 | } |
| 27 | }' |
| 28 | ``` |
| 29 | |
| 30 | #### Upload File via Base64 Content |
| 31 | |
| 32 | Supported up to 4MB file size. |
| 33 | |
| 34 | ```bash |
| 35 | curl --location 'https://backend.composio.dev/api/v3/tools/execute/proxy' \ |
| 36 | --header 'accept: application/json' \ |
| 37 | --header 'x-api-key: <YOUR_API_KEY>' \ |
| 38 | --header 'Content-Type: application/json' \ |
| 39 | --data '{ |
| 40 | "endpoint": "/upload-endpoint", |
| 41 | "method": "POST", |
| 42 | "connected_account_id": "<CONNECTED_ACCOUNT_ID>", |
| 43 | "binary_body": { |
| 44 | "base64": "JVBERi0xLjQKJ...<base64_data>...", |
| 45 | "content_type": "application/pdf" |
| 46 | } |
| 47 | }' |
| 48 | ``` |
| 49 | |
| 50 | ### File Downloads (`binary_data`) |
| 51 | |
| 52 | When the proxied request returns a binary response (for example, a PDF or image), the proxy automatically uploads the file to temporary storage, and you receive a signed URL in the `binary_data` field. This enables you to download large files securely. |
| 53 | |
| 54 | #### File Download Request |
| 55 | |
| 56 | ```bash |
| 57 | curl --location 'https://backend.composio.dev/api/v3/tools/execute/proxy' \ |
| 58 | --header 'accept: application/json' \ |
| 59 | --header 'x-api-key: <YOUR_API_KEY>' \ |
| 60 | --header 'Content-Type: application/json' \ |
| 61 | --data '{ |
| 62 | "endpoint": "{YOUR_ENDPOINT}", |
| 63 | "method": "GET", |
| 64 | "connected_account_id": "{YOUR_CONNECTED_ACCOUNT_ID}" |
| 65 | }' |
| 66 | ``` |
| 67 | |
| 68 | #### File Download Response |
| 69 | |
| 70 | ```json |
| 71 | { |
| 72 | "data": {}, |
| 73 | "binary_data": { |
| 74 | "url": "url to the file", |
| 75 | "content_type": "content type of the file", |
| 76 | "size": "size of the file", |
| 77 | "expires_at": "expires at of the file" |
| 78 | }, |
| 79 | "status": "status code of the response", |
| 80 | "headers": "headers of the response" |
| 81 | } |
| 82 | ``` |
| 83 | |
| 84 | ### Summary |
| 85 | |
| 86 | | Feature | Field | Description | |
| 87 | |---------|-------|-------------| |
| 88 | | File Upload via URL | `binary_body.url` | Provide a URL pointing to the file to upload | |
| 89 | | File Upload via Base64 | `binary_body.base64` + `binary_body.content_type` | Provide base64-encoded content (up to 4MB) | |
| 90 | | File Download | `binary_data` in response | Receive a signed URL to download binary responses | |
| 91 | |
| 92 | We'd love your feedback on the new proxy execute capabilities. If anything feels unclear or you have suggestions for improvement, please reach out. |