Skip to main content
PUT
/
library
/
{libraryId}
/
videos
/
{videoId}
Upload Video
curl --request PUT \
  --url https://video.bunnycdn.com/library/{libraryId}/videos/{videoId} \
  --header 'AccessKey: <api-key>' \
  --header 'Content-Type: application/octet-stream' \
  --data '"<string>"'
import requests

url = "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}"

payload = "<string>"
headers = {
"AccessKey": "<api-key>",
"Content-Type": "application/octet-stream"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {AccessKey: '<api-key>', 'Content-Type': 'application/octet-stream'},
body: JSON.stringify('<string>')
};

fetch('https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode('<string>'),
CURLOPT_HTTPHEADER => [
"AccessKey: <api-key>",
"Content-Type: application/octet-stream"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}"

payload := strings.NewReader("\"<string>\"")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("AccessKey", "<api-key>")
req.Header.Add("Content-Type", "application/octet-stream")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}")
.header("AccessKey", "<api-key>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();
require 'uri'
require 'net/http'

url = URI("https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["AccessKey"] = '<api-key>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "<string>",
  "statusCode": 123
}

Authorizations

AccessKey
string
header
required

AccessKey based authentication

Path Parameters

libraryId
integer<int64>
required
videoId
string
required

Query Parameters

jitEnabled
boolean

Marks whether JIT encoding should be enabled for this video (works only when Premium Encoding is enabled), overrides library settings

enabledResolutions
string | null
default:""

Comma separated list of resolutions enabled for encoding, available options: 240p, 360p, 480p, 720p, 1080p, 1440p, 2160p

enabledOutputCodecs
string | null
default:""

List of codecs that will be used to encode the file (overrides library settings). Available values: x264, vp9

transcribeEnabled
boolean | null

Setting this to true will enable transcription on this video. Enabling this will incur transcription charges

transcribeLanguages
string | null

Comma separated list of languages that will be used as target languages, use ISO 639-1 language codes.

sourceLanguage
string | null

Language spoken in the video, use ISO 639-1 language codes.

generateTitle
boolean | null

Whether video title should be generated from transcription.

generateDescription
boolean | null

Whether video description should be generated from transcription.

generateChapters
boolean | null

Whether video chapters should be generated from transcription.

generateMoments
boolean | null

Whether video moments should be generated from transcription.

Body

application/octet-stream

Video file to upload

The body is of type file.

Response

The video was successfully uploaded

success
boolean

Determines if the request was successful

message
string | null

Response message description

statusCode
integer<int32>

The response status code

Last modified on July 9, 2026