Delete Directory File
client.beta.directories.files.delete(stringdirectoryFileID, FileDeleteParams { directory_id, organization_id, project_id } params, RequestOptionsoptions?): void
DELETE/api/v1/beta/directories/{directory_id}/files/{directory_file_id}
Delete a file from the specified directory.
Note: This endpoint uses directory_file_id (the internal ID). If you’re trying to delete a file by its unique_id, use the list endpoint with a filter to find the directory_file_id first.
Delete Directory File
import LlamaCloud from '@llamaindex/llama-cloud';
const client = new LlamaCloud({
apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});
await client.beta.directories.files.delete('directory_file_id', { directory_id: 'directory_id' });