Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Delete a container file

client.containers.files.delete(fileID, params, options?): void
DELETE
/containers/{container_id}/files/{file_id}

Delete Container File

Delete a container file

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

await client.containers.files.delete('file_id', { container_id: 'container_id' });
Response example
{
    "id": "cfile_682e0e8a43c88191a7978f477a09bdf5",
    "object": "container.file.deleted",
    "deleted": true
}
Parameters
fileID: string
params: FileDeleteParams { container_id }
Returns Examples
Response example
{
    "id": "cfile_682e0e8a43c88191a7978f477a09bdf5",
    "object": "container.file.deleted",
    "deleted": true
}