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

> Create a player for your video, and customise it.



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/openapi.json post /libraries/{libraryId}/players
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}/players:
    post:
      tags:
        - Player Themes
      summary: Create Player
      description: Create a player for your video, and customise it.
      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:
                name:
                  type: string
                  description: >-
                    Name of the player configuration used to identify it within
                    your account.
                language:
                  type: string
                  description: Default language code for interface text (e.g., en, es).
                font_family:
                  type: string
                  description: Font family used for player UI text.
                custom_html:
                  type: string
                  description: Custom HTML or script snippets to embed in the player.
                playback_speeds:
                  type: array
                  items:
                    oneOf:
                      - type: number
                      - type: integer
                  description: >-
                    List of playback speed options available to users (e.g.,
                    0.5x, 1x, 1.5x, 2x).
                is_beta_enabled:
                  type: boolean
                  description: Enables experimental or beta player features for testing.
                is_default:
                  type: boolean
                  description: >-
                    Marks this player configuration as the default for all
                    videos.
                enable_resumable_position:
                  type: boolean
                  description: >-
                    Allows viewers to resume playback from their last watched
                    position.
                vast_tag_url:
                  type: boolean
                  description: >-
                    VAST ad tag URL for video ad integration. Leave empty if ads
                    are not used.
                dynamic_watermark:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                      description: Enables dynamic watermark display during playback.
                    font_size:
                      type: integer
                      description: Font size of the watermark text.
                    font_color:
                      type: string
                      description: >-
                        Text color of the watermark in HEX format (e.g.,
                        #FFFFFF).
                    background_color:
                      type: string
                      description: Background color behind the watermark text.
                    interval:
                      type: integer
                      description: Interval in seconds for watermark position changes.
                  description: >-
                    Defines watermark display settings such as font, color, and
                    movement interval.
                analytics:
                  type: object
                  properties:
                    facebook_pixel_id:
                      type: string
                      description: Facebook Pixel ID for audience tracking and analytics.
                    google_analytics_id:
                      type: string
                      description: Google Analytics ID for tracking player events.
                  description: >-
                    Contains analytics integration details for tracking player
                    performance and engagement.
                appearance:
                  type: object
                  properties:
                    primary_color:
                      type: string
                      description: >-
                        Primary color of the player interface (buttons, progress
                        bar, etc.).
                    caption_font_color:
                      type: string
                      description: Text color for captions.
                    caption_background_color:
                      type: string
                      description: Background color for captions.
                    font_size:
                      type: integer
                      description: Default font size for UI text.
                    caption_font_size:
                      type: integer
                      description: Font size for caption text.
                    logo:
                      type: string
                      description: URL of the logo displayed in the player (optional).
                    logo_destination_url:
                      type: string
                      description: URL to open when the logo is clicked.
                  description: >-
                    Controls the visual appearance of the player including
                    colors, fonts, and logo.
                controls:
                  type: object
                  properties:
                    loop:
                      type: boolean
                      description: Enables loop playback mode for videos.
                    backward:
                      type: boolean
                      description: Enables the backward seek button.
                    forward:
                      type: boolean
                      description: Enables the forward seek button.
                    big_play_button:
                      type: boolean
                      description: >-
                        Shows the central play button overlay before playback
                        starts.
                    captions:
                      type: boolean
                      description: Enables the captions toggle button.
                    cast:
                      type: boolean
                      description: Enables Chromecast or casting options.
                    current_time:
                      type: boolean
                      description: Displays the current playback time.
                    duration:
                      type: boolean
                      description: Displays the total video duration.
                    fullscreen:
                      type: boolean
                      description: Enables fullscreen toggle option.
                    mute:
                      type: boolean
                      description: Enables the mute/unmute button.
                    picture_in_picture:
                      type: boolean
                      description: Allows Picture-in-Picture playback mode.
                    play_pause:
                      type: boolean
                      description: Enables play/pause button control.
                    progress:
                      type: boolean
                      description: Displays the progress bar for playback tracking.
                    settings:
                      type: boolean
                      description: >-
                        Enables settings menu for resolution, captions, and
                        speed options.
                    volume:
                      type: boolean
                      description: Enables volume control slider.
                    controls_visible:
                      type: boolean
                      description: Keeps playback controls visible at all times.
                    preload_video_one_page_load:
                      type: boolean
                      description: >-
                        Preloads video data automatically when the page loads
                        for faster playback start.
                    hide_branding:
                      type: boolean
                      description: Hides player branding or watermark.
                    enable_download_button:
                      type: boolean
                      description: >-
                        Displays a download button to allow users to download
                        the video.
                    airplay:
                      type: boolean
                      description: Enables AirPlay streaming for Apple devices.
                    chromecast:
                      type: boolean
                      description: >-
                        Enables Chromecast support for casting playback to
                        external devices.
                  description: >-
                    Defines player control visibility and functionality,
                    including playback, captions, and casting options.
              required:
                - name
            example:
              name: Default Player2
              language: en
              font_family: Rubik
              custom_html: <!-- Custom analytics script -->
              playback_speeds:
                - 0.5
                - 1
                - 1.5
                - 2
              is_beta_enabled: true
              is_default: false
              enable_resumable_position: true
              vast_tag_url: ''
              dynamic_watermark:
                enabled: true
                font_size: 16
                font_color: '#FFFFFF'
                background_color: '#000000'
                interval: 10
              analytics:
                facebook_pixel_id: null
                google_analytics_id: null
              appearance:
                primary_color: '#1D9BF0'
                caption_font_color: '#FFFFFF'
                caption_background_color: '#000000'
                font_size: 16
                caption_font_size: 18
                logo: null
                logo_destination_url: null
              controls:
                loop: true
                backward: true
                forward: true
                big_play_button: true
                captions: true
                cast: false
                current_time: true
                duration: true
                fullscreen: true
                mute: true
                picture_in_picture: true
                play_pause: true
                progress: true
                settings: true
                volume: true
                controls_visible: true
                preload: true
                hide_branding: true
                enable_download_button: false
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      created_by:
                        type: string
                      updated_by:
                        type: string
                      font_family:
                        type: string
                      custom_html_footer:
                        type: string
                      name:
                        type: string
                      language:
                        type: string
                      custom_html_head:
                        type: string
                      playback_speeds:
                        type: array
                        items:
                          oneOf:
                            - type: number
                            - type: integer
                      appearance:
                        type: object
                        properties:
                          primary_color:
                            type: string
                          caption_font_color:
                            type: string
                          caption_background_color:
                            type: string
                          font_size:
                            type: integer
                          caption_font_size:
                            type: integer
                        required:
                          - primary_color
                          - caption_font_color
                          - caption_background_color
                          - font_size
                          - caption_font_size
                      library_id:
                        type: string
                      organization_id:
                        type: string
                      id:
                        type: string
                      controls:
                        type: object
                        properties:
                          backward:
                            type: boolean
                          forward:
                            type: boolean
                          big_play_button:
                            type: boolean
                          captions:
                            type: boolean
                          current_time:
                            type: boolean
                          duration:
                            type: boolean
                          fullscreen:
                            type: boolean
                          mute:
                            type: boolean
                          picture_in_picture:
                            type: boolean
                          play_pause:
                            type: boolean
                          progress:
                            type: boolean
                          settings:
                            type: boolean
                          volume:
                            type: boolean
                        required:
                          - backward
                          - forward
                          - big_play_button
                          - captions
                          - current_time
                          - duration
                          - fullscreen
                          - mute
                          - picture_in_picture
                          - play_pause
                          - progress
                          - settings
                          - volume
                      is_beta_enabled:
                        type: boolean
                      is_default:
                        type: boolean
                      enable_resumable_position:
                        type: boolean
                    required:
                      - created_at
                      - updated_at
                      - created_by
                      - updated_by
                      - font_family
                      - custom_html_footer
                      - name
                      - language
                      - custom_html_head
                      - playback_speeds
                      - appearance
                      - library_id
                      - organization_id
                      - id
                      - controls
                      - is_beta_enabled
                      - is_default
                      - enable_resumable_position
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - data
                  - message
                  - success
              example:
                data:
                  created_at: '2025-10-19T20:00:43.475427+06:00'
                  updated_at: '2025-10-19T20:00:43.475427+06:00'
                  created_by: ce877d84-c433-46fc-803d-ede73a8375bc
                  updated_by: ce877d84-c433-46fc-803d-ede73a8375bc
                  font_family: Rubik
                  custom_html_footer: <footer>Powered by MyApp</footer>
                  name: Default Player
                  language: en
                  custom_html_head: <!-- Custom analytics script -->
                  playback_speeds:
                    - 0.5
                    - 1
                    - 1.5
                    - 2
                  appearance:
                    primary_color: '#1D9BF0'
                    caption_font_color: '#FFFFFF'
                    caption_background_color: '#000000'
                    font_size: 16
                    caption_font_size: 18
                  library_id: b17ccdc7-eb3d-4d03-b0af-781d3c38c7e9
                  organization_id: 8babf060-e844-49e5-893c-35d0bf2edfc6
                  id: 1aaff3a6-5d28-4be5-a503-eff1f33e7010
                  controls:
                    backward: true
                    forward: true
                    big_play_button: true
                    captions: true
                    current_time: true
                    duration: true
                    fullscreen: true
                    mute: true
                    picture_in_picture: true
                    play_pause: true
                    progress: true
                    settings: true
                    volume: true
                  is_beta_enabled: true
                  is_default: false
                  enable_resumable_position: true
                message: Player 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

````