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

# Delete Gemini file

> Delete a file uploaded for Gemini-native `fileData` input. Requests that reference the deleted URI can no longer use it.



## OpenAPI

````yaml /openapi/files/_delete-file.yaml delete /files/{file_id}
openapi: 3.0.3
info:
  title: Delete Gemini file
  version: 1.0.0
  description: Delete an uploaded Gemini file when it is no longer needed.
servers:
  - url: https://api.linkmodel.ai/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Gemini
  - name: files
paths:
  /files/{file_id}:
    delete:
      tags:
        - Gemini
        - files
      summary: Delete Gemini file
      description: >-
        Delete a file uploaded for Gemini-native `fileData` input. Requests that
        reference the deleted URI can no longer use it.
      operationId: delete-gemini-file
      parameters:
        - name: file_id
          in: path
          required: true
          description: File identifier returned when the upload session was created.
          schema:
            type: string
          example: file_example123
      responses:
        '200':
          description: File deleted.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 0
                    example: 0
                  data:
                    type: object
                    required:
                      - file_id
                      - deleted
                    properties:
                      file_id:
                        type: string
                        example: file_example123
                      deleted:
                        type: boolean
                        enum:
                          - true
                        example: true
        '401':
          description: Missing or invalid LinkModel API key.
        '404':
          description: File identifier not found or not accessible to this account.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````