Delete file

DELETEhttps:/api.openai.com/v1/files/{file_id}

Delete a file.

Path parameters

  • file_id
    string
    Required
    The ID of the file to use for this request.

Response

Deletion status.

Example request
1
curl https://api.openai.com/v1/files/file-abc123 \
2
-X DELETE \
3
-H "Authorization: Bearer $OPENAI_API_KEY"
Example response
1
{
2
"id": "file-abc123",
3
"object": "file",
4
"deleted": true
5
}
Built with