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

# Initialize Multipart Upload

> Start a multipart upload session for a large video.
Vidinfra validates the file type and returns an uploadId for the client to upload chunks directly to S3.



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/openapi.json post /libraries/{libraryId}/uploads/s3/multipart
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers:
  - url: https://api.tenbyte.io/v1/vidinfra
    description: Production server
security:
  - bearer: []
tags:
  - name: Library
  - name: Folder
  - name: Video
  - name: Subtitle
  - name: Video Thumbnails
  - name: Transcoding Profiles
  - name: Player Themes
  - name: Video Chapter
  - name: Webhook Endpoints
  - name: Webhook Deliveries
  - name: Security
  - name: Video Multipart Upload
  - name: Webhook
  - name: Migration Jobs
paths:
  /libraries/{libraryId}/uploads/s3/multipart:
    post:
      tags:
        - Video Multipart Upload
      summary: Initialize Multipart Upload
      description: >-
        Start a multipart upload session for a large video.

        Vidinfra validates the file type and returns an uploadId for the client
        to upload chunks directly to S3.
      parameters:
        - name: libraryId
          in: path
          description: Unique identifier of the library.
          required: true
          example: 314221a1-3cbf-4d3c-846e-f6c22bc43064
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  description: >-
                    The original name of the file being uploaded, including its
                    extension (e.g., 'video.mp4').
                type:
                  type: string
                  description: >-
                    MIME type of the file (e.g., 'video/mp4', 'image/jpeg').
                    Used to validate and assign proper upload handling.
                metadata:
                  type: object
                  description: >-
                    Additional metadata to associate the uploaded file with a
                    specific library, folder, or tagging context.
                  properties:
                    libraryId:
                      type: string
                      description: >-
                        Unique identifier of the library where this file will be
                        uploaded.
                    folderId:
                      type: string
                      description: >-
                        Unique identifier of the folder within the library where
                        the file will be stored.
                    source:
                      type: string
                      description: >-
                        Source or origin of the upload (e.g., 'dashboard',
                        'api', 'integration').
                    tags:
                      type: array
                      items:
                        type: string
                      description: >-
                        Optional list of tags to categorize or label the
                        uploaded file.
                  required:
                    - libraryId
                    - folderId
                    - source
                    - tags
              required:
                - filename
                - type
                - metadata
            example:
              filename: demo_reel.mp4
              type: video/mp4
              metadata:
                libraryId: lib_123
                folderId: fold_456
                source: dashboard
                tags:
                  - launch
                  - promo
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - message
                  - success
              example:
                message: Invalid Request
                success: false
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - code
                  - message
                  - success
              example:
                code: auth_type_not_found
                message: >-
                  Could not determine authentication type from request. Please
                  provide a valid Authorization header or X-API-Key header.
                success: false
          headers: {}
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - message
                  - success
              example:
                message: Resource not found
                success: false
          headers: {}
        '422':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        code:
                          type: string
                        message:
                          type: string
                  success:
                    type: boolean
                required:
                  - message
                  - errors
                  - success
              example:
                message: Invalid Request
                errors:
                  - field: field_name
                    code: validation_required
                    message: This field is required
                success: false
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - message
                  - success
              example:
                message: Internal server error
                success: false
          headers: {}
      deprecated: false
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````