Skip to content

🎥 Make videos programmatically with React

Add licenseKey to other SDKs

Pramod7b1ed74b3e3c
diff --git a/packages/lambda-php/src/RenderParams.php b/packages/lambda-php/src/RenderParams.php
index 55fe4037e6..9f5c1c8904 100644
--- a/packages/lambda-php/src/RenderParams.php
+++ b/packages/lambda-php/src/RenderParams.php
@@ -47,6 +47,7 @@ class RenderParams
protected $forceHeight = null;
protected $forceWidth = null;
protected $apiKey = null;
+ protected $licenseKey = null;
protected $offthreadVideoCacheSizeInBytes = null;
protected $mediaCacheSizeInBytes = null;
protected $offthreadVideoThreads = null;
@@ -90,6 +91,7 @@ class RenderParams
?int $forceHeight = null,
?int $forceWidth = null,
?int $apiKey = null,
+ ?string $licenseKey = null,
?int $offthreadVideoCacheSizeInBytes = null,
?int $mediaCacheSizeInBytes = null,
?int $offthreadVideoThreads = null,
@@ -145,6 +147,7 @@ class RenderParams
$this->forceHeight = $forceHeight;
$this->forceWidth = $forceWidth;
$this->apiKey = $apiKey;
+ $this->licenseKey = $licenseKey;
$this->offthreadVideoCacheSizeInBytes = $offthreadVideoCacheSizeInBytes;
$this->mediaCacheSizeInBytes = $mediaCacheSizeInBytes;
$this->offthreadVideoThreads = $offthreadVideoThreads;
@@ -199,6 +202,7 @@ class RenderParams
'forceHeight' => $this->getForceHeight(),
'forceWidth' => $this->getForceWidth(),
'apiKey' => $this->getApiKey(),
+ 'licenseKey' => $this->getLicenseKey(),
'offthreadVideoCacheSizeInBytes' => $this->getOffthreadVideoCacheSizeInBytes(),
'mediaCacheSizeInBytes' => $this->getMediaCacheSizeInBytes(),
'offthreadVideoThreads' => $this->getOffthreadVideoThreads(),
@@ -756,6 +760,11 @@ class RenderParams
$this->apiKey = $apiKey;
}
+ public function setLicenseKey($licenseKey)
+ {
+ $this->licenseKey = $licenseKey;
+ }
+
public function setOffthreadVideoCacheSizeInBytes($offthreadVideoCacheSizeInBytes)
{
$this->offthreadVideoCacheSizeInBytes = $offthreadVideoCacheSizeInBytes;
@@ -831,6 +840,11 @@ class RenderParams
return $this->apiKey;
}
+ public function getLicenseKey()
+ {
+ return $this->licenseKey;
+ }
+
public function getOffthreadVideoCacheSizeInBytes()
{
return $this->offthreadVideoCacheSizeInBytes;
diff --git a/packages/lambda-python/remotion_lambda/models.py b/packages/lambda-python/remotion_lambda/models.py
index 1a8f250ea0..845287bee4 100644
--- a/packages/lambda-python/remotion_lambda/models.py
+++ b/packages/lambda-python/remotion_lambda/models.py
@@ -319,7 +319,9 @@ class RenderMediaParams:
media_cache_size_in_bytes: Optional[int] = None
offthreadvideo_threads: Optional[int] = None
force_width: Optional[int] = None
+ # **DEPRECATED** - Use `license_key` instead. Will be removed in a future version.
api_key: Optional[str] = None
+ license_key: Optional[str] = None
audio_codec: Optional[str] = None
storage_class: Optional[str] = None
renderer_function_name: Optional[str] = None
@@ -375,6 +377,7 @@ class RenderMediaParams:
'offthreadVideoThreads': self.offthreadvideo_threads,
'forceWidth': self.force_width,
'apiKey': self.api_key,
+ 'licenseKey': self.license_key,
'bucketName': self.bucket_name,
'audioCodec': self.audio_codec,
'x264Preset': self.x264_preset,
@@ -441,6 +444,7 @@ class RenderStillParams:
default_factory=lambda: PlayInBrowser(type='play-in-browser')
)
force_width: Optional[int] = None
+ # **DEPRECATED** - Use `license_key` instead. Will be removed in a future version.
api_key: Optional[int] = None
storage_class: Optional[str] = None
force_height: Optional[int] = None
diff --git a/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb b/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
index 6b606f3154..69fabf39d7 100644
--- a/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
+++ b/packages/lambda-ruby/lib/remotion_lambda/render_media_on_lambda_payload.rb
@@ -21,6 +21,7 @@ def get_render_media_on_lambda_payload(
force_path_style: false,
force_width: nil,
api_key: nil,
+ license_key: nil,
frame_range: nil,
frames_per_lambda: nil,
image_format: "jpeg",
@@ -50,6 +51,10 @@ def get_render_media_on_lambda_payload(
chromium_options: {}
)
+if api_key != nil
+ warn "[DEPRECATED] The 'api_key' parameter is deprecated and will be removed in a future version. Please use 'license_key' instead."
+end
+
payload = {
audioBitrate: audio_bitrate,
audioCodec: audio_codec,
@@ -71,6 +76,7 @@ payload = {
forcePathStyle: force_path_style,
forceWidth: force_width,
apiKey: api_key,
+ licenseKey: license_key,
frameRange: frame_range,
framesPerLambda: frames_per_lambda,
imageFormat: image_format,
diff --git a/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb b/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
index e91847992e..5280060527 100644
--- a/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
+++ b/packages/lambda-ruby/lib/remotion_lambda/render_still_on_lambda_payload.rb
@@ -10,6 +10,7 @@ def get_render_still_on_lambda_payload(
force_path_style: false,
force_width: nil,
api_key: nil,
+ license_key: nil,
image_format: "jpeg",
input_props: {},
jpeg_quality: 80,
@@ -30,6 +31,10 @@ def get_render_still_on_lambda_payload(
frame: 0
)
+if api_key != nil
+ warn "[DEPRECATED] The 'api_key' parameter is deprecated and will be removed in a future version. Please use 'license_key' instead."
+end
+
payload = {
composition: composition,
chromiumOptions: chromium_options,
@@ -40,6 +45,7 @@ payload = {
forcePathStyle: force_path_style,
forceWidth: force_width,
apiKey: api_key,
+ licenseKey: license_key,
imageFormat: image_format,
inputProps: {
type: "payload",