Delete File
client.beta.files.delete(stringfileID, FileDeleteParams { betas } params?, RequestOptionsoptions?): DeletedFile { id, type }
DELETE/v1/files/{file_id}
Delete File
Parameters
fileID: string
ID of the File.
Returns
Delete File
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
});
const deletedFile = await client.beta.files.delete('file_id');
console.log(deletedFile.id);Response 200
{
"id": "id",
"type": "file_deleted"
}Returns Examples
Response 200
{
"id": "id",
"type": "file_deleted"
}