Delete a file. This action marks the file as deleted and removes it from storage.
The ID of the file to delete (e.g., file-abc123).
Returns
The ID of the deleted file.
The object type, which is always file.
Confirmation that the file was deleted. Always true on success.
Return Examples
{
"id": "file-abc123",
"object": "file",
"deleted": true
}
Error 404 - File Not Found
{
"error": {
"message": "File not found or access denied",
"type": "invalid_request_error",
"code": "file_not_found"
}
}