Sample - OpenAI API
DELETE/vector_stores/{vector_store_id}/files/{file_id}

Delete a vector store file

Deletes a file association from a vector store without deleting the underlying File. Use vector_store_id and file_id to identify the association to remove. To delete the underlying File, call the separate file deletion operation.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
vector_store_idstringrequired
The identifier of the vector store from which to remove the file.
file_idstringrequired
The identifier of the file association to remove from the vector store.

2 status codes
200Returns a deletion object containing the removed association's identifier, a deleted flag, and the `vector_store.file.deleted` object type.
idstringrequired
deletedbooleanrequired
objectstringrequired
Allowed:vector_store.file.deleted
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

vector_store_id and file_id must identify the vector store-file association to remove. This operation does not delete the underlying File. A 429 is returned when the request exceeds the rate limit.