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

# Create Library

> Create a new video library within your Tenbyte account.
Libraries are used to organize video assets, folders, and related webhooks.



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/openapi.json post /libraries
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:
    post:
      tags:
        - Library
      summary: Create Library
      description: >-
        Create a new video library within your Tenbyte account.

        Libraries are used to organize video assets, folders, and related
        webhooks.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: >-
                    The display name of the library. This identifies the
                    library.
                region:
                  type: string
                  description: Deployment region or storage zone for the library.
                usage_type:
                  type: string
                  description: Defines how the library will be used.
                description:
                  type: string
                  description: Short summary of what this library is used for.
                default_privacy:
                  type: string
                  description: Sets the default privacy mode for uploaded assets.
                tags:
                  type: array
                  items:
                    type: string
                  description: >-
                    List of labels or keywords to categorize and quickly filter
                    libraries (e.g., ["marketing", "training", "internal"]).
              required:
                - name
                - region
                - usage_type
            example:
              name: Product Launch Video
              usage_type: marketing
              description: Videos for product launches and announcements.
              default_privacy: unlisted
              tags:
                - product
                - launch
                - marketing
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      updated_at:
                        type: string
                      created_at:
                        type: string
                      created_by:
                        type: string
                      updated_by:
                        type: string
                      distribution:
                        type: object
                        properties:
                          distribution_id:
                            type: string
                          distribution_url:
                            type: string
                        required:
                          - distribution_id
                          - distribution_url
                      name:
                        type: string
                      usage_type:
                        type: string
                      default_privacy:
                        type: string
                      status:
                        type: string
                      region:
                        type: string
                      description:
                        type: string
                      tags:
                        type: array
                        items:
                          type: string
                      id:
                        type: string
                      organization_id:
                        type: string
                      metrics:
                        type: object
                        properties:
                          video_count:
                            type: integer
                          storage_used:
                            type: integer
                          video_duration:
                            type: integer
                        required:
                          - video_count
                          - storage_used
                          - video_duration
                    required:
                      - updated_at
                      - created_at
                      - created_by
                      - updated_by
                      - distribution
                      - name
                      - usage_type
                      - default_privacy
                      - status
                      - region
                      - description
                      - tags
                      - id
                      - organization_id
                      - metrics
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - data
                  - message
                  - success
              example:
                data:
                  updated_at: '2025-10-16T10:28:09.121621765+06:00'
                  created_at: '2025-10-16T10:28:09.121621765+06:00'
                  created_by: 2fa3fe27-ffcd-470b-becf-83f6f22a93ab
                  updated_by: null
                  deleted_at: null
                  region: us-east-1
                  description: Videos for product launches and announcements.
                  default_privacy: unlisted
                  tags:
                    - product
                    - launch
                    - marketing
                  status: provisioning
                  usage_type: marketing
                  name: Product Launch Videos
                  security:
                    whitelist_referrer_policy: null
                    black_country_policy: null
                  id: ab0507fa-3020-4cfa-8f6a-a5864e65f06c
                  distribution_id: 00000000-0000-0000-0000-000000000000
                  organization_id: 677826f5-1aea-4cba-8973-043cdbc60f35
                message: Library Created Successfully
                success: true
          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

````