Upload file
upload_fileSend a local batch or image file to TokenLab or Anthropic Files API, returning metadata for batch or vision workflows.
Instructions
Uploads a TokenLab/OpenAI-compatible batch or image file. With anthropic-beta: files-api-2025-04-14, uploads an Anthropic Files resource without a purpose field and returns Anthropic file metadata.
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": {
"file": "<file>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Pass local file path. | |
| model | No | Optional TokenLab extension for image file uploads. Defaults to gpt-image-2 and binds the returned … | |
| purpose | No | Required in TokenLab/OpenAI-compatible mode: use batch for Batch API JSONL files, or user_data/visi… | |
| anthropic-beta | No | Include files-api-2025-04-14 to use Anthropic Files API mode. |