Skip to content
Primary navigation

Delete vector store file

$ openai vector-stores:files delete
DELETE/vector_stores/{vector_store_id}/files/{file_id}

Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the delete file endpoint.

ParametersExpand Collapse
--vector-store-id: string

The ID of the vector store that the file belongs to.

--file-id: string

The ID of the file to delete.

ReturnsExpand Collapse
vector_store_file_deleted: object { id, deleted, object }
id: string
deleted: boolean
object: "vector_store.file.deleted"

Delete vector store file

openai vector-stores:files delete \
  --api-key 'My API Key' \
  --vector-store-id vector_store_id \
  --file-id file_id
{
  id: "file-abc123",
  object: "vector_store.file.deleted",
  deleted: true
}
Returns Examples
{
  id: "file-abc123",
  object: "vector_store.file.deleted",
  deleted: true
}