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

# Delete File

> Permanently deletes a file. Once deleted, the file can no longer be
retrieved, downloaded, or referenced in requests. Returns 404 if no file
with the given id exists.

Permanently delete a file; afterwards it can no longer be retrieved or referenced (returns `404` if it doesn't exist). Compatible with [OpenAI's Delete file endpoint](https://developers.openai.com/api/reference/resources/files/methods/delete).

Rate limit: **100 requests/min**.


## OpenAPI

````yaml api-reference/openapi.json DELETE /v1/files/{file_id}
openapi: 3.1.0
info:
  title: Perceptron API
  contact:
    name: Perceptron API Support
    email: support@perceptron.inc
  version: 1.0.0
servers:
  - url: https://api.perceptron.inc
security: []
tags:
  - name: Chat Completions
    description: Chat completions API (OpenAI-compatible)
  - name: Detection
    description: Native Perceptron image detection API
  - name: Models
    description: Model listing and metadata API
  - name: Files
    description: File upload, listing, retrieval, and deletion API
paths:
  /v1/files/{file_id}:
    delete:
      tags:
        - Files
      summary: Delete a file
      description: |-
        Permanently deletes a file. Once deleted, the file can no longer be
        retrieved, downloaded, or referenced in requests. Returns 404 if no file
        with the given id exists.
      operationId: handle_delete_file
      parameters:
        - name: file_id
          in: path
          description: The id of the file to delete.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: File deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteFileResponse'
        '401':
          description: Authentication failed. Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: Invalid API key
                  param: null
                  type: authentication_error
        '404':
          description: No such file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: 'No such File object: file-missing'
                  param: id
                  type: invalid_request_error
        '500':
          description: Internal server error while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: The server had an error while processing your request.
                  param: null
                  type: server_error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DeleteFileResponse:
      type: object
      required:
        - object
        - id
        - deleted
      properties:
        deleted:
          type: boolean
          description: Whether the file was successfully deleted.
        id:
          type: string
          description: ID of the deleted file.
        object:
          type: string
          description: Always "file".
    OpenAIErrorResponse:
      type: object
      description: OpenAI-compatible error response format.
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/OpenAIErrorDetail'
    OpenAIErrorDetail:
      type: object
      description: OpenAI-compatible error detail.
      required:
        - message
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your Perceptron API key

````