DELETE /v1/files/:id
Delete a file.Authentication
Requires provider authentication headers:Request
Headers
The provider to route the request to (e.g.,
openai, azure-openai)Bearer token for the provider API
Path Parameters
The ID of the file to delete
Response
The ID of the deleted file
The object type, always “file”
Whether the file was successfully deleted (always
true on success)Example
Response Example
Error Handling
Common errors:- 404 Not Found: The file ID doesn’t exist
- 403 Forbidden: You don’t have permission to delete this file
- 409 Conflict: The file is currently being used by another operation
Related Endpoints
Upload File
Upload a new file
List Files
View all uploaded files
Retrieve File
Get file metadata