diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs index 948fe23..41c6417 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs @@ -27,8 +27,11 @@ public partial interface ISubpackageVideoGenerationClient /// /// Duration of the generated video in seconds /// + /// + /// Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. + /// /// - /// Whether to generate audio alongside the video. Defaults to true for models that support audio output, false otherwise. + /// Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. /// /// /// Reference images to guide video generation @@ -55,6 +58,7 @@ public partial interface ISubpackageVideoGenerationClient string prompt, global::OpenRouter.VideoGenerationRequestAspectRatio? aspectRatio = default, int? duration = default, + global::System.Collections.Generic.IList? frameImages = default, bool? generateAudio = default, global::System.Collections.Generic.IList? inputReferences = default, global::OpenRouter.VideoGenerationRequestProvider? provider = default, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FrameImageFrameType.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FrameImageFrameType.g.cs new file mode 100644 index 0000000..b6a0501 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FrameImageFrameType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class FrameImageFrameTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.FrameImageFrameType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenRouter.FrameImageFrameTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.FrameImageFrameType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.FrameImageFrameType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.FrameImageFrameType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenRouter.FrameImageFrameTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FrameImageFrameTypeNullable.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FrameImageFrameTypeNullable.g.cs new file mode 100644 index 0000000..ecad509 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FrameImageFrameTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class FrameImageFrameTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.FrameImageFrameType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenRouter.FrameImageFrameTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.FrameImageFrameType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.FrameImageFrameType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.FrameImageFrameType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenRouter.FrameImageFrameTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItems.g.cs new file mode 100644 index 0000000..49e4803 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItems.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class VideoModelSupportedFrameImagesItemsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.VideoModelSupportedFrameImagesItems Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenRouter.VideoModelSupportedFrameImagesItemsExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.VideoModelSupportedFrameImagesItems)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.VideoModelSupportedFrameImagesItems); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.VideoModelSupportedFrameImagesItems value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenRouter.VideoModelSupportedFrameImagesItemsExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItemsNullable.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItemsNullable.g.cs new file mode 100644 index 0000000..ef9d04f --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItemsNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class VideoModelSupportedFrameImagesItemsNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.VideoModelSupportedFrameImagesItems? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenRouter.VideoModelSupportedFrameImagesItemsExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.VideoModelSupportedFrameImagesItems)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.VideoModelSupportedFrameImagesItems?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.VideoModelSupportedFrameImagesItems? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenRouter.VideoModelSupportedFrameImagesItemsExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs index 9503ab8..a665a4f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs @@ -1385,6 +1385,10 @@ namespace OpenRouter typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.FrameImageFrameTypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.FrameImageFrameTypeNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionJsonConverter), typeof(global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionNullableJsonConverter), @@ -1397,6 +1401,10 @@ namespace OpenRouter typeof(global::OpenRouter.JsonConverters.VideoModelSupportedAspectRatiosItemsNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItemsJsonConverter), + + typeof(global::OpenRouter.JsonConverters.VideoModelSupportedFrameImagesItemsNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.VideoModelSupportedResolutionsItemsJsonConverter), typeof(global::OpenRouter.JsonConverters.VideoModelSupportedResolutionsItemsNullableJsonConverter), @@ -2662,21 +2670,26 @@ namespace OpenRouter [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestAspectRatio), TypeInfoPropertyName = "VideoGenerationRequestAspectRatio2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartImageImageUrl))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartImageType), TypeInfoPropertyName = "ContentPartImageType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageFrameType), TypeInfoPropertyName = "FrameImageFrameType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartImage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestProviderOptions))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestProvider))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestResolution), TypeInfoPropertyName = "VideoGenerationRequestResolution2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationResponseStatus), TypeInfoPropertyName = "VideoGenerationResponseStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationUsage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedAspectRatiosItems), TypeInfoPropertyName = "VideoModelSupportedAspectRatiosItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedFrameImagesItems), TypeInfoPropertyName = "VideoModelSupportedFrameImagesItems2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedResolutionsItems), TypeInfoPropertyName = "VideoModelSupportedResolutionsItems2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelSupportedSizesItems), TypeInfoPropertyName = "VideoModelSupportedSizesItems2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModel))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelsListResponse))] @@ -2774,9 +2787,11 @@ namespace OpenRouter [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs index 88af94d..a7e1496 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs @@ -4020,119 +4020,139 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::OpenRouter.ContentPartImage? Type998 { get; set; } + public global::OpenRouter.FrameImageFrameType? Type998 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequestProviderOptions? Type999 { get; set; } + public global::OpenRouter.FrameImage? Type999 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequestProvider? Type1000 { get; set; } + public global::OpenRouter.ContentPartImage? Type1000 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequestResolution? Type1001 { get; set; } + public global::OpenRouter.VideoGenerationRequestProviderOptions? Type1001 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequest? Type1002 { get; set; } + public global::OpenRouter.VideoGenerationRequestProvider? Type1002 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1003 { get; set; } + public global::OpenRouter.VideoGenerationRequestResolution? Type1003 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationResponseStatus? Type1004 { get; set; } + public global::OpenRouter.VideoGenerationRequest? Type1004 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationUsage? Type1005 { get; set; } + public global::System.Collections.Generic.IList? Type1005 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationResponse? Type1006 { get; set; } + public global::System.Collections.Generic.IList? Type1006 { get; set; } /// /// /// - public global::OpenRouter.VideoModelSupportedAspectRatiosItems? Type1007 { get; set; } + public global::OpenRouter.VideoGenerationResponseStatus? Type1007 { get; set; } /// /// /// - public global::OpenRouter.VideoModelSupportedResolutionsItems? Type1008 { get; set; } + public global::OpenRouter.VideoGenerationUsage? Type1008 { get; set; } /// /// /// - public global::OpenRouter.VideoModelSupportedSizesItems? Type1009 { get; set; } + public global::OpenRouter.VideoGenerationResponse? Type1009 { get; set; } /// /// /// - public global::OpenRouter.VideoModel? Type1010 { get; set; } + public global::OpenRouter.VideoModelSupportedAspectRatiosItems? Type1010 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1011 { get; set; } + public global::OpenRouter.VideoModelSupportedFrameImagesItems? Type1011 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1012 { get; set; } + public global::OpenRouter.VideoModelSupportedResolutionsItems? Type1012 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1013 { get; set; } + public global::OpenRouter.VideoModelSupportedSizesItems? Type1013 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1014 { get; set; } + public global::OpenRouter.VideoModel? Type1014 { get; set; } /// /// /// - public global::OpenRouter.VideoModelsListResponse? Type1015 { get; set; } + public global::System.Collections.Generic.IList? Type1015 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1016 { get; set; } + public global::System.Collections.Generic.IList? Type1016 { get; set; } /// /// /// - public global::OpenRouter.ExchangeAuthCodeForApiKeyRequest? Type1017 { get; set; } + public global::System.Collections.Generic.IList? Type1017 { get; set; } /// /// /// - public global::OpenRouter.OneOf? Type1018 { get; set; } + public global::System.Collections.Generic.IList? Type1018 { get; set; } /// /// /// - public global::OpenRouter.CreateAuthKeysCodeRequest? Type1019 { get; set; } + public global::System.Collections.Generic.IList? Type1019 { get; set; } /// /// /// - public global::OpenRouter.CreateEmbeddingsRequest? Type1020 { get; set; } + public global::OpenRouter.VideoModelsListResponse? Type1020 { get; set; } /// /// /// - public global::OpenRouter.CreateKeysRequest? Type1021 { get; set; } + public global::System.Collections.Generic.IList? Type1021 { get; set; } /// /// /// - public global::OpenRouter.OneOf? Type1022 { get; set; } + public global::OpenRouter.ExchangeAuthCodeForApiKeyRequest? Type1022 { get; set; } /// /// /// - public global::OpenRouter.UpdateKeysRequest? Type1023 { get; set; } + public global::OpenRouter.OneOf? Type1023 { get; set; } /// /// /// - public global::OpenRouter.OneOf? Type1024 { get; set; } + public global::OpenRouter.CreateAuthKeysCodeRequest? Type1024 { get; set; } /// /// /// - public global::OpenRouter.CreateRerankRequest? Type1025 { get; set; } + public global::OpenRouter.CreateEmbeddingsRequest? Type1025 { get; set; } /// /// /// - public byte[]? Type1026 { get; set; } + public global::OpenRouter.CreateKeysRequest? Type1026 { get; set; } + /// + /// + /// + public global::OpenRouter.OneOf? Type1027 { get; set; } + /// + /// + /// + public global::OpenRouter.UpdateKeysRequest? Type1028 { get; set; } + /// + /// + /// + public global::OpenRouter.OneOf? Type1029 { get; set; } + /// + /// + /// + public global::OpenRouter.CreateRerankRequest? Type1030 { get; set; } + /// + /// + /// + public byte[]? Type1031 { get; set; } /// /// @@ -4469,26 +4489,34 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType83 { get; set; } + public global::System.Collections.Generic.List? ListType83 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType84 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType85 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType84 { get; set; } + public global::System.Collections.Generic.List? ListType86 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType85 { get; set; } + public global::System.Collections.Generic.List? ListType87 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType86 { get; set; } + public global::System.Collections.Generic.List? ListType88 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType87 { get; set; } + public global::System.Collections.Generic.List? ListType89 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType88 { get; set; } + public global::System.Collections.Generic.List? ListType90 { get; set; } } } \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImage.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImage.Json.g.cs new file mode 100644 index 0000000..c78039e --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenRouter +{ + public sealed partial class FrameImage + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenRouter.FrameImage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenRouter.FrameImage), + jsonSerializerContext) as global::OpenRouter.FrameImage; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenRouter.FrameImage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenRouter.FrameImage), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.FrameImage; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImage.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImage.g.cs new file mode 100644 index 0000000..ee5e125 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImage.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// + /// + public sealed partial class FrameImage + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::OpenRouter.ContentPartImageImageUrl ImageUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeJsonConverter))] + public global::OpenRouter.ContentPartImageType Type { get; set; } + + /// + /// Whether this image represents the first or last frame of the video + /// + [global::System.Text.Json.Serialization.JsonPropertyName("frame_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.FrameImageFrameTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::OpenRouter.FrameImageFrameType FrameType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Whether this image represents the first or last frame of the video + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FrameImage( + global::OpenRouter.ContentPartImageImageUrl imageUrl, + global::OpenRouter.FrameImageFrameType frameType, + global::OpenRouter.ContentPartImageType type) + { + this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); + this.Type = type; + this.FrameType = frameType; + } + + /// + /// Initializes a new instance of the class. + /// + public FrameImage() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImageFrameType.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImageFrameType.g.cs new file mode 100644 index 0000000..2a41058 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FrameImageFrameType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// Whether this image represents the first or last frame of the video + /// + public enum FrameImageFrameType + { + /// + /// + /// + FirstFrame, + /// + /// + /// + LastFrame, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FrameImageFrameTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FrameImageFrameType value) + { + return value switch + { + FrameImageFrameType.FirstFrame => "first_frame", + FrameImageFrameType.LastFrame => "last_frame", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FrameImageFrameType? ToEnum(string value) + { + return value switch + { + "first_frame" => FrameImageFrameType.FirstFrame, + "last_frame" => FrameImageFrameType.LastFrame, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs index 36ec4ed..07ac8c6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs @@ -22,7 +22,13 @@ public sealed partial class VideoGenerationRequest public int? Duration { get; set; } /// - /// Whether to generate audio alongside the video. Defaults to true for models that support audio output, false otherwise. + /// Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("frame_images")] + public global::System.Collections.Generic.IList? FrameImages { get; set; } + + /// + /// Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. /// [global::System.Text.Json.Serialization.JsonPropertyName("generate_audio")] public bool? GenerateAudio { get; set; } @@ -89,8 +95,11 @@ public sealed partial class VideoGenerationRequest /// /// Duration of the generated video in seconds /// + /// + /// Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. + /// /// - /// Whether to generate audio alongside the video. Defaults to true for models that support audio output, false otherwise. + /// Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. /// /// /// Reference images to guide video generation @@ -115,6 +124,7 @@ public VideoGenerationRequest( string prompt, global::OpenRouter.VideoGenerationRequestAspectRatio? aspectRatio, int? duration, + global::System.Collections.Generic.IList? frameImages, bool? generateAudio, global::System.Collections.Generic.IList? inputReferences, global::OpenRouter.VideoGenerationRequestProvider? provider, @@ -124,6 +134,7 @@ public VideoGenerationRequest( { this.AspectRatio = aspectRatio; this.Duration = duration; + this.FrameImages = frameImages; this.GenerateAudio = generateAudio; this.InputReferences = inputReferences; this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoModel.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoModel.g.cs index d761526..1961f86 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoModel.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoModel.g.cs @@ -36,6 +36,12 @@ public sealed partial class VideoModel [global::System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } + /// + /// Whether the model supports generating audio alongside video + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generate_audio")] + public bool? GenerateAudio { get; set; } + /// /// Hugging Face model identifier, if applicable /// @@ -62,6 +68,12 @@ public sealed partial class VideoModel [global::System.Text.Json.Serialization.JsonPropertyName("pricing_skus")] public global::System.Collections.Generic.Dictionary? PricingSkus { get; set; } + /// + /// Whether the model supports deterministic generation via seed parameter + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public bool? Seed { get; set; } + /// /// Supported output aspect ratios /// @@ -74,6 +86,12 @@ public sealed partial class VideoModel [global::System.Text.Json.Serialization.JsonPropertyName("supported_durations")] public global::System.Collections.Generic.IList? SupportedDurations { get; set; } + /// + /// Supported frame image types (e.g. first_frame, last_frame) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("supported_frame_images")] + public global::System.Collections.Generic.IList? SupportedFrameImages { get; set; } + /// /// Supported output resolutions /// @@ -113,18 +131,27 @@ public sealed partial class VideoModel /// /// Description of the model /// + /// + /// Whether the model supports generating audio alongside video + /// /// /// Hugging Face model identifier, if applicable /// /// /// Pricing SKUs with provider prefix stripped, values as strings /// + /// + /// Whether the model supports deterministic generation via seed parameter + /// /// /// Supported output aspect ratios /// /// /// Supported video durations in seconds /// + /// + /// Supported frame image types (e.g. first_frame, last_frame) + /// /// /// Supported output resolutions /// @@ -141,10 +168,13 @@ public VideoModel( string id, string name, string? description, + bool? generateAudio, string? huggingFaceId, global::System.Collections.Generic.Dictionary? pricingSkus, + bool? seed, global::System.Collections.Generic.IList? supportedAspectRatios, global::System.Collections.Generic.IList? supportedDurations, + global::System.Collections.Generic.IList? supportedFrameImages, global::System.Collections.Generic.IList? supportedResolutions, global::System.Collections.Generic.IList? supportedSizes) { @@ -152,12 +182,15 @@ public VideoModel( this.CanonicalSlug = canonicalSlug ?? throw new global::System.ArgumentNullException(nameof(canonicalSlug)); this.Created = created; this.Description = description; + this.GenerateAudio = generateAudio; this.HuggingFaceId = huggingFaceId; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.PricingSkus = pricingSkus; + this.Seed = seed; this.SupportedAspectRatios = supportedAspectRatios; this.SupportedDurations = supportedDurations; + this.SupportedFrameImages = supportedFrameImages; this.SupportedResolutions = supportedResolutions; this.SupportedSizes = supportedSizes; } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoModelSupportedFrameImagesItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoModelSupportedFrameImagesItems.g.cs new file mode 100644 index 0000000..fd1b8c7 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoModelSupportedFrameImagesItems.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// + /// + public enum VideoModelSupportedFrameImagesItems + { + /// + /// + /// + FirstFrame, + /// + /// + /// + LastFrame, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoModelSupportedFrameImagesItemsExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoModelSupportedFrameImagesItems value) + { + return value switch + { + VideoModelSupportedFrameImagesItems.FirstFrame => "first_frame", + VideoModelSupportedFrameImagesItems.LastFrame => "last_frame", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoModelSupportedFrameImagesItems? ToEnum(string value) + { + return value switch + { + "first_frame" => VideoModelSupportedFrameImagesItems.FirstFrame, + "last_frame" => VideoModelSupportedFrameImagesItems.LastFrame, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs index d77aafb..c5c8a4d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs @@ -625,8 +625,11 @@ partial void ProcessCreateVideosResponseContent( /// /// Duration of the generated video in seconds /// + /// + /// Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. + /// /// - /// Whether to generate audio alongside the video. Defaults to true for models that support audio output, false otherwise. + /// Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. /// /// /// Reference images to guide video generation @@ -653,6 +656,7 @@ partial void ProcessCreateVideosResponseContent( string prompt, global::OpenRouter.VideoGenerationRequestAspectRatio? aspectRatio = default, int? duration = default, + global::System.Collections.Generic.IList? frameImages = default, bool? generateAudio = default, global::System.Collections.Generic.IList? inputReferences = default, global::OpenRouter.VideoGenerationRequestProvider? provider = default, @@ -666,6 +670,7 @@ partial void ProcessCreateVideosResponseContent( { AspectRatio = aspectRatio, Duration = duration, + FrameImages = frameImages, GenerateAudio = generateAudio, InputReferences = inputReferences, Model = model, diff --git a/src/libs/OpenRouter/openapi.yaml b/src/libs/OpenRouter/openapi.yaml index 729a86c..9d72d75 100644 --- a/src/libs/OpenRouter/openapi.yaml +++ b/src/libs/OpenRouter/openapi.yaml @@ -20260,6 +20260,36 @@ ], "title": "ContentPartImageType" }, + "FrameImageFrameType": { + "type": "string", + "enum": [ + "first_frame", + "last_frame" + ], + "description": "Whether this image represents the first or last frame of the video", + "title": "FrameImageFrameType" + }, + "FrameImage": { + "type": "object", + "properties": { + "image_url": { + "$ref": "#/components/schemas/ContentPartImageImageUrl" + }, + "type": { + "$ref": "#/components/schemas/ContentPartImageType" + }, + "frame_type": { + "$ref": "#/components/schemas/FrameImageFrameType", + "description": "Whether this image represents the first or last frame of the video" + } + }, + "required": [ + "image_url", + "type", + "frame_type" + ], + "title": "FrameImage" + }, "ContentPartImage": { "type": "object", "properties": { @@ -20942,9 +20972,16 @@ "type": "integer", "description": "Duration of the generated video in seconds" }, + "frame_images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FrameImage" + }, + "description": "Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame." + }, "generate_audio": { "type": "boolean", - "description": "Whether to generate audio alongside the video. Defaults to true for models that support audio output, false otherwise." + "description": "Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set." }, "input_references": { "type": "array", @@ -21059,6 +21096,14 @@ ], "title": "VideoModelSupportedAspectRatiosItems" }, + "VideoModelSupportedFrameImagesItems": { + "type": "string", + "enum": [ + "first_frame", + "last_frame" + ], + "title": "VideoModelSupportedFrameImagesItems" + }, "VideoModelSupportedResolutionsItems": { "type": "string", "enum": [ @@ -21127,6 +21172,13 @@ "type": "string", "description": "Description of the model" }, + "generate_audio": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the model supports generating audio alongside video" + }, "hugging_face_id": { "type": [ "string", @@ -21152,6 +21204,13 @@ }, "description": "Pricing SKUs with provider prefix stripped, values as strings" }, + "seed": { + "type": [ + "boolean", + "null" + ], + "description": "Whether the model supports deterministic generation via seed parameter" + }, "supported_aspect_ratios": { "type": [ "array", @@ -21172,6 +21231,16 @@ }, "description": "Supported video durations in seconds" }, + "supported_frame_images": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/VideoModelSupportedFrameImagesItems" + }, + "description": "Supported frame image types (e.g. first_frame, last_frame)" + }, "supported_resolutions": { "type": [ "array", @@ -21197,10 +21266,13 @@ "allowed_passthrough_parameters", "canonical_slug", "created", + "generate_audio", "id", "name", + "seed", "supported_aspect_ratios", "supported_durations", + "supported_frame_images", "supported_resolutions", "supported_sizes" ],