Claude Platform Docs

Delete File

DELETE/v1/files/{file_id}

Delete File

Path parameters
file_id: string

ID of the File.

Returns
DeletedFile object{ id, type }
id: string

ID of the deleted file.

type: optional "file_deleted"

Deleted object type.

For file deletion, this is always "file_deleted".

defaultfile_deleted

Delete File

curl https://api.anthropic.com/v1/files/$FILE_ID \
    -X DELETE \
    -H 'anthropic-version: 2023-06-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY"
{
  "id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "type": "file_deleted"
}
Returns Examples
{
  "id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "type": "file_deleted"
}