---
title: "Add Video Library"
method: POST
path: "/videolibrary"
tags: ["Stream Video Library"]
---

# Add Video Library

`POST /videolibrary`

## Request

- Base URL: `https://api.bunny.net`
- URL: `https://api.bunny.net/videolibrary`
- Auth: one of:
  - API key in header `AccessKey`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/bunny/apis/bunny-net-api/docs/videolibrary/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- VideoLibraryCreateModel
  - `Name` string, required: The name of the Video Library.
  - `ReplicationRegions` string[], nullable: The geo-replication regions of the underlying storage zone
  - `PlayerVersion` integer, nullable: (Optional) Sets player version used for this library
  - `EncodingTier` 0 | 1: 0 = Free 1 = Premium
  - `JitEncodingEnabled` boolean, nullable: (Optional) Determines whether JIT encoding should be used for the library. Supported in premium encoding only.
  - `OutputCodecs` string, nullable: (Optional) Specifies which video codecs are used for encoding, provided as a comma-separated (CSV) string. Free encoding tier supports only x264. A premium encoding tier adds support for vp9, hevc, and av1.
  - `EnabledResolutions` string, nullable: (Optional) Sets the enabled resolutions for the transcoding. At least one resolution should be enabled. Possible values: 240p, 360p, 480p, 720p, 1080p, 1440p, 2160p
  - `BlockNoneReferrer` boolean, nullable: (Optional) Determines if requests without a referer should be blocked.
  - `EnableMP4Fallback` boolean, nullable: (Optional) Determines if MP4 fallback should be enabled for this library.
  - `KeepOriginalFiles` boolean, nullable: (Optional) Determines if the original file should be kept after the video is processed.
  - `AllowDirectPlay` boolean, nullable: (Optional) Determines if direct play URLs should be enabled for the library
  - `EnableMultiAudioTrackSupport` boolean, nullable: (Optional) Determines if multiple output audio track support is enabled on video library.
  - `EnableTranscribing` boolean, nullable: (Optional) Enables automatic audio transcribing for this library.
  - `TranscribingCaptionLanguages` string[], nullable: (Optional) Languages that captions will be automatically transcribed to.
  - `EnableTranscribingTitleGeneration` boolean, nullable: (Optional) Determines if automatic transcribing title generation is enabled for this library. Enabling any smart generation feature turns on transcribing automatically.
  - `EnableTranscribingDescriptionGeneration` boolean, nullable: (Optional) Determines if automatic transcribing description generation is enabled for this library. Enabling any smart generation feature turns on transcribing automatically.
  - `EnableTranscribingChaptersGeneration` boolean, nullable: (Optional) Determines if automatic transcribing chapters generation is enabled for this library. Enabling any smart generation feature turns on transcribing automatically.
  - `EnableTranscribingMomentsGeneration` boolean, nullable: (Optional) Determines if automatic transcribing moments generation is enabled for this library. Enabling any smart generation feature turns on transcribing automatically.
  - `AllowEarlyPlay` boolean, nullable: (Optional) Enables Early Play. Enabling this also exposes originals via CDN settings consistent with the video library update API.

## Response `201`

The added video library

- VideoLibraryModel
  - `Id` integer
  - `Name` string, nullable: The name of the Video Library.
  - `VideoCount` integer: The number of videos in the video library
  - `LiveStreamCount` integer, nullable: The total number of live streams contained by the video library
  - `TotalCount` integer: The total number of items contained by the video library
  - `TrafficUsage` integer: The amount of traffic usage this month
  - `StorageUsage` integer: The total amount of storage used by the library
  - `DateCreated` string, date-time: The date when the video library was created
  - `DateModified` string, date-time: The date when the video library was last modified
  - `ReplicationRegions` string[], nullable: The geo-replication regions of the underlying storage zone
  - `ApiKey` string, nullable: The API key used for authenticating with the video library
  - `ReadOnlyApiKey` string, nullable: The read-only API key used for authenticating with the video library
  - `HasWatermark` boolean: Determines if the video library has a watermark configured
  - `WatermarkPositionLeft` integer: The left offset of the watermark position (in %)
  - `WatermarkPositionTop` integer: The top offset of the watermark position (in %)
  - `WatermarkWidth` integer: The width of the watermark (in %)
  - `PullZoneId` integer: The ID of the connected underlying pull zone
  - `StorageZoneId` integer: The ID of the connected underlying storage zone
  - `WatermarkHeight` integer: The height of the watermark (in %)
  - `EnabledResolutions` string, nullable: The comma separated list of enabled resolutions
  - `ViAiPublisherId` string, nullable: The vi.ai publisher id for advertising configuration
  - `VastTagUrl` string, nullable: The URL of the VAST tag endpoint for advertising configuration
  - `WebhookUrl` string, nullable: The webhook URL of the video library
  - `CaptionsFontSize` integer: The captions display font size
  - `CaptionsFontColor` string, nullable: The captions display font color
  - `CaptionsBackground` string, nullable: The captions display background color
  - `UILanguage` string, nullable: The UI language of the player
  - `AllowEarlyPlay` boolean, nullable: Determines if the Early-Play feature is enabled. Always false while EnableDRM is true.
  - `PlayerTokenAuthenticationEnabled` boolean: Determines if the player token authentication is enabled
  - `AllowedReferrers` string[], nullable: The list of allowed referrer domains allowed to access the library
  - `BlockedReferrers` string[], nullable: The list of blocked referrer domains blocked from accessing the library
  - `BlockNoneReferrer` boolean: Determines if the requests without a referrer are blocked
  - `EnableMP4Fallback` boolean: Determines if the MP4 fallback feature is enabled
  - `KeepOriginalFiles` boolean: Determines if the original video files should be stored after encoding
  - `AllowDirectPlay` boolean: Determines direct play URLs are enabled for the library
  - `EnableDRM` boolean: Determines if MediaCage DRM is enabled. While true, AllowEarlyPlay and ExposeOriginals are always false.
  - `DrmVersion` 0 | 1 | 2: 0 = Basic 1 = Enterprise 2 = Basic V2
  - `AppleFairPlayDrm` AppleFairPlayDrm
    - `Enabled` boolean
    - `CertificateId` integer, nullable
    - `CertificateExpirationDate` string, date-time, nullable
    - `Provider` string, nullable
  - `GoogleWidevineDrm` GoogleWidevineDrm
    - `Enabled` boolean
    - `CertificateId` integer, nullable
    - `CertificateExpirationDate` string, date-time, nullable
    - `Provider` string, nullable
    - `SdOnlyForL3` boolean
    - `MinClientSecurityLevel` 0 | 1 | 2 | 3: 0 = None 1 = L1 2 = L2 3 = L3
  - `Bitrate240p` integer: The bitrate used for encoding 240p videos
  - `Bitrate360p` integer: The bitrate used for encoding 360p videos
  - `Bitrate480p` integer: The bitrate used for encoding 480p videos
  - `Bitrate720p` integer: The bitrate used for encoding 720p videos
  - `Bitrate1080p` integer: The bitrate used for encoding 1080p videos
  - `Bitrate1440p` integer: The bitrate used for encoding 1440p videos
  - `Bitrate2160p` integer: The bitrate used for encoding 2160p videos
  - `ApiAccessKey` string, nullable
  - `ShowHeatmap` boolean: Determines if the video watch heatmap should be displayed in the player.
  - `EnableContentTagging` boolean: Determines if content tagging should be enabled for this library.
  - `PullZoneType` 0 | 1: 0 = Premium 1 = Volume
  - `CustomHTML` string, nullable: The custom HTMl that is added into the head of the HTML player.
  - `Controls` string, nullable: The comma-separated list of controls displayed in the video player. Possible values: play-large, play, progress, current-time, duration, mute, volume, captions, settings, pip, airplay, fullscreen, rewind, fast-forward, and chromecast. Empty when all player UI controls are removed.
  - `PlaybackSpeeds` string, nullable: The list of playback speeds available in the video player.
  - `PlayerKeyColor` string, nullable: The key color of the player.
  - `FontFamily` string, nullable: The captions font family.
  - `WatermarkVersion` integer
  - `EnableTranscribing` boolean: Determines if the automatic audio transcribing is currently enabled for this zone.
  - `EnableTranscribingTitleGeneration` boolean: Determines if automatic transcribing title generation is currently enabled.
  - `EnableTranscribingDescriptionGeneration` boolean: Determines if automatic transcribing description generation is currently enabled.
  - `EnableTranscribingChaptersGeneration` boolean: Determines if automatic transcribing chapters generation is currently enabled.
  - `EnableTranscribingMomentsGeneration` boolean: Determines if automatic transcribing moments generation is currently enabled.
  - `TranscribingCaptionLanguages` string[], nullable: The list of languages that the captions will be automatically transcribed to.
  - `EnableCaptionsInPlaylist` boolean, nullable: Determines if any associated captions will be automatically signaled in the HLS master playlist via EXT-X-MEDIA tags, allowing client players to show captions.
  - `RememberPlayerPosition` boolean: Determines if the player will automatically remember the playback position.
  - `EnableMultiAudioTrackSupport` boolean: Determines if multiple output audio track support is enabled on video library.
  - `UseSeparateAudioStream` boolean: Determines whether output audio stream should be split from video stream segments.
  - `JitEncodingEnabled` boolean: Determines whether JIT encoding should be used for the library. Supported in premium encoding only.
  - `EncodingTier` 0 | 1: 0 = Free 1 = Premium
  - `OutputCodecs` string, nullable: Specifies which video codecs are used for encoding, provided as a comma-separated (CSV) string. Free encoding tier supports only x264. A premium encoding tier adds support for vp9, hevc, and av1.
  - `DrmBasePriceOverride` number, nullable: DRM (enterprise) monthly base price for this video library if it differs from list price.
  - `DrmCostPerLicenseOverride` number, nullable: DRM (enterprise) cost per license for this video library if it differs from list price.
  - `TranscribingPriceOverride` number, nullable
  - `PremiumEncodingPriceOverride` number, nullable
  - `MonthlyChargesTranscribing` number
  - `MonthlyChargesPremiumEncoding` number
  - `MonthlyChargesEnterpriseDrm` number
  - `FeatureFlags` string, nullable
  - `PlayerVersion` integer
  - `RemoveMetadataFromFallbackVideos` boolean: Marks whether all potential video metadata should be removed from the fallback files. Default false.
  - `ScaleVideoUsingBothDimensions` boolean: Marks whether videos should be scaled using both dimensions. Prevents videos being upscaled or unexpected aspect ratio changes. Default true.
  - `ExposeOriginals` boolean: Marks whether original video files are exposed via CDN. Always false while EnableDRM is true; original files are not protected by DRM.
  - `ExposeVideoMetadata` boolean: Marks whether video metadata in form of schema meta tags and LD+JSON should be exposed.
  - `EnableCompactControls` boolean: Marks whether compact controls should be enabled for the player.
  - `GeoBlocking` VideoGeoBlocking
    - `Enabled` boolean: Whether geo-blocking is enabled for the video library
    - `AllowedCountries` string[], nullable: The list of countries allowed to access the video library, 2 letter ISO 3166-1 code
    - `BlockedCountries` string[], nullable: The list of countries blocked from accessing the video library, 2 letter ISO 3166-1 code

## Other responses

- `400`: Failed to add video library
- `401`: The request authorization failed
- `500`: Internal Server Error

## Changes

- **2026-10-27** `2096a6606d8d`: 3 info
  - added the optional property `GeoBlocking` to the response with the `201` status
  - added the optional property `LiveStreamCount` to the response with the `201` status
  - added the optional property `TotalCount` to the response with the `201` status
- **2026-08-07** `205129a7ebd5`: 2 info
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `AccessKey`
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `bearer`
- **2026-04-23** `30efa45cf436`: 17 info
  - added the new optional request property `AllowDirectPlay`
  - added the new optional request property `AllowEarlyPlay`
  - added the new optional request property `BlockNoneReferrer`
  - added the new optional request property `EnableMP4Fallback`
  - …13 more
- **2026-04-12** `9123bf5c2354`: 6 breaking, 8 info
  - added the new required request property `Name`
  - the request's body became not nullable
  - request body became required
  - removed `#/components/schemas/VideoLibraryCreateModel` from the request body `oneOf` list
  - …10 more

[Operation history](https://skmtc.dev/bunny/apis/bunny-net-api/changes/videolibrary/post.md)

---

[API](https://skmtc.dev/bunny/apis/bunny-net-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-net-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-net-api/revisions/2b06f94dbfbf?raw)
