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

# Delete a file

`DELETE /v1/files/{file_id}`

Delete a file and its content immediately. Deleting an input file does not stop a batch that already read it; deleting an output file makes its results unrecoverable.

## Path parameters

- `file_id` string, required — The `file_` prefixed id of the file to remove.

## Response `200`

The file was deleted.

- FileDeleted — Confirmation that a file and its content are gone.
  - `id` string, required — Id of the file that was deleted.
  - `object` string, required — Always `file`, even on a deletion receipt.
  - `deleted` boolean, required — Always `true` on success.

## Other responses

- `400` — Malformed request — missing or invalid fields.
- `401` — Missing or invalid API key.
- `404` — The requested resource does not exist.
- `429` — Rate limited — retry after the interval in the Retry-After header.
- `500` — Internal error — safe to retry with backoff.

## Changes

- **2026-09-02** `681b2f463d11` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/morphllm/apis/morph-api/changes/v1/files/:file_id/delete.md)

---

[API](https://skmtc.dev/morphllm/apis/morph-api.md) · [All operations](https://skmtc.dev/morphllm/apis/morph-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/morphllm/morph-api/revisions/681b2f463d11/schema)
