Delete File
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
deleted_file = client.files.delete(
"file_id",
)
print(deleted_file.id){
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"type": "file_deleted"
}Returns Examples
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"type": "file_deleted"
}