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

# Delete file

`DELETE /v1/files/{file_id}`

## Request

- Base URL: `https://api.tokenlab.sh`
- URL: `https://api.tokenlab.sh/v1/files/{file_id}`
- Auth: HTTP bearer

Deletes a batch file or a bound image/reference file. When the request includes anthropic-beta: files-api-2025-04-14, the route uses Anthropic Files API mode for the bound workspace.

## Path parameters

- `file_id` string, required

## Headers

- `anthropic-beta` string

## Response `200`

File deleted

- union
  - FileDeletedObject
    - `id` string, required
    - `object` 'file', required
    - `deleted` boolean, required
  - AnthropicDeletedFile
    - `id` string, required
    - `type` 'file_deleted'

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `404`: Not Found

---

[API](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway.md) · [All operations](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/revisions/3208bfbcda22?raw)
