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

# Delete file

> Interactive playground for DELETE /v1/files/{file_id}.

Soft-delete a file. It is removed from storage immediately and returns `404` on list, retrieve, and download afterward. Deleting an input file does not stop an active batch.

Full reference: [Files API](/docs/batch/objects).


## OpenAPI

````yaml api-reference/openapi/batch.openapi.json DELETE /v1/files/{file_id}
openapi: 3.1.0
info:
  title: ZeroGPU Batch & Files API
  version: '1.0'
  description: >-
    JSONL file storage (`/v1/files`) and asynchronous batch inference
    (`/v1/batches`). Wire-compatible with OpenAI's files and batch APIs. Auth:
    `x-api-key` on every request; `x-project-id` is optional.
servers:
  - url: https://api.zerogpu.ai
    description: Production
security:
  - ApiKey: []
paths:
  /v1/files/{file_id}:
    delete:
      tags:
        - Files
      summary: Delete a file
      description: >-
        Soft-delete. The file returns 404 on list, retrieve, and content
        afterward.
      operationId: deleteFile
      parameters:
        - name: x-project-id
          in: header
          required: false
          schema:
            type: string
          description: >-
            Optional project identifier. Scopes the request to a specific
            project when provided.
        - name: file_id
          in: path
          required: true
          schema:
            type: string
          example: file-abc123...
      responses:
        '200':
          description: File deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDeleted'
        '404':
          description: File not found
components:
  schemas:
    FileDeleted:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - file
        deleted:
          type: boolean
          enum:
            - true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````