Start file upload
start_uploadUpload local files (on the disk you can reach with a shell) to the user's AdChat library, up to 20 per call. Steps: 1. For each file get its exact byte size (wc -c < file), its MIME type (e.g. image/png) and optionally its sha256 (shasum -a 256 file), and call start_upload with files: [{name, size, type, sha256, path}]. 2. Run the curl command returned for each file (POSIX shell): it PUTs the bytes to private storage (curl -fsS --globoff -X PUT -T -H 'content-type: ' '<put_url>'); the size and content-type must match what you declared, within 10 minutes. 3. Call finish_upload with the upload_ids. It returns each file_id for meta_upload_media, read_file and the rest. A file marked reused is already saved: use its file_id, nothing to upload. Limits match the web app: images 50 MB, video and audio 200 MB, other files 25 MB, 2 GB in total.
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": {
"files": "<files>"
},
"name": "start_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| account_id | No | e.g. act_1234567890 |