From e96c4ddb901f7ef3111994781e6eb34d359dd1d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jun 2026 17:28:55 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Generated/Shotstack.Models.Asset.g.cs | 41 ++++++- .../Shotstack.Models.AudioAsset.g.cs | 106 ++++++++++++++---- .../Shotstack.Models.ImageAsset.g.cs | 58 ++++++---- .../Shotstack.Models.ImageToVideoAsset.g.cs | 23 ++-- .../Shotstack.Models.TextToImageAsset.g.cs | 21 ++-- .../Shotstack.Models.TextToSpeechAsset.g.cs | 18 ++- .../Shotstack.Models.VideoAsset.g.cs | 78 +++++++++---- src/libs/Shotstack/openapi.json | 88 ++++++++++++--- 8 files changed, 326 insertions(+), 107 deletions(-) diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs index 93684ed..7ae358a 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs @@ -15,7 +15,14 @@ namespace Shotstack public global::Shotstack.AssetDiscriminatorType? Type { get; } /// - /// The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file. + /// The VideoAsset adds a video to a Clip. The video can be sourced from a URL
+ /// (`src`) or generated from a text prompt (`prompt`), optionally seeded from a
+ /// starting image (`seed`). Exactly one of `src` or `prompt` must be provided.
+ /// - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
+ /// - **Generated:** set `prompt` to describe the motion. Optionally set `seed` to
+ /// a starting image URL (image-to-video). Use `model` to choose the generator
+ /// (e.g. `luma-ray-3`, `runpod-itv-mini`). The generated `src` is filled in
+ /// automatically. ///
#if NET6_0_OR_GREATER public global::Shotstack.VideoAsset? Video { get; init; } @@ -52,7 +59,12 @@ public bool TryPickVideo( : throw new global::System.InvalidOperationException($"Expected union variant 'Video' but the value was {ToString()}."); /// - /// The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file. + /// The ImageAsset adds an image to a Clip. The image can be sourced from a URL
+ /// (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
+ /// `prompt` must be provided.
+ /// - **Source URL:** set `src` to the publicly accessible URL of a jpg or png file.
+ /// - **Generated:** set `prompt` to describe the image; the engine generates it
+ /// using the provider chosen by `model` and fills `src` in automatically. ///
#if NET6_0_OR_GREATER public global::Shotstack.ImageAsset? Image { get; init; } @@ -165,7 +177,15 @@ public bool TryPickRichText( : throw new global::System.InvalidOperationException($"Expected union variant 'RichText' but the value was {ToString()}."); /// - /// The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file. + /// The AudioAsset adds audio to a Clip. The audio can be sourced from a URL
+ /// (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
+ /// `prompt` must be provided.
+ /// - **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).
+ /// - **Generated speech:** set `prompt` to the spoken text and `voice` to a voice
+ /// identifier (text-to-speech). Optionally set `language`/`newscaster`.
+ /// - **Generated music or SFX:** set `prompt` describing the sound; omit `voice`.
+ /// - Use `model` to choose the generator. The generated `src` is filled in
+ /// automatically. ///
#if NET6_0_OR_GREATER public global::Shotstack.AudioAsset? Audio { get; init; } @@ -522,6 +542,9 @@ public bool TryPickSvg( : throw new global::System.InvalidOperationException($"Expected union variant 'Svg' but the value was {ToString()}."); /// + /// **Notice: TextToImageAsset is deprecated. Use [ImageAsset](#tocs_imageasset)
+ /// with `prompt` instead.** This type continues to function and is internally
+ /// rewritten to ImageAsset; no behaviour change for existing integrations.
/// The TextToImageAsset lets you create a dynamic image from a text prompt. ///
#if NET6_0_OR_GREATER @@ -559,6 +582,10 @@ public bool TryPickTextToImage( : throw new global::System.InvalidOperationException($"Expected union variant 'TextToImage' but the value was {ToString()}."); /// + /// **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
+ /// with `prompt` and `seed` instead.** This type continues to function and is
+ /// internally rewritten to VideoAsset; no behaviour change for existing
+ /// integrations.
/// The ImageToVideoAsset lets you create a video from an image and a text prompt. ///
#if NET6_0_OR_GREATER @@ -596,7 +623,13 @@ public bool TryPickImageToVideo( : throw new global::System.InvalidOperationException($"Expected union variant 'ImageToVideo' but the value was {ToString()}."); /// - /// The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service. The generated audio can be trimmed, faded and have its volume and speed adjusted using the same properties available on the AudioAsset. + /// **Notice: TextToSpeechAsset is deprecated. Use [AudioAsset](#tocs_audioasset)
+ /// with `prompt` (the spoken text) and `voice` instead.** This type continues to
+ /// function and is internally rewritten to AudioAsset; no behaviour change for
+ /// existing integrations.
+ /// The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service.
+ /// The generated audio can be trimmed, faded and have its volume and speed adjusted using the
+ /// same properties available on the AudioAsset. ///
#if NET6_0_OR_GREATER public global::Shotstack.TextToSpeechAsset? TextToSpeech { get; init; } diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.AudioAsset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.AudioAsset.g.cs index cdee795..4f20091 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.AudioAsset.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.AudioAsset.g.cs @@ -4,7 +4,15 @@ namespace Shotstack { /// - /// The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file. + /// The AudioAsset adds audio to a Clip. The audio can be sourced from a URL
+ /// (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
+ /// `prompt` must be provided.
+ /// - **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).
+ /// - **Generated speech:** set `prompt` to the spoken text and `voice` to a voice
+ /// identifier (text-to-speech). Optionally set `language`/`newscaster`.
+ /// - **Generated music or SFX:** set `prompt` describing the sound; omit `voice`.
+ /// - Use `model` to choose the generator. The generated `src` is filled in
+ /// automatically. ///
public sealed partial class AudioAsset { @@ -18,13 +26,51 @@ public sealed partial class AudioAsset public global::Shotstack.AudioAssetType Type { get; set; } = global::Shotstack.AudioAssetType.Audio; /// - /// The audio source URL. The URL must be publicly accessible or include credentials.
+ /// The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3 ///
/// https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3 [global::System.Text.Json.Serialization.JsonPropertyName("src")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Src { get; set; } + public string? Src { get; set; } + + /// + /// A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.
+ /// Example: Welcome to today's broadcast. + ///
+ /// Welcome to today's broadcast. + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.
+ /// Example: Matthew + ///
+ /// Matthew + [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + public string? Voice { get; set; } + + /// + /// Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.
+ /// Example: en-US + ///
+ /// en-US + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { get; set; } + + /// + /// Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("newscaster")] + public bool? Newscaster { get; set; } + + /// + /// The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.
+ /// Example: polly-neural + ///
+ /// polly-neural + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// /// The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached. @@ -40,7 +86,7 @@ public sealed partial class AudioAsset public global::Shotstack.OneOf>? Volume { get; set; } /// - /// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).
+ /// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).
/// Example: 1 ///
/// 1 @@ -68,9 +114,29 @@ public sealed partial class AudioAsset /// Initializes a new instance of the class. ///
/// - /// The audio source URL. The URL must be publicly accessible or include credentials.
+ /// The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3 /// + /// + /// A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.
+ /// Example: Welcome to today's broadcast. + /// + /// + /// Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.
+ /// Example: Matthew + /// + /// + /// Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.
+ /// Example: en-US + /// + /// + /// Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.
+ /// Default Value: false + /// + /// + /// The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.
+ /// Example: polly-neural + /// /// /// The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached. /// @@ -78,7 +144,7 @@ public sealed partial class AudioAsset /// Set the volume of the audio clip. Use a number or an array of [Tween](./#tocs_tween) objects to create custom volume transitions. /// /// - /// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).
+ /// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).
/// Example: 1 /// /// @@ -96,7 +162,12 @@ public sealed partial class AudioAsset [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AudioAsset( - string src, + string? src, + string? prompt, + string? voice, + string? language, + bool? newscaster, + string? model, double? trim, global::Shotstack.OneOf>? volume, float? speed, @@ -104,7 +175,12 @@ public AudioAsset( global::Shotstack.AudioAssetType type = global::Shotstack.AudioAssetType.Audio) { this.Type = type; - this.Src = src ?? throw new global::System.ArgumentNullException(nameof(src)); + this.Src = src; + this.Prompt = prompt; + this.Voice = voice; + this.Language = language; + this.Newscaster = newscaster; + this.Model = model; this.Trim = trim; this.Volume = volume; this.Speed = speed; @@ -118,17 +194,5 @@ public AudioAsset() { } - /// - /// Creates a new from its single non-const required field, - /// hardcoding any const discriminator fields. - /// - public static AudioAsset FromSrc(string src) - { - return new AudioAsset - { - Src = src, - }; - } - } } \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.ImageAsset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.ImageAsset.g.cs index 58ecf83..cc80a28 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.ImageAsset.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.ImageAsset.g.cs @@ -4,7 +4,12 @@ namespace Shotstack { /// - /// The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file. + /// The ImageAsset adds an image to a Clip. The image can be sourced from a URL
+ /// (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
+ /// `prompt` must be provided.
+ /// - **Source URL:** set `src` to the publicly accessible URL of a jpg or png file.
+ /// - **Generated:** set `prompt` to describe the image; the engine generates it
+ /// using the provider chosen by `model` and fills `src` in automatically. ///
public sealed partial class ImageAsset { @@ -18,13 +23,28 @@ public sealed partial class ImageAsset public global::Shotstack.ImageAssetType Type { get; set; } = global::Shotstack.ImageAssetType.Image; /// - /// The image source URL. The URL must be publicly accessible or include credentials.
+ /// The image source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg ///
/// https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg [global::System.Text.Json.Serialization.JsonPropertyName("src")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Src { get; set; } + public string? Src { get; set; } + + /// + /// A text prompt to generate the image from. When set without `src`, the engine generates an image and fills `src` automatically. Use `model` to choose the generator.
+ /// Example: A serene landscape with a crystal-clear mountain lake at sunrise. + ///
+ /// A serene landscape with a crystal-clear mountain lake at sunrise. + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// The generation model to use when `prompt` is set (e.g. `flux-schnell`). Defaults to the platform's preferred generator if omitted.
+ /// Example: flux-schnell + ///
+ /// flux-schnell + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// /// Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset. @@ -42,9 +62,17 @@ public sealed partial class ImageAsset /// Initializes a new instance of the class. /// /// - /// The image source URL. The URL must be publicly accessible or include credentials.
+ /// The image source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg /// + /// + /// A text prompt to generate the image from. When set without `src`, the engine generates an image and fills `src` automatically. Use `model` to choose the generator.
+ /// Example: A serene landscape with a crystal-clear mountain lake at sunrise. + /// + /// + /// The generation model to use when `prompt` is set (e.g. `flux-schnell`). Defaults to the platform's preferred generator if omitted.
+ /// Example: flux-schnell + /// /// /// Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset. /// @@ -56,12 +84,16 @@ public sealed partial class ImageAsset [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageAsset( - string src, + string? src, + string? prompt, + string? model, global::Shotstack.Crop? crop, global::Shotstack.ImageAssetType type = global::Shotstack.ImageAssetType.Image) { this.Type = type; - this.Src = src ?? throw new global::System.ArgumentNullException(nameof(src)); + this.Src = src; + this.Prompt = prompt; + this.Model = model; this.Crop = crop; } @@ -72,17 +104,5 @@ public ImageAsset() { } - /// - /// Creates a new from its single non-const required field, - /// hardcoding any const discriminator fields. - /// - public static ImageAsset FromSrc(string src) - { - return new ImageAsset - { - Src = src, - }; - } - } } \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.ImageToVideoAsset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.ImageToVideoAsset.g.cs index 04191cc..dd3cd5f 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.ImageToVideoAsset.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.ImageToVideoAsset.g.cs @@ -4,8 +4,13 @@ namespace Shotstack { /// + /// **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
+ /// with `prompt` and `seed` instead.** This type continues to function and is
+ /// internally rewritten to VideoAsset; no behaviour change for existing
+ /// integrations.
/// The ImageToVideoAsset lets you create a video from an image and a text prompt. ///
+ [global::System.Obsolete("This model marked as deprecated.")] public sealed partial class ImageToVideoAsset { /// @@ -15,6 +20,7 @@ public sealed partial class ImageToVideoAsset /// global::Shotstack.ImageToVideoAssetType.ImageToVideo [global::System.Text.Json.Serialization.JsonPropertyName("type")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.ImageToVideoAssetTypeJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.ImageToVideoAssetType Type { get; set; } = global::Shotstack.ImageToVideoAssetType.ImageToVideo; /// @@ -24,6 +30,7 @@ public sealed partial class ImageToVideoAsset /// https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg [global::System.Text.Json.Serialization.JsonPropertyName("src")] [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] public required string Src { get; set; } /// @@ -32,6 +39,7 @@ public sealed partial class ImageToVideoAsset /// /// Slowly zoom out and orbit left around the object. [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Obsolete("This property marked as deprecated.")] public string? Prompt { get; set; } /// @@ -41,6 +49,7 @@ public sealed partial class ImageToVideoAsset /// 16:9 [global::System.Text.Json.Serialization.JsonPropertyName("aspectRatio")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.ImageToVideoAssetAspectRatioJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.ImageToVideoAssetAspectRatio? AspectRatio { get; set; } /// @@ -49,12 +58,14 @@ public sealed partial class ImageToVideoAsset /// /// 1 [global::System.Text.Json.Serialization.JsonPropertyName("speed")] + [global::System.Obsolete("This property marked as deprecated.")] public float? Speed { get; set; } /// /// Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset. /// [global::System.Text.Json.Serialization.JsonPropertyName("crop")] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.Crop? Crop { get; set; } /// @@ -115,17 +126,5 @@ public ImageToVideoAsset() { } - /// - /// Creates a new from its single non-const required field, - /// hardcoding any const discriminator fields. - /// - public static ImageToVideoAsset FromSrc(string src) - { - return new ImageToVideoAsset - { - Src = src, - }; - } - } } \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.TextToImageAsset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.TextToImageAsset.g.cs index 5c15990..8d92c8a 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.TextToImageAsset.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.TextToImageAsset.g.cs @@ -4,8 +4,12 @@ namespace Shotstack { /// + /// **Notice: TextToImageAsset is deprecated. Use [ImageAsset](#tocs_imageasset)
+ /// with `prompt` instead.** This type continues to function and is internally
+ /// rewritten to ImageAsset; no behaviour change for existing integrations.
/// The TextToImageAsset lets you create a dynamic image from a text prompt. ///
+ [global::System.Obsolete("This model marked as deprecated.")] public sealed partial class TextToImageAsset { /// @@ -15,6 +19,7 @@ public sealed partial class TextToImageAsset /// global::Shotstack.TextToImageAssetType.TextToImage [global::System.Text.Json.Serialization.JsonPropertyName("type")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.TextToImageAssetTypeJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.TextToImageAssetType Type { get; set; } = global::Shotstack.TextToImageAssetType.TextToImage; /// @@ -24,6 +29,7 @@ public sealed partial class TextToImageAsset /// A serene landscape featuring a crystal-clear mountain lake at sunrise. The water reflects the pink and orange sky like a mirror. In the foreground, a majestic pine tree stands tall, its branches framing the view. Snow-capped peaks rise in the distance, their edges softened by a light morning mist. A pair of deer drink from the lake's edge, creating gentle ripples on the otherwise still surface. [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] public required string Prompt { get; set; } /// @@ -32,6 +38,7 @@ public sealed partial class TextToImageAsset /// /// 512 [global::System.Text.Json.Serialization.JsonPropertyName("width")] + [global::System.Obsolete("This property marked as deprecated.")] public int? Width { get; set; } /// @@ -40,12 +47,14 @@ public sealed partial class TextToImageAsset /// /// 512 [global::System.Text.Json.Serialization.JsonPropertyName("height")] + [global::System.Obsolete("This property marked as deprecated.")] public int? Height { get; set; } /// /// Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset. /// [global::System.Text.Json.Serialization.JsonPropertyName("crop")] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.Crop? Crop { get; set; } /// @@ -100,17 +109,5 @@ public TextToImageAsset() { } - /// - /// Creates a new from its single non-const required field, - /// hardcoding any const discriminator fields. - /// - public static TextToImageAsset FromPrompt(string prompt) - { - return new TextToImageAsset - { - Prompt = prompt, - }; - } - } } \ No newline at end of file diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.TextToSpeechAsset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.TextToSpeechAsset.g.cs index a559f28..797f1ef 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.TextToSpeechAsset.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.TextToSpeechAsset.g.cs @@ -4,8 +4,15 @@ namespace Shotstack { /// - /// The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service. The generated audio can be trimmed, faded and have its volume and speed adjusted using the same properties available on the AudioAsset. + /// **Notice: TextToSpeechAsset is deprecated. Use [AudioAsset](#tocs_audioasset)
+ /// with `prompt` (the spoken text) and `voice` instead.** This type continues to
+ /// function and is internally rewritten to AudioAsset; no behaviour change for
+ /// existing integrations.
+ /// The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service.
+ /// The generated audio can be trimmed, faded and have its volume and speed adjusted using the
+ /// same properties available on the AudioAsset. ///
+ [global::System.Obsolete("This model marked as deprecated.")] public sealed partial class TextToSpeechAsset { /// @@ -15,6 +22,7 @@ public sealed partial class TextToSpeechAsset /// global::Shotstack.TextToSpeechAssetType.TextToSpeech [global::System.Text.Json.Serialization.JsonPropertyName("type")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.TextToSpeechAssetTypeJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.TextToSpeechAssetType Type { get; set; } = global::Shotstack.TextToSpeechAssetType.TextToSpeech; /// @@ -24,6 +32,7 @@ public sealed partial class TextToSpeechAsset /// This is a text to speech example generated by Shotstack [global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] public required string Text { get; set; } /// @@ -33,6 +42,7 @@ public sealed partial class TextToSpeechAsset /// Matthew [global::System.Text.Json.Serialization.JsonPropertyName("voice")] [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] public required string Voice { get; set; } /// @@ -41,6 +51,7 @@ public sealed partial class TextToSpeechAsset /// /// en-US [global::System.Text.Json.Serialization.JsonPropertyName("language")] + [global::System.Obsolete("This property marked as deprecated.")] public string? Language { get; set; } /// @@ -48,12 +59,14 @@ public sealed partial class TextToSpeechAsset /// Default Value: false /// [global::System.Text.Json.Serialization.JsonPropertyName("newscaster")] + [global::System.Obsolete("This property marked as deprecated.")] public bool? Newscaster { get; set; } /// /// The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the trim point. The audio will play until the file ends or the Clip length is reached. /// [global::System.Text.Json.Serialization.JsonPropertyName("trim")] + [global::System.Obsolete("This property marked as deprecated.")] public double? Trim { get; set; } /// @@ -61,6 +74,7 @@ public sealed partial class TextToSpeechAsset /// [global::System.Text.Json.Serialization.JsonPropertyName("volume")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.OneOfJsonConverter>))] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.OneOf>? Volume { get; set; } /// @@ -69,6 +83,7 @@ public sealed partial class TextToSpeechAsset /// /// 1 [global::System.Text.Json.Serialization.JsonPropertyName("speed")] + [global::System.Obsolete("This property marked as deprecated.")] public float? Speed { get; set; } /// @@ -80,6 +95,7 @@ public sealed partial class TextToSpeechAsset /// [global::System.Text.Json.Serialization.JsonPropertyName("effect")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Shotstack.JsonConverters.TextToSpeechAssetEffectJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] public global::Shotstack.TextToSpeechAssetEffect? Effect { get; set; } /// diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.VideoAsset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.VideoAsset.g.cs index 0763307..530aa88 100644 --- a/src/libs/Shotstack/Generated/Shotstack.Models.VideoAsset.g.cs +++ b/src/libs/Shotstack/Generated/Shotstack.Models.VideoAsset.g.cs @@ -4,7 +4,14 @@ namespace Shotstack { /// - /// The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file. + /// The VideoAsset adds a video to a Clip. The video can be sourced from a URL
+ /// (`src`) or generated from a text prompt (`prompt`), optionally seeded from a
+ /// starting image (`seed`). Exactly one of `src` or `prompt` must be provided.
+ /// - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
+ /// - **Generated:** set `prompt` to describe the motion. Optionally set `seed` to
+ /// a starting image URL (image-to-video). Use `model` to choose the generator
+ /// (e.g. `luma-ray-3`, `runpod-itv-mini`). The generated `src` is filled in
+ /// automatically. ///
public sealed partial class VideoAsset { @@ -18,13 +25,36 @@ public sealed partial class VideoAsset public global::Shotstack.VideoAssetType Type { get; set; } = global::Shotstack.VideoAssetType.Video; /// - /// The video source URL. The URL must be publicly accessible or include credentials.
+ /// The video source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4 ///
/// https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4 [global::System.Text.Json.Serialization.JsonPropertyName("src")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Src { get; set; } + public string? Src { get; set; } + + /// + /// A text prompt to generate the video from. When set without `src`, the engine generates a video and fills `src` automatically. Optionally pair with `seed` for image-to-video. Use `model` to choose the generator.
+ /// Example: Slowly zoom out and orbit left around the object. + ///
+ /// Slowly zoom out and orbit left around the object. + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// Seed image URL for image-to-video generation. The image is used as the starting frame; `prompt` describes the motion. Has no effect unless `prompt` is set.
+ /// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/seed-image.jpg + ///
+ /// https://s3-ap-northeast-1.amazonaws.com/my-bucket/seed-image.jpg + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public string? Seed { get; set; } + + /// + /// The generation model to use when `prompt` is set (e.g. `luma-ray-3`, `runpod-itv-mini`). Defaults to the platform's preferred generator if omitted.
+ /// Example: luma-ray-3 + ///
+ /// luma-ray-3 + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// /// Set to `true` to force re-encoding of the video during preprocessing. This can help resolve compatibility issues, fix rotation problems, synchronize audio, or convert formats. The video will be processed to ensure optimal compatibility with the rendering engine.
@@ -61,7 +91,7 @@ public sealed partial class VideoAsset public global::Shotstack.VideoAssetVolumeEffect? VolumeEffect { get; set; } /// - /// Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).
+ /// Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).
/// Example: 1 ///
/// 1 @@ -90,9 +120,21 @@ public sealed partial class VideoAsset /// Initializes a new instance of the class. ///
/// - /// The video source URL. The URL must be publicly accessible or include credentials.
+ /// The video source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4 /// + /// + /// A text prompt to generate the video from. When set without `src`, the engine generates a video and fills `src` automatically. Optionally pair with `seed` for image-to-video. Use `model` to choose the generator.
+ /// Example: Slowly zoom out and orbit left around the object. + /// + /// + /// Seed image URL for image-to-video generation. The image is used as the starting frame; `prompt` describes the motion. Has no effect unless `prompt` is set.
+ /// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/seed-image.jpg + /// + /// + /// The generation model to use when `prompt` is set (e.g. `luma-ray-3`, `runpod-itv-mini`). Defaults to the platform's preferred generator if omitted.
+ /// Example: luma-ray-3 + /// /// /// Set to `true` to force re-encoding of the video during preprocessing. This can help resolve compatibility issues, fix rotation problems, synchronize audio, or convert formats. The video will be processed to ensure optimal compatibility with the rendering engine.
/// Example: false @@ -112,7 +154,7 @@ public sealed partial class VideoAsset /// </ul> /// /// - /// Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).
+ /// Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).
/// Example: 1 /// /// @@ -129,7 +171,10 @@ public sealed partial class VideoAsset [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VideoAsset( - string src, + string? src, + string? prompt, + string? seed, + string? model, bool? transcode, double? trim, global::Shotstack.OneOf>? volume, @@ -140,7 +185,10 @@ public VideoAsset( global::Shotstack.VideoAssetType type = global::Shotstack.VideoAssetType.Video) { this.Type = type; - this.Src = src ?? throw new global::System.ArgumentNullException(nameof(src)); + this.Src = src; + this.Prompt = prompt; + this.Seed = seed; + this.Model = model; this.Transcode = transcode; this.Trim = trim; this.Volume = volume; @@ -157,17 +205,5 @@ public VideoAsset() { } - /// - /// Creates a new from its single non-const required field, - /// hardcoding any const discriminator fields. - /// - public static VideoAsset FromSrc(string src) - { - return new VideoAsset - { - Src = src, - }; - } - } } \ No newline at end of file diff --git a/src/libs/Shotstack/openapi.json b/src/libs/Shotstack/openapi.json index 96079e4..52a9f36 100644 --- a/src/libs/Shotstack/openapi.json +++ b/src/libs/Shotstack/openapi.json @@ -1151,7 +1151,7 @@ "additionalProperties": false }, "VideoAsset": { - "description": "The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file.", + "description": "The VideoAsset adds a video to a Clip. The video can be sourced from a URL\n(`src`) or generated from a text prompt (`prompt`), optionally seeded from a\nstarting image (`seed`). Exactly one of `src` or `prompt` must be provided.\n\n- **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.\n- **Generated:** set `prompt` to describe the motion. Optionally set `seed` to\n a starting image URL (image-to-video). Use `model` to choose the generator\n (e.g. `luma-ray-3`, `runpod-itv-mini`). The generated `src` is filled in\n automatically.\n", "type": "object", "properties": { "type": { @@ -1163,12 +1163,29 @@ "type": "string" }, "src": { - "description": "The video source URL. The URL must be publicly accessible or include credentials.", + "description": "The video source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.", "type": "string", "minLength": 1, "pattern": "\\S", "example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4" }, + "prompt": { + "description": "A text prompt to generate the video from. When set without `src`, the engine generates a video and fills `src` automatically. Optionally pair with `seed` for image-to-video. Use `model` to choose the generator.", + "type": "string", + "maxLength": 4000, + "example": "Slowly zoom out and orbit left around the object." + }, + "seed": { + "description": "Seed image URL for image-to-video generation. The image is used as the starting frame; `prompt` describes the motion. Has no effect unless `prompt` is set.", + "type": "string", + "minLength": 1, + "example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/seed-image.jpg" + }, + "model": { + "description": "The generation model to use when `prompt` is set (e.g. `luma-ray-3`, `runpod-itv-mini`). Defaults to the platform's preferred generator if omitted.", + "type": "string", + "example": "luma-ray-3" + }, "transcode": { "type": "boolean", "description": "Set to `true` to force re-encoding of the video during preprocessing. This can help resolve compatibility issues, fix rotation problems, synchronize audio, or convert formats. The video will be processed to ensure optimal compatibility with the rendering engine.", @@ -1210,7 +1227,7 @@ "type": "string" }, "speed": { - "description": "Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).", + "description": "Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).", "type": "number", "format": "float", "minimum": 0, @@ -1226,12 +1243,11 @@ }, "additionalProperties": false, "required": [ - "type", - "src" + "type" ] }, "ImageAsset": { - "description": "The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file.", + "description": "The ImageAsset adds an image to a Clip. The image can be sourced from a URL\n(`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or\n`prompt` must be provided.\n\n- **Source URL:** set `src` to the publicly accessible URL of a jpg or png file.\n- **Generated:** set `prompt` to describe the image; the engine generates it\n using the provider chosen by `model` and fills `src` in automatically.\n", "type": "object", "properties": { "type": { @@ -1243,20 +1259,30 @@ "type": "string" }, "src": { - "description": "The image source URL. The URL must be publicly accessible or include credentials.", + "description": "The image source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.", "type": "string", "minLength": 1, "pattern": "\\S", "example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg" }, + "prompt": { + "description": "A text prompt to generate the image from. When set without `src`, the engine generates an image and fills `src` automatically. Use `model` to choose the generator.", + "type": "string", + "maxLength": 4000, + "example": "A serene landscape with a crystal-clear mountain lake at sunrise." + }, + "model": { + "description": "The generation model to use when `prompt` is set (e.g. `flux-schnell`). Defaults to the platform's preferred generator if omitted.", + "type": "string", + "example": "flux-schnell" + }, "crop": { "$ref": "#/components/schemas/Crop" } }, "additionalProperties": false, "required": [ - "type", - "src" + "type" ] }, "TextAsset": { @@ -1390,7 +1416,7 @@ ] }, "AudioAsset": { - "description": "The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.", + "description": "The AudioAsset adds audio to a Clip. The audio can be sourced from a URL\n(`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or\n`prompt` must be provided.\n\n- **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).\n- **Generated speech:** set `prompt` to the spoken text and `voice` to a voice\n identifier (text-to-speech). Optionally set `language`/`newscaster`.\n- **Generated music or SFX:** set `prompt` describing the sound; omit `voice`.\n- Use `model` to choose the generator. The generated `src` is filled in\n automatically.\n", "type": "object", "properties": { "type": { @@ -1402,12 +1428,38 @@ "type": "string" }, "src": { - "description": "The audio source URL. The URL must be publicly accessible or include credentials.", + "description": "The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.", "type": "string", "minLength": 1, "pattern": "\\S", "example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3" }, + "prompt": { + "description": "A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.", + "type": "string", + "maxLength": 4000, + "example": "Welcome to today's broadcast." + }, + "voice": { + "description": "Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.", + "type": "string", + "example": "Matthew" + }, + "language": { + "description": "Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.", + "type": "string", + "example": "en-US" + }, + "newscaster": { + "description": "Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.", + "type": "boolean", + "default": false + }, + "model": { + "description": "The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.", + "type": "string", + "example": "polly-neural" + }, "trim": { "description": "The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached.", "type": "number" @@ -1433,7 +1485,7 @@ ] }, "speed": { - "description": "Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).", + "description": "Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).", "type": "number", "format": "float", "minimum": 0, @@ -1453,8 +1505,7 @@ }, "additionalProperties": false, "required": [ - "type", - "src" + "type" ] }, "ShapeAsset": { @@ -1879,7 +1930,8 @@ ] }, "TextToImageAsset": { - "description": "The TextToImageAsset lets you create a dynamic image from a text prompt.", + "deprecated": true, + "description": "**Notice: TextToImageAsset is deprecated. Use [ImageAsset](#tocs_imageasset)\nwith `prompt` instead.** This type continues to function and is internally\nrewritten to ImageAsset; no behaviour change for existing integrations.\n\nThe TextToImageAsset lets you create a dynamic image from a text prompt.\n", "properties": { "type": { "type": "string", @@ -1916,7 +1968,8 @@ ] }, "ImageToVideoAsset": { - "description": "The ImageToVideoAsset lets you create a video from an image and a text prompt.", + "deprecated": true, + "description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt` and `seed` instead.** This type continues to function and is\ninternally rewritten to VideoAsset; no behaviour change for existing\nintegrations.\n\nThe ImageToVideoAsset lets you create a video from an image and a text prompt.\n", "properties": { "type": { "type": "string", @@ -1971,7 +2024,8 @@ ] }, "TextToSpeechAsset": { - "description": "The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service. The generated audio can be trimmed, faded and have its volume and speed adjusted using the same properties available on the AudioAsset.", + "deprecated": true, + "description": "**Notice: TextToSpeechAsset is deprecated. Use [AudioAsset](#tocs_audioasset)\nwith `prompt` (the spoken text) and `voice` instead.** This type continues to\nfunction and is internally rewritten to AudioAsset; no behaviour change for\nexisting integrations.\n\nThe TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service.\nThe generated audio can be trimmed, faded and have its volume and speed adjusted using the\nsame properties available on the AudioAsset.\n", "type": "object", "properties": { "type": {