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 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.

Delete vector store file

openai vector-stores:files delete \
  --api-key 'My API Key' \
  --vector-store-id vector_store_id \
  --file-id file_id
Response example
{
  "id": "file-abc123",
  "object": "vector_store.file.deleted",
  "deleted": true
}
Parameters
--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.

Returns
vector_store_file_deleted: object { id, deleted, object }
id: string
deleted: boolean
object: "vector_store.file.deleted"
Returns Examples
Response example
{
  "id": "file-abc123",
  "object": "vector_store.file.deleted",
  "deleted": true
}