> ## 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.

# حذف ملف

> يحذف ملف دفعة أو ربط ملف صورة/مرجع أو ملفًا في وضع Anthropic.

## نظرة عامة

يحذف ملفًا تم إنشاؤه عبر `/v1/files`. بدون ترويسات Anthropic، يحذف المسار ملفات الدفعات في TokenLab أو ربط ملفات الصور/المراجع. مع `anthropic-beta: files-api-2025-04-14`، يستخدم وضع Anthropic Files API لمساحة العمل المرتبطة.

## ملاحظات

* حذف ملف دفعة يزيل سجل الملف المخزن ويمنع مهام الدفعة اللاحقة من استخدام معرف الملف هذا.
* حذف ملف صورة/مرجع يطلب من المزود المختار حذف الملف، ثم يزيل ربط الملف في TokenLab بعد قبول المزود للحذف.
* يتطلب وضع Anthropic Files API نفس ترويسات Anthropic الأصلية المستخدمة في الرفع والاسترجاع.

## مثال

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

## الطلب / الاستجابة

استخدم لوحة OpenAPI التفاعلية أعلاه للحصول على schema الدقيق.

## مثال الاستجابة

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

## حقول مهمة

<ResponseField name="id" type="string">معرف الملف الذي تم حذفه.</ResponseField>
<ResponseField name="deleted" type="boolean">ما إذا كان طلب الحذف قد نجح.</ResponseField>
