upload_file
Upload a local file or URL to the bot's file library, get a public URL to embed in your Telegram bot scenario.
Instructions
Загрузить файл в библиотеку /bots/files (POST /api/bots/media) и получить публичный URL для вставки в сценарий. Передай path (локальный файл) ИЛИ url (перезалить файл по ссылке в своё хранилище). Возвращает {id, url, mediaType, sizeBytes, originalName}. Полученный url ставь в медиа-карточку SEND_MESSAGE (image/video/audio/file/voice/videonote → поле url; gallery → urls[]) или в SEND_PHOTO.photoUrl. Лимит 50 МБ; типы: image/video/audio/pdf/zip/doc(x)/xlsx/pptx/txt (SVG запрещён); при нехватке места — HTTP 402.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Ссылка на файл — будет скачан и перезалит в /bots/files | |
| path | No | Путь к локальному файлу (поддерживается ~) | |
| filename | No | Переопределить имя файла (необязательно) |