> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Xóa file

> Xóa file batch, liên kết file ảnh/tham chiếu hoặc file ở chế độ Anthropic.

## Tổng quan

Xóa file được tạo qua `/v1/files`. Khi không có header Anthropic, route này xóa file batch của TokenLab hoặc liên kết file ảnh/tham chiếu đã bind. Với `anthropic-beta: files-api-2025-04-14`, route dùng chế độ Anthropic Files API cho workspace đã bind.

## Ghi chú

* Xóa file batch sẽ xóa bản ghi file đã lưu và ngăn các job batch sau này dùng file ID đó.
* Xóa file ảnh/tham chiếu sẽ yêu cầu provider đã chọn xóa file, rồi xóa liên kết file của TokenLab sau khi provider chấp nhận.
* Chế độ Anthropic Files API yêu cầu cùng các header Anthropic native dùng khi upload và retrieve.

## Ví dụ

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.tokenlab.sh/v1/files/file_abc123" \
    -H "Authorization: Bearer sk-your-api-key"
  ```
</RequestExample>

## Request / Response

Dùng bảng OpenAPI tương tác phía trên để xem schema chính xác.

## Ví dụ response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "id": "file_abc123",
    "object": "file",
    "deleted": true
  }
  ```
</ResponseExample>

## Trường quan trọng

<ResponseField name="id" type="string">Định danh file đã bị xóa.</ResponseField>
<ResponseField name="deleted" type="boolean">Yêu cầu xóa có thành công hay không.</ResponseField>
