DELETE /v1/files/:id
Delete a file.Authentication
Requires provider authentication headers:Request
Headers
string
required
The provider to route the request to (e.g.,
openai, azure-openai)string
required
Bearer token for the provider API
Path Parameters
string
required
The ID of the file to delete
Response
string
The ID of the deleted file
string
The object type, always “file”
boolean
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