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

# Delete files

> Delete one or more uploaded files by file_id. Removes storage objects, upload records, and related jobs.

Delete one or more uploaded files by `file_id`. Removes storage objects, upload records, and any related transcription jobs.

## Request body

```json theme={"system"}
{
  "file_ids": [
    "1374132b-b5db-4ec3-9cf1-f61f982e89b0",
    "2485243c-c6ec-5fd4-0dg2-g72g093f90c1"
  ]
}
```

## Example

```bash theme={"system"}
curl -X DELETE "https://api.soket.ai/files" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"file_ids": ["1374132b-b5db-4ec3-9cf1-f61f982e89b0"]}'
```

## Typical response

```json theme={"system"}
{
  "deleted_file_ids": ["1374132b-b5db-4ec3-9cf1-f61f982e89b0"],
  "deleted_count": 1,
  "storage_objects_deleted": 1,
  "jobs_cleaned": 0
}
```

Returns `404` if any `file_id` is not found or not owned by the authenticated user.


## OpenAPI

````yaml DELETE /files
openapi: 3.0.3
info:
  title: Dhrith ASR API
  version: 1.0.0
  description: >-
    Upload audio, submit batches, track progress, and fetch merged transcription
    results.
servers:
  - url: https://api.soket.ai/transcribe
    description: Batch transcription, status, results, and download
  - url: https://api.soket.ai
    description: File upload and management
security:
  - bearerAuth: []
paths:
  /files:
    servers:
      - url: https://api.soket.ai
    delete:
      summary: Delete files
      description: >-
        Delete one or more uploaded files by file_id. Removes storage objects,
        upload records, and related jobs.
      operationId: deleteFiles
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteFilesRequest'
      responses:
        '200':
          description: Files deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteFilesResponse'
        '400':
          description: Empty file_ids list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Some file_ids not found or not owned by you
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DeleteFilesRequest:
      type: object
      required:
        - file_ids
      properties:
        file_ids:
          type: array
          items:
            type: string
    DeleteFilesResponse:
      type: object
      properties:
        deleted_file_ids:
          type: array
          items:
            type: string
        deleted_count:
          type: integer
        storage_objects_deleted:
          type: integer
        jobs_cleaned:
          type: integer
    ErrorResponse:
      type: object
      properties:
        detail:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````