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

> Uploads video directly under a library.



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/openapi.json post /libraries/{libraryId}/videos
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}/videos:
    post:
      tags:
        - Video
      summary: Create Video
      description: Uploads video directly under a library.
      parameters:
        - name: libraryId
          in: path
          description: Unique identifier of the library.
          required: true
          example: a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The title or display name of the video.
                description:
                  type: string
                  description: Short summary or context about the video content.
                url:
                  type: string
                  description: Source URL of the uploaded or external video file.
                metadata:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        description: Metadata field name (e.g., size, codec).
                      value:
                        type: string
                        description: Metadata field value corresponding to the key.
                    required:
                      - key
                      - value
                  description: >-
                    Key–value pairs containing additional information or custom
                    attributes for the video.
                tags:
                  type: array
                  items:
                    type: string
                  description: Optional list of tags or labels for categorizing the video.
                folder_id:
                  type: string
                  description: >-
                    ID of the folder under which this video will be created. Use
                    null to store it directly in the library root.
              required:
                - url
            example:
              name: Video name
              description: This is my description
              url: https://example.com/sample/BigBuckBunny.mp4
              metadata:
                - key: note
                  value: this value of note
                - key: task
                  value: this value of task
              tags:
                - trending
                - viral
              folder_id: 8946e490-2cf3-48d2-82ae-99ab8e65a795
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      updated_at:
                        type: string
                      created_at:
                        type: string
                      assets:
                        type: object
                        properties:
                          thumbnails:
                            type: object
                            properties:
                              preview_url:
                                type: string
                              sprite_vtt_url:
                                type: string
                              default_url:
                                type: string
                              urls:
                                type: array
                                items:
                                  type: string
                            required:
                              - preview_url
                              - sprite_vtt_url
                              - default_url
                              - urls
                          playback:
                            type: object
                            properties:
                              direct_play_url:
                                type: string
                              hls_url:
                                type: string
                              dash_url:
                                type: string
                              embed_url:
                                type: string
                            required:
                              - direct_play_url
                              - hls_url
                              - dash_url
                              - embed_url
                        required:
                          - thumbnails
                          - playback
                      folder_id:
                        type: string
                      format:
                        type: string
                      status:
                        type: string
                      description:
                        type: string
                      name:
                        type: string
                      resolutions:
                        type: array
                        items:
                          type: string
                      tags:
                        type: string
                      metadata:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                          required:
                            - key
                            - value
                      size_bytes:
                        type: integer
                      raw_size_bytes:
                        type: integer
                      duration_seconds:
                        type: integer
                      duration:
                        type: integer
                      organization_id:
                        type: string
                      id:
                        type: string
                      library_id:
                        type: string
                    required:
                      - updated_at
                      - created_at
                      - assets
                      - folder_id
                      - format
                      - status
                      - description
                      - name
                      - resolutions
                      - tags
                      - metadata
                      - size_bytes
                      - raw_size_bytes
                      - duration_seconds
                      - duration
                      - organization_id
                      - id
                      - library_id
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - data
                  - message
                  - success
              example:
                data:
                  updated_at: '2025-11-10T14:44:36.377486+06:00'
                  created_at: '2025-11-10T14:44:36.377486+06:00'
                  assets:
                    thumbnails:
                      preview_url: >-
                        https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/preview.webp
                      sprite_vtt_url: >-
                        https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/sprite.vtt
                      default_url: >-
                        https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/thumbnail.jpg
                      urls:
                        - >-
                          https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/thumbnail.jpg
                        - >-
                          https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/thumbnail_1.jpg
                        - >-
                          https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/thumbnail_2.jpg
                        - >-
                          https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/thumbnail_3.jpg
                        - >-
                          https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/thumbnail_4.jpg
                        - >-
                          https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/thumbnail_5.jpg
                    playback:
                      direct_play_url: >-
                        /stream/314221a1-3cbf-4d3c-846e-f6c22bc43064/default/505362a2-7f3e-4bb3-b646-6571c079f635
                      hls_url: >-
                        https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/playlist.m3u8
                      dash_url: >-
                        https://openresty-v2.sohel.pro/505362a2-7f3e-4bb3-b646-6571c079f635/playlist.mpd
                      embed_url: >-
                        /stream/314221a1-3cbf-4d3c-846e-f6c22bc43064/default/505362a2-7f3e-4bb3-b646-6571c079f635
                  folder_id: null
                  format: abr
                  status: created
                  description: this is my description
                  name: Test video
                  resolutions:
                    - 240p
                    - 360p
                    - 480p
                    - 720p
                    - 1080p
                  tags: null
                  metadata:
                    - key: note
                      value: this value of note
                    - key: task
                      value: this value of task
                  size_bytes: 0
                  raw_size_bytes: 158008374
                  duration_seconds: 0
                  duration: 0
                  organization_id: a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04
                  id: 505362a2-7f3e-4bb3-b646-6571c079f635
                  library_id: 314221a1-3cbf-4d3c-846e-f6c22bc43064
                message: Video 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

````