---
title: "Deletes the file with the given file-id.
Deletion is also allowed if a file was used, e.g., as training file in a fine-tune job."
method: DELETE
path: "/files/{file-id}"
tags: ["Files:"]
---

# Deletes the file with the given file-id.
Deletion is also allowed if a file was used, e.g., as training file in a fine-tune job.

`DELETE /files/{file-id}`

## Path parameters

- `file-id` string, required

## Query parameters

- `api-version` string, required

## Response `200`

The file was successfully deleted.

- FileDelete — Defines the response for File Delete.
  - `object` string, required — If the file was deleted.
  - `deleted` boolean, required — A value indicating whether gets if the file was deleted.
  - `id` string, required — The file-id that was deleted.

## Other responses

- `default` — An error occurred.

---

[API](https://skmtc.net/azure/apis/cognitiveservices-azureopenai-authoring.md) · [All operations](https://skmtc.net/azure/apis/cognitiveservices-azureopenai-authoring/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/cognitiveservices-azureopenai-authoring/versions/b177dc430e39/schema)
