Chuyển đến nội dung chính

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ụ

curl -X DELETE "https://api.tokenlab.sh/v1/files/file_abc123" \
  -H "Authorization: Bearer sk-your-api-key"

Request / Response

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

Ví dụ response

{
  "id": "file_abc123",
  "object": "file",
  "deleted": true
}

Trường quan trọng

id
string
Định danh file đã bị xóa.
deleted
boolean
Yêu cầu xóa có thành công hay không.