> ## 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 Transcoding Profile

> Create a new transcoding profile with video, audio, and AI settings



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/openapi.json post /libraries/{libraryId}/transcoding/profiles
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}/transcoding/profiles:
    post:
      tags:
        - Transcoding Profiles
      summary: Create Transcoding Profile
      description: Create a new transcoding profile with video, audio, and AI settings
      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: >-
                    The name of the transcoding profile used to identify it
                    within the library.
                description:
                  type: string
                  description: >-
                    Short summary describing the purpose or usage of this
                    profile.
                transcoding:
                  type: object
                  properties:
                    format:
                      type: array
                      items:
                        type: string
                      description: Output container formats to generate (e.g., hls, dash).
                    resolutions:
                      type: array
                      items:
                        type: string
                      description: Video resolutions to produce (e.g., 720p, 1080p, 4k).
                    video_codec:
                      type: array
                      items:
                        type: string
                      description: >-
                        List of video codecs to use during encoding (e.g.,
                        h264).
                    per_title_encoding:
                      description: >-
                        Enables per-title encoding optimization to improve
                        quality and bitrate efficiency. Default value is true.
                      type: boolean
                    image_overlay:
                      type: object
                      properties:
                        url:
                          type: string
                          description: >-
                            URL of the image to overlay (e.g., watermark or
                            logo).
                        position:
                          type: string
                          description: >-
                            Position of the overlay image on the video (e.g.,
                            top-right, bottom-left).
                        opacity:
                          type: number
                          description: Transparency level of the overlay image (0–1).
                        size:
                          type: object
                          properties:
                            width:
                              type: integer
                              description: Width of the overlay image in pixels.
                            height:
                              type: integer
                              description: Height of the overlay image in pixels.
                          required:
                            - width
                            - height
                        margin:
                          type: object
                          properties:
                            x:
                              type: integer
                              description: >-
                                Horizontal margin offset for the overlay
                                position.
                            'y':
                              type: integer
                              description: Vertical margin offset for the overlay position.
                          required:
                            - x
                            - 'y'
                      required:
                        - url
                        - position
                      description: Transcoding image overlay object.
                    thumbnail:
                      type: object
                      properties:
                        mode:
                          type: string
                          description: Thumbnail generation mode.
                        format:
                          type: string
                          description: Output format for thumbnails (e.g., jpg, webp).
                        count:
                          type: integer
                          description: Number of thumbnails to generate.
                        spritesheet:
                          type: boolean
                          description: >-
                            Whether to generate a spritesheet containing
                            multiple thumbnails.
                      required:
                        - mode
                        - format
                        - count
                        - spritesheet
                      description: Transcoding thumbnails object.
                    generate_subtitles:
                      type: object
                      properties:
                        audio_language:
                          type: string
                          description: Source audio language for auto-generated subtitles.
                        subtitle_languages:
                          type: array
                          items:
                            type: string
                          description: >-
                            Target subtitle languages to generate (e.g., ["en",
                            "es"]).
                      required:
                        - audio_language
                        - subtitle_languages
                      description: Transcoding subtitle object.
                    drm:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: >-
                            Enables Digital Rights Management (DRM) for
                            protected playback.
                        widevine:
                          type: object
                          properties:
                            signing_secret:
                              type: string
                              description: Secret key used to sign Widevine DRM licenses.
                            license_proxy_url:
                              type: string
                              description: URL of the Widevine license proxy server.
                          required:
                            - signing_secret
                            - license_proxy_url
                        fairplay:
                          type: object
                          properties:
                            license_url:
                              type: string
                              description: License server URL for FairPlay DRM.
                            certificate_url:
                              type: string
                              description: Certificate URL for FairPlay DRM authorization.
                            application_service_key:
                              type: string
                              description: >-
                                Application key used for FairPlay
                                authentication.
                            private_key_passphrase:
                              type: string
                              description: Passphrase for the FairPlay private key.
                          required:
                            - license_url
                            - certificate_url
                            - application_service_key
                            - private_key_passphrase
                      required:
                        - enabled
                        - widevine
                        - fairplay
                      description: Transcoding DRM object.
                    basic_drm:
                      type: boolean
                      description: Enables a simplified DRM protection mechanism.
                    mp4_access:
                      type: boolean
                      description: Allows direct download or playback of MP4 files.
                    keep_original:
                      type: boolean
                      description: >-
                        Keeps the original source file after transcoding
                        completes.
                  required:
                    - format
                    - resolutions
                    - video_codec
                    - image_overlay
                  description: Transcoding property object.
              required:
                - name
                - transcoding
            example: |-
              {
                "name": "Vidinfra Ultra Secure Profile",
                "description": "4K adaptive bitrate profile with AES encryption, DRM, watermark, and subtitle generation.",
                "transcoding": {
                  "format": [
                    "abr"
                  ],
                  "resolutions": [
                    "144p",
                    "240p",
                    "360p",
                    "480p",
                    "720p",
                    "1080p",
                    "1440p",
                    "2160p"
                  ],
                  "video_codec": [
                    "h264"
                  ],
                  "per_title_encoding": true, // default true
                  "image_overlay": {
                    "url": "https://cdn.vidinfra.com/watermark.png",
                    "position": "bottom-right",
                    "opacity": 0.8,
                    "size": {
                      "width": 100,
                      "height": 60
                    },
                    "margin": {
                      "x": 100,
                      "y": 60
                    }
                  },
                  "thumbnail": { // default
                    "mode": "auto",
                    "format": "jpg",
                    "count": 6,
                    "spritesheet": true
                  },
                  "generate_subtitles": {
                    "audio_language": "en",
                    "subtitle_languages": [
                      "es",
                      "fr"
                    ]
                  },
                  "drm": {
                    "enabled": true,
                    "widevine": {
                      "signing_secret": "YOUR_SECURE_PROXY_SECRET",
                      "license_proxy_url": "https://widevine.yourdomain.com/licence/"
                    },
                    "fairplay": {
                      "license_url": "https://license.fairplay.vidinfra.com",
                      "certificate_url": "https://yourdomain.com/fairplay.cer",
                      "application_service_key": "YOUR_APPLE_SERVICE_KEY",
                      "private_key_passphrase": "YOUR_PRIVATE_KEY_PASSPHRASE"
                    }
                  },
                  "basic_drm": true,
                  "mp4_access": false,
                  "keep_original": false
                }
              }
      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
                      deleted_at:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                      transcoding:
                        type: object
                        properties:
                          drm:
                            type: object
                            properties:
                              widevine:
                                type: object
                                properties:
                                  signing_secret:
                                    type: string
                                  license_proxy_url:
                                    type: string
                                required:
                                  - signing_secret
                                  - license_proxy_url
                              fairplay:
                                type: object
                                properties:
                                  license_url:
                                    type: string
                                  certificate_url:
                                    type: string
                                  application_service_key:
                                    type: string
                                  private_key_passphrase:
                                    type: string
                                required:
                                  - license_url
                                  - certificate_url
                                  - application_service_key
                                  - private_key_passphrase
                              enabled:
                                type: boolean
                            required:
                              - widevine
                              - fairplay
                              - enabled
                          format:
                            type: array
                            items:
                              type: string
                          generate_subtitles:
                            type: object
                            properties:
                              audio_language:
                                type: string
                              subtitle_languages:
                                type: array
                                items:
                                  type: string
                            required:
                              - audio_language
                              - subtitle_languages
                          resolutions:
                            type: array
                            items:
                              type: string
                          video_codec:
                            type: array
                            items:
                              type: string
                          thumbnail:
                            type: object
                            properties:
                              mode:
                                type: string
                              format:
                                type: string
                              count:
                                type: integer
                              spritesheet:
                                type: boolean
                            required:
                              - mode
                              - format
                              - count
                              - spritesheet
                          image_overlay:
                            type: object
                            properties:
                              url:
                                type: string
                              position:
                                type: string
                              opacity:
                                type: number
                              size:
                                type: object
                                properties:
                                  width:
                                    type: integer
                                  height:
                                    type: integer
                                required:
                                  - width
                                  - height
                              margin:
                                type: object
                                properties:
                                  x:
                                    type: integer
                                  'y':
                                    type: integer
                                required:
                                  - x
                                  - 'y'
                            required:
                              - url
                              - position
                              - opacity
                              - size
                              - margin
                          per_title_encoding:
                            type: boolean
                          basic_drm:
                            type: boolean
                          mp4_access:
                            type: boolean
                          keep_original:
                            type: boolean
                        required:
                          - drm
                          - format
                          - generate_subtitles
                          - resolutions
                          - video_codec
                          - thumbnail
                          - image_overlay
                          - per_title_encoding
                          - basic_drm
                          - mp4_access
                          - keep_original
                      id:
                        type: string
                      organization_id:
                        type: string
                      library_id:
                        type: string
                      is_default:
                        type: boolean
                    required:
                      - updated_at
                      - created_at
                      - created_by
                      - updated_by
                      - deleted_at
                      - name
                      - description
                      - transcoding
                      - id
                      - organization_id
                      - library_id
                      - is_default
                  message:
                    type: string
                  success:
                    type: boolean
                required:
                  - data
                  - message
                  - success
              example:
                data:
                  updated_at: '2025-10-16T10:20:10.613203744+06:00'
                  created_at: '2025-10-16T10:20:10.613203744+06:00'
                  created_by: 2fa3fe27-ffcd-470b-becf-83f6f22a93ab
                  updated_by: null
                  deleted_at: null
                  name: Vidinfra Ultra Secure Profile
                  description: >-
                    4K adaptive bitrate profile with AES encryption, DRM,
                    watermark, and subtitle generation.
                  transcoding:
                    drm:
                      widevine:
                        signing_secret: YOUR_SECURE_PROXY_SECRET
                        license_proxy_url: https://widevine.yourdomain.com/licence/
                      fairplay:
                        license_url: https://license.fairplay.vidinfra.com
                        certificate_url: https://yourdomain.com/fairplay.cer
                        application_service_key: YOUR_APPLE_SERVICE_KEY
                        private_key_passphrase: YOUR_PRIVATE_KEY_PASSPHRASE
                      enabled: true
                    format:
                      - abr
                    generate_subtitles:
                      audio_language: en
                      subtitle_languages:
                        - es
                        - fr
                    resolutions:
                      - 144p
                      - 240p
                      - 360p
                      - 480p
                      - 720p
                      - 1080p
                      - 1440p
                      - 2160p
                    video_codec:
                      - h264
                    thumbnail:
                      mode: auto
                      format: jpg
                      count: 6
                      spritesheet: true
                    image_overlay:
                      url: https://cdn.vidinfra.com/watermark.png
                      position: bottom-right
                      opacity: 0.8
                      size:
                        width: 100
                        height: 60
                      margin:
                        x: 100
                        'y': 60
                    per_title_encoding: true
                    basic_drm: true
                    mp4_access: false
                    keep_original: false
                  id: 1e293fc8-63a4-449d-aae2-dd460a025b45
                  organization_id: 677826f5-1aea-4cba-8973-043cdbc60f35
                  library_id: 3b06c833-b73c-43c3-8794-a123a0a6ef1d
                  is_default: false
                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

````