---
title: "Changes to Delete a file"
method: DELETE
path: "/files/{file_id}"
---

# Changes to Delete a file

`DELETE /files/{file_id}`

> Every recorded change to this endpoint, newest first.

## Timeline

Changed in 2 of 303 revisions.

- **2026-08-26** `ed04e14f2755` — 2 breaking, 1 warning
- **2026-07-29** `6968addaaf97` — 4 breaking, 5 info

## Changes

- **2026-08-26** `ed04e14f2755` — 2 breaking, 1 warning
  - for the `path` request parameter `file_id`, the minLength was increased from `0` to `1`
  - added the pattern `^[\w-]+$` to the `path` request parameter `file_id`
  - for the `path` request parameter `file_id`, the maxLength was set to `256`
- **2026-07-29** `6968addaaf97` — 4 breaking, 5 info
  - added `#/components/schemas/OpenRouterFileDeleted, #/components/schemas/OpenAIFileDeleted, #/components/schemas/AnthropicFileDeleted` to the response body `oneOf` list for the response status `200`
  - the response's body type changed from `object` to no type for status `200`
  - removed the required property `id` from the response with the `200` status
  - removed the required property `type` from the response with the `200` status
  - added the new optional `query` request parameter `provider`
  - added response discriminator for the response status `200`
  - added the non-success response with the status `403`
  - added the non-success response with the status `502`
  - added the non-success response with the status `503`

---

[Operation](https://skmtc.dev/openrouterteam/apis/openrouter-api/docs/files/:file_id/delete.md) · [API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) · [Page](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/files/:file_id/delete)
