files.upload_file
Reserve a direct upload slot for a local file or folder.
Pass the desired file_name. For a single file, this becomes the stored name. For a folder, this becomes the destination folder prefix. To nest further, use a path in file_name (folder/subfolder/.../name). Optionally pass retention_days (default 7, minimum 1). The name may omit an extension. Vee3 returns an upload_code.
Install the Vee3 CLI once with npm install -g @vee3/cli (requires Node 18+), then run vee3-upload {upload_code} {file_or_folder_path} in the terminal. The CLI accepts a file or a folder. A folder uploads every nested file in one command and stores each file under the reserved file_name prefix, preserving relative paths. The CLI resolves the code to signed upload URLs, streams the local file or files to Vee3 storage, and prints each stored file_name after the upload finishes. Use those file_name values in files.list_uploaded_files and other capabilities. The CLI does not need an API key. When a stored file already uses the same name, the upload stops, skips that file, or replaces it.
If installation fails with a TLS or certificate error (common on networks that inspect HTTPS traffic), use Node 22.15 or newer and run with NODE_OPTIONS=--use-system-ca, or configure npm to trust your network's root certificate.
Each file can be up to 2 GB. One folder upload can include up to 500 files. Retention is chosen at reserve time (default 7 days) and applies to every file in the folder. After each upload is detected, Vee3 bills max(1, ceil(size_gibibytes * retention_days * 2)) tokens per file. Upload codes can be resolved within 60 minutes of reserve.
Use files.list_uploaded_files to list stored uploads for follow-up work.
Cost = 0 tokens to reserve. After upload completes, billing is max(1, ceil(size_gibibytes * retention_days * 2)) tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_name | Yes | Desired file name or path for the uploaded file. Use folder/subfolder/.../file_name to organize files in folders. Extension is optional and is replaced based on detected file type. Do not use '..' or absolute paths. | |
| existing_files | No | What to do when a stored file already uses the same name. 'stop' (default) fails on the first duplicate. 'continue' skips duplicates and keeps uploading remaining files. 'replace' overwrites duplicated stored files. | stop |
| retention_days | No | How many days to keep the file after upload completes. Default 7. Billing uses size and this retention. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | No | Suggested terminal command for uploading the local file or folder. | |
| max_bytes | No | Maximum allowed file size in bytes. | |
| upload_id | No | Stable identifier for the reserved upload. | |
| expires_at | No | ISO 8601 timestamp when the upload code can no longer be resolved (60 minutes after reserve). | |
| upload_code | No | Short code to pass to the @vee3/upload CLI. | |
| existing_files | No | Policy for files that already exist: stop, continue, or replace. | |
| retention_days | No | Days the file will be retained after upload completes. | |
| install_command | No | One-time command to install the Vee3 CLI (`npm install -g @vee3/cli`). On networks that inspect HTTPS, install may require Node 22.15+ with NODE_OPTIONS=--use-system-ca. | |
| troubleshooting | No | What to do if installation or uploading fails: re-read this tool's description via meta-tools.describe for setup and troubleshooting steps. |