---
title: "Delete a file"
method: DELETE
path: "/files/{file_id}"
tags: ["Files"]
---

# Delete a file

`DELETE /files/{file_id}`

Deletes a file owned by the requesting workspace. Deletion is irreversible.

## Path parameters

- `file_id` string, required

## Query parameters

- `workspace_id` string, uuid — Workspace to scope the request to. Defaults to the caller’s default workspace.

## Response `200`

The file was deleted.

- FileDeleteResponse — Confirmation that a file was deleted.
  - `id` string, required
  - `type` 'file_deleted', required

## Other responses

- `401` — Unauthorized - Authentication required or invalid credentials
- `404` — Not Found - Resource does not exist
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error - Unexpected server error

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) · [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openrouterteam/openrouter-api/revisions/9814733ca74d/schema)
