Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ public partial interface ISubpackageVideoGenerationClient
/// <param name="duration">
/// Duration of the generated video in seconds
/// </param>
/// <param name="frameImages">
/// 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.
/// </param>
/// <param name="generateAudio">
/// 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.
/// </param>
/// <param name="inputReferences">
/// Reference images to guide video generation
Expand All @@ -55,6 +58,7 @@ public partial interface ISubpackageVideoGenerationClient
string prompt,
global::OpenRouter.VideoGenerationRequestAspectRatio? aspectRatio = default,
int? duration = default,
global::System.Collections.Generic.IList<global::OpenRouter.FrameImage>? frameImages = default,
bool? generateAudio = default,
global::System.Collections.Generic.IList<global::OpenRouter.ContentPartImage>? inputReferences = default,
global::OpenRouter.VideoGenerationRequestProvider? provider = default,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class FrameImageFrameTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.FrameImageFrameType>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class FrameImageFrameTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.FrameImageFrameType?>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class VideoModelSupportedFrameImagesItemsJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.VideoModelSupportedFrameImagesItems>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class VideoModelSupportedFrameImagesItemsNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.VideoModelSupportedFrameImagesItems?>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down Expand Up @@ -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::OpenRouter.FrameImage>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::OpenRouter.ContentPartImage>))]
[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::OpenRouter.VideoModelSupportedAspectRatiosItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<int>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::OpenRouter.VideoModelSupportedFrameImagesItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::OpenRouter.VideoModelSupportedResolutionsItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::OpenRouter.VideoModelSupportedSizesItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoModelsListResponse))]
Expand Down Expand Up @@ -2774,9 +2787,11 @@ namespace OpenRouter
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItemsDatacentersItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.ProvidersGetResponsesContentApplicationJsonSchemaDataItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.RerankPostResponsesContentApplicationJsonSchemaResultsItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.FrameImage>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.ContentPartImage>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.VideoModelSupportedAspectRatiosItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<int>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.VideoModelSupportedFrameImagesItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.VideoModelSupportedResolutionsItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.VideoModelSupportedSizesItems>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::OpenRouter.VideoModel>))]
Expand Down
Loading
Loading