---
title: "Create Video"
method: POST
path: "/library/{libraryId}/videos"
tags: ["Manage Videos"]
---

# Create Video

`POST /library/{libraryId}/videos`

## Path parameters

- `libraryId` integer, required

## Request body

- CreateVideoModel
  - `title` string, required — The title of the video
  - `collectionId` string, nullable — The ID of the collection where the video will be put
  - `thumbnailTime` integer, nullable — Video time in ms to extract the main video thumbnail.

## Response `200`

The video was successfully created and returned as the response.

- VideoModel
  - `videoLibraryId` integer, required — The ID of the video library that the video belongs to
  - `guid` string, required — The unique ID of the video
  - `title` string, required — The title of the video
  - `description` string, nullable — The description of the video
  - `dateUploaded` string, date-time, required — The date when the video was uploaded
  - `views` integer, required — The number of views the video received
  - `isPublic` boolean, required — Determines if the video is publically accessible
  - `length` integer, required — The duration of the video in seconds
  - `status` union, required
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
  - `framerate` number, double, required — The framerate of the video
  - `rotation` integer, nullable — The rotation of the video
  - `width` integer, required — The width of the original video file
  - `height` integer, required — The height of the original video file
  - `availableResolutions` string, nullable — The available resolutions of the video
  - `outputCodecs` string, required — Encoded output codecs of the video
  - `thumbnailCount` integer, required — The number of thumbnails generated for this video
  - `encodeProgress` integer, required — The current encode progress of the video
  - `storageSize` integer, required — The amount of storage used by this video
  - `captions` CaptionModel[], nullable — The list of captions available for the video
    - `srclang` string, nullable — The unique srclang shortcode for the caption
    - `label` string, nullable — The text description label for the caption
    - `version` integer
  - `hasMP4Fallback` boolean, required — Determines if the video has MP4 fallback files generated
  - `collectionId` string, nullable — The ID of the collection where the video belongs
  - `thumbnailFileName` string, nullable — The file name of the thumbnail inside of the storage
  - `thumbnailUrl` string, nullable — The CDN URL of the thumbnail
  - `thumbnailBlurhash` string, nullable — Thumbnail blurhash to show while the actual thumbnail is being loaded
  - `averageWatchTime` integer, required — The average watch time of the video in seconds
  - `totalWatchTime` integer, required — The total video watch time in seconds
  - `category` string, nullable — The automatically detected category of the video
  - `chapters` ChapterModel[], nullable — The list of chapters available for the video
    - `title` string, required — The title of the chapter
    - `start` integer — The start time of the chapter in seconds
    - `end` integer — The end time of the chapter in seconds
  - `moments` MomentModel[], nullable — The list of moments available for the video
    - `label` string, required — The text description label for the chapter
    - `timestamp` integer — The timestamp of the moment in seconds
  - `metaTags` MetaTagModel[], nullable — The list of meta tags that have been added to the video
    - `property` string, nullable
    - `value` string, nullable
  - `transcodingMessages` TranscodingMessageModel[], nullable — The list of transcoding messages that describe potential issues while the video was transcoding
    - `timeStamp` string, date-time
    - `level` union
      - 0 — Shouldn't be used
      - 1 — An info message to the user, shouldn't break anythying
      - 2 — A warning message, for example that the transcoded video may break when playing
      - 3 — An error, meaning that the video will most likely not be playable
    - `issueCode` union
      - 0 — Shouldn't be used
      - 1 — Marks that there is a mismatch between lengths of audio and video streams in the transcoded file
      - 2 — Marks that transcoding completed with warnings
      - 3 — Marks that original video file has incompatible resolution or isn't a video stream
      - 4 — Marks that original video file has invalid framerate
      - 5 — Marks that video stream exceeded max duration
      - 6 — Marks that audio stream exceeded max duration
      - 7 — Marks that video file is corrupted and couldn't be processed properly
      - 8 — Marks that video transcription finished with errors and might not be complete
      - 9 — Marks that video file is not compatible with JIT encoding
      - 10 — Marks that video failed JIT encoding
      - 11 — Marks that captions generation failed
    - `message` string, nullable
    - `value` string, nullable
  - `jitEncodingEnabled` boolean, nullable
  - `smartGenerateStatus` union
    - 0
    - 1
    - 2
    - 3
    - 4
  - `smartGenerateFeaturesStatus` SmartGenerateFeaturesStatusModel
    - `title` union
      - 0
      - 1
      - 2
      - 3
      - 4
    - `description` union
      - 0
      - 1
      - 2
      - 3
      - 4
    - `chapters` union
      - 0
      - 1
      - 2
      - 3
      - 4
    - `moments` union
      - 0
      - 1
      - 2
      - 3
      - 4
  - `hasOriginal` boolean, nullable — Determines if video has the original file available in storage
  - `originalHash` string, nullable — Original uploaded file SHA256 hash
  - `hasHighQualityPreview` boolean, nullable

## Other responses

- `400` — Request was invalid
- `401` — The request authentication failed
- `403` — The request authorization failed
- `500` — Internal Server Error

---

[API](https://skmtc.net/bunny/apis/bunny-net-cdn-logging.md) · [All operations](https://skmtc.net/bunny/apis/bunny-net-cdn-logging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bunny/bunny-net-cdn-logging/versions/9e622620664b/schema)
