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

# Finalize an upload

> Finish an upload so the file becomes available to the agent.

Call this after sending the bytes to the `upload_url` from `POST /experimental/files`. Until then, the file is stored but not visible to tasks in the project.


## OpenAPI

````yaml api-reference/openapi.json POST /experimental/files/{file_id}/finalize
openapi: 3.1.0
info:
  title: Phylo API — V1
  description: Public API for Phylo, the biomedical AI agent platform.
  version: 0.1.0
servers:
  - url: https://api.phylo.bio/v1
    description: >-
      Self-serve platform. Enterprise customers should contact the Phylo team to
      get their API base URL. Learn more at https://phylo.bio/enterprise.
security: []
paths:
  /experimental/files/{file_id}/finalize:
    post:
      tags:
        - files
      summary: Finalize an upload
      description: Finish an upload so the file becomes available to the agent.
      operationId: finalize_upload_experimental_files__file_id__finalize_post
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            title: File Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/FinalizeUploadRequest'
                - type: 'null'
              title: Req
      responses:
        '200':
          description: Upload finished. The file becomes available to the agent shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadFinalized'
              example:
                type: upload_finalized
                file_id: file_014komnJmtG0aWnZwu4yCzzw
      security:
        - bearerAuth: []
components:
  schemas:
    FinalizeUploadRequest:
      properties:
        upload_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Upload Id
        parts:
          anyOf:
            - items:
                $ref: '#/components/schemas/CompletedPart'
              type: array
            - type: 'null'
          title: Parts
      additionalProperties: false
      type: object
      title: FinalizeUploadRequest
      description: |-
        Omit both fields for a single upload.

        For a multipart upload, send the `upload_id` from
        `POST /experimental/files` and every part's `{part_number, etag}`.
    UploadFinalized:
      properties:
        type:
          type: string
          const: upload_finalized
          title: Type
          default: upload_finalized
        file_id:
          type: string
          title: File Id
      type: object
      required:
        - file_id
      title: UploadFinalized
    CompletedPart:
      properties:
        part_number:
          type: integer
          exclusiveMinimum: 0
          title: Part Number
        etag:
          type: string
          title: Etag
          description: ETag returned in the part's PUT response
      additionalProperties: false
      type: object
      required:
        - part_number
        - etag
      title: CompletedPart
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Requires an API key. See the Authentication guide.

````