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

# Delete Media File

> Delete a media file. After deletion, the file no longer counts toward your upload limit. Returns `404` if the file is not found. See [How to Use](/file-api/how-to-use) for the full workflow.



## OpenAPI

````yaml /file-api/media-files.json delete /api/v1/media/files/{file_id}
openapi: 3.1.0
info:
  title: Media Files API
  description: >-
    Upload, list, and delete media files for use with Modellix prediction APIs.
    Authenticate with an API Key. This API is not billed. Uploaded files are
    retained for a limited time (default 7 days).
  version: 1.0.0
  contact:
    name: Modellix API Support
    email: support@modellix.ai
servers:
  - url: https://api.modellix.ai/
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v1/media/files/{file_id}:
    delete:
      summary: Delete Media File
      description: >-
        Delete a media file. After deletion, the file no longer counts toward
        your upload limit. Returns `404` if the file is not found. See [How to
        Use](/file-api/how-to-use) for the full workflow.
      operationId: deleteMediaFile
      parameters:
        - name: file_id
          in: path
          required: true
          description: File ID returned by the upload API
          schema:
            type: string
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Delete succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteMediaFileResponse'
              examples:
                success:
                  summary: Deleted
                  value:
                    code: 0
                    message: success
                    data: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    DeleteMediaFileResponse:
      type: object
      required:
        - code
        - message
        - data
      properties:
        code:
          type: integer
          example: 0
        message:
          type: string
          example: success
        data:
          type: object
          additionalProperties: false
          description: Empty object on success
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: Error code (matches HTTP status)
          example: 400
        message:
          type: string
          description: 'Error message in the form Category: detail'
          example: 'Invalid format: unsupported file format'
  responses:
    Unauthorized:
      description: Unauthorized — Invalid or missing API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            message: 'Authentication failed: invalid API key'
    NotFound:
      description: File not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 404
            message: 'Resource not found: file not found'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 500
            message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API Key authentication. Format: Bearer YOUR_API_KEY'

````