Files and images
Send images and documents with your messages: uploaded first, by URL, or inline as base64.
Base URLhttps://api.kalle.build/v1AuthBearer kalle_sk_…VersionKalle-Version: 2026-11-01
Upload a file
Upload once and refer to the file by its ID in as many messages as you like. Files are stored until you delete them and are only visible to your workspace. GET /files/{id} returns the details again.
| Type | Formats | Max size |
|---|---|---|
| Images | JPEG, PNG, WebP, GIF | 10 MB |
| Documents | PDF, plain text, Markdown, CSV | 32 MB |
POST/v1/files
curl https://api.kalle.build/v1/files \
-H "Authorization: Bearer $KALLE_API_KEY" \
-H "Kalle-Version: 2026-11-01" \
-F "file=@menu.pdf" \
-F "purpose=user_data"Use files in a message
Content blocks
"content": [
{ "type": "document", "source": { "type": "file", "file_id": "file_9f2c41d07a6b4e1c8d3e5f60a1b2c3d4" } },
{ "type": "image", "source": { "type": "url", "url": "https://example.com/studio.jpg" } },
{ "type": "image", "source": { "type": "base64", "media_type": "image/png", "data": "iVBORw0KGgo..." } },
{ "type": "text", "text": "Make a price list from the menu, in the style of the photo." }
]A url source must be a public http or https address that answers within 15 seconds with one of the types above. A document block can have a title.
Delete a file
The file's contents are removed, and it can no longer be used in new messages.
DELETE/v1/files/file_9f2c41d07a6b4e1c8d3e5f60a1b2c3d4
curl https://api.kalle.build/v1/files/file_9f2c41d07a6b4e1c8d3e5f60a1b2c3d4 \
-X DELETE \
-H "Authorization: Bearer $KALLE_API_KEY" \
-H "Kalle-Version: 2026-11-01"