Sample - OpenAI API
DELETE/files/{file_id}

Delete a file

Deletes a specific uploaded file and removes it from all vector stores. Use file_id to identify the file you want to remove; deletion is not limited to the file's direct metadata.

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

1 parameter
file_idstringrequired
The identifier of the file to delete.

1 status code
200Returns the deleted file identifier, the `file` object type, and a boolean confirming deletion.
idstringrequired
objectstringrequired
Allowed:file
deletedbooleanrequired

Error handling

file_id must identify the file to delete. Deleting the file also removes it from all vector stores.