Delete File

Permanently delete an uploaded file.

Permanently delete an uploaded file and free its storage. After delete, any chat completion request that still references the file_id will fail with 404 No such File object.

DELETE /v1/files/:file_id

Path parameters

file_idstringrequired

The id of the file (prefixed file-).

Response

idstringoptional

The id of the deleted file (echo).

object'file'optional

Always file.

deletedbooleanoptional

true when the underlying object was removed.

Deletion is permanent and cannot be undone.

Errors

StatusReason
404No such File object: <id> - id does not exist or is owned by another user.