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

# Multipart complete

> Finalize the multipart upload after all parts are uploaded.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://upload.autorender.io/api/v1/multipart/complete \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "id": "<string>",
      "file_no": "<string>",
      "name": "big-video.mp4",
      "url": "<string>",
      "path": "uploads/videos",
      "width": null,
      "height": null,
      "format": "mp4",
      "file_size": 73400320,
      "workspace_no": "<string>"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "<string>"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized",
    "message": "Invalid or missing API key"
  }
  ```

  ```json 500 theme={null}
  {
    "success": false,
    "error": "<string>",
    "message": "<string>"
  }
  ```
</ResponseExample>

## Overview

Finalizes the multipart session after every part has been uploaded to its presigned URL. Autorender assembles the parts and registers the file in your workspace.

## Authentication

`Authorization: Bearer YOUR_API_KEY`

## Workflow

This is **step 3 of 3**.

1. [**Multipart start**](/docs/api-reference/multipart-start)
2. [**Upload parts**](/docs/api-reference/multipart-upload-parts)
3. **Multipart complete** (this endpoint) — body: `{ "session_id": "<from start>" }`

## Request body

| Field        | Type   | Required | Description                          |
| ------------ | ------ | -------- | ------------------------------------ |
| `session_id` | string | Yes      | `session_id` from the start response |


## OpenAPI

````yaml api-reference/openapi.json POST /api/v1/multipart/complete
openapi: 3.0.0
info:
  title: AutoRender Public API
  description: >-
    REST API for uploading, managing, and serving media assets. All endpoints
    require an API key via the x-api-key header or Authorization: Bearer <key>.
  version: 1.0.0
  contact:
    name: AutoRender Support
    email: support@autorender.io
servers:
  - url: https://app-api.autorender.io
    description: Production server
security:
  - apiKey: []
tags:
  - name: Uploads
    description: Upload endpoints (API key required)
  - name: Files
    description: File management endpoints (API key required)
  - name: Folders
    description: Folder management endpoints (API key required)
paths:
  /api/v1/multipart/complete:
    post:
      tags:
        - Uploads
      summary: Complete multipart upload
      description: Finalise a multipart upload session and return the stored file record.
      operationId: multipartComplete
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                session_id:
                  type: string
                  minLength: 1
                uuid:
                  type: string
              required:
                - session_id
      responses:
        '201':
          description: Upload completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  file_no:
                    type: string
                  workspace_id:
                    type: string
                  name:
                    type: string
                  path:
                    type: string
                  url:
                    type: string
                  width:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  height:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  size:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  format:
                    type: string
                  mime_type:
                    type: string
                  hash:
                    type: string
                  tags:
                    type: array
                    items:
                      type: string
                  metadata:
                    nullable: true
                    type: object
                    additionalProperties:
                      x-stainless-any: true
                  custom_id:
                    nullable: true
                    type: string
                  folder_no:
                    nullable: true
                    type: string
                  is_private:
                    type: boolean
                  is_duplicate:
                    type: boolean
                  created_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  upload_source:
                    type: string
                  thumbnail:
                    type: string
                  extension:
                    type: string
                required:
                  - id
                  - file_no
                  - workspace_id
                  - name
                  - path
                  - url
                  - width
                  - height
                  - size
                  - mime_type
                  - tags
                  - metadata
                  - custom_id
                  - folder_no
                  - is_duplicate
                  - created_at
                  - upload_source
                  - thumbnail
                  - extension
                additionalProperties: false
                description: Upload completed
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  errorCode:
                    type: string
                  message:
                    type: string
                required:
                  - error
                additionalProperties: false
                description: Invalid request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - error
                additionalProperties: false
                description: Unauthorized
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  errorCode:
                    type: string
                  message:
                    type: string
                required:
                  - error
                additionalProperties: false
                description: Server error
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for public endpoints. Can also be provided via Authorization:
        Bearer <key>

````