> ## 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.

# Complete Gemini file upload

> Call this endpoint only after the direct PUT to the pre-signed upload URL succeeds. An accepted response starts file processing; poll the file resource until its status becomes `active`.

This file lifecycle is only for Gemini-native `fileData` requests.




## OpenAPI

````yaml /openapi/files/_complete-upload.yaml post /files/{file_id}/complete
openapi: 3.0.3
info:
  title: Complete Gemini file upload
  version: 1.0.0
  description: Confirm that a Gemini file upload finished and start server-side processing.
servers:
  - url: https://api.linkmodel.ai/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Gemini
  - name: files
paths:
  /files/{file_id}/complete:
    post:
      tags:
        - Gemini
        - files
      summary: Complete Gemini file upload
      description: >
        Call this endpoint only after the direct PUT to the pre-signed upload
        URL succeeds. An accepted response starts file processing; poll the file
        resource until its status becomes `active`.


        This file lifecycle is only for Gemini-native `fileData` requests.
      operationId: complete-gemini-file-upload
      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:
        '202':
          description: Upload accepted and file processing started.
        '400':
          description: The upload is incomplete or its metadata does not match the session.
        '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

````