Delete file
delete_fileDeletes a batch file or bound image/reference file by its Files API file ID. Use it to remove stored files from a workspace or Anthropic Files API mode.
Instructions
Deletes a batch file or a bound image/reference file. When the request includes anthropic-beta: files-api-2025-04-14, the route uses Anthropic Files API mode for the bound workspace.
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_id": "<file_id>"
},
"name": "delete_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | File ID returned by the Files API. | |
| anthropic-beta | No | Include files-api-2025-04-14 to use Anthropic Files API mode. |