Upload file
upload_fileGet a link to send one image, video or document from your disk (logo, screenshot, product shot, PDF) for a task to work from. Send the file with an HTTP PUT, e.g. curl -T '<upload_url>'; the answer is JSON with the file_id to pass in files on start_task or reply. The link works for 15 minutes. One file_id works for any number of tasks. A document up to 100 MB, an image up to 20 MB. A video (up to 1 GB) or sound (up to 200 MB) needs size_bytes, its exact size: the answer gives its file_id (or media_id) at once, and the PUT must carry the headers it names, e.g. curl -T -H 'Content-Type: video/mp4' '<upload_url>'. Upload an image or video right before the task that uses it: about 20 can wait unsent, and waiting ones also block your human uploading in the app. A large scan can take minutes to read; start_task says when it is not ready yet. With space_id, a document joins that space's Files instead: every chat in the space reads it, the team sees it, and pin can make it required reading. The answer comes once it is read, with its space_file_id; no file_id is needed for tasks there. A long read answers reading: true, and list_space shows the file when it is done. A PNG, JPEG, WebP, GIF or SVG image with space_id joins that space's Files, where every chat in the space can find it, and answers its image_id: add_images sorts it into the space's collections, pin makes it material every chat reads, and create_element makes it an @element. An MP4, MOV or WebM video or an MP3, WAV or M4A sound with space_id answers a media_id for create_element, good for a day. It joins that space's Files about a minute after it arrives; later, list_space media gives its lasting media_id. An upload without space_id is deleted after a day unless a task uses it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Its name with extension, which sets how it is read. | |
| space_id | No | A space id from list_spaces, to keep a document or an image in the space's Files rather than give it to one task. | |
| size_bytes | No | A video or sound: its exact size in bytes (wc -c < file), which the storage link is signed for. |