From a57b0b36e61c2aabb3db82b6e030b83b5886bcf9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 19 Oct 2026 20:24:10 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ....AudioToVideoInterfaceStaticAudioPost.g.cs | 29 + ...EnqueueGSAGenerationFacesGsCreatePost.g.cs | 20 +- ...ient.GetRequestStatusFacesGsStatusGet.g.cs | 10 +- ...ent.InitIntegrationsLivekitAgentsPost.g.cs | 8 +- ...rocessImageFacesTrinityPreprocessPost.g.cs | 87 +- ...rtAudioToVideoSessionComposeTokenPost.g.cs | 28 +- .../Simli.JsonConverters.AnimationId.g.cs | 53 + ...li.JsonConverters.AnimationIdNullable.g.cs | 60 + ...JsonConverters.TrinityGenerationState.g.cs | 53 + ...erters.TrinityGenerationStateNullable.g.cs | 60 + .../Simli.JsonSerializerContext.g.cs | 26 +- .../Simli.JsonSerializerContextTypes.g.cs | 132 +- .../Generated/Simli.Models.AgentRequest.g.cs | 16 +- ...imli.Models.AgentRequestVoiceProvider.g.cs | 6 + .../Generated/Simli.Models.AgentResponse.g.cs | 18 +- ...mli.Models.AgentResponseVoiceProvider.g.cs | 6 + .../Generated/Simli.Models.AgentUpdate.g.cs | 16 +- ...Simli.Models.AgentUpdateVoiceProvider.g.cs | 6 + .../Generated/Simli.Models.AnimationId.g.cs | 57 + ...VideoInterfaceStaticAudioPostResponse.g.cs | 13 +- .../Simli.Models.AudioToVideoRequest.g.cs | 78 +- ...s => Simli.Models.CameraSetting.Json.g.cs} | 26 +- .../Generated/Simli.Models.CameraSetting.g.cs | 152 ++ ...mli.Models.ConfigurableSessionRequest.g.cs | 97 +- ...ecatSessionTokenAutoTokenPostResponse.g.cs | 36 + ...SAGenerationFacesGsCreatePostResponse.g.cs | 61 + .../Generated/Simli.Models.LLMConfig.g.cs | 4 +- .../Generated/Simli.Models.OpenAIModels.g.cs | 36 +- .../Simli.Models.SessionDetails.g.cs | 13 +- .../Generated/Simli.Models.SimliModels.g.cs | 6 - ...oVideoSessionComposeTokenPostResponse.g.cs | 13 +- ...i.Models.StartStreamingSessionRequest.g.cs | 71 +- .../Generated/Simli.Models.TokenRequest.g.cs | 65 +- .../Simli.Models.TrinityGeneration.Json.g.cs | 141 ++ .../Simli.Models.TrinityGeneration.g.cs | 79 ++ .../Simli.Models.TrinityGenerationState.g.cs | 69 + ...i.Models.TrinityGenerationStatus.Json.g.cs | 141 ++ .../Simli.Models.TrinityGenerationStatus.g.cs | 83 ++ .../Simli.Models.TrinityVersion.g.cs | 10 +- .../Generated/Simli.Models.TtsProvider.g.cs | 6 +- .../Simli.Models.ValidationError.g.cs | 20 +- .../Simli.Models.ValidationErrorCtx.Json.g.cs | 141 ++ ...s => Simli.Models.ValidationErrorCtx.g.cs} | 2 +- ...imli.Models.ValidationErrorInput.Json.g.cs | 141 ++ .../Simli.Models.ValidationErrorInput.g.cs | 19 + ....AudioToVideoInterfaceStaticAudioPost.g.cs | 35 + ...EnqueueGSAGenerationFacesGsCreatePost.g.cs | 182 ++- ...ient.GetRequestStatusFacesGsStatusGet.g.cs | 24 +- ...ent.InitIntegrationsLivekitAgentsPost.g.cs | 19 +- ...rocessImageFacesTrinityPreprocessPost.g.cs | 1248 +++++++++++++++-- ...rtAudioToVideoSessionComposeTokenPost.g.cs | 33 +- src/libs/Simli/asyncapi.yaml | 76 +- src/libs/Simli/openapi.yaml | 585 +++++++- 53 files changed, 4070 insertions(+), 346 deletions(-) create mode 100644 src/libs/Simli/Generated/Simli.JsonConverters.AnimationId.g.cs create mode 100644 src/libs/Simli/Generated/Simli.JsonConverters.AnimationIdNullable.g.cs create mode 100644 src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationState.g.cs create mode 100644 src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationStateNullable.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.AnimationId.g.cs rename src/libs/Simli/Generated/{Simli.Models.GetRequestStatusFacesGsStatusGetResponse.Json.g.cs => Simli.Models.CameraSetting.Json.g.cs} (85%) create mode 100644 src/libs/Simli/Generated/Simli.Models.CameraSetting.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.TrinityGeneration.Json.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.TrinityGeneration.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.TrinityGenerationState.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.Json.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.ValidationErrorCtx.Json.g.cs rename src/libs/Simli/Generated/{Simli.Models.GetRequestStatusFacesGsStatusGetResponse.g.cs => Simli.Models.ValidationErrorCtx.g.cs} (86%) create mode 100644 src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.Json.g.cs create mode 100644 src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.g.cs diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs index e35eeaa..6d1144d 100644 --- a/src/libs/Simli/Generated/Simli.ISimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs +++ b/src/libs/Simli/Generated/Simli.ISimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs @@ -46,6 +46,29 @@ public partial interface ISimliClient /// /// Default Value: 0 /// + /// + /// Turns off the face restoration pass on legacy faces.
+ /// Default Value: false + /// + /// + /// Width of the video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the video starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -56,6 +79,12 @@ public partial interface ISimliClient int? audioSampleRate = default, int? audioChannelCount = default, int? videoStartingFrame = default, + bool? disableSuperRes = default, + int? streamingWidth = default, + int? streamingHeight = default, + double? avatarPositionX = default, + double? avatarPositionY = default, + global::Simli.CameraSetting? camera = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs index 6aac316..83de01c 100644 --- a/src/libs/Simli/Generated/Simli.ISimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs +++ b/src/libs/Simli/Generated/Simli.ISimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs @@ -7,6 +7,7 @@ public partial interface ISimliClient /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -17,9 +18,10 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( + global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost request, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -27,6 +29,7 @@ public partial interface ISimliClient /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -37,9 +40,10 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( + global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost request, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -47,6 +51,7 @@ public partial interface ISimliClient /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -58,9 +63,10 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( + global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( byte[] image, string imagename, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -69,6 +75,7 @@ public partial interface ISimliClient /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -82,9 +89,10 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( + global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( global::System.IO.Stream image, string imagename, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -92,6 +100,7 @@ public partial interface ISimliClient /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -105,9 +114,10 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( + global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( global::System.IO.Stream image, string imagename, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.GetRequestStatusFacesGsStatusGet.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.GetRequestStatusFacesGsStatusGet.g.cs index 5b9e8d4..0cfed7e 100644 --- a/src/libs/Simli/Generated/Simli.ISimliClient.GetRequestStatusFacesGsStatusGet.g.cs +++ b/src/libs/Simli/Generated/Simli.ISimliClient.GetRequestStatusFacesGsStatusGet.g.cs @@ -5,24 +5,26 @@ namespace Simli public partial interface ISimliClient { /// - /// Check Trinity Generation Status + /// Check Trinity Generation Status
+ /// Status of the caller's Trinity generations. `generations` lists every one still tracked, oldest first; the top-level status, queue_position and face_id describe the most recent of them. Accounts that generate in parallel should read `generations` - the top-level fields only ever describe one of several in flight. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task GetRequestStatusFacesGsStatusGetAsync( + global::System.Threading.Tasks.Task GetRequestStatusFacesGsStatusGetAsync( string? faceId = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Check Trinity Generation Status + /// Check Trinity Generation Status
+ /// Status of the caller's Trinity generations. `generations` lists every one still tracked, oldest first; the top-level status, queue_position and face_id describe the most recent of them. Accounts that generate in parallel should read `generations` - the top-level fields only ever describe one of several in flight. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> GetRequestStatusFacesGsStatusGetAsResponseAsync( + global::System.Threading.Tasks.Task> GetRequestStatusFacesGsStatusGetAsResponseAsync( string? faceId = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.InitIntegrationsLivekitAgentsPost.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.InitIntegrationsLivekitAgentsPost.g.cs index 0226bf5..e9c1a38 100644 --- a/src/libs/Simli/Generated/Simli.ISimliClient.InitIntegrationsLivekitAgentsPost.g.cs +++ b/src/libs/Simli/Generated/Simli.ISimliClient.InitIntegrationsLivekitAgentsPost.g.cs @@ -7,6 +7,7 @@ public partial interface ISimliClient /// /// Start Livekit Agents Session /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -14,11 +15,13 @@ public partial interface ISimliClient global::System.Threading.Tasks.Task InitIntegrationsLivekitAgentsPostAsync( global::Simli.LiveKitInitializationRequest request, + string? sessionToken = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Start Livekit Agents Session /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -26,21 +29,24 @@ public partial interface ISimliClient global::System.Threading.Tasks.Task> InitIntegrationsLivekitAgentsPostAsResponseAsync( global::Simli.LiveKitInitializationRequest request, + string? sessionToken = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Start Livekit Agents Session /// /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task InitIntegrationsLivekitAgentsPostAsync( - string sessionToken, + string requestSessionToken, string livekitToken, string livekitUrl, + string? sessionToken = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs index 7d93726..22cc5be 100644 --- a/src/libs/Simli/Generated/Simli.ISimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs +++ b/src/libs/Simli/Generated/Simli.ISimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs @@ -6,8 +6,11 @@ public partial interface ISimliClient { /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// @@ -15,16 +18,20 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// @@ -32,16 +39,41 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( + global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsStreamAsync( global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// + /// + /// Default Value: false + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( + + global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + global::Simli.TrinityVersion? gsVersion = default, + bool? retry = default, + global::Simli.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Preprocess Trinity Face Image
+ /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. + ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// @@ -54,17 +86,47 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( byte[] image, string imagename, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. + ///
+ /// + /// Default Value: GSA_1.0 + /// + /// + /// Default Value: false + /// + /// + /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. + /// + /// + /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + global::System.IO.Stream image, + string imagename, + global::Simli.TrinityVersion? gsVersion = default, + bool? retry = default, + global::Simli.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Preprocess Trinity Face Image
+ /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// @@ -77,16 +139,20 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsStreamAsync( global::System.IO.Stream image, string imagename, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// @@ -99,9 +165,10 @@ public partial interface ISimliClient /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( + global::System.Threading.Tasks.Task> PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( global::System.IO.Stream image, string imagename, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs index 1b9d7bd..296c34e 100644 --- a/src/libs/Simli/Generated/Simli.ISimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs +++ b/src/libs/Simli/Generated/Simli.ISimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs @@ -35,7 +35,9 @@ public partial interface ISimliClient /// Create a temporary Simli Compose Session Token /// /// - /// + /// + /// Default Value: v2 + /// /// /// /// Default Value: true @@ -52,6 +54,25 @@ public partial interface ISimliClient /// /// Default Value: pcm16 /// + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -64,6 +85,11 @@ public partial interface ISimliClient int? maxIdleTime = default, int? startFrame = default, string? audioInputFormat = default, + int? streamingWidth = default, + int? streamingHeight = default, + double? avatarPositionX = default, + double? avatarPositionY = default, + global::Simli.CameraSetting? camera = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Simli/Generated/Simli.JsonConverters.AnimationId.g.cs b/src/libs/Simli/Generated/Simli.JsonConverters.AnimationId.g.cs new file mode 100644 index 0000000..1ba1fa9 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.JsonConverters.AnimationId.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Simli.JsonConverters +{ + /// + public sealed class AnimationIdJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Simli.AnimationId 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::Simli.AnimationIdExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Simli.AnimationId)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Simli.AnimationId); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Simli.AnimationId value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Simli.AnimationIdExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Simli/Generated/Simli.JsonConverters.AnimationIdNullable.g.cs b/src/libs/Simli/Generated/Simli.JsonConverters.AnimationIdNullable.g.cs new file mode 100644 index 0000000..e5a5572 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.JsonConverters.AnimationIdNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Simli.JsonConverters +{ + /// + public sealed class AnimationIdNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Simli.AnimationId? 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::Simli.AnimationIdExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Simli.AnimationId)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Simli.AnimationId?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Simli.AnimationId? 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::Simli.AnimationIdExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationState.g.cs b/src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationState.g.cs new file mode 100644 index 0000000..a09ff3d --- /dev/null +++ b/src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationState.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Simli.JsonConverters +{ + /// + public sealed class TrinityGenerationStateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Simli.TrinityGenerationState 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::Simli.TrinityGenerationStateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Simli.TrinityGenerationState)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Simli.TrinityGenerationState); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Simli.TrinityGenerationState value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Simli.TrinityGenerationStateExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationStateNullable.g.cs b/src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationStateNullable.g.cs new file mode 100644 index 0000000..0f62b61 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.JsonConverters.TrinityGenerationStateNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Simli.JsonConverters +{ + /// + public sealed class TrinityGenerationStateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Simli.TrinityGenerationState? 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::Simli.TrinityGenerationStateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Simli.TrinityGenerationState)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Simli.TrinityGenerationState?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Simli.TrinityGenerationState? 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::Simli.TrinityGenerationStateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs b/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs index 13f91d6..8b4fecc 100644 --- a/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs +++ b/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs @@ -47,6 +47,10 @@ namespace Simli typeof(global::Simli.JsonConverters.LlmProviderNullableJsonConverter), + typeof(global::Simli.JsonConverters.AnimationIdJsonConverter), + + typeof(global::Simli.JsonConverters.AnimationIdNullableJsonConverter), + typeof(global::Simli.JsonConverters.OpenAIModelsJsonConverter), typeof(global::Simli.JsonConverters.OpenAIModelsNullableJsonConverter), @@ -63,6 +67,10 @@ namespace Simli typeof(global::Simli.JsonConverters.CharacterVersionNullableJsonConverter), + typeof(global::Simli.JsonConverters.TrinityGenerationStateJsonConverter), + + typeof(global::Simli.JsonConverters.TrinityGenerationStateNullableJsonConverter), + typeof(global::Simli.JsonConverters.TrinityVersionJsonConverter), typeof(global::Simli.JsonConverters.TrinityVersionNullableJsonConverter), @@ -93,12 +101,15 @@ namespace Simli [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.AgentUpdateLlmProvider), TypeInfoPropertyName = "AgentUpdateLlmProvider2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.AudioToVideoRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.AudioToVideoRequestAudioFormat), TypeInfoPropertyName = "AudioToVideoRequestAudioFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.CameraSetting))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.ConfigurableSessionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.TtsProvider), TypeInfoPropertyName = "TtsProvider2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.AnimationId), TypeInfoPropertyName = "AnimationId2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.CustomLLMConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.LLMConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.SimliModels), TypeInfoPropertyName = "SimliModels2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.GoogleModels), TypeInfoPropertyName = "GoogleModels2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.HTTPValidationError))] @@ -109,13 +120,12 @@ namespace Simli [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.LlmProvider), TypeInfoPropertyName = "LlmProvider2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.LiveKitInitializationRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.SessionDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.StartStreamingSessionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.TokenRequest))] - [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::Simli.AnyOf), TypeInfoPropertyName = "AnyOfStringInt322")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.HistoryRecord))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTimeOffset))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.Error))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.BodyGenerateFaceIDAPIFacesLegacyCreatePost))] @@ -123,21 +133,29 @@ namespace Simli [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.CharacterVersion), TypeInfoPropertyName = "CharacterVersion2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.TrinityGenerationState), TypeInfoPropertyName = "TrinityGenerationState2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.TrinityGeneration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.TrinityGenerationStatus))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.TrinityVersion), TypeInfoPropertyName = "TrinityVersion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(float))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.GetIceServersComposeIceGetResponseItem))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.StartAudioToVideoSessionComposeTokenPostResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.StartAudioToVideoSessionComposeTokenPostResponse2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.AudioToVideoInterfaceStaticAudioPostResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.InitIntegrationsLivekitAgentsPostResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.GetHistorySessionsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.GetRatelimiterSessionsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.CreatePipecatSessionTokenAutoTokenPostResponse))] [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/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs b/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs index de50fd7..38ea420 100644 --- a/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs +++ b/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs @@ -101,171 +101,207 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Simli.ConfigurableSessionRequest? Type17 { get; set; } + public bool? Type17 { get; set; } /// /// /// - public global::Simli.TtsProvider? Type18 { get; set; } + public double? Type18 { get; set; } /// /// /// - public object? Type19 { get; set; } + public global::Simli.CameraSetting? Type19 { get; set; } /// /// /// - public global::Simli.CustomLLMConfig? Type20 { get; set; } + public object? Type20 { get; set; } /// /// /// - public global::Simli.LLMConfig? Type21 { get; set; } + public global::Simli.ConfigurableSessionRequest? Type21 { get; set; } /// /// /// - public bool? Type22 { get; set; } + public global::Simli.TtsProvider? Type22 { get; set; } /// /// /// - public global::Simli.SimliModels? Type23 { get; set; } + public global::Simli.AnimationId? Type23 { get; set; } /// /// /// - public global::Simli.GoogleModels? Type24 { get; set; } + public global::Simli.CustomLLMConfig? Type24 { get; set; } /// /// /// - public global::Simli.HTTPValidationError? Type25 { get; set; } + public global::Simli.LLMConfig? Type25 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type26 { get; set; } + public global::Simli.SimliModels? Type26 { get; set; } /// /// /// - public global::Simli.ValidationError? Type27 { get; set; } + public global::Simli.GoogleModels? Type27 { get; set; } /// /// /// - public global::Simli.AnyOf? Type28 { get; set; } + public global::Simli.HTTPValidationError? Type28 { get; set; } /// /// /// - public global::Simli.OpenAIModels? Type29 { get; set; } + public global::System.Collections.Generic.IList? Type29 { get; set; } /// /// /// - public global::Simli.LlmProvider? Type30 { get; set; } + public global::Simli.ValidationError? Type30 { get; set; } /// /// /// - public global::Simli.LiveKitInitializationRequest? Type31 { get; set; } + public global::Simli.AnyOf? Type31 { get; set; } /// /// /// - public global::Simli.SessionDetails? Type32 { get; set; } + public global::Simli.OpenAIModels? Type32 { get; set; } /// /// /// - public global::Simli.StartStreamingSessionRequest? Type33 { get; set; } + public global::Simli.LlmProvider? Type33 { get; set; } /// /// /// - public global::Simli.TokenRequest? Type34 { get; set; } + public global::Simli.LiveKitInitializationRequest? Type34 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type35 { get; set; } + public global::Simli.SessionDetails? Type35 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type36 { get; set; } + public global::System.Collections.Generic.IList? Type36 { get; set; } /// /// /// - public global::Simli.AnyOf? Type37 { get; set; } + public global::Simli.StartStreamingSessionRequest? Type37 { get; set; } /// /// /// - public global::Simli.HistoryRecord? Type38 { get; set; } + public global::Simli.TokenRequest? Type38 { get; set; } /// /// /// - public double? Type39 { get; set; } + public global::System.Collections.Generic.IList>? Type39 { get; set; } /// /// /// - public global::System.DateTimeOffset? Type40 { get; set; } + public global::Simli.AnyOf? Type40 { get; set; } /// /// /// - public global::Simli.Error? Type41 { get; set; } + public global::Simli.HistoryRecord? Type41 { get; set; } /// /// /// - public global::Simli.BodyGenerateFaceIDAPIFacesLegacyCreatePost? Type42 { get; set; } + public global::System.DateTimeOffset? Type42 { get; set; } /// /// /// - public byte[]? Type43 { get; set; } + public global::Simli.Error? Type43 { get; set; } /// /// /// - public global::Simli.CharacterVersion? Type44 { get; set; } + public global::Simli.BodyGenerateFaceIDAPIFacesLegacyCreatePost? Type44 { get; set; } /// /// /// - public global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost? Type45 { get; set; } + public byte[]? Type45 { get; set; } /// /// /// - public global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost? Type46 { get; set; } + public global::Simli.CharacterVersion? Type46 { get; set; } /// /// /// - public global::Simli.TrinityVersion? Type47 { get; set; } + public global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost? Type47 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type48 { get; set; } + public global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost? Type48 { get; set; } /// /// /// - public global::Simli.GetIceServersComposeIceGetResponseItem? Type49 { get; set; } + public global::Simli.TrinityGenerationState? Type49 { get; set; } /// /// /// - public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse? Type50 { get; set; } + public global::Simli.TrinityGeneration? Type50 { get; set; } /// /// /// - public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse2? Type51 { get; set; } + public global::Simli.TrinityGenerationStatus? Type51 { get; set; } /// /// /// - public global::Simli.AudioToVideoInterfaceStaticAudioPostResponse? Type52 { get; set; } + public global::System.Collections.Generic.IList? Type52 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type53 { get; set; } + public global::Simli.TrinityVersion? Type53 { get; set; } /// /// /// - public global::Simli.InitIntegrationsLivekitAgentsPostResponse? Type54 { get; set; } + public float? Type54 { get; set; } /// /// /// - public global::Simli.GetHistorySessionsResponse? Type55 { get; set; } + public global::System.Collections.Generic.IList? Type55 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type56 { get; set; } + public global::Simli.GetIceServersComposeIceGetResponseItem? Type56 { get; set; } /// /// /// - public global::Simli.GetRatelimiterSessionsResponse? Type57 { get; set; } + public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse? Type57 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type58 { get; set; } + public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse2? Type58 { get; set; } + /// + /// + /// + public global::Simli.AudioToVideoInterfaceStaticAudioPostResponse? Type59 { get; set; } + /// + /// + /// + public global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse? Type60 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type61 { get; set; } + /// + /// + /// + public global::Simli.InitIntegrationsLivekitAgentsPostResponse? Type62 { get; set; } + /// + /// + /// + public global::Simli.GetHistorySessionsResponse? Type63 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type64 { get; set; } + /// + /// + /// + public global::Simli.GetRatelimiterSessionsResponse? Type65 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type66 { get; set; } + /// + /// + /// + public global::Simli.CreatePipecatSessionTokenAutoTokenPostResponse? Type67 { get; set; } /// /// @@ -282,18 +318,22 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType3 { get; set; } + public global::System.Collections.Generic.List? ListType3 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType4 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType4 { get; set; } + public global::System.Collections.Generic.List? ListType5 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType5 { get; set; } + public global::System.Collections.Generic.List? ListType6 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType6 { get; set; } + public global::System.Collections.Generic.List? ListType7 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.AgentRequest.g.cs b/src/libs/Simli/Generated/Simli.Models.AgentRequest.g.cs index cb38af9..165b801 100644 --- a/src/libs/Simli/Generated/Simli.Models.AgentRequest.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AgentRequest.g.cs @@ -43,10 +43,10 @@ public sealed partial class AgentRequest public global::Simli.AgentRequestVoiceProvider? VoiceProvider { get; set; } /// - /// + /// The voice's ID at the voice provider (Inworld voices go by name, such as Sarah) /// [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] - public global::System.Guid? VoiceId { get; set; } + public string? VoiceId { get; set; } /// /// Example: sonic-english @@ -74,9 +74,9 @@ public sealed partial class AgentRequest public global::System.Guid? Emotion { get; set; } /// - /// Example: gpt-4o-mini + /// Example: gpt-6-luna /// - /// gpt-4o-mini + /// gpt-6-luna [global::System.Text.Json.Serialization.JsonPropertyName("llm_model")] public string? LlmModel { get; set; } @@ -135,7 +135,9 @@ public sealed partial class AgentRequest /// /// /// - /// + /// + /// The voice's ID at the voice provider (Inworld voices go by name, such as Sarah) + /// /// /// Example: sonic-english /// @@ -145,7 +147,7 @@ public sealed partial class AgentRequest /// /// /// - /// Example: gpt-4o-mini + /// Example: gpt-6-luna /// /// /// The URL of the custom LLM to use
@@ -175,7 +177,7 @@ public AgentRequest( string? firstMessage, string? prompt, global::Simli.AgentRequestVoiceProvider? voiceProvider, - global::System.Guid? voiceId, + string? voiceId, string? voiceModel, string? ownerId, string? language, diff --git a/src/libs/Simli/Generated/Simli.Models.AgentRequestVoiceProvider.g.cs b/src/libs/Simli/Generated/Simli.Models.AgentRequestVoiceProvider.g.cs index 896bb7e..3e08841 100644 --- a/src/libs/Simli/Generated/Simli.Models.AgentRequestVoiceProvider.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AgentRequestVoiceProvider.g.cs @@ -16,6 +16,10 @@ public enum AgentRequestVoiceProvider /// ///
Elevenlabs, + /// + /// + /// + Inworld, } /// @@ -32,6 +36,7 @@ public static string ToValueString(this AgentRequestVoiceProvider value) { AgentRequestVoiceProvider.Cartesia => "cartesia", AgentRequestVoiceProvider.Elevenlabs => "elevenlabs", + AgentRequestVoiceProvider.Inworld => "inworld", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -44,6 +49,7 @@ public static string ToValueString(this AgentRequestVoiceProvider value) { "cartesia" => AgentRequestVoiceProvider.Cartesia, "elevenlabs" => AgentRequestVoiceProvider.Elevenlabs, + "inworld" => AgentRequestVoiceProvider.Inworld, _ => null, }; } diff --git a/src/libs/Simli/Generated/Simli.Models.AgentResponse.g.cs b/src/libs/Simli/Generated/Simli.Models.AgentResponse.g.cs index 0cdc45f..32b19cc 100644 --- a/src/libs/Simli/Generated/Simli.Models.AgentResponse.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AgentResponse.g.cs @@ -53,11 +53,11 @@ public sealed partial class AgentResponse public required global::Simli.AgentResponseVoiceProvider VoiceProvider { get; set; } /// - /// + /// The voice's ID at the voice provider (Inworld voices go by name, such as Sarah) /// [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Guid VoiceId { get; set; } + public required string VoiceId { get; set; } /// /// Example: sonic-english @@ -82,9 +82,9 @@ public sealed partial class AgentResponse public required global::System.Guid Emotion { get; set; } /// - /// Example: gpt-4o-mini + /// Example: gpt-6-luna /// - /// gpt-4o-mini + /// gpt-6-luna [global::System.Text.Json.Serialization.JsonPropertyName("llm_model")] [global::System.Text.Json.Serialization.JsonRequired] public required string LlmModel { get; set; } @@ -168,14 +168,16 @@ public sealed partial class AgentResponse /// /// /// - /// + /// + /// The voice's ID at the voice provider (Inworld voices go by name, such as Sarah) + /// /// /// Example: sonic-english /// /// /// /// - /// Example: gpt-4o-mini + /// Example: gpt-6-luna /// /// /// The URL of the custom LLM to use
@@ -213,7 +215,7 @@ public AgentResponse( string firstMessage, string prompt, global::Simli.AgentResponseVoiceProvider voiceProvider, - global::System.Guid voiceId, + string voiceId, string voiceModel, string language, global::System.Guid emotion, @@ -233,7 +235,7 @@ public AgentResponse( this.FirstMessage = firstMessage ?? throw new global::System.ArgumentNullException(nameof(firstMessage)); this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); this.VoiceProvider = voiceProvider; - this.VoiceId = voiceId; + this.VoiceId = voiceId ?? throw new global::System.ArgumentNullException(nameof(voiceId)); this.VoiceModel = voiceModel ?? throw new global::System.ArgumentNullException(nameof(voiceModel)); this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language)); this.Emotion = emotion; diff --git a/src/libs/Simli/Generated/Simli.Models.AgentResponseVoiceProvider.g.cs b/src/libs/Simli/Generated/Simli.Models.AgentResponseVoiceProvider.g.cs index 6204fea..fd15df1 100644 --- a/src/libs/Simli/Generated/Simli.Models.AgentResponseVoiceProvider.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AgentResponseVoiceProvider.g.cs @@ -16,6 +16,10 @@ public enum AgentResponseVoiceProvider /// ///
Elevenlabs, + /// + /// + /// + Inworld, } /// @@ -32,6 +36,7 @@ public static string ToValueString(this AgentResponseVoiceProvider value) { AgentResponseVoiceProvider.Cartesia => "cartesia", AgentResponseVoiceProvider.Elevenlabs => "elevenlabs", + AgentResponseVoiceProvider.Inworld => "inworld", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -44,6 +49,7 @@ public static string ToValueString(this AgentResponseVoiceProvider value) { "cartesia" => AgentResponseVoiceProvider.Cartesia, "elevenlabs" => AgentResponseVoiceProvider.Elevenlabs, + "inworld" => AgentResponseVoiceProvider.Inworld, _ => null, }; } diff --git a/src/libs/Simli/Generated/Simli.Models.AgentUpdate.g.cs b/src/libs/Simli/Generated/Simli.Models.AgentUpdate.g.cs index 7369a95..13d956f 100644 --- a/src/libs/Simli/Generated/Simli.Models.AgentUpdate.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AgentUpdate.g.cs @@ -40,10 +40,10 @@ public sealed partial class AgentUpdate public global::Simli.AgentUpdateVoiceProvider? VoiceProvider { get; set; } /// - /// + /// The voice's ID at the voice provider (Inworld voices go by name, such as Sarah) /// [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] - public global::System.Guid? VoiceId { get; set; } + public string? VoiceId { get; set; } /// /// Example: sonic-english @@ -53,9 +53,9 @@ public sealed partial class AgentUpdate public string? VoiceModel { get; set; } /// - /// Example: gpt-4o-mini + /// Example: gpt-6-luna /// - /// gpt-4o-mini + /// gpt-6-luna [global::System.Text.Json.Serialization.JsonPropertyName("llm_model")] public string? LlmModel { get; set; } @@ -124,12 +124,14 @@ public sealed partial class AgentUpdate /// /// /// - /// + /// + /// The voice's ID at the voice provider (Inworld voices go by name, such as Sarah) + /// /// /// Example: sonic-english /// /// - /// Example: gpt-4o-mini + /// Example: gpt-6-luna /// /// /// The URL of the custom LLM to use
@@ -157,7 +159,7 @@ public AgentUpdate( string? firstMessage, string? prompt, global::Simli.AgentUpdateVoiceProvider? voiceProvider, - global::System.Guid? voiceId, + string? voiceId, string? voiceModel, string? llmModel, string? llmEndpoint, diff --git a/src/libs/Simli/Generated/Simli.Models.AgentUpdateVoiceProvider.g.cs b/src/libs/Simli/Generated/Simli.Models.AgentUpdateVoiceProvider.g.cs index 99e373c..df6aaa5 100644 --- a/src/libs/Simli/Generated/Simli.Models.AgentUpdateVoiceProvider.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AgentUpdateVoiceProvider.g.cs @@ -16,6 +16,10 @@ public enum AgentUpdateVoiceProvider /// ///
Elevenlabs, + /// + /// + /// + Inworld, } /// @@ -32,6 +36,7 @@ public static string ToValueString(this AgentUpdateVoiceProvider value) { AgentUpdateVoiceProvider.Cartesia => "cartesia", AgentUpdateVoiceProvider.Elevenlabs => "elevenlabs", + AgentUpdateVoiceProvider.Inworld => "inworld", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -44,6 +49,7 @@ public static string ToValueString(this AgentUpdateVoiceProvider value) { "cartesia" => AgentUpdateVoiceProvider.Cartesia, "elevenlabs" => AgentUpdateVoiceProvider.Elevenlabs, + "inworld" => AgentUpdateVoiceProvider.Inworld, _ => null, }; } diff --git a/src/libs/Simli/Generated/Simli.Models.AnimationId.g.cs b/src/libs/Simli/Generated/Simli.Models.AnimationId.g.cs new file mode 100644 index 0000000..eb193d9 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.AnimationId.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Simli +{ + /// + /// An animation clip a Trinity-2 avatar can play, by the same ID everywhere animations are named. + /// + public enum AnimationId + { + /// + /// + /// + G003WaveGoodbyeSolo, + /// + /// + /// + SpeakingHandsExplaining, + /// + /// + /// + Wave, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AnimationIdExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AnimationId value) + { + return value switch + { + AnimationId.G003WaveGoodbyeSolo => "g003_wave_goodbye_solo", + AnimationId.SpeakingHandsExplaining => "speaking_hands_explaining", + AnimationId.Wave => "wave", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AnimationId? ToEnum(string value) + { + return value switch + { + "g003_wave_goodbye_solo" => AnimationId.G003WaveGoodbyeSolo, + "speaking_hands_explaining" => AnimationId.SpeakingHandsExplaining, + "wave" => AnimationId.Wave, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.AudioToVideoInterfaceStaticAudioPostResponse.g.cs b/src/libs/Simli/Generated/Simli.Models.AudioToVideoInterfaceStaticAudioPostResponse.g.cs index 379a1cc..a126e35 100644 --- a/src/libs/Simli/Generated/Simli.Models.AudioToVideoInterfaceStaticAudioPostResponse.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AudioToVideoInterfaceStaticAudioPostResponse.g.cs @@ -22,6 +22,12 @@ public sealed partial class AudioToVideoInterfaceStaticAudioPostResponse [global::System.Text.Json.Serialization.JsonPropertyName("mp4_url")] public string? Mp4Url { get; set; } + /// + /// Camera fields outside their supported range. The video is made with them regardless. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("warnings")] + public global::System.Collections.Generic.IList? Warnings { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,15 +43,20 @@ public sealed partial class AudioToVideoInterfaceStaticAudioPostResponse /// /// Example: https://api.simli.ai/mp4/path-to-file/output.mp4 /// + /// + /// Camera fields outside their supported range. The video is made with them regardless. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AudioToVideoInterfaceStaticAudioPostResponse( string? hlsUrl, - string? mp4Url) + string? mp4Url, + global::System.Collections.Generic.IList? warnings) { this.HlsUrl = hlsUrl; this.Mp4Url = mp4Url; + this.Warnings = warnings; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.AudioToVideoRequest.g.cs b/src/libs/Simli/Generated/Simli.Models.AudioToVideoRequest.g.cs index 1c5a6d0..baa6fdd 100644 --- a/src/libs/Simli/Generated/Simli.Models.AudioToVideoRequest.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.AudioToVideoRequest.g.cs @@ -48,6 +48,47 @@ public sealed partial class AudioToVideoRequest [global::System.Text.Json.Serialization.JsonPropertyName("videoStartingFrame")] public int? VideoStartingFrame { get; set; } + /// + /// Turns off the face restoration pass on legacy faces.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("disableSuperRes")] + public bool? DisableSuperRes { get; set; } + + /// + /// Width of the video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_width")] + public int? StreamingWidth { get; set; } + + /// + /// Height of the video in pixels. See streaming_width.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_height")] + public int? StreamingHeight { get; set; } + + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_x")] + public double? AvatarPositionX { get; set; } + + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_y")] + public double? AvatarPositionY { get; set; } + + /// + /// The camera the video starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("camera")] + public global::Simli.CameraSetting? Camera { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -69,6 +110,29 @@ public sealed partial class AudioToVideoRequest /// /// Default Value: 0 /// + /// + /// Turns off the face restoration pass on legacy faces.
+ /// Default Value: false + /// + /// + /// Width of the video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the video starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -78,7 +142,13 @@ public AudioToVideoRequest( global::Simli.AudioToVideoRequestAudioFormat audioFormat, int? audioSampleRate, int? audioChannelCount, - int? videoStartingFrame) + int? videoStartingFrame, + bool? disableSuperRes, + int? streamingWidth, + int? streamingHeight, + double? avatarPositionX, + double? avatarPositionY, + global::Simli.CameraSetting? camera) { this.FaceId = faceId ?? throw new global::System.ArgumentNullException(nameof(faceId)); this.AudioBase64 = audioBase64 ?? throw new global::System.ArgumentNullException(nameof(audioBase64)); @@ -86,6 +156,12 @@ public AudioToVideoRequest( this.AudioSampleRate = audioSampleRate; this.AudioChannelCount = audioChannelCount; this.VideoStartingFrame = videoStartingFrame; + this.DisableSuperRes = disableSuperRes; + this.StreamingWidth = streamingWidth; + this.StreamingHeight = streamingHeight; + this.AvatarPositionX = avatarPositionX; + this.AvatarPositionY = avatarPositionY; + this.Camera = camera; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.GetRequestStatusFacesGsStatusGetResponse.Json.g.cs b/src/libs/Simli/Generated/Simli.Models.CameraSetting.Json.g.cs similarity index 85% rename from src/libs/Simli/Generated/Simli.Models.GetRequestStatusFacesGsStatusGetResponse.Json.g.cs rename to src/libs/Simli/Generated/Simli.Models.CameraSetting.Json.g.cs index 303d59d..7b2625c 100644 --- a/src/libs/Simli/Generated/Simli.Models.GetRequestStatusFacesGsStatusGetResponse.Json.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.CameraSetting.Json.g.cs @@ -2,7 +2,7 @@ namespace Simli { - public sealed partial class GetRequestStatusFacesGsStatusGetResponse + public sealed partial class CameraSetting { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Simli.GetRequestStatusFacesGsStatusGetResponse? FromJson( + public static global::Simli.CameraSetting? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Simli.GetRequestStatusFacesGsStatusGetResponse), - jsonSerializerContext) as global::Simli.GetRequestStatusFacesGsStatusGetResponse; + typeof(global::Simli.CameraSetting), + jsonSerializerContext) as global::Simli.CameraSetting; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Simli.GetRequestStatusFacesGsStatusGetResponse? FromJson( + public static global::Simli.CameraSetting? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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::Simli.GetRequestStatusFacesGsStatusGetResponse? FromJson( + public static global::Simli.CameraSetting? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Simli.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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::Simli.GetRequestStatusFacesGsStatusGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Simli.GetRequestStatusFacesGsStatusGetResponse; + typeof(global::Simli.CameraSetting), + jsonSerializerContext).ConfigureAwait(false)) as global::Simli.CameraSetting; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Simli.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Simli/Generated/Simli.Models.CameraSetting.g.cs b/src/libs/Simli/Generated/Simli.Models.CameraSetting.g.cs new file mode 100644 index 0000000..05e9133 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.CameraSetting.g.cs @@ -0,0 +1,152 @@ + +#nullable enable + +namespace Simli +{ + /// + /// Camera offsets on top of the avatar's own framing. Every field is optional and neutral when left out. A value outside its supported range is still applied, and the response lists a warning for it; NaN and infinity are a 422. + /// + public sealed partial class CameraSetting + { + /// + /// Moves the avatar right, in half canvas widths. Supported range -10 to 10.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("pos_x_off")] + public double? PosXOff { get; set; } + + /// + /// Moves the avatar down, in half canvas heights. Supported range -10 to 10.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("pos_y_off")] + public double? PosYOff { get; set; } + + /// + /// Metres the camera backs away from the avatar (negative moves in). Supported range -5 to 5.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("pos_z_off")] + public double? PosZOff { get; set; } + + /// + /// Degrees the camera tilts up (pitch). Supported range -180 to 180.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rot_x_off")] + public double? RotXOff { get; set; } + + /// + /// Degrees the camera pans right (yaw). Supported range -180 to 180.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rot_y_off")] + public double? RotYOff { get; set; } + + /// + /// Degrees the camera rolls clockwise. Supported range -180 to 180.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rot_z_off")] + public double? RotZOff { get; set; } + + /// + /// Multiplies the avatar's zoom; 1 is no change. Supported range above 0, up to 4.
+ /// Default Value: 1.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("zoom")] + public double? Zoom { get; set; } + + /// + /// Degrees the camera orbits up over the avatar's head (elevation). Supported range -80 to 80.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("orbit_x_off")] + public double? OrbitXOff { get; set; } + + /// + /// Degrees the camera orbits round to its right (azimuth). Supported range -180 to 180.
+ /// Default Value: 0.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("orbit_y_off")] + public double? OrbitYOff { 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. + /// + /// + /// Moves the avatar right, in half canvas widths. Supported range -10 to 10.
+ /// Default Value: 0.0 + /// + /// + /// Moves the avatar down, in half canvas heights. Supported range -10 to 10.
+ /// Default Value: 0.0 + /// + /// + /// Metres the camera backs away from the avatar (negative moves in). Supported range -5 to 5.
+ /// Default Value: 0.0 + /// + /// + /// Degrees the camera tilts up (pitch). Supported range -180 to 180.
+ /// Default Value: 0.0 + /// + /// + /// Degrees the camera pans right (yaw). Supported range -180 to 180.
+ /// Default Value: 0.0 + /// + /// + /// Degrees the camera rolls clockwise. Supported range -180 to 180.
+ /// Default Value: 0.0 + /// + /// + /// Multiplies the avatar's zoom; 1 is no change. Supported range above 0, up to 4.
+ /// Default Value: 1.0 + /// + /// + /// Degrees the camera orbits up over the avatar's head (elevation). Supported range -80 to 80.
+ /// Default Value: 0.0 + /// + /// + /// Degrees the camera orbits round to its right (azimuth). Supported range -180 to 180.
+ /// Default Value: 0.0 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CameraSetting( + double? posXOff, + double? posYOff, + double? posZOff, + double? rotXOff, + double? rotYOff, + double? rotZOff, + double? zoom, + double? orbitXOff, + double? orbitYOff) + { + this.PosXOff = posXOff; + this.PosYOff = posYOff; + this.PosZOff = posZOff; + this.RotXOff = rotXOff; + this.RotYOff = rotYOff; + this.RotZOff = rotZOff; + this.Zoom = zoom; + this.OrbitXOff = orbitXOff; + this.OrbitYOff = orbitYOff; + } + + /// + /// Initializes a new instance of the class. + /// + public CameraSetting() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.ConfigurableSessionRequest.g.cs b/src/libs/Simli/Generated/Simli.Models.ConfigurableSessionRequest.g.cs index 027d757..ccc3821 100644 --- a/src/libs/Simli/Generated/Simli.Models.ConfigurableSessionRequest.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.ConfigurableSessionRequest.g.cs @@ -51,6 +51,12 @@ public sealed partial class ConfigurableSessionRequest [global::System.Text.Json.Serialization.JsonPropertyName("firstMessage")] public string? FirstMessage { get; set; } + /// + /// An animation the avatar plays as it opens the session, when the user joins (with firstMessage, if there is one). Trinity-2 faces only; the others ignore it. Leave it out for no animation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("introAnimation")] + public global::Simli.AnimationId? IntroAnimation { get; set; } + /// /// Default Value: 3600 /// @@ -76,7 +82,7 @@ public sealed partial class ConfigurableSessionRequest public global::Simli.CustomLLMConfig? CustomLLMConfig { get; set; } /// - /// Default Value: {"model":"gpt-4o-mini","provider":"OpenAI"} + /// Default Value: {"model":"gpt-6-luna","provider":"OpenAI"} /// [global::System.Text.Json.Serialization.JsonPropertyName("llmConfig")] public global::Simli.LLMConfig? LlmConfig { get; set; } @@ -88,12 +94,53 @@ public sealed partial class ConfigurableSessionRequest public bool? CreateTranscript { get; set; } /// - /// Default Value: artalk + /// Default Value: fasttalk /// [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Simli.JsonConverters.SimliModelsJsonConverter))] public global::Simli.SimliModels? Model { get; set; } + /// + /// Turns off the face restoration pass on legacy faces.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("disableSuperRes")] + public bool? DisableSuperRes { get; set; } + + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_width")] + public int? StreamingWidth { get; set; } + + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_height")] + public int? StreamingHeight { get; set; } + + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_x")] + public double? AvatarPositionX { get; set; } + + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_y")] + public double? AvatarPositionY { get; set; } + + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("camera")] + public global::Simli.CameraSetting? Camera { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -120,6 +167,9 @@ public sealed partial class ConfigurableSessionRequest /// Default Value: You are Chatbot, a friendly, helpful robot. Your goal is to demonstrate your capabilities in a succinct way. Your output will be converted to audio so don't include special characters in your answers. Respond to what the user said in a creative and helpful way, but keep your responses brief. /// /// + /// + /// An animation the avatar plays as it opens the session, when the user joins (with firstMessage, if there is one). Trinity-2 faces only; the others ignore it. Leave it out for no animation. + /// /// /// Default Value: 3600 /// @@ -131,13 +181,36 @@ public sealed partial class ConfigurableSessionRequest /// /// /// - /// Default Value: {"model":"gpt-4o-mini","provider":"OpenAI"} + /// Default Value: {"model":"gpt-6-luna","provider":"OpenAI"} /// /// /// Default Value: false /// /// - /// Default Value: artalk + /// Default Value: fasttalk + /// + /// + /// Turns off the face restoration pass on legacy faces.
+ /// Default Value: false + /// + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -150,13 +223,20 @@ public ConfigurableSessionRequest( string? voiceId, string? systemPrompt, string? firstMessage, + global::Simli.AnimationId? introAnimation, int? maxSessionLength, int? maxIdleTime, string? language, global::Simli.CustomLLMConfig? customLLMConfig, global::Simli.LLMConfig? llmConfig, bool? createTranscript, - global::Simli.SimliModels? model) + global::Simli.SimliModels? model, + bool? disableSuperRes, + int? streamingWidth, + int? streamingHeight, + double? avatarPositionX, + double? avatarPositionY, + global::Simli.CameraSetting? camera) { this.FaceId = faceId; this.TtsProvider = ttsProvider; @@ -165,6 +245,7 @@ public ConfigurableSessionRequest( this.VoiceId = voiceId; this.SystemPrompt = systemPrompt; this.FirstMessage = firstMessage; + this.IntroAnimation = introAnimation; this.MaxSessionLength = maxSessionLength; this.MaxIdleTime = maxIdleTime; this.Language = language; @@ -172,6 +253,12 @@ public ConfigurableSessionRequest( this.LlmConfig = llmConfig; this.CreateTranscript = createTranscript; this.Model = model; + this.DisableSuperRes = disableSuperRes; + this.StreamingWidth = streamingWidth; + this.StreamingHeight = streamingHeight; + this.AvatarPositionX = avatarPositionX; + this.AvatarPositionY = avatarPositionY; + this.Camera = camera; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.CreatePipecatSessionTokenAutoTokenPostResponse.g.cs b/src/libs/Simli/Generated/Simli.Models.CreatePipecatSessionTokenAutoTokenPostResponse.g.cs index 3c3dd27..1f3d191 100644 --- a/src/libs/Simli/Generated/Simli.Models.CreatePipecatSessionTokenAutoTokenPostResponse.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.CreatePipecatSessionTokenAutoTokenPostResponse.g.cs @@ -8,6 +8,17 @@ namespace Simli /// public sealed partial class CreatePipecatSessionTokenAutoTokenPostResponse { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_token")] + public string? SessionToken { get; set; } + + /// + /// Starting camera fields outside their supported range. The token is minted regardless. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("warnings")] + public global::System.Collections.Generic.IList? Warnings { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -15,5 +26,30 @@ public sealed partial class CreatePipecatSessionTokenAutoTokenPostResponse [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. + /// + /// + /// + /// Starting camera fields outside their supported range. The token is minted regardless. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreatePipecatSessionTokenAutoTokenPostResponse( + string? sessionToken, + global::System.Collections.Generic.IList? warnings) + { + this.SessionToken = sessionToken; + this.Warnings = warnings; + } + + /// + /// Initializes a new instance of the class. + /// + public CreatePipecatSessionTokenAutoTokenPostResponse() + { + } + } } \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.EnqueueGSAGenerationFacesGsCreatePostResponse.g.cs b/src/libs/Simli/Generated/Simli.Models.EnqueueGSAGenerationFacesGsCreatePostResponse.g.cs index 48f2e94..4ee924f 100644 --- a/src/libs/Simli/Generated/Simli.Models.EnqueueGSAGenerationFacesGsCreatePostResponse.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.EnqueueGSAGenerationFacesGsCreatePostResponse.g.cs @@ -8,6 +8,32 @@ namespace Simli /// public sealed partial class EnqueueGSAGenerationFacesGsCreatePostResponse { + /// + /// The generation's place in the queue, and how long it is held, if it is. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// The new face's ID. Poll GET /faces/trinity/generation_status with it. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("face_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FaceId { get; set; } + + /// + /// GSA_2.0 only, when the generation is held by the 10 minutes between one account's GSA_2.0 generations: the Unix time (seconds) it may start. Absent otherwise. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dispatch_after")] + public int? DispatchAfter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("warnings")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Warnings { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -15,5 +41,40 @@ public sealed partial class EnqueueGSAGenerationFacesGsCreatePostResponse [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. + /// + /// + /// The generation's place in the queue, and how long it is held, if it is. + /// + /// + /// The new face's ID. Poll GET /faces/trinity/generation_status with it. + /// + /// + /// + /// GSA_2.0 only, when the generation is held by the 10 minutes between one account's GSA_2.0 generations: the Unix time (seconds) it may start. Absent otherwise. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EnqueueGSAGenerationFacesGsCreatePostResponse( + string message, + string faceId, + global::System.Collections.Generic.IList warnings, + int? dispatchAfter) + { + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + this.FaceId = faceId ?? throw new global::System.ArgumentNullException(nameof(faceId)); + this.DispatchAfter = dispatchAfter; + this.Warnings = warnings ?? throw new global::System.ArgumentNullException(nameof(warnings)); + } + + /// + /// Initializes a new instance of the class. + /// + public EnqueueGSAGenerationFacesGsCreatePostResponse() + { + } + } } \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.LLMConfig.g.cs b/src/libs/Simli/Generated/Simli.Models.LLMConfig.g.cs index 6c7d673..9435f71 100644 --- a/src/libs/Simli/Generated/Simli.Models.LLMConfig.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.LLMConfig.g.cs @@ -9,7 +9,7 @@ namespace Simli public sealed partial class LLMConfig { /// - /// Default Value: gpt-4o-mini + /// Default Value: gpt-6-luna /// [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Simli.JsonConverters.AnyOfJsonConverter))] @@ -44,7 +44,7 @@ public sealed partial class LLMConfig /// Initializes a new instance of the class. /// /// - /// Default Value: gpt-4o-mini + /// Default Value: gpt-6-luna /// /// /// Default Value: OpenAI diff --git a/src/libs/Simli/Generated/Simli.Models.OpenAIModels.g.cs b/src/libs/Simli/Generated/Simli.Models.OpenAIModels.g.cs index 1992ce1..dc2c1f7 100644 --- a/src/libs/Simli/Generated/Simli.Models.OpenAIModels.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.OpenAIModels.g.cs @@ -4,30 +4,22 @@ namespace Simli { /// - /// + /// gpt-realtime-2.1-mini and gpt-live-1 are speech to speech: they listen and speak themselves, so the TTS settings don't apply. The older gpt-4o and gpt-4.1 models are still accepted for existing integrations. /// public enum OpenAIModels { /// /// /// - Gpt41, + Gpt6Luna, /// - /// - /// - Gpt41Mini, - /// - /// + /// they listen and speak themselves, so the TTS settings don't apply. The older gpt-4o and gpt-4.1 models are still accepted for existing integrations. /// - Gpt41Nano, + GptLive1, /// - /// - /// - Gpt4o, - /// - /// + /// they listen and speak themselves, so the TTS settings don't apply. The older gpt-4o and gpt-4.1 models are still accepted for existing integrations. /// - Gpt4oMini, + GptRealtime21Mini, } /// @@ -42,11 +34,9 @@ public static string ToValueString(this OpenAIModels value) { return value switch { - OpenAIModels.Gpt41 => "gpt-4.1", - OpenAIModels.Gpt41Mini => "gpt-4.1-mini", - OpenAIModels.Gpt41Nano => "gpt-4.1-nano", - OpenAIModels.Gpt4o => "gpt-4o", - OpenAIModels.Gpt4oMini => "gpt-4o-mini", + OpenAIModels.Gpt6Luna => "gpt-6-luna", + OpenAIModels.GptLive1 => "gpt-live-1", + OpenAIModels.GptRealtime21Mini => "gpt-realtime-2.1-mini", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -57,11 +47,9 @@ public static string ToValueString(this OpenAIModels value) { return value switch { - "gpt-4.1" => OpenAIModels.Gpt41, - "gpt-4.1-mini" => OpenAIModels.Gpt41Mini, - "gpt-4.1-nano" => OpenAIModels.Gpt41Nano, - "gpt-4o" => OpenAIModels.Gpt4o, - "gpt-4o-mini" => OpenAIModels.Gpt4oMini, + "gpt-6-luna" => OpenAIModels.Gpt6Luna, + "gpt-live-1" => OpenAIModels.GptLive1, + "gpt-realtime-2.1-mini" => OpenAIModels.GptRealtime21Mini, _ => null, }; } diff --git a/src/libs/Simli/Generated/Simli.Models.SessionDetails.g.cs b/src/libs/Simli/Generated/Simli.Models.SessionDetails.g.cs index f6b5732..1c11759 100644 --- a/src/libs/Simli/Generated/Simli.Models.SessionDetails.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.SessionDetails.g.cs @@ -22,6 +22,12 @@ public sealed partial class SessionDetails [global::System.Text.Json.Serialization.JsonRequired] public required string SessionId { get; set; } + /// + /// Deprecations, and starting camera fields outside their supported range. The session starts regardless. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("warnings")] + public global::System.Collections.Generic.IList? Warnings { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,15 +39,20 @@ public sealed partial class SessionDetails /// /// /// + /// + /// Deprecations, and starting camera fields outside their supported range. The session starts regardless. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SessionDetails( string roomUrl, - string sessionId) + string sessionId, + global::System.Collections.Generic.IList? warnings) { this.RoomUrl = roomUrl ?? throw new global::System.ArgumentNullException(nameof(roomUrl)); this.SessionId = sessionId ?? throw new global::System.ArgumentNullException(nameof(sessionId)); + this.Warnings = warnings; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.SimliModels.g.cs b/src/libs/Simli/Generated/Simli.Models.SimliModels.g.cs index 53151b0..694beb7 100644 --- a/src/libs/Simli/Generated/Simli.Models.SimliModels.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.SimliModels.g.cs @@ -8,10 +8,6 @@ namespace Simli /// public enum SimliModels { - /// - /// - /// - Artalk, /// /// /// @@ -30,7 +26,6 @@ public static string ToValueString(this SimliModels value) { return value switch { - SimliModels.Artalk => "artalk", SimliModels.Fasttalk => "fasttalk", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -42,7 +37,6 @@ public static string ToValueString(this SimliModels value) { return value switch { - "artalk" => SimliModels.Artalk, "fasttalk" => SimliModels.Fasttalk, _ => null, }; diff --git a/src/libs/Simli/Generated/Simli.Models.StartAudioToVideoSessionComposeTokenPostResponse.g.cs b/src/libs/Simli/Generated/Simli.Models.StartAudioToVideoSessionComposeTokenPostResponse.g.cs index 030a580..80fa345 100644 --- a/src/libs/Simli/Generated/Simli.Models.StartAudioToVideoSessionComposeTokenPostResponse.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.StartAudioToVideoSessionComposeTokenPostResponse.g.cs @@ -14,6 +14,12 @@ public sealed partial class StartAudioToVideoSessionComposeTokenPostResponse [global::System.Text.Json.Serialization.JsonPropertyName("session_token")] public string? SessionToken { get; set; } + /// + /// Starting camera fields outside their supported range, and region overrides. The token is minted regardless. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("warnings")] + public global::System.Collections.Generic.IList? Warnings { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -24,13 +30,18 @@ public sealed partial class StartAudioToVideoSessionComposeTokenPostResponse /// Initializes a new instance of the class. ///
/// + /// + /// Starting camera fields outside their supported range, and region overrides. The token is minted regardless. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public StartAudioToVideoSessionComposeTokenPostResponse( - string? sessionToken) + string? sessionToken, + global::System.Collections.Generic.IList? warnings) { this.SessionToken = sessionToken; + this.Warnings = warnings; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.StartStreamingSessionRequest.g.cs b/src/libs/Simli/Generated/Simli.Models.StartStreamingSessionRequest.g.cs index 2a708a6..4803b1a 100644 --- a/src/libs/Simli/Generated/Simli.Models.StartStreamingSessionRequest.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.StartStreamingSessionRequest.g.cs @@ -16,7 +16,7 @@ public sealed partial class StartStreamingSessionRequest public required string FaceId { get; set; } /// - /// + /// Default Value: v2 /// [global::System.Text.Json.Serialization.JsonPropertyName("apiVersion")] public string? ApiVersion { get; set; } @@ -57,6 +57,40 @@ public sealed partial class StartStreamingSessionRequest [global::System.Text.Json.Serialization.JsonPropertyName("audioInputFormat")] public string? AudioInputFormat { get; set; } + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_width")] + public int? StreamingWidth { get; set; } + + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_height")] + public int? StreamingHeight { get; set; } + + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_x")] + public double? AvatarPositionX { get; set; } + + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_y")] + public double? AvatarPositionY { get; set; } + + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("camera")] + public global::Simli.CameraSetting? Camera { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -67,7 +101,9 @@ public sealed partial class StartStreamingSessionRequest /// Initializes a new instance of the class. ///
/// - /// + /// + /// Default Value: v2 + /// /// /// /// Default Value: true @@ -84,6 +120,25 @@ public sealed partial class StartStreamingSessionRequest /// /// Default Value: pcm16 /// + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -95,7 +150,12 @@ public StartStreamingSessionRequest( int? maxSessionLength, int? maxIdleTime, int? startFrame, - string? audioInputFormat) + string? audioInputFormat, + int? streamingWidth, + int? streamingHeight, + double? avatarPositionX, + double? avatarPositionY, + global::Simli.CameraSetting? camera) { this.FaceId = faceId ?? throw new global::System.ArgumentNullException(nameof(faceId)); this.ApiVersion = apiVersion; @@ -105,6 +165,11 @@ public StartStreamingSessionRequest( this.MaxIdleTime = maxIdleTime; this.StartFrame = startFrame; this.AudioInputFormat = audioInputFormat; + this.StreamingWidth = streamingWidth; + this.StreamingHeight = streamingHeight; + this.AvatarPositionX = avatarPositionX; + this.AvatarPositionY = avatarPositionY; + this.Camera = camera; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.TokenRequest.g.cs b/src/libs/Simli/Generated/Simli.Models.TokenRequest.g.cs index 9486f59..c538a03 100644 --- a/src/libs/Simli/Generated/Simli.Models.TokenRequest.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.TokenRequest.g.cs @@ -45,6 +45,40 @@ public sealed partial class TokenRequest [global::System.Text.Json.Serialization.JsonPropertyName("originAllowList")] public global::System.Collections.Generic.IList? OriginAllowList { get; set; } + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_width")] + public int? StreamingWidth { get; set; } + + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("streaming_height")] + public int? StreamingHeight { get; set; } + + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_x")] + public double? AvatarPositionX { get; set; } + + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("avatar_position_y")] + public double? AvatarPositionY { get; set; } + + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("camera")] + public global::Simli.CameraSetting? Camera { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -66,6 +100,25 @@ public sealed partial class TokenRequest /// /// Default Value: [] /// + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -75,7 +128,12 @@ public TokenRequest( string? llmAPIKey, string? ttsAPIKey, bool? createTranscript, - global::System.Collections.Generic.IList? originAllowList) + global::System.Collections.Generic.IList? originAllowList, + int? streamingWidth, + int? streamingHeight, + double? avatarPositionX, + double? avatarPositionY, + global::Simli.CameraSetting? camera) { this.ExpiryStamp = expiryStamp; this.SimliAPIKey = simliAPIKey ?? throw new global::System.ArgumentNullException(nameof(simliAPIKey)); @@ -83,6 +141,11 @@ public TokenRequest( this.TtsAPIKey = ttsAPIKey; this.CreateTranscript = createTranscript; this.OriginAllowList = originAllowList; + this.StreamingWidth = streamingWidth; + this.StreamingHeight = streamingHeight; + this.AvatarPositionX = avatarPositionX; + this.AvatarPositionY = avatarPositionY; + this.Camera = camera; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.TrinityGeneration.Json.g.cs b/src/libs/Simli/Generated/Simli.Models.TrinityGeneration.Json.g.cs new file mode 100644 index 0000000..d7b0734 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.TrinityGeneration.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Simli +{ + public sealed partial class TrinityGeneration + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Simli.TrinityGeneration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Simli.TrinityGeneration), + jsonSerializerContext) as global::Simli.TrinityGeneration; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Simli.TrinityGeneration? FromJson( + string json) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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::Simli.TrinityGeneration? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + 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::Simli.TrinityGeneration), + jsonSerializerContext).ConfigureAwait(false)) as global::Simli.TrinityGeneration; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Simli/Generated/Simli.Models.TrinityGeneration.g.cs b/src/libs/Simli/Generated/Simli.Models.TrinityGeneration.g.cs new file mode 100644 index 0000000..d83554f --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.TrinityGeneration.g.cs @@ -0,0 +1,79 @@ + +#nullable enable + +namespace Simli +{ + /// + /// + /// + public sealed partial class TrinityGeneration + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("face_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FaceId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Simli.JsonConverters.TrinityGenerationStateJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Simli.TrinityGenerationState Status { get; set; } + + /// + /// Place in the pending queue. 0 once the generation has left the queue and is being worked on. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("queue_position")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int QueuePosition { get; set; } + + /// + /// GSA_2.0 only, while the generation is pending and held by the 10 minutes between one account's GSA_2.0 generations: the Unix time (seconds) it may start. Absent otherwise. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dispatch_after")] + public int? DispatchAfter { 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. + /// + /// + /// + /// + /// Place in the pending queue. 0 once the generation has left the queue and is being worked on. + /// + /// + /// GSA_2.0 only, while the generation is pending and held by the 10 minutes between one account's GSA_2.0 generations: the Unix time (seconds) it may start. Absent otherwise. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TrinityGeneration( + string faceId, + global::Simli.TrinityGenerationState status, + int queuePosition, + int? dispatchAfter) + { + this.FaceId = faceId ?? throw new global::System.ArgumentNullException(nameof(faceId)); + this.Status = status; + this.QueuePosition = queuePosition; + this.DispatchAfter = dispatchAfter; + } + + /// + /// Initializes a new instance of the class. + /// + public TrinityGeneration() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.TrinityGenerationState.g.cs b/src/libs/Simli/Generated/Simli.Models.TrinityGenerationState.g.cs new file mode 100644 index 0000000..af9daa0 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.TrinityGenerationState.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace Simli +{ + /// + /// + /// + public enum TrinityGenerationState + { + /// + /// + /// + Completed, + /// + /// + /// + Failed, + /// + /// + /// + NotFound, + /// + /// + /// + Pending, + /// + /// + /// + Processing, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TrinityGenerationStateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TrinityGenerationState value) + { + return value switch + { + TrinityGenerationState.Completed => "completed", + TrinityGenerationState.Failed => "failed", + TrinityGenerationState.NotFound => "not_found", + TrinityGenerationState.Pending => "pending", + TrinityGenerationState.Processing => "processing", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TrinityGenerationState? ToEnum(string value) + { + return value switch + { + "completed" => TrinityGenerationState.Completed, + "failed" => TrinityGenerationState.Failed, + "not_found" => TrinityGenerationState.NotFound, + "pending" => TrinityGenerationState.Pending, + "processing" => TrinityGenerationState.Processing, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.Json.g.cs b/src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.Json.g.cs new file mode 100644 index 0000000..f8e11fa --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Simli +{ + public sealed partial class TrinityGenerationStatus + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Simli.TrinityGenerationStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Simli.TrinityGenerationStatus), + jsonSerializerContext) as global::Simli.TrinityGenerationStatus; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Simli.TrinityGenerationStatus? FromJson( + string json) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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::Simli.TrinityGenerationStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + 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::Simli.TrinityGenerationStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::Simli.TrinityGenerationStatus; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.g.cs b/src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.g.cs new file mode 100644 index 0000000..b27ee04 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.TrinityGenerationStatus.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace Simli +{ + /// + /// + /// + public sealed partial class TrinityGenerationStatus + { + /// + /// Status of the most recent generation, or not_found when none is tracked. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Simli.JsonConverters.TrinityGenerationStateJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Simli.TrinityGenerationState Status { get; set; } + + /// + /// Queue position of the most recent generation, or -1 when none is tracked. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("queue_position")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int QueuePosition { get; set; } + + /// + /// The most recent generation's face id. Absent when nothing is tracked and no face_id was requested; echoes the requested face_id otherwise. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("face_id")] + public string? FaceId { get; set; } + + /// + /// Every generation still tracked for the caller, oldest first. Completed and failed entries remain listed for 24 hours. Empty when none is tracked. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generations")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Generations { 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. + /// + /// + /// Status of the most recent generation, or not_found when none is tracked. + /// + /// + /// Queue position of the most recent generation, or -1 when none is tracked. + /// + /// + /// Every generation still tracked for the caller, oldest first. Completed and failed entries remain listed for 24 hours. Empty when none is tracked. + /// + /// + /// The most recent generation's face id. Absent when nothing is tracked and no face_id was requested; echoes the requested face_id otherwise. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TrinityGenerationStatus( + global::Simli.TrinityGenerationState status, + int queuePosition, + global::System.Collections.Generic.IList generations, + string? faceId) + { + this.Status = status; + this.QueuePosition = queuePosition; + this.FaceId = faceId; + this.Generations = generations ?? throw new global::System.ArgumentNullException(nameof(generations)); + } + + /// + /// Initializes a new instance of the class. + /// + public TrinityGenerationStatus() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.Models.TrinityVersion.g.cs b/src/libs/Simli/Generated/Simli.Models.TrinityVersion.g.cs index 188c588..afdf35d 100644 --- a/src/libs/Simli/Generated/Simli.Models.TrinityVersion.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.TrinityVersion.g.cs @@ -4,14 +4,18 @@ namespace Simli { /// - /// + /// The avatar generation: GSA_1.0 makes a Trinity-1 face, GSA_2.0 a Trinity-2 face. /// public enum TrinityVersion { /// - /// + /// GSA_1.0 makes a Trinity-1 face, GSA_2.0 a Trinity-2 face. /// Gsa10, + /// + /// GSA_1.0 makes a Trinity-1 face, GSA_2.0 a Trinity-2 face. + /// + Gsa20, } /// @@ -27,6 +31,7 @@ public static string ToValueString(this TrinityVersion value) return value switch { TrinityVersion.Gsa10 => "GSA_1.0", + TrinityVersion.Gsa20 => "GSA_2.0", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -38,6 +43,7 @@ public static string ToValueString(this TrinityVersion value) return value switch { "GSA_1.0" => TrinityVersion.Gsa10, + "GSA_2.0" => TrinityVersion.Gsa20, _ => null, }; } diff --git a/src/libs/Simli/Generated/Simli.Models.TtsProvider.g.cs b/src/libs/Simli/Generated/Simli.Models.TtsProvider.g.cs index 39ee38b..de1b1c2 100644 --- a/src/libs/Simli/Generated/Simli.Models.TtsProvider.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.TtsProvider.g.cs @@ -19,7 +19,7 @@ public enum TtsProvider /// /// /// - PlayHT, + Inworld, /// /// /// @@ -40,7 +40,7 @@ public static string ToValueString(this TtsProvider value) { TtsProvider.Cartesia => "Cartesia", TtsProvider.ElevenLabs => "ElevenLabs", - TtsProvider.PlayHT => "PlayHT", + TtsProvider.Inworld => "Inworld", TtsProvider.User => "User", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -54,7 +54,7 @@ public static string ToValueString(this TtsProvider value) { "Cartesia" => TtsProvider.Cartesia, "ElevenLabs" => TtsProvider.ElevenLabs, - "PlayHT" => TtsProvider.PlayHT, + "Inworld" => TtsProvider.Inworld, "User" => TtsProvider.User, _ => null, }; diff --git a/src/libs/Simli/Generated/Simli.Models.ValidationError.g.cs b/src/libs/Simli/Generated/Simli.Models.ValidationError.g.cs index ae54c62..c1893eb 100644 --- a/src/libs/Simli/Generated/Simli.Models.ValidationError.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.ValidationError.g.cs @@ -29,6 +29,18 @@ public sealed partial class ValidationError [global::System.Text.Json.Serialization.JsonRequired] public required string Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + public object? Input { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ctx")] + public object? Ctx { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,17 +53,23 @@ public sealed partial class ValidationError /// /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ValidationError( global::System.Collections.Generic.IList> loc, string msg, - string type) + string type, + object? input, + object? ctx) { this.Loc = loc ?? throw new global::System.ArgumentNullException(nameof(loc)); this.Msg = msg ?? throw new global::System.ArgumentNullException(nameof(msg)); this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Input = input; + this.Ctx = ctx; } /// diff --git a/src/libs/Simli/Generated/Simli.Models.ValidationErrorCtx.Json.g.cs b/src/libs/Simli/Generated/Simli.Models.ValidationErrorCtx.Json.g.cs new file mode 100644 index 0000000..4922c83 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.ValidationErrorCtx.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Simli +{ + public sealed partial class ValidationErrorCtx + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Simli.ValidationErrorCtx? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Simli.ValidationErrorCtx), + jsonSerializerContext) as global::Simli.ValidationErrorCtx; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Simli.ValidationErrorCtx? FromJson( + string json) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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::Simli.ValidationErrorCtx? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + 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::Simli.ValidationErrorCtx), + jsonSerializerContext).ConfigureAwait(false)) as global::Simli.ValidationErrorCtx; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Simli/Generated/Simli.Models.GetRequestStatusFacesGsStatusGetResponse.g.cs b/src/libs/Simli/Generated/Simli.Models.ValidationErrorCtx.g.cs similarity index 86% rename from src/libs/Simli/Generated/Simli.Models.GetRequestStatusFacesGsStatusGetResponse.g.cs rename to src/libs/Simli/Generated/Simli.Models.ValidationErrorCtx.g.cs index 060f77a..212f4ee 100644 --- a/src/libs/Simli/Generated/Simli.Models.GetRequestStatusFacesGsStatusGetResponse.g.cs +++ b/src/libs/Simli/Generated/Simli.Models.ValidationErrorCtx.g.cs @@ -6,7 +6,7 @@ namespace Simli /// /// /// - public sealed partial class GetRequestStatusFacesGsStatusGetResponse + public sealed partial class ValidationErrorCtx { /// diff --git a/src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.Json.g.cs b/src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.Json.g.cs new file mode 100644 index 0000000..84084f5 --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Simli +{ + public sealed partial class ValidationErrorInput + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Simli.ValidationErrorInput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Simli.ValidationErrorInput), + jsonSerializerContext) as global::Simli.ValidationErrorInput; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Simli.ValidationErrorInput? FromJson( + string json) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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::Simli.ValidationErrorInput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Simli.SourceGenerationContext.Default); + } + + 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::Simli.ValidationErrorInput), + jsonSerializerContext).ConfigureAwait(false)) as global::Simli.ValidationErrorInput; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Simli.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.g.cs b/src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.g.cs new file mode 100644 index 0000000..5c04b9b --- /dev/null +++ b/src/libs/Simli/Generated/Simli.Models.ValidationErrorInput.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Simli +{ + /// + /// + /// + public sealed partial class ValidationErrorInput + { + + /// + /// 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(); + + } +} \ No newline at end of file diff --git a/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs index 8914e23..35038d7 100644 --- a/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs +++ b/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs @@ -486,6 +486,29 @@ partial void ProcessAudioToVideoInterfaceStaticAudioPostResponseContent( /// /// Default Value: 0 /// + /// + /// Turns off the face restoration pass on legacy faces.
+ /// Default Value: false + /// + /// + /// Width of the video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the video starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -496,6 +519,12 @@ partial void ProcessAudioToVideoInterfaceStaticAudioPostResponseContent( int? audioSampleRate = default, int? audioChannelCount = default, int? videoStartingFrame = default, + bool? disableSuperRes = default, + int? streamingWidth = default, + int? streamingHeight = default, + double? avatarPositionX = default, + double? avatarPositionY = default, + global::Simli.CameraSetting? camera = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -507,6 +536,12 @@ partial void ProcessAudioToVideoInterfaceStaticAudioPostResponseContent( AudioSampleRate = audioSampleRate, AudioChannelCount = audioChannelCount, VideoStartingFrame = videoStartingFrame, + DisableSuperRes = disableSuperRes, + StreamingWidth = streamingWidth, + StreamingHeight = streamingHeight, + AvatarPositionX = avatarPositionX, + AvatarPositionY = avatarPositionY, + Camera = camera, }; return await AudioToVideoInterfaceStaticAudioPostAsync( diff --git a/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs index ed4a124..81d18be 100644 --- a/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs +++ b/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs @@ -27,12 +27,14 @@ public partial class SimliClient }; partial void PrepareEnqueueGSAGenerationFacesGsCreatePostArguments( global::System.Net.Http.HttpClient httpClient, + ref float? targetRatio, ref global::Simli.TrinityVersion? gsVersion, ref string? faceName, global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost request); partial void PrepareEnqueueGSAGenerationFacesGsCreatePostRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, + float? targetRatio, global::Simli.TrinityVersion? gsVersion, string? faceName, global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost request); @@ -48,6 +50,7 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent( /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -58,9 +61,10 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent( /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( + public async global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost request, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -69,6 +73,7 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent( var __response = await EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( request: request, + targetRatio: targetRatio, gsVersion: gsVersion, faceName: faceName, requestOptions: requestOptions, @@ -80,6 +85,7 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent( /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -90,9 +96,10 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent( /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( + public async global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( global::Simli.BodyEnqueueGSAGenerationFacesGsCreatePost request, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -104,6 +111,7 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent( client: HttpClient); PrepareEnqueueGSAGenerationFacesGsCreatePostArguments( httpClient: HttpClient, + targetRatio: ref targetRatio, gsVersion: ref gsVersion, faceName: ref faceName, request: request); @@ -168,6 +176,12 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent( } } + if (targetRatio != default) + { + __httpRequest.Headers.TryAddWithoutValidation("target-ratio", targetRatio.ToString()); + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); __contentImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -220,6 +234,7 @@ request.Imagename is null PrepareEnqueueGSAGenerationFacesGsCreatePostRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + targetRatio: targetRatio, gsVersion: gsVersion, faceName: faceName, request: request); @@ -401,6 +416,38 @@ request.Imagename is null retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Validation Error if ((int)__response.StatusCode == 422) { @@ -460,11 +507,13 @@ request.Imagename is null { __response.EnsureSuccessStatusCode(); - return new global::Simli.AutoSDKHttpResponse( + var __value = global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, - body: __content); + body: __value); } catch (global::System.Exception __ex) { @@ -484,17 +533,19 @@ request.Imagename is null try { __response.EnsureSuccessStatusCode(); - var __content = await __response.Content.ReadAsStringAsync( + using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - return new global::Simli.AutoSDKHttpResponse( + var __value = await global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, - body: __content); + body: __value); } catch (global::System.Exception __ex) { @@ -533,6 +584,7 @@ request.Imagename is null /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -544,9 +596,10 @@ request.Imagename is null /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( + public async global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( byte[] image, string imagename, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -559,6 +612,7 @@ request.Imagename is null }; return await EnqueueGSAGenerationFacesGsCreatePostAsync( + targetRatio: targetRatio, gsVersion: gsVersion, faceName: faceName, request: __request, @@ -569,6 +623,7 @@ request.Imagename is null /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -582,9 +637,10 @@ request.Imagename is null /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( + public async global::System.Threading.Tasks.Task EnqueueGSAGenerationFacesGsCreatePostAsync( global::System.IO.Stream image, string imagename, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -601,6 +657,7 @@ request.Imagename is null client: HttpClient); PrepareEnqueueGSAGenerationFacesGsCreatePostArguments( httpClient: HttpClient, + targetRatio: ref targetRatio, gsVersion: ref gsVersion, faceName: ref faceName, request: request); @@ -665,6 +722,12 @@ request.Imagename is null } } + if (targetRatio != default) + { + __httpRequest.Headers.TryAddWithoutValidation("target-ratio", targetRatio.ToString()); + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentImage = new global::System.Net.Http.StreamContent(image); __contentImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -717,6 +780,7 @@ request.Imagename is null PrepareEnqueueGSAGenerationFacesGsCreatePostRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + targetRatio: targetRatio, gsVersion: gsVersion, faceName: faceName, request: request); @@ -898,6 +962,38 @@ request.Imagename is null retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Validation Error if ((int)__response.StatusCode == 422) { @@ -957,7 +1053,9 @@ request.Imagename is null { __response.EnsureSuccessStatusCode(); - return __content; + return + global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) { @@ -977,13 +1075,15 @@ request.Imagename is null try { __response.EnsureSuccessStatusCode(); - var __content = await __response.Content.ReadAsStringAsync( + using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - return __content; + return + await global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) { @@ -1022,6 +1122,7 @@ request.Imagename is null /// /// Generate Trinity Face /// + /// /// /// Default Value: GSA_1.0 /// @@ -1035,9 +1136,10 @@ request.Imagename is null /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( + public async global::System.Threading.Tasks.Task> EnqueueGSAGenerationFacesGsCreatePostAsResponseAsync( global::System.IO.Stream image, string imagename, + float? targetRatio = default, global::Simli.TrinityVersion? gsVersion = default, string? faceName = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, @@ -1054,6 +1156,7 @@ request.Imagename is null client: HttpClient); PrepareEnqueueGSAGenerationFacesGsCreatePostArguments( httpClient: HttpClient, + targetRatio: ref targetRatio, gsVersion: ref gsVersion, faceName: ref faceName, request: request); @@ -1118,6 +1221,12 @@ request.Imagename is null } } + if (targetRatio != default) + { + __httpRequest.Headers.TryAddWithoutValidation("target-ratio", targetRatio.ToString()); + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentImage = new global::System.Net.Http.StreamContent(image); __contentImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -1170,6 +1279,7 @@ request.Imagename is null PrepareEnqueueGSAGenerationFacesGsCreatePostRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + targetRatio: targetRatio, gsVersion: gsVersion, faceName: faceName, request: request); @@ -1351,6 +1461,38 @@ request.Imagename is null retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Validation Error if ((int)__response.StatusCode == 422) { @@ -1410,11 +1552,13 @@ request.Imagename is null { __response.EnsureSuccessStatusCode(); - return new global::Simli.AutoSDKHttpResponse( + var __value = global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, - body: __content); + body: __value); } catch (global::System.Exception __ex) { @@ -1434,17 +1578,19 @@ request.Imagename is null try { __response.EnsureSuccessStatusCode(); - var __content = await __response.Content.ReadAsStringAsync( + using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - return new global::Simli.AutoSDKHttpResponse( + var __value = await global::Simli.EnqueueGSAGenerationFacesGsCreatePostResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, - body: __content); + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs index fb478c9..c8e8aa7 100644 --- a/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs +++ b/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs @@ -42,13 +42,14 @@ partial void ProcessGetRequestStatusFacesGsStatusGetResponseContent( ref string content); /// - /// Check Trinity Generation Status + /// Check Trinity Generation Status
+ /// Status of the caller's Trinity generations. `generations` lists every one still tracked, oldest first; the top-level status, queue_position and face_id describe the most recent of them. Accounts that generate in parallel should read `generations` - the top-level fields only ever describe one of several in flight. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task GetRequestStatusFacesGsStatusGetAsync( + public async global::System.Threading.Tasks.Task GetRequestStatusFacesGsStatusGetAsync( string? faceId = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -62,13 +63,14 @@ partial void ProcessGetRequestStatusFacesGsStatusGetResponseContent( return __response.Body; } /// - /// Check Trinity Generation Status + /// Check Trinity Generation Status
+ /// Status of the caller's Trinity generations. `generations` lists every one still tracked, oldest first; the top-level status, queue_position and face_id describe the most recent of them. Accounts that generate in parallel should read `generations` - the top-level fields only ever describe one of several in flight. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> GetRequestStatusFacesGsStatusGetAsResponseAsync( + public async global::System.Threading.Tasks.Task> GetRequestStatusFacesGsStatusGetAsResponseAsync( string? faceId = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -386,11 +388,13 @@ partial void ProcessGetRequestStatusFacesGsStatusGetResponseContent( { __response.EnsureSuccessStatusCode(); - return new global::Simli.AutoSDKHttpResponse( + var __value = global::Simli.TrinityGenerationStatus.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, - body: __content); + body: __value); } catch (global::System.Exception __ex) { @@ -410,17 +414,19 @@ partial void ProcessGetRequestStatusFacesGsStatusGetResponseContent( try { __response.EnsureSuccessStatusCode(); - var __content = await __response.Content.ReadAsStringAsync( + using var __content = await __response.Content.ReadAsStreamAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - return new global::Simli.AutoSDKHttpResponse( + var __value = await global::Simli.TrinityGenerationStatus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, - body: __content); + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs index a7ab3c6..3467b98 100644 --- a/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs +++ b/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs @@ -27,10 +27,12 @@ public partial class SimliClient }; partial void PrepareInitIntegrationsLivekitAgentsPostArguments( global::System.Net.Http.HttpClient httpClient, + ref string? sessionToken, global::Simli.LiveKitInitializationRequest request); partial void PrepareInitIntegrationsLivekitAgentsPostRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? sessionToken, global::Simli.LiveKitInitializationRequest request); partial void ProcessInitIntegrationsLivekitAgentsPostResponse( global::System.Net.Http.HttpClient httpClient, @@ -44,6 +46,7 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( /// /// Start Livekit Agents Session /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -51,12 +54,14 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( public async global::System.Threading.Tasks.Task InitIntegrationsLivekitAgentsPostAsync( global::Simli.LiveKitInitializationRequest request, + string? sessionToken = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { var __response = await InitIntegrationsLivekitAgentsPostAsResponseAsync( request: request, + sessionToken: sessionToken, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -66,6 +71,7 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( /// /// Start Livekit Agents Session /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -73,6 +79,7 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( public async global::System.Threading.Tasks.Task> InitIntegrationsLivekitAgentsPostAsResponseAsync( global::Simli.LiveKitInitializationRequest request, + string? sessionToken = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -82,6 +89,7 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( client: HttpClient); PrepareInitIntegrationsLivekitAgentsPostArguments( httpClient: HttpClient, + sessionToken: ref sessionToken, request: request); @@ -110,6 +118,9 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( var __pathBuilder = new global::Simli.PathBuilder( path: "/integrations/livekit/agents", baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("session_token", sessionToken) + ; var __path = __pathBuilder.ToString(); __path = global::Simli.AutoSDKRequestOptionsSupport.AppendQueryParameters( path: __path, @@ -156,6 +167,7 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( PrepareInitIntegrationsLivekitAgentsPostRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + sessionToken: sessionToken, request: request); return __httpRequest; @@ -509,26 +521,29 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent( /// Start Livekit Agents Session ///
/// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task InitIntegrationsLivekitAgentsPostAsync( - string sessionToken, + string requestSessionToken, string livekitToken, string livekitUrl, + string? sessionToken = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Simli.LiveKitInitializationRequest { - SessionToken = sessionToken, + SessionToken = requestSessionToken, LivekitToken = livekitToken, LivekitUrl = livekitUrl, }; return await InitIntegrationsLivekitAgentsPostAsync( + sessionToken: sessionToken, request: __request, requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/Simli/Generated/Simli.SimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs index 3df5441..55e4c80 100644 --- a/src/libs/Simli/Generated/Simli.SimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs +++ b/src/libs/Simli/Generated/Simli.SimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs @@ -27,67 +27,990 @@ public partial class SimliClient }; partial void PreparePreprocessImageFacesTrinityPreprocessPostArguments( global::System.Net.Http.HttpClient httpClient, + ref global::Simli.TrinityVersion? gsVersion, ref bool? retry, global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request); partial void PreparePreprocessImageFacesTrinityPreprocessPostRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Simli.TrinityVersion? gsVersion, bool? retry, global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request); partial void ProcessPreprocessImageFacesTrinityPreprocessPostResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); + partial void ProcessPreprocessImageFacesTrinityPreprocessPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref byte[] content); + + /// + /// Preprocess Trinity Face Image
+ /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. + ///
+ /// + /// Default Value: GSA_1.0 + /// + /// + /// Default Value: false + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + + global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + global::Simli.TrinityVersion? gsVersion = default, + bool? retry = default, + global::Simli.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( + + request: request, + gsVersion: gsVersion, + retry: retry, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Preprocess Trinity Face Image
+ /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. + ///
+ /// + /// Default Value: GSA_1.0 + /// + /// + /// Default Value: false + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsStreamAsync( + + global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + global::Simli.TrinityVersion? gsVersion = default, + bool? retry = default, + global::Simli.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePreprocessImageFacesTrinityPreprocessPostArguments( + httpClient: HttpClient, + gsVersion: ref gsVersion, + retry: ref retry, + request: request); + + + var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PreprocessImageFacesTrinityPreprocessPostSecurityRequirements, + operationName: "PreprocessImageFacesTrinityPreprocessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Simli.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Simli.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Simli.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Simli.PathBuilder( + path: "/faces/trinity/preprocess", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("gsVersion", gsVersion?.ToString()) + .AddOptionalParameter("retry", retry?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Simli.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); + __contentImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Imagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Imagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Simli.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePreprocessImageFacesTrinityPreprocessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + gsVersion: gsVersion, + retry: retry, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Simli.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Simli.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Simli.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Simli.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Simli.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Simli.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + try + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPreprocessImageFacesTrinityPreprocessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Simli.ResponseStream(__response, __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + } + catch + { + __response.Dispose(); + throw; + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Preprocess Trinity Face Image
+ /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. + ///
+ /// + /// Default Value: GSA_1.0 + /// + /// + /// Default Value: false + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( + + global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + global::Simli.TrinityVersion? gsVersion = default, + bool? retry = default, + global::Simli.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePreprocessImageFacesTrinityPreprocessPostArguments( + httpClient: HttpClient, + gsVersion: ref gsVersion, + retry: ref retry, + request: request); + + + var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PreprocessImageFacesTrinityPreprocessPostSecurityRequirements, + operationName: "PreprocessImageFacesTrinityPreprocessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Simli.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Simli.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Simli.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Simli.PathBuilder( + path: "/faces/trinity/preprocess", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("gsVersion", gsVersion?.ToString()) + .AddOptionalParameter("retry", retry?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Simli.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); + __contentImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Imagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Imagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Simli.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePreprocessImageFacesTrinityPreprocessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + gsVersion: gsVersion, + retry: retry, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Simli.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Simli.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Simli.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Simli.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Simli.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Simli.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPreprocessImageFacesTrinityPreprocessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Simli.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Simli.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PreprocessImageFacesTrinityPreprocessPost", + methodName: "PreprocessImageFacesTrinityPreprocessPostAsync", + pathTemplate: "\"/faces/trinity/preprocess\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsByteArrayAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessPreprocessImageFacesTrinityPreprocessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Simli.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: null, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsByteArrayAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Simli.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// - /// + /// + /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. + /// + /// + /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( - - global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + /// + public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + byte[] image, + string imagename, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - await PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( + var __request = new global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost + { + Image = image, + Imagename = imagename, + }; - request: request, + return await PreprocessImageFacesTrinityPreprocessPostAsync( + gsVersion: gsVersion, retry: retry, + request: __request, requestOptions: requestOptions, - cancellationToken: cancellationToken - ).ConfigureAwait(false); + cancellationToken: cancellationToken).ConfigureAwait(false); } + /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// - /// + /// + /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. + /// + /// + /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( - - global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request, + public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + global::System.IO.Stream image, + string imagename, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + image = image ?? throw new global::System.ArgumentNullException(nameof(image)); + var request = new global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost + { + Image = global::System.Array.Empty(), + Imagename = imagename, + }; PrepareArguments( client: HttpClient); PreparePreprocessImageFacesTrinityPreprocessPostArguments( httpClient: HttpClient, + gsVersion: ref gsVersion, retry: ref retry, request: request); @@ -118,6 +1041,7 @@ await PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( path: "/faces/trinity/preprocess", baseUri: HttpClient.BaseAddress); __pathBuilder + .AddOptionalParameter("gsVersion", gsVersion?.ToString()) .AddOptionalParameter("retry", retry?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); @@ -151,7 +1075,7 @@ await PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( } var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); - var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); + var __contentImage = new global::System.Net.Http.StreamContent(image); __contentImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( request.Imagename is null ? "application/octet-stream" @@ -202,6 +1126,7 @@ request.Imagename is null PreparePreprocessImageFacesTrinityPreprocessPostRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + gsVersion: gsVersion, retry: retry, request: request); @@ -382,36 +1307,65 @@ request.Imagename is null retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { - var __content = await __response.Content.ReadAsStringAsync( + var __content = await __response.Content.ReadAsByteArrayAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, + ProcessPreprocessImageFacesTrinityPreprocessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { __response.EnsureSuccessStatusCode(); - return new global::Simli.AutoSDKHttpResponse( - statusCode: __response.StatusCode, - headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), - requestUri: __response.RequestMessage?.RequestUri); + return __content; } catch (global::System.Exception __ex) { throw global::Simli.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __response.ReasonPhrase ?? string.Empty, innerException: __ex, - responseBody: __content, + responseBody: null, responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, @@ -423,10 +1377,13 @@ request.Imagename is null try { __response.EnsureSuccessStatusCode(); - return new global::Simli.AutoSDKHttpResponse( - statusCode: __response.StatusCode, - headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), - requestUri: __response.RequestMessage?.RequestUri); + var __content = await __response.Content.ReadAsByteArrayAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return __content; } catch (global::System.Exception __ex) { @@ -464,44 +1421,11 @@ request.Imagename is null } /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
- /// - /// Default Value: false - /// - /// - /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. - /// - /// - /// JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a person facing the camera whose head is at least 15% of the image height - a head smaller than that carries too few pixels to keep the likeness, and is rejected. Where several people are present, the largest camera-facing head is treated as the subject. + /// + /// Default Value: GSA_1.0 /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( - byte[] image, - string imagename, - bool? retry = default, - global::Simli.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost - { - Image = image, - Imagename = imagename, - }; - - await PreprocessImageFacesTrinityPreprocessPostAsync( - retry: retry, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. - ///
/// /// Default Value: false /// @@ -514,9 +1438,10 @@ await PreprocessImageFacesTrinityPreprocessPostAsync( /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsync( + public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsStreamAsync( global::System.IO.Stream image, string imagename, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -532,6 +1457,7 @@ await PreprocessImageFacesTrinityPreprocessPostAsync( client: HttpClient); PreparePreprocessImageFacesTrinityPreprocessPostArguments( httpClient: HttpClient, + gsVersion: ref gsVersion, retry: ref retry, request: request); @@ -562,6 +1488,7 @@ await PreprocessImageFacesTrinityPreprocessPostAsync( path: "/faces/trinity/preprocess", baseUri: HttpClient.BaseAddress); __pathBuilder + .AddOptionalParameter("gsVersion", gsVersion?.ToString()) .AddOptionalParameter("retry", retry?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); @@ -646,6 +1573,7 @@ request.Imagename is null PreparePreprocessImageFacesTrinityPreprocessPostRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + gsVersion: gsVersion, retry: retry, request: request); @@ -684,7 +1612,7 @@ request.Imagename is null { __response = await HttpClient.SendAsync( request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); } catch (global::System.Net.Http.HttpRequestException __exception) @@ -773,7 +1701,7 @@ request.Imagename is null throw new global::System.InvalidOperationException("No response received."); } - using (__response) + try { ProcessResponse( @@ -826,72 +1754,83 @@ request.Imagename is null retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } - - if (__effectiveReadResponseAsString) + // + if ((int)__response.StatusCode == 403) { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - + string? __content_403 = null; + global::System.Exception? __exception_403 = null; try { - __response.EnsureSuccessStatusCode(); - + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } } catch (global::System.Exception __ex) { - throw global::Simli.ApiException.Create( - statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - responseBody: __content, - responseHeaders: global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value)); + __exception_403 = __ex; } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); } - else + + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Simli.ResponseStream(__response, __content); + } + catch (global::System.Exception __ex) { + string? __content = null; try { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Exception __ex) - { - string? __content = null; - try - { - __content = await __response.Content.ReadAsStringAsync( + __content = await __response.Content.ReadAsStringAsync( #if NET5_0_OR_GREATER - __effectiveCancellationToken + __effectiveCancellationToken #endif - ).ConfigureAwait(false); - } - catch (global::System.Exception) - { - } - - throw global::Simli.ApiException.Create( - statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - responseBody: __content, - responseHeaders: global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value)); + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { } + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); } } + catch + { + __response.Dispose(); + throw; + } } finally { @@ -900,8 +1839,11 @@ request.Imagename is null } /// /// Preprocess Trinity Face Image
- /// Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG. + /// Reframes a portrait to the framing its generation expects, and returns the reframed PNG. GSA_1.0: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. GSA_2.0: the person waist-up, with the torso and both hands, on the image's own background. Either way, the image needs someone facing the camera. ///
+ /// + /// Default Value: GSA_1.0 + /// /// /// Default Value: false /// @@ -914,9 +1856,10 @@ request.Imagename is null /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( + public async global::System.Threading.Tasks.Task> PreprocessImageFacesTrinityPreprocessPostAsResponseAsync( global::System.IO.Stream image, string imagename, + global::Simli.TrinityVersion? gsVersion = default, bool? retry = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -932,6 +1875,7 @@ request.Imagename is null client: HttpClient); PreparePreprocessImageFacesTrinityPreprocessPostArguments( httpClient: HttpClient, + gsVersion: ref gsVersion, retry: ref retry, request: request); @@ -962,6 +1906,7 @@ request.Imagename is null path: "/faces/trinity/preprocess", baseUri: HttpClient.BaseAddress); __pathBuilder + .AddOptionalParameter("gsVersion", gsVersion?.ToString()) .AddOptionalParameter("retry", retry?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); @@ -1046,6 +1991,7 @@ request.Imagename is null PreparePreprocessImageFacesTrinityPreprocessPostRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + gsVersion: gsVersion, retry: retry, request: request); @@ -1226,36 +2172,69 @@ request.Imagename is null retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Simli.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { - var __content = await __response.Content.ReadAsStringAsync( + var __content = await __response.Content.ReadAsByteArrayAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, + ProcessPreprocessImageFacesTrinityPreprocessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { __response.EnsureSuccessStatusCode(); - return new global::Simli.AutoSDKHttpResponse( + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), - requestUri: __response.RequestMessage?.RequestUri); + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { throw global::Simli.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __response.ReasonPhrase ?? string.Empty, innerException: __ex, - responseBody: __content, + responseBody: null, responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, @@ -1267,10 +2246,17 @@ request.Imagename is null try { __response.EnsureSuccessStatusCode(); - return new global::Simli.AutoSDKHttpResponse( + var __content = await __response.Content.ReadAsByteArrayAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Simli.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response), - requestUri: __response.RequestMessage?.RequestUri); + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs index 5150119..5e00d53 100644 --- a/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs +++ b/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs @@ -512,7 +512,9 @@ partial void ProcessStartAudioToVideoSessionComposeTokenPostResponseContent( /// Create a temporary Simli Compose Session Token ///
/// - /// + /// + /// Default Value: v2 + /// /// /// /// Default Value: true @@ -529,6 +531,25 @@ partial void ProcessStartAudioToVideoSessionComposeTokenPostResponseContent( /// /// Default Value: pcm16 /// + /// + /// Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.
+ /// Default Value: 768 + /// + /// + /// Height of the streamed video in pixels. See streaming_width.
+ /// Default Value: 768 + /// + /// + /// Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.
+ /// Default Value: 0.5 + /// + /// + /// Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.
+ /// Default Value: 1.0 + /// + /// + /// The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -541,6 +562,11 @@ partial void ProcessStartAudioToVideoSessionComposeTokenPostResponseContent( int? maxIdleTime = default, int? startFrame = default, string? audioInputFormat = default, + int? streamingWidth = default, + int? streamingHeight = default, + double? avatarPositionX = default, + double? avatarPositionY = default, + global::Simli.CameraSetting? camera = default, global::Simli.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -554,6 +580,11 @@ partial void ProcessStartAudioToVideoSessionComposeTokenPostResponseContent( MaxIdleTime = maxIdleTime, StartFrame = startFrame, AudioInputFormat = audioInputFormat, + StreamingWidth = streamingWidth, + StreamingHeight = streamingHeight, + AvatarPositionX = avatarPositionX, + AvatarPositionY = avatarPositionY, + Camera = camera, }; return await StartAudioToVideoSessionComposeTokenPostAsync( diff --git a/src/libs/Simli/asyncapi.yaml b/src/libs/Simli/asyncapi.yaml index dce1a99..66794ba 100644 --- a/src/libs/Simli/asyncapi.yaml +++ b/src/libs/Simli/asyncapi.yaml @@ -35,6 +35,10 @@ channels: $ref: "#/components/messages/clear_buffer" final_message: $ref: "#/components/messages/final_message" + camera: + $ref: "#/components/messages/camera" + camera_notice: + $ref: "#/components/messages/camera_notice" event: $ref: "#/components/messages/event" error: @@ -57,6 +61,10 @@ channels: $ref: "#/components/messages/clear_buffer" final_message: $ref: "#/components/messages/final_message" + camera: + $ref: "#/components/messages/camera" + camera_notice: + $ref: "#/components/messages/camera_notice" event: $ref: "#/components/messages/event" error: @@ -93,6 +101,18 @@ operations: $ref: "#/channels/peer_to_peer" messages: - $ref: "#/channels/peer_to_peer/messages/final_message" + sendCamera_peer_to_peer: + action: send + channel: + $ref: "#/channels/peer_to_peer" + messages: + - $ref: "#/channels/peer_to_peer/messages/camera" + cameraNotice_peer_to_peer: + action: receive + channel: + $ref: "#/channels/peer_to_peer" + messages: + - $ref: "#/channels/peer_to_peer/messages/camera_notice" event_peer_to_peer: action: receive channel: @@ -131,6 +151,18 @@ operations: $ref: "#/channels/livekit" messages: - $ref: "#/channels/livekit/messages/final_message" + sendCamera_livekit: + action: send + channel: + $ref: "#/channels/livekit" + messages: + - $ref: "#/channels/livekit/messages/camera" + cameraNotice_livekit: + action: receive + channel: + $ref: "#/channels/livekit" + messages: + - $ref: "#/channels/livekit/messages/camera_notice" event_livekit: action: receive channel: @@ -176,6 +208,47 @@ components: schema: type: string const: DONE + camera: + description: | + Moves the camera, Trinity-2 faces only. Sent as binary: the ASCII prefix `CAM_`, then little-endian float32 camera offsets on top of the avatar's own framing, in this order (y comes before x): + + | # | Field | Meaning | Supported range | + |---|-------|---------|-----------------| + | 1 | pos_y_off | Moves the avatar down, in half canvas heights | -10 to 10 | + | 2 | pos_x_off | Moves the avatar right, in half canvas widths | -10 to 10 | + | 3 | pos_z_off | Metres the camera backs away from the avatar (negative moves in) | -5 to 5 | + | 4 | zoom | Multiplies the avatar's zoom; 1 is no change | above 0, up to 4 | + | 5 | rot_x_off | Degrees the camera tilts up (pitch) | -180 to 180 | + | 6 | rot_y_off | Degrees the camera pans right (yaw) | -180 to 180 | + | 7 | rot_z_off | Degrees the camera rolls clockwise | -180 to 180 | + | 8 | orbit_x_off | Degrees the camera orbits up over the avatar's head (elevation) | -80 to 80 | + | 9 | orbit_y_off | Degrees the camera orbits round to its right (azimuth) | -180 to 180 | + + Send the first 4, the first 7 or all 9 values; the ones left off stay neutral (0). + + Each message replaces the whole camera, including the one the session started with (the session token's `camera`): the values are offsets from the avatar's own framing, not from the previous message. 0, 0, 0, 1, 0, 0, 0, 0, 0 returns to the avatar's own framing. + + The camera cuts to the new setting. To glide instead, append the ASCII tag `LERP` and one more float32: the seconds the move takes, from wherever the camera is now (part-way through an earlier glide, if one is running). 0 or less is a cut. + + A message is 20, 32 or 40 bytes, or 28, 40 or 48 with `LERP`. A value outside its supported range is still applied, with a `WARNING:` reply. Any other length, NaN or infinity is rejected and the camera stays where it is. See camera_notice. + contentType: application/octet-stream + payload: + schema: + type: string + format: bytestring + camera_notice: + description: "Server replies to a camera message, sent as text. None of them end the session." + payload: + schema: + type: string + oneOf: + - pattern: '^WARNING: .+$' + description: "Values outside their supported range, applied as sent. Each reads `camera is outside its supported range [, ]; applied as is` (zoom's range opens with `(`), separated by `; `." + - const: "Invalid camera override received" + description: "The payload was the wrong length, or held NaN or infinity. The camera is unchanged." + - const: "Selected model does not support camera overrides" + description: "The face is not Trinity-2. The camera is unchanged." + example: "WARNING: camera zoom 6.0 is outside its supported range (0.0, 4.0]; applied as is" event: description: "Server sent signals" @@ -207,10 +280,11 @@ components: properties: livekit_url: type: string + description: LiveKit server URL to join. For users pinned to a region this is that region's endpoint (e.g. wss://.eu.rtc.livekit.cloud), so always connect to the URL in this message rather than a cached one. livekit_token: type: string error: - description: Termination messages that specify the reason for immediate termination + description: Termination messages that specify the reason for immediate termination, including a routing error (Routing error, no EU Sessions available. EU ONLY PROCESSING enabled) when a region-pinned session lands on a machine outside its region payload: schema: type: string # Wrapping in an object often fixes the 'properties' read error diff --git a/src/libs/Simli/openapi.yaml b/src/libs/Simli/openapi.yaml index 8d976d8..5c3ce21 100644 --- a/src/libs/Simli/openapi.yaml +++ b/src/libs/Simli/openapi.yaml @@ -59,6 +59,13 @@ paths: properties: session_token: type: string + warnings: + type: array + items: + type: string + description: >- + Starting camera fields outside their supported range, and region + overrides. The token is minted regardless. "400": description: Invalid Data content: @@ -104,6 +111,13 @@ paths: mp4_url: type: string example: "https://api.simli.ai/mp4/path-to-file/output.mp4" + warnings: + type: array + items: + type: string + description: >- + Camera fields outside their supported range. The video is made + with them regardless. "422": description: Validation Error content: @@ -181,9 +195,33 @@ paths: summary: Generate Trinity Face operationId: enqueueGSAGeneration_faces_gs_create_post parameters: + - name: target-ratio + in: header + required: false + description: >- + The TARGET-RATIO header returned by POST /faces/trinity/preprocess, + passed back together with the image that call returned. Its presence + means the image is already framed, so it is used as-is. Omit it when + posting an image that has not been through preprocess: the image is + then framed here first, which adds roughly 25 seconds, and the ratio + is measured rather than taken from you. Preprocess with the same + gsVersion as this call: the two frame the image differently. + schema: + type: number + format: float + title: Target Ratio - name: gsVersion in: query required: false + description: >- + The avatar generation to make. GSA_1.0 (the default) makes a + Trinity-1 face and takes one of your plan's face slots. GSA_2.0 + makes a Trinity-2 face and runs on your Trinity-2 generations: one + is used when the face is built (a failed build uses none), and each + generation still queued or building holds one meanwhile. One + account's GSA_2.0 generations start at least 10 minutes apart; a + request inside that window is accepted at once and held in the + queue, and the response's dispatch_after says until when. schema: allOf: - $ref: "#/components/schemas/TrinityVersion" @@ -206,7 +244,34 @@ paths: description: Successful Response content: application/json: - schema: {} + schema: + type: object + properties: + message: + type: string + description: The generation's place in the queue, and how long it is held, if it is. + face_id: + type: string + description: The new face's ID. Poll GET /faces/trinity/generation_status with it. + dispatch_after: + type: integer + description: >- + GSA_2.0 only, when the generation is held by the 10 minutes + between one account's GSA_2.0 generations: the Unix time + (seconds) it may start. Absent otherwise. + warnings: + type: array + items: + type: string + required: + - message + - face_id + - warnings + "403": + description: >- + Out of avatars for this gsVersion: with GSA_1.0, every face slot of + your plan is taken; with GSA_2.0, you have no Trinity-2 generations + left. "422": description: Validation Error content: @@ -217,11 +282,25 @@ paths: post: summary: Preprocess Trinity Face Image description: >- - Reframes a portrait to the framing Trinity expects: the head centred with - equal padding above and below, squared to the camera, on a simplified - version of the image's own background. Returns the reframed PNG. + Reframes a portrait to the framing its generation expects, and returns the + reframed PNG. GSA_1.0: the head centred with equal padding above and + below, squared to the camera, on a simplified version of the image's own + background. GSA_2.0: the person waist-up, with the torso and both hands, + on the image's own background. Either way, the image needs someone facing + the camera. operationId: preprocess_image_faces_trinity_preprocess_post parameters: + - name: gsVersion + in: query + required: false + description: >- + The avatar generation the image is for. Pass the same one to POST + /faces/trinity. Checks that the account has a face slot (GSA_1.0) or + a Trinity-2 generation (GSA_2.0) left, as that call does. + schema: + allOf: + - $ref: "#/components/schemas/TrinityVersion" + default: GSA_1.0 - name: retry in: query required: false @@ -239,14 +318,59 @@ paths: multipart/form-data: schema: $ref: "#/components/schemas/Body_preprocess_image_faces_trinity_preprocess_post" + responses: + "200": + description: >- + The reframed image. Pass TARGET-RATIO back to POST /faces/trinity as + the target-ratio header, along with this image, to generate from it. + headers: + TARGET-RATIO: + description: >- + Tracker ratio measured off the returned image: how much frame + surrounds the head. Pass it verbatim to POST /faces/trinity as the + target-ratio header - that call needs it to track the face, and + its presence also tells the API this image is already framed. + GSA_2.0 measures none and returns 0; pass it back all the same. + schema: + type: number + format: float + warnings: + description: >- + JSON array of advisory strings. Empty when there is nothing to + report; the image is still usable when it is not. + schema: + type: string + required-padding: + description: >- + JSON object of the padding added around the head, keyed up, down, + left, right. Always zero now that framing is done by cropping. + schema: + type: string + content: + image/png: + schema: + type: string + format: binary + "403": + description: >- + Out of avatars for this gsVersion: with GSA_1.0, every face slot of + your plan is taken; with GSA_2.0, you have no Trinity-2 generations + left. /faces/trinity/generation_status: get: summary: Check Trinity Generation Status + description: >- + Status of the caller's Trinity generations. `generations` lists every one + still tracked, oldest first; the top-level status, queue_position and + face_id describe the most recent of them. Accounts that generate in + parallel should read `generations` - the top-level fields only ever + describe one of several in flight. operationId: getRequestStatus_faces_gs_status_get parameters: - name: face_id in: query required: false + description: Limit the response to a single generation. schema: type: string title: Face Id @@ -255,7 +379,8 @@ paths: description: Successful Response content: application/json: - schema: {} + schema: + $ref: "#/components/schemas/TrinityGenerationStatus" "422": description: Validation Error content: @@ -298,6 +423,18 @@ paths: security: [] summary: Start Livekit Agents Session operationId: init_integrations_livekit_agents_post + parameters: + - name: session_token + in: query + required: false + description: >- + The same Simli session token carried in the request body. Supplying + it here as well lets the edge route the request without reading the + body; the body field remains authoritative for older clients, and + this value takes precedence when both are sent. + schema: + type: string + title: Session Token requestBody: content: application/json: @@ -568,7 +705,19 @@ paths: description: Successful Response content: application/json: - schema: {} + schema: + type: object + properties: + session_token: + type: string + warnings: + type: array + items: + type: string + description: >- + Starting camera fields outside their supported range. The token + is minted regardless. + "422": description: Validation Error content: @@ -639,18 +788,68 @@ paths: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" + /auto/start/{agent_id}: + get: + security: [] + summary: Start Auto Session from config (token in header) + description: >- + Same as /auto/start/{agent_id}/{session_token}, with the session token + sent in the session-token header instead of the path. + deprecated: true + operationId: startAgentIDHeader_auto_start__agent_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: session-token + in: header + required: true + schema: + type: string + title: Session-Token + - name: redirect + in: query + required: false + schema: + type: boolean + default: false + title: Redirect + responses: + "200": + description: Successful Response + content: + application/json: + schema: + $ref: "#/components/schemas/SessionDetails" + "422": + description: Validation Error + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" /auto/transcript/{session_id}: get: summary: Get Simli Auto Transcript deprecated: true operationId: getE2ETranscript_auto_transcript__session_id__get + security: [] parameters: - name: session_id - in: query + in: path required: true schema: type: string title: Sessionid + - name: api-key + in: header + required: true + description: Your Simli API key + schema: + type: string + title: Api-Key responses: "200": description: Successful Response @@ -739,10 +938,10 @@ components: type: string voice_provider: type: string - enum: ["elevenlabs", "cartesia"] + enum: ["elevenlabs", "cartesia", "inworld"] voice_id: type: string - format: uuid + description: "The voice's ID at the voice provider (Inworld voices go by name, such as Sarah)" voice_model: type: string example: sonic-english @@ -753,7 +952,7 @@ components: format: uuid llm_model: type: string - example: gpt-4o-mini + example: gpt-6-luna llm_endpoint: type: string description: "The URL of the custom LLM to use" @@ -818,10 +1017,10 @@ components: type: string voice_provider: type: string - enum: ["elevenlabs", "cartesia"] + enum: ["elevenlabs", "cartesia", "inworld"] voice_id: type: string - format: uuid + description: "The voice's ID at the voice provider (Inworld voices go by name, such as Sarah)" voice_model: type: string example: sonic-english @@ -835,7 +1034,7 @@ components: format: uuid llm_model: type: string - example: gpt-4o-mini + example: gpt-6-luna llm_endpoint: type: string description: "The URL of the custom LLM to use" @@ -876,16 +1075,16 @@ components: type: string voice_provider: type: string - enum: ["elevenlabs", "cartesia"] + enum: ["elevenlabs", "cartesia", "inworld"] voice_id: type: string - format: uuid + description: "The voice's ID at the voice provider (Inworld voices go by name, such as Sarah)" voice_model: type: string example: sonic-english llm_model: type: string - example: gpt-4o-mini + example: gpt-6-luna llm_endpoint: type: string description: "The URL of the custom LLM to use" @@ -940,12 +1139,105 @@ components: type: integer title: Videostartingframe default: 0 + disableSuperRes: + type: boolean + title: Disablesuperres + default: false + description: Turns off the face restoration pass on legacy faces. + streaming_width: + type: integer + title: Streaming Width + default: 768 + minimum: 512 + description: >- + Width of the video in pixels, Trinity-2 faces only (the others + keep their own frame size). At least 512, and with + streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A + canvas larger than the avatar's frame is padded with its + background; a smaller one crops a window out of it. + streaming_height: + type: integer + title: Streaming Height + default: 768 + minimum: 512 + description: Height of the video in pixels. See streaming_width. + avatar_position_x: + type: number + title: Avatar Position X + default: 0.5 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits across the canvas, from 0 (left) to 1 + (right). Trinity-2 only. + avatar_position_y: + type: number + title: Avatar Position Y + default: 1.0 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits down the canvas, from 0 (top) to 1 + (bottom). Trinity-2 only. + camera: + anyOf: + - $ref: "#/components/schemas/CameraSetting" + - type: "null" + description: >- + The camera the video starts with, on top of the avatar's own + framing. Trinity-2 only. Leave it out to keep the avatar's + framing. type: object required: - faceId - audioBase64 - audioFormat title: AudioToVideoRequest + CameraSetting: + type: object + title: CameraSetting + description: >- + Camera offsets on top of the avatar's own framing. Every field is + optional and neutral when left out. A value outside its supported + range is still applied, and the response lists a warning for it; + NaN and infinity are a 422. + properties: + pos_x_off: + type: number + default: 0.0 + description: "Moves the avatar right, in half canvas widths. Supported range -10 to 10." + pos_y_off: + type: number + default: 0.0 + description: "Moves the avatar down, in half canvas heights. Supported range -10 to 10." + pos_z_off: + type: number + default: 0.0 + description: "Metres the camera backs away from the avatar (negative moves in). Supported range -5 to 5." + rot_x_off: + type: number + default: 0.0 + description: "Degrees the camera tilts up (pitch). Supported range -180 to 180." + rot_y_off: + type: number + default: 0.0 + description: "Degrees the camera pans right (yaw). Supported range -180 to 180." + rot_z_off: + type: number + default: 0.0 + description: "Degrees the camera rolls clockwise. Supported range -180 to 180." + zoom: + type: number + default: 1.0 + description: "Multiplies the avatar's zoom; 1 is no change. Supported range above 0, up to 4." + orbit_x_off: + type: number + default: 0.0 + description: "Degrees the camera orbits up over the avatar's head (elevation). Supported range -80 to 80." + orbit_y_off: + type: number + default: 0.0 + description: "Degrees the camera orbits round to its right (azimuth). Supported range -180 to 180." ConfigurableSessionRequest: properties: faceId: @@ -985,6 +1277,14 @@ components: - type: string - type: "null" title: Firstmessage + introAnimation: + anyOf: + - $ref: "#/components/schemas/AnimationId" + - type: "null" + description: >- + An animation the avatar plays as it opens the session, when the + user joins (with firstMessage, if there is one). Trinity-2 faces + only; the others ignore it. Leave it out for no animation. maxSessionLength: type: integer title: Maxsessionlength @@ -1005,7 +1305,7 @@ components: allOf: - $ref: "#/components/schemas/LLMConfig" default: - model: gpt-4o-mini + model: gpt-6-luna provider: OpenAI createTranscript: type: boolean @@ -1014,7 +1314,55 @@ components: model: allOf: - $ref: "#/components/schemas/SimliModels" - default: artalk + default: fasttalk + disableSuperRes: + type: boolean + title: Disablesuperres + default: false + description: Turns off the face restoration pass on legacy faces. + streaming_width: + type: integer + title: Streaming Width + default: 768 + minimum: 512 + description: >- + Width of the streamed video in pixels, Trinity-2 faces only (the others + keep their own frame size). At least 512, and with + streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A + canvas larger than the avatar's frame is padded with its + background; a smaller one crops a window out of it. + streaming_height: + type: integer + title: Streaming Height + default: 768 + minimum: 512 + description: Height of the streamed video in pixels. See streaming_width. + avatar_position_x: + type: number + title: Avatar Position X + default: 0.5 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits across the canvas, from 0 (left) to 1 + (right). Trinity-2 only. + avatar_position_y: + type: number + title: Avatar Position Y + default: 1.0 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits down the canvas, from 0 (top) to 1 + (bottom). Trinity-2 only. + camera: + anyOf: + - $ref: "#/components/schemas/CameraSetting" + - type: "null" + description: >- + The camera the session starts with, on top of the avatar's own + framing. Trinity-2 only. Leave it out to keep the avatar's + framing. A streaming session can move it afterwards with CAM_ messages. type: object title: ConfigurableSessionRequest CustomLLMConfig: @@ -1058,7 +1406,7 @@ components: - $ref: "#/components/schemas/Google_Models" - type: string title: Model - default: gpt-4o-mini + default: gpt-6-luna provider: allOf: - $ref: "#/components/schemas/LLM_Provider" @@ -1099,14 +1447,27 @@ components: - livekit_token - livekit_url title: LiveKitInitializationRequest + AnimationId: + type: string + description: >- + An animation clip a Trinity-2 avatar can play, by the same ID + everywhere animations are named. + enum: + - g003_wave_goodbye_solo + - speaking_hands_explaining + - wave + title: AnimationId OpenAI_Models: type: string + description: >- + gpt-realtime-2.1-mini and gpt-live-1 are speech to speech: they listen + and speak themselves, so the TTS settings don't apply. The older + gpt-4o and gpt-4.1 models are still accepted for existing + integrations. enum: - - gpt-4o - - gpt-4o-mini - - gpt-4.1 - - gpt-4.1-mini - - gpt-4.1-nano + - gpt-6-luna + - gpt-realtime-2.1-mini + - gpt-live-1 title: OpenAI_Models SessionDetails: properties: @@ -1116,6 +1477,13 @@ components: sessionId: type: string title: Sessionid + warnings: + type: array + items: + type: string + description: >- + Deprecations, and starting camera fields outside their supported + range. The session starts regardless. type: object required: - roomUrl @@ -1125,7 +1493,6 @@ components: type: string enum: - fasttalk - - artalk title: SimliModels StartStreamingSessionRequest: properties: @@ -1136,6 +1503,7 @@ components: type: string title: Apiversion const: v2 + default: v2 sessionAggregator: anyOf: - type: string @@ -1161,6 +1529,49 @@ components: type: string title: Audioinputformat default: pcm16 + streaming_width: + type: integer + title: Streaming Width + default: 768 + minimum: 512 + description: >- + Width of the streamed video in pixels, Trinity-2 faces only (the others + keep their own frame size). At least 512, and with + streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A + canvas larger than the avatar's frame is padded with its + background; a smaller one crops a window out of it. + streaming_height: + type: integer + title: Streaming Height + default: 768 + minimum: 512 + description: Height of the streamed video in pixels. See streaming_width. + avatar_position_x: + type: number + title: Avatar Position X + default: 0.5 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits across the canvas, from 0 (left) to 1 + (right). Trinity-2 only. + avatar_position_y: + type: number + title: Avatar Position Y + default: 1.0 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits down the canvas, from 0 (top) to 1 + (bottom). Trinity-2 only. + camera: + anyOf: + - $ref: "#/components/schemas/CameraSetting" + - type: "null" + description: >- + The camera the session starts with, on top of the avatar's own + framing. Trinity-2 only. Leave it out to keep the avatar's + framing. A streaming session can move it afterwards with CAM_ messages. type: object required: - faceId @@ -1169,8 +1580,8 @@ components: type: string enum: - ElevenLabs - - PlayHT - Cartesia + - Inworld - User title: TTS_Provider TokenRequest: @@ -1209,6 +1620,49 @@ components: - type: "null" title: Originallowlist default: [] + streaming_width: + type: integer + title: Streaming Width + default: 768 + minimum: 512 + description: >- + Width of the streamed video in pixels, Trinity-2 faces only (the others + keep their own frame size). At least 512, and with + streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A + canvas larger than the avatar's frame is padded with its + background; a smaller one crops a window out of it. + streaming_height: + type: integer + title: Streaming Height + default: 768 + minimum: 512 + description: Height of the streamed video in pixels. See streaming_width. + avatar_position_x: + type: number + title: Avatar Position X + default: 0.5 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits across the canvas, from 0 (left) to 1 + (right). Trinity-2 only. + avatar_position_y: + type: number + title: Avatar Position Y + default: 1.0 + minimum: 0 + maximum: 1 + description: >- + Where the avatar sits down the canvas, from 0 (top) to 1 + (bottom). Trinity-2 only. + camera: + anyOf: + - $ref: "#/components/schemas/CameraSetting" + - type: "null" + description: >- + The camera the session starts with, on top of the avatar's own + framing. Trinity-2 only. Leave it out to keep the avatar's + framing. A streaming session can move it afterwards with CAM_ messages. type: object required: - simliAPIKey @@ -1228,6 +1682,11 @@ components: type: type: string title: Error Type + input: + title: Input + ctx: + type: object + title: Context type: object required: - loc @@ -1323,8 +1782,82 @@ components: required: - image title: Body_preprocess_image_faces_trinity_preprocess_post + TrinityGenerationState: + type: string + enum: + - not_found + - pending + - processing + - completed + - failed + title: TrinityGenerationState + TrinityGeneration: + type: object + properties: + face_id: + type: string + title: Face Id + status: + $ref: "#/components/schemas/TrinityGenerationState" + queue_position: + type: integer + title: Queue Position + description: >- + Place in the pending queue. 0 once the generation has left the queue + and is being worked on. + dispatch_after: + type: integer + title: Dispatch After + description: >- + GSA_2.0 only, while the generation is pending and held by the 10 + minutes between one account's GSA_2.0 generations: the Unix time + (seconds) it may start. Absent otherwise. + required: + - face_id + - status + - queue_position + title: TrinityGeneration + TrinityGenerationStatus: + type: object + properties: + status: + allOf: + - $ref: "#/components/schemas/TrinityGenerationState" + description: >- + Status of the most recent generation, or not_found when none is + tracked. + queue_position: + type: integer + title: Queue Position + description: >- + Queue position of the most recent generation, or -1 when none is + tracked. + face_id: + type: string + title: Face Id + description: >- + The most recent generation's face id. Absent when nothing is tracked + and no face_id was requested; echoes the requested face_id otherwise. + generations: + type: array + items: + $ref: "#/components/schemas/TrinityGeneration" + title: Generations + description: >- + Every generation still tracked for the caller, oldest first. Completed + and failed entries remain listed for 24 hours. Empty when none is + tracked. + required: + - status + - queue_position + - generations + title: TrinityGenerationStatus TrinityVersion: type: string + description: >- + The avatar generation: GSA_1.0 makes a Trinity-1 face, GSA_2.0 a + Trinity-2 face. enum: - GSA_1.0 + - GSA_2.0 title: GSVersion