Delete File
client.beta.files.delete(stringfileID, FileDeleteParams { betas } params?, RequestOptionsoptions?): DeletedFile { id, type }
/v1/files/{file_id}?beta=true
Delete File
Parameters
fileID: string
ID of the File.
Returns
Delete File
TypeScript
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: 'my-anthropic-api-key',
});
const deletedFile = await client.beta.files.delete('file_id');
console.log(deletedFile.id);{
"id": "id",
"type": "file_deleted"
}Returns Examples
{
"id": "id",
"type": "file_deleted"
}