diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.GetHistorySessions.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.GetHistorySessions.g.cs
index 0ecf9aa..7e87ac3 100644
--- a/src/libs/Simli/Generated/Simli.ISimliClient.GetHistorySessions.g.cs
+++ b/src/libs/Simli/Generated/Simli.ISimliClient.GetHistorySessions.g.cs
@@ -8,36 +8,36 @@ public partial interface ISimliClient
/// Retrieve session history
/// Returns a list of session history records for the authenticated user
///
- ///
+ ///
/// Example: 1745750387
///
- ///
+ ///
/// Example: 1745750408
///
/// 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 GetHistorySessionsAsync(
- int? start = default,
- int? end = default,
+ int? startTime = default,
+ int? endTime = default,
global::Simli.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Retrieve session history
/// Returns a list of session history records for the authenticated user
///
- ///
+ ///
/// Example: 1745750387
///
- ///
+ ///
/// Example: 1745750408
///
/// 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> GetHistorySessionsAsResponseAsync(
- int? start = default,
- int? end = default,
+ int? startTime = default,
+ int? endTime = 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
new file mode 100644
index 0000000..7d93726
--- /dev/null
+++ b/src/libs/Simli/Generated/Simli.ISimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs
@@ -0,0 +1,109 @@
+#nullable enable
+
+namespace Simli
+{
+ 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.
+ ///
+ ///
+ /// 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 PreprocessImageFacesTrinityPreprocessPostAsync(
+
+ global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request,
+ 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.
+ ///
+ ///
+ /// 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,
+ 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.
+ ///
+ ///
+ /// 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(
+ byte[] image,
+ string imagename,
+ 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.
+ ///
+ ///
+ /// 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,
+ 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.
+ ///
+ ///
+ /// 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 PreprocessImageFacesTrinityPreprocessPostAsResponseAsync(
+ global::System.IO.Stream image,
+ string imagename,
+ bool? retry = default,
+ global::Simli.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs b/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs
index 0f19659..5ae766a 100644
--- a/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs
+++ b/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs
@@ -122,6 +122,7 @@ namespace Simli
[global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))]
[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.TrinityVersion), TypeInfoPropertyName = "TrinityVersion2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.GetIceServersComposeIceGetResponseItem))]
diff --git a/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs b/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs
index bd183db..be8114a 100644
--- a/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs
@@ -212,51 +212,55 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Simli.TrinityVersion? Type46 { get; set; }
+ public global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost? Type46 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type47 { get; set; }
+ public global::Simli.TrinityVersion? Type47 { get; set; }
///
///
///
- public global::Simli.GetIceServersComposeIceGetResponseItem? Type48 { get; set; }
+ public global::System.Collections.Generic.IList? Type48 { get; set; }
///
///
///
- public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse? Type49 { get; set; }
+ public global::Simli.GetIceServersComposeIceGetResponseItem? Type49 { get; set; }
///
///
///
- public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse2? Type50 { get; set; }
+ public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse? Type50 { get; set; }
///
///
///
- public global::Simli.AudioToVideoInterfaceStaticAudioPostResponse? Type51 { get; set; }
+ public global::Simli.StartAudioToVideoSessionComposeTokenPostResponse2? Type51 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type52 { get; set; }
+ public global::Simli.AudioToVideoInterfaceStaticAudioPostResponse? Type52 { get; set; }
///
///
///
- public global::Simli.InitIntegrationsLivekitAgentsPostResponse? Type53 { get; set; }
+ public global::System.Collections.Generic.IList? Type53 { get; set; }
///
///
///
- public global::Simli.GetHistorySessionsResponse? Type54 { get; set; }
+ public global::Simli.InitIntegrationsLivekitAgentsPostResponse? Type54 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type55 { get; set; }
+ public global::Simli.GetHistorySessionsResponse? Type55 { get; set; }
///
///
///
- public global::Simli.GetRatelimiterSessionsResponse? Type56 { get; set; }
+ public global::System.Collections.Generic.IList? Type56 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type57 { get; set; }
+ public global::Simli.GetRatelimiterSessionsResponse? Type57 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.IList? Type58 { get; set; }
///
///
diff --git a/src/libs/Simli/Generated/Simli.Models.BodyPreprocessImageFacesTrinityPreprocessPost.Json.g.cs b/src/libs/Simli/Generated/Simli.Models.BodyPreprocessImageFacesTrinityPreprocessPost.Json.g.cs
new file mode 100644
index 0000000..f2e9b10
--- /dev/null
+++ b/src/libs/Simli/Generated/Simli.Models.BodyPreprocessImageFacesTrinityPreprocessPost.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Simli
+{
+ public sealed partial class BodyPreprocessImageFacesTrinityPreprocessPost
+ {
+ ///
+ /// 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.BodyPreprocessImageFacesTrinityPreprocessPost? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost),
+ jsonSerializerContext) as global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost? 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.BodyPreprocessImageFacesTrinityPreprocessPost? 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.BodyPreprocessImageFacesTrinityPreprocessPost),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost;
+ }
+
+ ///
+ /// 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.BodyPreprocessImageFacesTrinityPreprocessPost.g.cs b/src/libs/Simli/Generated/Simli.Models.BodyPreprocessImageFacesTrinityPreprocessPost.g.cs
new file mode 100644
index 0000000..bd5226d
--- /dev/null
+++ b/src/libs/Simli/Generated/Simli.Models.BodyPreprocessImageFacesTrinityPreprocessPost.g.cs
@@ -0,0 +1,59 @@
+
+#nullable enable
+
+namespace Simli
+{
+ ///
+ ///
+ ///
+ public sealed partial class BodyPreprocessImageFacesTrinityPreprocessPost
+ {
+ ///
+ /// 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.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("image")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required byte[] Image { get; set; }
+
+ ///
+ /// 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.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("imagename")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Imagename { 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.
+ ///
+ ///
+ /// 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.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public BodyPreprocessImageFacesTrinityPreprocessPost(
+ byte[] image,
+ string imagename)
+ {
+ this.Image = image ?? throw new global::System.ArgumentNullException(nameof(image));
+ this.Imagename = imagename ?? throw new global::System.ArgumentNullException(nameof(imagename));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public BodyPreprocessImageFacesTrinityPreprocessPost()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Simli/Generated/Simli.Models.HistoryRecord.g.cs b/src/libs/Simli/Generated/Simli.Models.HistoryRecord.g.cs
index ff1d178..37259e0 100644
--- a/src/libs/Simli/Generated/Simli.Models.HistoryRecord.g.cs
+++ b/src/libs/Simli/Generated/Simli.Models.HistoryRecord.g.cs
@@ -16,10 +16,16 @@ public sealed partial class HistoryRecord
public required global::System.Guid Id { get; set; }
///
- /// Firebase user id
+ /// face_id used in session
///
- [global::System.Text.Json.Serialization.JsonPropertyName("userId")]
- public string? UserId { get; set; }
+ [global::System.Text.Json.Serialization.JsonPropertyName("face_id")]
+ public string? FaceId { get; set; }
+
+ ///
+ /// Interaction Method
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("kind")]
+ public string? Kind { get; set; }
///
/// (optional) Aggregation identifier provided in request by customer for grouping their end-users
@@ -77,8 +83,11 @@ public sealed partial class HistoryRecord
///
/// Session end time as Unix timestamp
///
- ///
- /// Firebase user id
+ ///
+ /// face_id used in session
+ ///
+ ///
+ /// Interaction Method
///
///
/// (optional) Aggregation identifier provided in request by customer for grouping their end-users
@@ -94,12 +103,14 @@ public HistoryRecord(
double sessionTotalTime,
global::System.DateTimeOffset startTime,
global::System.DateTimeOffset endTime,
- string? userId,
+ string? faceId,
+ string? kind,
string? endUserAggregator,
string? apiKeyName)
{
this.Id = id;
- this.UserId = userId;
+ this.FaceId = faceId;
+ this.Kind = kind;
this.EndUserAggregator = endUserAggregator;
this.ApiKeyName = apiKeyName;
this.SessionTotalTime = sessionTotalTime;
diff --git a/src/libs/Simli/Generated/Simli.Realtime.SimliPeerToPeerRealtimeClient.g.cs b/src/libs/Simli/Generated/Simli.Realtime.SimliPeerToPeerRealtimeClient.g.cs
index 0ad7f40..ae8d017 100644
--- a/src/libs/Simli/Generated/Simli.Realtime.SimliPeerToPeerRealtimeClient.g.cs
+++ b/src/libs/Simli/Generated/Simli.Realtime.SimliPeerToPeerRealtimeClient.g.cs
@@ -11,7 +11,7 @@ public sealed partial class SimliPeerToPeerRealtimeClient : global::System.IDisp
///
/// Default WebSocket base URL.
///
- public const string DefaultBaseUrl = "wss://api.simli.ai/compose/webrtc/p2p";
+ public const string DefaultBaseUrl = "wss://api.simli.ai/compose/webrtc/peer_to_peer";
private global::System.Net.WebSockets.ClientWebSocket _clientWebSocket;
private global::System.Uri? _lastConnectUri;
@@ -489,7 +489,7 @@ private void ApplyConnectionOptions(
}
}
- private const string DefaultBaseUrlTemplate = "wss://api.simli.ai/compose/webrtc/p2p";
+ private const string DefaultBaseUrlTemplate = "wss://api.simli.ai/compose/webrtc/peer_to_peer";
///
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs
index 6aee96e..3cfc792 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs
@@ -27,13 +27,13 @@ public partial class SimliClient
};
partial void PrepareGetHistorySessionsArguments(
global::System.Net.Http.HttpClient httpClient,
- ref int? start,
- ref int? end);
+ ref int? startTime,
+ ref int? endTime);
partial void PrepareGetHistorySessionsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
- int? start,
- int? end);
+ int? startTime,
+ int? endTime);
partial void ProcessGetHistorySessionsResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -47,24 +47,24 @@ partial void ProcessGetHistorySessionsResponseContent(
/// Retrieve session history
/// Returns a list of session history records for the authenticated user
///
- ///
+ ///
/// Example: 1745750387
///
- ///
+ ///
/// Example: 1745750408
///
/// 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 GetHistorySessionsAsync(
- int? start = default,
- int? end = default,
+ int? startTime = default,
+ int? endTime = default,
global::Simli.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await GetHistorySessionsAsResponseAsync(
- start: start,
- end: end,
+ startTime: startTime,
+ endTime: endTime,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -75,18 +75,18 @@ partial void ProcessGetHistorySessionsResponseContent(
/// Retrieve session history
/// Returns a list of session history records for the authenticated user
///
- ///
+ ///
/// Example: 1745750387
///
- ///
+ ///
/// Example: 1745750408
///
/// 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> GetHistorySessionsAsResponseAsync(
- int? start = default,
- int? end = default,
+ int? startTime = default,
+ int? endTime = default,
global::Simli.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -94,8 +94,8 @@ partial void ProcessGetHistorySessionsResponseContent(
client: HttpClient);
PrepareGetHistorySessionsArguments(
httpClient: HttpClient,
- start: ref start,
- end: ref end);
+ startTime: ref startTime,
+ endTime: ref endTime);
var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
@@ -124,8 +124,8 @@ partial void ProcessGetHistorySessionsResponseContent(
path: "/history/sessions",
baseUri: HttpClient.BaseAddress);
__pathBuilder
- .AddOptionalParameter("start", start?.ToString())
- .AddOptionalParameter("end", end?.ToString())
+ .AddOptionalParameter("startTime", startTime?.ToString())
+ .AddOptionalParameter("endTime", endTime?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::Simli.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -167,8 +167,8 @@ partial void ProcessGetHistorySessionsResponseContent(
PrepareGetHistorySessionsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
- start: start,
- end: end);
+ startTime: startTime,
+ endTime: endTime);
return __httpRequest;
}
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs
new file mode 100644
index 0000000..f8a9d12
--- /dev/null
+++ b/src/libs/Simli/Generated/Simli.SimliClient.PreprocessImageFacesTrinityPreprocessPost.g.cs
@@ -0,0 +1,1334 @@
+
+#nullable enable
+
+namespace Simli
+{
+ public partial class SimliClient
+ {
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_PreprocessImageFacesTrinityPreprocessPostSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ SchemeId = "ApikeyXSimliApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_PreprocessImageFacesTrinityPreprocessPostSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_PreprocessImageFacesTrinityPreprocessPostSecurityRequirement0,
+ };
+ partial void PreparePreprocessImageFacesTrinityPreprocessPostArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref bool? retry,
+ global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request);
+ partial void PreparePreprocessImageFacesTrinityPreprocessPostRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ bool? retry,
+ global::Simli.BodyPreprocessImageFacesTrinityPreprocessPost request);
+ partial void ProcessPreprocessImageFacesTrinityPreprocessPostResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// 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
+ ///
+ ///
+ /// 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,
+ bool? retry = default,
+ global::Simli.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await PreprocessImageFacesTrinityPreprocessPostAsResponseAsync(
+
+ request: request,
+ retry: retry,
+ 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
+ ///
+ ///
+ /// 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,
+ 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,
+ 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("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();
+ if (retry != default)
+ {
+
+ __httpRequestContent.Add(
+ content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(retry, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
+ name: "\"retry\"");
+
+ }
+ 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,
+ 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!,
+ 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!,
+ 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!,
+ 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!,
+ 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!,
+ 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 (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __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);
+ }
+ 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));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ return new global::Simli.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ 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.
+ ///
+ ///
+ /// 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(
+ 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
+ ///
+ ///
+ /// 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::System.IO.Stream image,
+ string imagename,
+ bool? retry = default,
+ global::Simli.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+
+ 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,
+ 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("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();
+ if (retry != default)
+ {
+
+ __httpRequestContent.Add(
+ content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(retry, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
+ name: "\"retry\"");
+
+ }
+ 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"
+ : (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,
+ 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!,
+ 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!,
+ 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!,
+ 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!,
+ 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!,
+ 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 (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ }
+ 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));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ 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.
+ ///
+ ///
+ /// 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::System.IO.Stream image,
+ string imagename,
+ bool? retry = default,
+ global::Simli.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+
+ 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,
+ 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("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();
+ if (retry != default)
+ {
+
+ __httpRequestContent.Add(
+ content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(retry, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
+ name: "\"retry\"");
+
+ }
+ 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"
+ : (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,
+ 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!,
+ 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!,
+ 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!,
+ 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!,
+ 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!,
+ 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 (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __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);
+ }
+ 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));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ return new global::Simli.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Simli.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ 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();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Simli/asyncapi.yaml b/src/libs/Simli/asyncapi.yaml
index 50060a8..923cd1e 100644
--- a/src/libs/Simli/asyncapi.yaml
+++ b/src/libs/Simli/asyncapi.yaml
@@ -1,231 +1,224 @@
-asyncapi: 3.0.0
-info:
- title: Simli WebSockets
- version: 1.0.0
-servers:
- Simli WSS:
- host: "api.simli.ai"
- protocol: wss
- variables:
- session_token:
- description: Session token generated by https://api.simli.ai/compose/token
-
-defaultContentType: text/plain
-channels:
- peer_to_peer:
- summary: |
- Peer to Peer WebRTC
-
- [Compose Session Token](/api-reference/compose-session-token) is sent as query parameter string
-
- enableSFU is a query parameter boolean to opt into sending the traffic through cloudflare network for improved reliability
-
- First message must be offer. Offer must be provided within 30 seconds of opening the websocket. Once offer is sent, a corresponding answer will be sent from the server which can be used as described [here](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/setRemoteDescription)
- address: /compose/webrtc/p2p
- messages:
- offer:
- $ref: "#/components/messages/rtc_offer"
- description: "RTC Offer. Must be first message"
- answer:
- $ref: "#/components/messages/rtc_answer"
- description: "RTC Offer. Must be first message"
- audio_chunk:
- $ref: "#/components/messages/audio_chunk"
- clear_buffer:
- $ref: "#/components/messages/clear_buffer"
- final_message:
- $ref: "#/components/messages/final_message"
- event:
- $ref: "#/components/messages/event"
- error:
- $ref: "#/components/messages/error"
-
- livekit:
- summary: |
- Livekit Backed WebRTC
-
- [Compose Session Token](/api-reference/compose-session-token) is sent as query parameter string
-
- No first message is required. However, You must successfully join the livekit room within 30 seconds
- address: /compose/webrtc/livekit
- messages:
- livekit_join_info:
- $ref: "#/components/messages/livekit_join_info"
- audio_chunk:
- $ref: "#/components/messages/audio_chunk"
- clear_buffer:
- $ref: "#/components/messages/clear_buffer"
- final_message:
- $ref: "#/components/messages/final_message"
- event:
- $ref: "#/components/messages/event"
- error:
- $ref: "#/components/messages/error"
-
-operations:
- sendOffer:
- action: receive
- channel:
- $ref: "#/channels/peer_to_peer"
- messages:
- - $ref: "#/channels/peer_to_peer/messages/offer"
- reply:
- messages:
- - $ref: "#/channels/peer_to_peer/messages/answer"
- channel:
- $ref: "#/channels/peer_to_peer"
- recvAnswer:
- action: send
- messages:
- - $ref: "#/channels/peer_to_peer/messages/answer"
- channel:
- $ref: "#/channels/peer_to_peer"
-
- sendAudioChunk_peer_to_peer:
- action: receive
- channel:
- $ref: "#/channels/peer_to_peer"
- messages:
- - $ref: "#/channels/peer_to_peer/messages/audio_chunk"
-
- clearBuffer_peer_to_peer:
- action: receive
- channel:
- $ref: "#/channels/peer_to_peer"
- messages:
- - $ref: "#/channels/peer_to_peer/messages/clear_buffer"
- finalMessage_peer_to_peer:
- action: receive
- channel:
- $ref: "#/channels/peer_to_peer"
- messages:
- - $ref: "#/channels/peer_to_peer/messages/final_message"
- event_peer_to_peer:
- action: send
- channel:
- $ref: "#/channels/peer_to_peer"
- messages:
- - $ref: "#/channels/peer_to_peer/messages/event"
- error_peer_to_peer:
- action: send
- channel:
- $ref: "#/channels/peer_to_peer"
- messages:
- - $ref: "#/channels/peer_to_peer/messages/error"
-
- recvLivekitInfo:
- action: send
- channel:
- $ref: "#/channels/livekit"
- messages:
- - $ref: "#/channels/livekit/messages/livekit_join_info"
- sendAudioChunk_livekit:
- action: receive
- channel:
- $ref: "#/channels/livekit"
- messages:
- - $ref: "#/channels/livekit/messages/audio_chunk"
-
- clearBuffer_livekit:
- action: receive
- channel:
- $ref: "#/channels/livekit"
- messages:
- - $ref: "#/channels/livekit/messages/clear_buffer"
- finalMessage_livekit:
- action: receive
- channel:
- $ref: "#/channels/livekit"
- messages:
- - $ref: "#/channels/livekit/messages/final_message"
- event_livekit:
- action: send
- channel:
- $ref: "#/channels/livekit"
- messages:
- - $ref: "#/channels/livekit/messages/event"
- error_livekit:
- action: send
- channel:
- $ref: "#/channels/livekit"
- messages:
- - $ref: "#/channels/livekit/messages/error"
-
-components:
- messages:
- rtc_offer:
- description: RTC Offer as generated by https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createOffer or compatible
- payload:
- schema:
- type: object
- properties:
- type:
- type: string
- const: "offer"
- sdp:
- type: string
- audio_chunk:
- description: Binary stream of the audio that the Avatar will lipsync to. Sent as a binary stream (in JS/TS UInt8Arr)
- contentType: application/octet-stream
- payload:
- schema:
- type: string
- format: bytestring
- clear_buffer:
- description: "Client Signal to make the avatar stop speaking immediately and ignore all previously sent audio"
- payload:
- schema:
- type: string
- const: SKIP
- final_message:
- description: "Client Signal to tell the server that the final segment of audio has been already sent and that it should close after playing it back"
- payload:
- schema:
- type: string
- const: DONE
-
- event:
- description: "Server sent signals"
- payload:
- schema:
- type: string
- enum:
- - START
- - ACK
- - STOP
- - SPEAK
- - SILENT
- rtc_answer:
- description: RTC Answer as generated by https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createAnswer or compatible. Will be received AFTER an offer has been sent
- payload:
- schema:
- type: object
- properties:
- type:
- type: string
- const: "answer"
- sdp:
- type: string
- livekit_join_info:
- description: Room info and join token that are used by the client to join a livekit room that hosts the avatar session
- payload:
- schema:
- type: object
- properties:
- livekit_url:
- type: string
- livekit_token:
- type: string
- error:
- description: Termination messages that specify the reason for immediate termination
- payload:
- schema:
- type: string # Wrapping in an object often fixes the 'properties' read error
- oneOf:
- - pattern: '^(?i)ERROR\s+.+$'
- description: "Matches 'ERROR' regardless of casing."
- - pattern: '^(?i)RATE\s+.+$'
- description: "Matches 'RATE' followed by a space."
- - pattern: '^(?i)CLOSING\s+.+$'
- description: "Matches 'CLOSING' followed by a space."
- example: "ERROR: INVALID_API_KEY"
+asyncapi: 3.0.0
+info:
+ title: Simli WebSockets
+ version: 1.0.0
+servers:
+ Simli WSS:
+ host: "api.simli.ai"
+ protocol: wss
+ variables:
+ session_token:
+ description: Session token generated by https://api.simli.ai/compose/token
+
+defaultContentType: text/plain
+channels:
+ peer_to_peer:
+ summary: |
+ Peer to Peer WebRTC
+
+ [Compose Session Token](/api-reference/compose-session-token) is sent as query parameter string
+
+ enableSFU is a query parameter boolean to opt into sending the traffic through cloudflare network for improved reliability
+
+ First message must be offer. Offer must be provided within 30 seconds of opening the websocket. Once offer is sent, a corresponding answer will be sent from the server which can be used as described [here](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/setRemoteDescription)
+ address: /compose/webrtc/peer_to_peer
+ messages:
+ offer:
+ $ref: "#/components/messages/rtc_offer"
+ description: "RTC Offer. Must be first message"
+ answer:
+ $ref: "#/components/messages/rtc_answer"
+ description: "RTC Offer. Must be first message"
+ audio_chunk:
+ $ref: "#/components/messages/audio_chunk"
+ clear_buffer:
+ $ref: "#/components/messages/clear_buffer"
+ final_message:
+ $ref: "#/components/messages/final_message"
+ event:
+ $ref: "#/components/messages/event"
+ error:
+ $ref: "#/components/messages/error"
+
+ livekit:
+ summary: |
+ Livekit Backed WebRTC
+
+ [Compose Session Token](/api-reference/compose-session-token) is sent as query parameter string
+
+ No first message is required. However, You must successfully join the livekit room within 30 seconds
+ address: /compose/webrtc/livekit
+ messages:
+ livekit_join_info:
+ $ref: "#/components/messages/livekit_join_info"
+ audio_chunk:
+ $ref: "#/components/messages/audio_chunk"
+ clear_buffer:
+ $ref: "#/components/messages/clear_buffer"
+ final_message:
+ $ref: "#/components/messages/final_message"
+ event:
+ $ref: "#/components/messages/event"
+ error:
+ $ref: "#/components/messages/error"
+
+operations:
+ sendOffer:
+ action: send
+ channel:
+ $ref: "#/channels/peer_to_peer"
+ messages:
+ - $ref: "#/channels/peer_to_peer/messages/offer"
+ recvAnswer:
+ action: receive
+ messages:
+ - $ref: "#/channels/peer_to_peer/messages/answer"
+ channel:
+ $ref: "#/channels/peer_to_peer"
+ sendAudioChunk_peer_to_peer:
+ action: send
+ channel:
+ $ref: "#/channels/peer_to_peer"
+ messages:
+ - $ref: "#/channels/peer_to_peer/messages/audio_chunk"
+ clearBuffer_peer_to_peer:
+ action: send
+ channel:
+ $ref: "#/channels/peer_to_peer"
+ messages:
+ - $ref: "#/channels/peer_to_peer/messages/clear_buffer"
+ finalMessage_peer_to_peer:
+ action: send
+ channel:
+ $ref: "#/channels/peer_to_peer"
+ messages:
+ - $ref: "#/channels/peer_to_peer/messages/final_message"
+ event_peer_to_peer:
+ action: receive
+ channel:
+ $ref: "#/channels/peer_to_peer"
+ messages:
+ - $ref: "#/channels/peer_to_peer/messages/event"
+ error_peer_to_peer:
+ action: receive
+ channel:
+ $ref: "#/channels/peer_to_peer"
+ messages:
+ - $ref: "#/channels/peer_to_peer/messages/error"
+
+ recvLivekitInfo:
+ action: receive
+ channel:
+ $ref: "#/channels/livekit"
+ messages:
+ - $ref: "#/channels/livekit/messages/livekit_join_info"
+ sendAudioChunk_livekit:
+ action: send
+ channel:
+ $ref: "#/channels/livekit"
+ messages:
+ - $ref: "#/channels/livekit/messages/audio_chunk"
+
+ clearBuffer_livekit:
+ action: send
+ channel:
+ $ref: "#/channels/livekit"
+ messages:
+ - $ref: "#/channels/livekit/messages/clear_buffer"
+ finalMessage_livekit:
+ action: send
+ channel:
+ $ref: "#/channels/livekit"
+ messages:
+ - $ref: "#/channels/livekit/messages/final_message"
+ event_livekit:
+ action: receive
+ channel:
+ $ref: "#/channels/livekit"
+ messages:
+ - $ref: "#/channels/livekit/messages/event"
+ error_livekit:
+ action: receive
+ channel:
+ $ref: "#/channels/livekit"
+ messages:
+ - $ref: "#/channels/livekit/messages/error"
+
+components:
+ messages:
+ rtc_offer:
+ description: RTC Offer as generated by https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createOffer or compatible
+ payload:
+ schema:
+ type: object
+ properties:
+ type:
+ type: string
+ const: "offer"
+ sdp:
+ type: string
+ audio_chunk:
+ description: Binary stream of the audio that the Avatar will lipsync to. Sent as a binary stream (in JS/TS UInt8Arr)
+ contentType: application/octet-stream
+ payload:
+ schema:
+ type: string
+ format: bytestring
+ clear_buffer:
+ description: "Client Signal to make the avatar stop speaking immediately and ignore all previously sent audio"
+ payload:
+ schema:
+ type: string
+ const: SKIP
+ final_message:
+ description: "Client Signal to tell the server that the final segment of audio has been already sent and that it should close after playing it back"
+ payload:
+ schema:
+ type: string
+ const: DONE
+
+ event:
+ description: "Server sent signals"
+ payload:
+ schema:
+ type: string
+ enum:
+ - START
+ - ACK
+ - STOP
+ - SPEAK
+ - SILENT
+ rtc_answer:
+ description: RTC Answer as generated by https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createAnswer or compatible. Will be received AFTER an offer has been sent
+ payload:
+ schema:
+ type: object
+ properties:
+ type:
+ type: string
+ const: "answer"
+ sdp:
+ type: string
+ livekit_join_info:
+ description: Room info and join token that are used by the client to join a livekit room that hosts the avatar session
+ payload:
+ schema:
+ type: object
+ properties:
+ livekit_url:
+ type: string
+ livekit_token:
+ type: string
+ error:
+ description: Termination messages that specify the reason for immediate termination
+ payload:
+ schema:
+ type: string # Wrapping in an object often fixes the 'properties' read error
+ oneOf:
+ - pattern: '^(?i)ERROR\s+.+$'
+ description: "Matches 'ERROR' regardless of casing."
+ - pattern: '^(?i)RATE\s+.+$'
+ description: "Matches 'RATE' followed by a space."
+ - pattern: '^(?i)CLOSING\s+.+$'
+ description: "Matches 'CLOSING' followed by a space."
+ example: "ERROR: INVALID_API_KEY"
diff --git a/src/libs/Simli/openapi.yaml b/src/libs/Simli/openapi.yaml
index ed4e64b..8d976d8 100644
--- a/src/libs/Simli/openapi.yaml
+++ b/src/libs/Simli/openapi.yaml
@@ -1,1281 +1,1330 @@
-openapi: 3.1.0
-info:
- title: Simli
- version: 1.0.0
-security:
- - ApiKeyAuth: []
-servers:
- - url: https://api.simli.ai/
- description: API server
-
-paths:
- /compose/ice:
- get:
- summary: Get Ice Servers
- description: Create a new set of temporary ICE Server Credentials for WebRTC P2P session
- operationId: getIceServers_compose_ice_get
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- minProperties: 1
- properties:
- urls:
- type: string
- username:
- type: string
- credential:
- type: string
-
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /compose/token:
- post:
- summary: Compose Session Token
- description: Create a temporary Simli Compose Session Token
- operationId: start_audio_to_video_session_compose_token_post
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/StartStreamingSessionRequest"
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema:
- type: object
- properties:
- session_token:
- type: string
- "400":
- description: Invalid Data
- content:
- application/json:
- schema:
- type: object
- properties:
- session_token:
- type: string
- description: FAIL TOKEN
- detail:
- type: string
- description: Fail Reason
-
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /static/audio:
- post:
- summary: Generate Static Video
- description: Generate and stream a static video file from a given audio sample
- operationId: audioToVideoInterface_static_audio_post
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AudioToVideoRequest"
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema:
- contentMediaType: application/json
- properties:
- hls_url:
- type: string
- example: "https://api.simli.ai/hls/path-to-file/output.m3u8"
- mp4_url:
- type: string
- example: "https://api.simli.ai/mp4/path-to-file/output.mp4"
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /static/hls/{destination}/{file}:
- get:
- summary: Get HLS Segment
- security: []
- description: Get HLS Stream of Generated Video
- operationId: getCachedVideo_static_hls__machineIP___file__get
- parameters:
- - name: destination
- in: path
- required: true
- schema:
- type: string
- - name: file
- in: path
- required: true
- schema:
- type: string
- title: File
- responses:
- "200":
- description: Successful Response
- content:
- application/x-mpegURL:
- schema: {}
- video/MP2T:
- schema: {}
- "404":
- description: File not found
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /static/mp4/{destination}/{file}:
- get:
- summary: Get MP4 of Generated Video
- operationId: getCachedVideoMp4_static_mp4__machineIP___file__get
- security: []
- parameters:
- - name: destination
- in: path
- required: true
- schema:
- type: string
- - name: file
- in: path
- required: true
- schema:
- type: string
- title: File
- responses:
- "200":
- description: Successful Response
- content:
- video/mp4:
- schema: {}
- "404":
- description: File not found
-
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /faces/trinity:
- post:
- summary: Generate Trinity Face
- operationId: enqueueGSAGeneration_faces_gs_create_post
- parameters:
- - name: gsVersion
- in: query
- required: false
- schema:
- allOf:
- - $ref: "#/components/schemas/TrinityVersion"
- default: GSA_1.0
- - name: face_name
- in: query
- required: false
- schema:
- type: string
- default: untitled_avatar
- title: Face Name
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- $ref: "#/components/schemas/Body_enqueueGSAGeneration_faces_gs_create_post"
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema: {}
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /faces/trinity/generation_status:
- get:
- summary: Check Trinity Generation Status
- operationId: getRequestStatus_faces_gs_status_get
- parameters:
- - name: face_id
- in: query
- required: false
- schema:
- type: string
- title: Face Id
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema: {}
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /faces:
- get:
- summary: Get all faces
- responses:
- "200":
- description: List of faces
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: "#/components/schemas/FacesResponse"
-
- /faces/trinity/{id}:
- delete:
- summary: Delete a face
- description: Removes a face. This can not be undone. All agents connected to this face_id will be broken
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- responses:
- "204":
- description: Face deleted successfully
- "400":
- description: Invalid input
- "401":
- description: Unauthorized
- /integrations/livekit/agents:
- post:
- security: []
- summary: Start Livekit Agents Session
- operationId: init_integrations_livekit_agents_post
- requestBody:
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LiveKitInitializationRequest"
- required: true
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema:
- properties:
- status:
- type: string
- session_id:
- type: string
- format: uuid
- destination:
- type: string
- format: base64
- "400":
- description: Session Failed
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
-
- /history/sessions:
- get:
- summary: Retrieve session history
- description: Returns a list of session history records for the authenticated user
- parameters:
- - name: start
- in: query
- description: Filter records from this Unix timestamp
- required: false
- schema:
- type: integer
- example: 1745750387
- - name: end
- in: query
- description: Filter records until this Unix timestamp
- required: false
- schema:
- type: integer
- example: 1745750408
- responses:
- "200":
- description: A list of session history records
- content:
- application/json:
- schema:
- type: object
- properties:
- sessions:
- type: array
- items:
- $ref: "#/components/schemas/HistoryRecord"
- "401":
- description: Unauthorized - Invalid API key
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "500":
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
-
- /ratelimiter/sessions:
- get:
- summary: Active Session Count
- responses:
- "200":
- description: "Active session Count"
- content:
- application/json:
- schema:
- type: object
- properties:
- currentUsage:
- type: integer
- "401":
- description: Unauthorized - Invalid API key
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /faces/legacy:
- post:
- summary: Generate Legacy Face
- deprecated: true
- operationId: generateFaceIDAPI_faces_legacy_create_post
- parameters:
- - name: characterVersion
- in: query
- required: false
- schema:
- allOf:
- - $ref: "#/components/schemas/CharacterVersion"
- default: "1.5"
- - name: face_name
- in: query
- required: false
- schema:
- type: string
- default: untitled_avatar
- title: Face Name
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- $ref: "#/components/schemas/Body_generateFaceIDAPI_faces_legacy_create_post"
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema: {}
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
-
- /faces/legacy/{id}:
- delete:
- deprecated: true
- summary: Delete a face
- description: Removes a face. This can not be undone. All agents connected to this face_id will be broken
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- responses:
- "204":
- description: Face deleted successfully
- "400":
- description: Invalid input
- "401":
- description: Unauthorized
-
- /faces/legacy/generation_status:
- get:
- deprecated: true
- summary: Get Legacy Face Generation Status
- operationId: getRequestStatus_faces_legacy_status_get
- parameters:
- - name: face_id
- in: query
- required: false
- schema:
- type: string
- title: Face Id
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema: {}
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
-
- /auto/agent:
- post:
- deprecated: true
- summary: Create New Agent
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AgentRequest"
- responses:
- "201":
- description: Agent created successfully
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AgentResponse"
- "400":
- description: Invalid input
- /auto/agents:
- get:
- deprecated: true
- summary: Get All Agents
- responses:
- "200":
- description: List of agents
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: "#/components/schemas/AgentResponse"
- /auto/agent/{id}:
- parameters:
- - name: id
- required: true
- in: path
- schema:
- type: string
- format: uuid
- get:
- deprecated: true
- summary: Get Agent
- responses:
- "200":
- description: A single agent
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AgentResponse"
- put:
- summary: Update Agent
- deprecated: true
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AgentUpdate"
- responses:
- "200":
- description: Agent updated successfully
- "404":
- description: Agent not found
- delete:
- summary: Delete Agent
- deprecated: true
- responses:
- "204":
- description: Agent deleted successfully
- "404":
- description: Agent not found
- /auto/token:
- post:
- summary: Create Simli Auto Session Token
- description: Create a temporary session token for Simli Auto Sessions
- deprecated: true
- operationId: createPipecatSessionToken_auto_token_post
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TokenRequest"
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema: {}
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
- /auto/start/configurable:
- post:
- summary: Start Auto Session
- description: Start new Simli Auto Session without preconfigured agent
- deprecated: true
- operationId: startPipecatSession_auto_start_configurable_post
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ConfigurableSessionRequest"
- 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/start/{agent_id}/{session_token}:
- get:
- security: []
- summary: Start Auto Session from config
- deprecated: true
- operationId: startAgentIDQuery_auto_start__agent_id___session_token__post
- parameters:
- - name: agent_id
- in: path
- required: true
- schema:
- type: string
- title: Agent Id
- - name: session_token
- in: path
- 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
- parameters:
- - name: session_id
- in: query
- required: true
- schema:
- type: string
- title: Sessionid
- responses:
- "200":
- description: Successful Response
- content:
- application/json:
- schema: {}
- "422":
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HTTPValidationError"
-
-components:
- securitySchemes:
- ApiKeyAuth:
- type: apiKey
- in: header
- name: x-simli-api-key
-
- schemas:
- FacesRequest:
- type: object
- additionalProperties: false
- properties:
- id:
- type: string
- format: uuid
- description: "Unique identifier for the face, generated by the MySQL service"
- owner_id:
- type: string
- description: "Unique identifier for the owner of the face"
- simli_version:
- type: integer
- description: "Version of the Simli model used for the face"
- example: 1
- required:
- - id
- - owner_id
- FacesResponse:
- type: object
- additionalProperties: false
- properties:
- id:
- type: string
- format: uuid
- description: "Unique identifier for the face, generated by the MySQL service"
- owner_id:
- type: string
- description: "Unique identifier for the owner of the face"
- simli_version:
- type: integer
- description: "Version of the Simli model used for the face"
- example: 1
- created_at:
- type: string
- format: date-time
- description: "Timestamp when the face was created"
- updated_at:
- type: string
- format: date-time
- description: "Timestamp when the face was last updated"
- required:
- - id
- - owner_id
- - simli_version
- - created_at
- - updated_at
- AgentResponse:
- type: object
- additionalProperties: false
- properties:
- id:
- type: string
- format: uuid
- description: "Unique identifier for the agent, generated by the MySQL service"
- face_id:
- type: string
- format: uuid
- name:
- type: string
- default: "Untitled Agent"
- first_message:
- type: string
- prompt:
- type: string
- voice_provider:
- type: string
- enum: ["elevenlabs", "cartesia"]
- voice_id:
- type: string
- format: uuid
- voice_model:
- type: string
- example: sonic-english
- language:
- type: string
- emotion:
- type: string
- format: uuid
- llm_model:
- type: string
- example: gpt-4o-mini
- llm_endpoint:
- type: string
- description: "The URL of the custom LLM to use"
- example: https://api.example.com/v1/chat/completions
- max_idle_time:
- type: integer
- default: 300
- max_session_length:
- type: integer
- default: 3600
- owner_id:
- type: string
- description: "Unique identifier for the owner of the agent"
- llm_provider:
- type: string
- enum: ["openai", "google", "user"]
- description: "The provider of the LLM used by the agent"
- simli_version:
- type: integer
- description: "Version of the Simli model used for the face"
- example: 1
- created_at:
- type: string
- format: date-time
- description: "Timestamp when the agent was created"
- updated_at:
- type: string
- format: date-time
- description: "Timestamp when the agent was last updated"
- required:
- - id
- - face_id
- - name
- - first_message
- - prompt
- - voice_provider
- - voice_id
- - voice_model
- - language
- - emotion
- - llm_model
- - llm_endpoint
- - max_idle_time
- - max_session_length
- - owner_id
- - llm_provider
- - created_at
- - updated_at
- AgentRequest:
- type: object
- additionalProperties: false
- properties:
- face_id:
- type: string
- format: uuid
- name:
- type: string
- default: "Untitled Agent"
- first_message:
- type: string
- prompt:
- type: string
- voice_provider:
- type: string
- enum: ["elevenlabs", "cartesia"]
- voice_id:
- type: string
- format: uuid
- voice_model:
- type: string
- example: sonic-english
- owner_id:
- type: string
- description: "Unique identifier for the owner of the agent"
- language:
- type: string
- emotion:
- type: string
- format: uuid
- llm_model:
- type: string
- example: gpt-4o-mini
- llm_endpoint:
- type: string
- description: "The URL of the custom LLM to use"
- example: https://api.example.com/v1/chat/completions
- max_idle_time:
- type: integer
- default: 300
- max_session_length:
- type: integer
- default: 3600
- llm_provider:
- type: string
- enum: ["openai", "google", "user"]
- description: "The provider of the LLM used by the agent"
- created_at:
- type: string
- format: date-time
- description: "Timestamp when the agent was created"
- updated_at:
- type: string
- format: date-time
- description: "Timestamp when the agent was updated"
- required:
- - face_id
- - name
- AgentUpdate:
- type: object
- additionalProperties: false
- properties:
- face_id:
- type: string
- format: uuid
- name:
- type: string
- first_message:
- type: string
- prompt:
- type: string
- voice_provider:
- type: string
- enum: ["elevenlabs", "cartesia"]
- voice_id:
- type: string
- format: uuid
- voice_model:
- type: string
- example: sonic-english
- llm_model:
- type: string
- example: gpt-4o-mini
- llm_endpoint:
- type: string
- description: "The URL of the custom LLM to use"
- example: https://api.example.com/v1/chat/completions
- language:
- type: string
- emotion:
- type: string
- format: uuid
- max_idle_time:
- type: integer
- max_session_length:
- type: integer
- llm_provider:
- type: string
- enum: ["openai", "google", "user"]
- description: "The provider of the LLM used by the agent"
- created_at:
- type: string
- format: date-time
- description: "Timestamp when the agent was created"
- updated_at:
- type: string
- format: date-time
- description: "Timestamp when the agent was updated"
- AudioToVideoRequest:
- properties:
- faceId:
- type: string
- title: Faceid
- audioBase64:
- type: string
- title: Audiobase64
- audioFormat:
- type: string
- enum:
- - pcm16
- - pcm32
- - wav
- - mp3
- - ogg
- title: Audioformat
- audioSampleRate:
- type: integer
- title: Audiosamplerate
- default: 16000
- audioChannelCount:
- type: integer
- title: Audiochannelcount
- default: 1
- videoStartingFrame:
- type: integer
- title: Videostartingframe
- default: 0
- type: object
- required:
- - faceId
- - audioBase64
- - audioFormat
- title: AudioToVideoRequest
- ConfigurableSessionRequest:
- properties:
- faceId:
- type: string
- title: Faceid
- default: tmp9i8bbq7c
- ttsProvider:
- allOf:
- - $ref: "#/components/schemas/TTS_Provider"
- default: Cartesia
- ttsAPIKey:
- anyOf:
- - type: string
- - type: "null"
- title: Ttsapikey
- ttsModel:
- type: string
- title: Ttsmodel
- default: sonic-turbo-2025-03-07
- voiceId:
- type: string
- title: Voiceid
- default: a167e0f3-df7e-4d52-a9c3-f949145efdab
- systemPrompt:
- anyOf:
- - type: string
- - type: "null"
- title: Systemprompt
- default: 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.
- firstMessage:
- anyOf:
- - type: string
- - type: "null"
- title: Firstmessage
- maxSessionLength:
- type: integer
- title: Maxsessionlength
- default: 3600
- maxIdleTime:
- type: integer
- title: Maxidletime
- default: 300
- language:
- type: string
- title: Language
- default: en
- customLLMConfig:
- anyOf:
- - $ref: "#/components/schemas/CustomLLMConfig"
- - type: "null"
- llmConfig:
- allOf:
- - $ref: "#/components/schemas/LLMConfig"
- default:
- model: gpt-4o-mini
- provider: OpenAI
- createTranscript:
- type: boolean
- title: Createtranscript
- default: false
- model:
- allOf:
- - $ref: "#/components/schemas/SimliModels"
- default: artalk
- type: object
- title: ConfigurableSessionRequest
- CustomLLMConfig:
- properties:
- model:
- type: string
- title: Model
- baseURL:
- type: string
- title: Baseurl
- llmAPIKey:
- type: string
- title: Llmapikey
- type: object
- required:
- - model
- - baseURL
- - llmAPIKey
- title: CustomLLMConfig
- Google_Models:
- type: string
- enum:
- - gemini-2.5-pro
- - gemini-2.5-flash
- - gemini-2.5-flash-lite-preview-06-17
- title: Google_Models
- HTTPValidationError:
- properties:
- detail:
- items:
- $ref: "#/components/schemas/ValidationError"
- type: array
- title: Detail
- type: object
- title: HTTPValidationError
- LLMConfig:
- properties:
- model:
- anyOf:
- - $ref: "#/components/schemas/OpenAI_Models"
- - $ref: "#/components/schemas/Google_Models"
- - type: string
- title: Model
- default: gpt-4o-mini
- provider:
- allOf:
- - $ref: "#/components/schemas/LLM_Provider"
- default: OpenAI
- apiKey:
- anyOf:
- - type: string
- - type: "null"
- title: Apikey
- baseURL:
- anyOf:
- - type: string
- - type: "null"
- title: Baseurl
- type: object
- title: LLMConfig
- LLM_Provider:
- type: string
- enum:
- - OpenAI
- - Google
- - User
- title: LLM_Provider
- LiveKitInitializationRequest:
- properties:
- session_token:
- type: string
- title: Session Token
- livekit_token:
- type: string
- title: Livekit Token
- livekit_url:
- type: string
- title: Livekit Url
- type: object
- required:
- - session_token
- - livekit_token
- - livekit_url
- title: LiveKitInitializationRequest
- OpenAI_Models:
- type: string
- enum:
- - gpt-4o
- - gpt-4o-mini
- - gpt-4.1
- - gpt-4.1-mini
- - gpt-4.1-nano
- title: OpenAI_Models
- SessionDetails:
- properties:
- roomUrl:
- type: string
- title: Roomurl
- sessionId:
- type: string
- title: Sessionid
- type: object
- required:
- - roomUrl
- - sessionId
- title: SessionDetails
- SimliModels:
- type: string
- enum:
- - fasttalk
- - artalk
- title: SimliModels
- StartStreamingSessionRequest:
- properties:
- faceId:
- type: string
- title: Faceid
- apiVersion:
- type: string
- title: Apiversion
- const: v2
- sessionAggregator:
- anyOf:
- - type: string
- - type: "null"
- title: Sessionaggregator
- handleSilence:
- type: boolean
- title: Handlesilence
- default: true
- maxSessionLength:
- type: integer
- title: Maxsessionlength
- default: 3600
- maxIdleTime:
- type: integer
- title: Maxidletime
- default: 300
- startFrame:
- type: integer
- title: Startframe
- default: 0
- audioInputFormat:
- type: string
- title: Audioinputformat
- default: pcm16
- type: object
- required:
- - faceId
- title: StartStreamingSessionRequest
- TTS_Provider:
- type: string
- enum:
- - ElevenLabs
- - PlayHT
- - Cartesia
- - User
- title: TTS_Provider
- TokenRequest:
- properties:
- expiryStamp:
- anyOf:
- - type: integer
- - type: "null"
- title: Expirystamp
- default: -1
- simliAPIKey:
- type: string
- title: Simliapikey
- llmAPIKey:
- anyOf:
- - type: string
- - type: "null"
- title: Llmapikey
- default: ""
- ttsAPIKey:
- anyOf:
- - type: string
- - type: "null"
- title: Ttsapikey
- default: ""
- createTranscript:
- type: boolean
- title: Createtranscript
- default: false
- originAllowList:
- anyOf:
- - items:
- type: string
- type: array
- uniqueItems: true
- - type: "null"
- title: Originallowlist
- default: []
- type: object
- required:
- - simliAPIKey
- title: TokenRequest
- ValidationError:
- properties:
- loc:
- items:
- anyOf:
- - type: string
- - type: integer
- type: array
- title: Location
- msg:
- type: string
- title: Message
- type:
- type: string
- title: Error Type
- type: object
- required:
- - loc
- - msg
- - type
- title: ValidationError
- HistoryRecord:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Firebase unique identifier for the session
- userId:
- type: string
- description: Firebase user id
- endUserAggregator:
- type: string
- description: (optional) Aggregation identifier provided in request by customer for grouping their end-users
- apiKeyName:
- type: string
- description: (optional) Name of the API key used for this session
- sessionTotalTime:
- type: number
- format: double
- description: Total session duration in seconds
- startTime:
- type: integer
- description: Session start time as Unix timestamp
- endTime:
- type: integer
- description: Session end time as Unix timestamp
- required:
- - id
- - sessionTotalTime
- - startTime
- - endTime
- Error:
- type: object
- properties:
- error:
- type: string
- description: Error message
- code:
- type: string
- description: Error code
- required:
- - error
- Body_generateFaceIDAPI_faces_legacy_create_post:
- properties:
- image:
- type: string
- format: binary
- title: Image
- type: object
- required:
- - image
- title: Body_generateFaceIDAPI_faces_legacy_create_post
- CharacterVersion:
- type: string
- enum:
- - "1.5"
- title: CharacterVersion
- Body_enqueueGSAGeneration_faces_gs_create_post:
- properties:
- image:
- type: string
- format: binary
- title: Image
- type: object
- required:
- - image
- title: Body_enqueueGSAGeneration_faces_gs_create_post
- TrinityVersion:
- type: string
- enum:
- - GSA_1.0
- title: GSVersion
+openapi: 3.1.0
+info:
+ title: Simli
+ version: 1.0.0
+security:
+ - ApiKeyAuth: []
+servers:
+ - url: https://api.simli.ai/
+ description: API server
+
+paths:
+ /compose/ice:
+ get:
+ summary: Get Ice Servers
+ description: Create a new set of temporary ICE Server Credentials for WebRTC P2P session
+ operationId: getIceServers_compose_ice_get
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: object
+ minProperties: 1
+ properties:
+ urls:
+ type: string
+ username:
+ type: string
+ credential:
+ type: string
+
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /compose/token:
+ post:
+ summary: Compose Session Token
+ description: Create a temporary Simli Compose Session Token
+ operationId: start_audio_to_video_session_compose_token_post
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/StartStreamingSessionRequest"
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ session_token:
+ type: string
+ "400":
+ description: Invalid Data
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ session_token:
+ type: string
+ description: FAIL TOKEN
+ detail:
+ type: string
+ description: Fail Reason
+
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /static/audio:
+ post:
+ summary: Generate Static Video
+ description: Generate and stream a static video file from a given audio sample
+ operationId: audioToVideoInterface_static_audio_post
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/AudioToVideoRequest"
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ contentMediaType: application/json
+ properties:
+ hls_url:
+ type: string
+ example: "https://api.simli.ai/hls/path-to-file/output.m3u8"
+ mp4_url:
+ type: string
+ example: "https://api.simli.ai/mp4/path-to-file/output.mp4"
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /static/hls/{destination}/{file}:
+ get:
+ summary: Get HLS Segment
+ security: []
+ description: Get HLS Stream of Generated Video
+ operationId: getCachedVideo_static_hls__machineIP___file__get
+ parameters:
+ - name: destination
+ in: path
+ required: true
+ schema:
+ type: string
+ - name: file
+ in: path
+ required: true
+ schema:
+ type: string
+ title: File
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/x-mpegURL:
+ schema: {}
+ video/MP2T:
+ schema: {}
+ "404":
+ description: File not found
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /static/mp4/{destination}/{file}:
+ get:
+ summary: Get MP4 of Generated Video
+ operationId: getCachedVideoMp4_static_mp4__machineIP___file__get
+ security: []
+ parameters:
+ - name: destination
+ in: path
+ required: true
+ schema:
+ type: string
+ - name: file
+ in: path
+ required: true
+ schema:
+ type: string
+ title: File
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ video/mp4:
+ schema: {}
+ "404":
+ description: File not found
+
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /faces/trinity:
+ post:
+ summary: Generate Trinity Face
+ operationId: enqueueGSAGeneration_faces_gs_create_post
+ parameters:
+ - name: gsVersion
+ in: query
+ required: false
+ schema:
+ allOf:
+ - $ref: "#/components/schemas/TrinityVersion"
+ default: GSA_1.0
+ - name: face_name
+ in: query
+ required: false
+ schema:
+ type: string
+ default: untitled_avatar
+ title: Face Name
+ requestBody:
+ required: true
+ content:
+ multipart/form-data:
+ schema:
+ $ref: "#/components/schemas/Body_enqueueGSAGeneration_faces_gs_create_post"
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /faces/trinity/preprocess:
+ 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.
+ operationId: preprocess_image_faces_trinity_preprocess_post
+ parameters:
+ - name: retry
+ in: query
+ required: false
+ description: >-
+ Render at higher quality. Substantially slower - roughly 160 seconds
+ against 25 - so use it to re-run an image whose first result was
+ unsatisfactory rather than as the default.
+ schema:
+ type: boolean
+ default: false
+ title: Retry
+ requestBody:
+ required: true
+ content:
+ multipart/form-data:
+ schema:
+ $ref: "#/components/schemas/Body_preprocess_image_faces_trinity_preprocess_post"
+ /faces/trinity/generation_status:
+ get:
+ summary: Check Trinity Generation Status
+ operationId: getRequestStatus_faces_gs_status_get
+ parameters:
+ - name: face_id
+ in: query
+ required: false
+ schema:
+ type: string
+ title: Face Id
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /faces:
+ get:
+ summary: Get all faces
+ responses:
+ "200":
+ description: List of faces
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/FacesResponse"
+
+ /faces/trinity/{id}:
+ delete:
+ summary: Delete a face
+ description: Removes a face. This can not be undone. All agents connected to this face_id will be broken
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ responses:
+ "204":
+ description: Face deleted successfully
+ "400":
+ description: Invalid input
+ "401":
+ description: Unauthorized
+ /integrations/livekit/agents:
+ post:
+ security: []
+ summary: Start Livekit Agents Session
+ operationId: init_integrations_livekit_agents_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/LiveKitInitializationRequest"
+ required: true
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ properties:
+ status:
+ type: string
+ session_id:
+ type: string
+ format: uuid
+ destination:
+ type: string
+ format: base64
+ "400":
+ description: Session Failed
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+
+ /history/sessions:
+ get:
+ summary: Retrieve session history
+ description: Returns a list of session history records for the authenticated user
+ parameters:
+ - name: startTime
+ in: query
+ description: Filter records from this Unix timestamp
+ required: false
+ schema:
+ type: integer
+ example: 1745750387
+ - name: endTime
+ in: query
+ description: Filter records until this Unix timestamp
+ required: false
+ schema:
+ type: integer
+ example: 1745750408
+ responses:
+ "200":
+ description: A list of session history records
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ sessions:
+ type: array
+ items:
+ $ref: "#/components/schemas/HistoryRecord"
+ "401":
+ description: Unauthorized - Invalid API key
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+
+ /ratelimiter/sessions:
+ get:
+ summary: Active Session Count
+ responses:
+ "200":
+ description: "Active session Count"
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ currentUsage:
+ type: integer
+ "401":
+ description: Unauthorized - Invalid API key
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ /faces/legacy:
+ post:
+ summary: Generate Legacy Face
+ deprecated: true
+ operationId: generateFaceIDAPI_faces_legacy_create_post
+ parameters:
+ - name: characterVersion
+ in: query
+ required: false
+ schema:
+ allOf:
+ - $ref: "#/components/schemas/CharacterVersion"
+ default: "1.5"
+ - name: face_name
+ in: query
+ required: false
+ schema:
+ type: string
+ default: untitled_avatar
+ title: Face Name
+ requestBody:
+ required: true
+ content:
+ multipart/form-data:
+ schema:
+ $ref: "#/components/schemas/Body_generateFaceIDAPI_faces_legacy_create_post"
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+
+ /faces/legacy/{id}:
+ delete:
+ deprecated: true
+ summary: Delete a face
+ description: Removes a face. This can not be undone. All agents connected to this face_id will be broken
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ responses:
+ "204":
+ description: Face deleted successfully
+ "400":
+ description: Invalid input
+ "401":
+ description: Unauthorized
+
+ /faces/legacy/generation_status:
+ get:
+ deprecated: true
+ summary: Get Legacy Face Generation Status
+ operationId: getRequestStatus_faces_legacy_status_get
+ parameters:
+ - name: face_id
+ in: query
+ required: false
+ schema:
+ type: string
+ title: Face Id
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+
+ /auto/agent:
+ post:
+ deprecated: true
+ summary: Create New Agent
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/AgentRequest"
+ responses:
+ "201":
+ description: Agent created successfully
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/AgentResponse"
+ "400":
+ description: Invalid input
+ /auto/agents:
+ get:
+ deprecated: true
+ summary: Get All Agents
+ responses:
+ "200":
+ description: List of agents
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/AgentResponse"
+ /auto/agent/{id}:
+ parameters:
+ - name: id
+ required: true
+ in: path
+ schema:
+ type: string
+ format: uuid
+ get:
+ deprecated: true
+ summary: Get Agent
+ responses:
+ "200":
+ description: A single agent
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/AgentResponse"
+ put:
+ summary: Update Agent
+ deprecated: true
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/AgentUpdate"
+ responses:
+ "200":
+ description: Agent updated successfully
+ "404":
+ description: Agent not found
+ delete:
+ summary: Delete Agent
+ deprecated: true
+ responses:
+ "204":
+ description: Agent deleted successfully
+ "404":
+ description: Agent not found
+ /auto/token:
+ post:
+ summary: Create Simli Auto Session Token
+ description: Create a temporary session token for Simli Auto Sessions
+ deprecated: true
+ operationId: createPipecatSessionToken_auto_token_post
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/TokenRequest"
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+ /auto/start/configurable:
+ post:
+ summary: Start Auto Session
+ description: Start new Simli Auto Session without preconfigured agent
+ deprecated: true
+ operationId: startPipecatSession_auto_start_configurable_post
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ConfigurableSessionRequest"
+ 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/start/{agent_id}/{session_token}:
+ get:
+ security: []
+ summary: Start Auto Session from config
+ deprecated: true
+ operationId: startAgentIDQuery_auto_start__agent_id___session_token__post
+ parameters:
+ - name: agent_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Agent Id
+ - name: session_token
+ in: path
+ 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
+ parameters:
+ - name: session_id
+ in: query
+ required: true
+ schema:
+ type: string
+ title: Sessionid
+ responses:
+ "200":
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ "422":
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPValidationError"
+
+components:
+ securitySchemes:
+ ApiKeyAuth:
+ type: apiKey
+ in: header
+ name: x-simli-api-key
+
+ schemas:
+ FacesRequest:
+ type: object
+ additionalProperties: false
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: "Unique identifier for the face, generated by the MySQL service"
+ owner_id:
+ type: string
+ description: "Unique identifier for the owner of the face"
+ simli_version:
+ type: integer
+ description: "Version of the Simli model used for the face"
+ example: 1
+ required:
+ - id
+ - owner_id
+ FacesResponse:
+ type: object
+ additionalProperties: false
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: "Unique identifier for the face, generated by the MySQL service"
+ owner_id:
+ type: string
+ description: "Unique identifier for the owner of the face"
+ simli_version:
+ type: integer
+ description: "Version of the Simli model used for the face"
+ example: 1
+ created_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the face was created"
+ updated_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the face was last updated"
+ required:
+ - id
+ - owner_id
+ - simli_version
+ - created_at
+ - updated_at
+ AgentResponse:
+ type: object
+ additionalProperties: false
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: "Unique identifier for the agent, generated by the MySQL service"
+ face_id:
+ type: string
+ format: uuid
+ name:
+ type: string
+ default: "Untitled Agent"
+ first_message:
+ type: string
+ prompt:
+ type: string
+ voice_provider:
+ type: string
+ enum: ["elevenlabs", "cartesia"]
+ voice_id:
+ type: string
+ format: uuid
+ voice_model:
+ type: string
+ example: sonic-english
+ language:
+ type: string
+ emotion:
+ type: string
+ format: uuid
+ llm_model:
+ type: string
+ example: gpt-4o-mini
+ llm_endpoint:
+ type: string
+ description: "The URL of the custom LLM to use"
+ example: https://api.example.com/v1/chat/completions
+ max_idle_time:
+ type: integer
+ default: 300
+ max_session_length:
+ type: integer
+ default: 3600
+ owner_id:
+ type: string
+ description: "Unique identifier for the owner of the agent"
+ llm_provider:
+ type: string
+ enum: ["openai", "google", "user"]
+ description: "The provider of the LLM used by the agent"
+ simli_version:
+ type: integer
+ description: "Version of the Simli model used for the face"
+ example: 1
+ created_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the agent was created"
+ updated_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the agent was last updated"
+ required:
+ - id
+ - face_id
+ - name
+ - first_message
+ - prompt
+ - voice_provider
+ - voice_id
+ - voice_model
+ - language
+ - emotion
+ - llm_model
+ - llm_endpoint
+ - max_idle_time
+ - max_session_length
+ - owner_id
+ - llm_provider
+ - created_at
+ - updated_at
+ AgentRequest:
+ type: object
+ additionalProperties: false
+ properties:
+ face_id:
+ type: string
+ format: uuid
+ name:
+ type: string
+ default: "Untitled Agent"
+ first_message:
+ type: string
+ prompt:
+ type: string
+ voice_provider:
+ type: string
+ enum: ["elevenlabs", "cartesia"]
+ voice_id:
+ type: string
+ format: uuid
+ voice_model:
+ type: string
+ example: sonic-english
+ owner_id:
+ type: string
+ description: "Unique identifier for the owner of the agent"
+ language:
+ type: string
+ emotion:
+ type: string
+ format: uuid
+ llm_model:
+ type: string
+ example: gpt-4o-mini
+ llm_endpoint:
+ type: string
+ description: "The URL of the custom LLM to use"
+ example: https://api.example.com/v1/chat/completions
+ max_idle_time:
+ type: integer
+ default: 300
+ max_session_length:
+ type: integer
+ default: 3600
+ llm_provider:
+ type: string
+ enum: ["openai", "google", "user"]
+ description: "The provider of the LLM used by the agent"
+ created_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the agent was created"
+ updated_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the agent was updated"
+ required:
+ - face_id
+ - name
+ AgentUpdate:
+ type: object
+ additionalProperties: false
+ properties:
+ face_id:
+ type: string
+ format: uuid
+ name:
+ type: string
+ first_message:
+ type: string
+ prompt:
+ type: string
+ voice_provider:
+ type: string
+ enum: ["elevenlabs", "cartesia"]
+ voice_id:
+ type: string
+ format: uuid
+ voice_model:
+ type: string
+ example: sonic-english
+ llm_model:
+ type: string
+ example: gpt-4o-mini
+ llm_endpoint:
+ type: string
+ description: "The URL of the custom LLM to use"
+ example: https://api.example.com/v1/chat/completions
+ language:
+ type: string
+ emotion:
+ type: string
+ format: uuid
+ max_idle_time:
+ type: integer
+ max_session_length:
+ type: integer
+ llm_provider:
+ type: string
+ enum: ["openai", "google", "user"]
+ description: "The provider of the LLM used by the agent"
+ created_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the agent was created"
+ updated_at:
+ type: string
+ format: date-time
+ description: "Timestamp when the agent was updated"
+ AudioToVideoRequest:
+ properties:
+ faceId:
+ type: string
+ title: Faceid
+ audioBase64:
+ type: string
+ title: Audiobase64
+ audioFormat:
+ type: string
+ enum:
+ - pcm16
+ - pcm32
+ - wav
+ - mp3
+ - ogg
+ title: Audioformat
+ audioSampleRate:
+ type: integer
+ title: Audiosamplerate
+ default: 16000
+ audioChannelCount:
+ type: integer
+ title: Audiochannelcount
+ default: 1
+ videoStartingFrame:
+ type: integer
+ title: Videostartingframe
+ default: 0
+ type: object
+ required:
+ - faceId
+ - audioBase64
+ - audioFormat
+ title: AudioToVideoRequest
+ ConfigurableSessionRequest:
+ properties:
+ faceId:
+ type: string
+ title: Faceid
+ default: tmp9i8bbq7c
+ ttsProvider:
+ allOf:
+ - $ref: "#/components/schemas/TTS_Provider"
+ default: Cartesia
+ ttsAPIKey:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Ttsapikey
+ ttsModel:
+ type: string
+ title: Ttsmodel
+ default: sonic-turbo-2025-03-07
+ voiceId:
+ type: string
+ title: Voiceid
+ default: a167e0f3-df7e-4d52-a9c3-f949145efdab
+ systemPrompt:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Systemprompt
+ default:
+ 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.
+ firstMessage:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Firstmessage
+ maxSessionLength:
+ type: integer
+ title: Maxsessionlength
+ default: 3600
+ maxIdleTime:
+ type: integer
+ title: Maxidletime
+ default: 300
+ language:
+ type: string
+ title: Language
+ default: en
+ customLLMConfig:
+ anyOf:
+ - $ref: "#/components/schemas/CustomLLMConfig"
+ - type: "null"
+ llmConfig:
+ allOf:
+ - $ref: "#/components/schemas/LLMConfig"
+ default:
+ model: gpt-4o-mini
+ provider: OpenAI
+ createTranscript:
+ type: boolean
+ title: Createtranscript
+ default: false
+ model:
+ allOf:
+ - $ref: "#/components/schemas/SimliModels"
+ default: artalk
+ type: object
+ title: ConfigurableSessionRequest
+ CustomLLMConfig:
+ properties:
+ model:
+ type: string
+ title: Model
+ baseURL:
+ type: string
+ title: Baseurl
+ llmAPIKey:
+ type: string
+ title: Llmapikey
+ type: object
+ required:
+ - model
+ - baseURL
+ - llmAPIKey
+ title: CustomLLMConfig
+ Google_Models:
+ type: string
+ enum:
+ - gemini-2.5-pro
+ - gemini-2.5-flash
+ - gemini-2.5-flash-lite-preview-06-17
+ title: Google_Models
+ HTTPValidationError:
+ properties:
+ detail:
+ items:
+ $ref: "#/components/schemas/ValidationError"
+ type: array
+ title: Detail
+ type: object
+ title: HTTPValidationError
+ LLMConfig:
+ properties:
+ model:
+ anyOf:
+ - $ref: "#/components/schemas/OpenAI_Models"
+ - $ref: "#/components/schemas/Google_Models"
+ - type: string
+ title: Model
+ default: gpt-4o-mini
+ provider:
+ allOf:
+ - $ref: "#/components/schemas/LLM_Provider"
+ default: OpenAI
+ apiKey:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Apikey
+ baseURL:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Baseurl
+ type: object
+ title: LLMConfig
+ LLM_Provider:
+ type: string
+ enum:
+ - OpenAI
+ - Google
+ - User
+ title: LLM_Provider
+ LiveKitInitializationRequest:
+ properties:
+ session_token:
+ type: string
+ title: Session Token
+ livekit_token:
+ type: string
+ title: Livekit Token
+ livekit_url:
+ type: string
+ title: Livekit Url
+ type: object
+ required:
+ - session_token
+ - livekit_token
+ - livekit_url
+ title: LiveKitInitializationRequest
+ OpenAI_Models:
+ type: string
+ enum:
+ - gpt-4o
+ - gpt-4o-mini
+ - gpt-4.1
+ - gpt-4.1-mini
+ - gpt-4.1-nano
+ title: OpenAI_Models
+ SessionDetails:
+ properties:
+ roomUrl:
+ type: string
+ title: Roomurl
+ sessionId:
+ type: string
+ title: Sessionid
+ type: object
+ required:
+ - roomUrl
+ - sessionId
+ title: SessionDetails
+ SimliModels:
+ type: string
+ enum:
+ - fasttalk
+ - artalk
+ title: SimliModels
+ StartStreamingSessionRequest:
+ properties:
+ faceId:
+ type: string
+ title: Faceid
+ apiVersion:
+ type: string
+ title: Apiversion
+ const: v2
+ sessionAggregator:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Sessionaggregator
+ handleSilence:
+ type: boolean
+ title: Handlesilence
+ default: true
+ maxSessionLength:
+ type: integer
+ title: Maxsessionlength
+ default: 3600
+ maxIdleTime:
+ type: integer
+ title: Maxidletime
+ default: 300
+ startFrame:
+ type: integer
+ title: Startframe
+ default: 0
+ audioInputFormat:
+ type: string
+ title: Audioinputformat
+ default: pcm16
+ type: object
+ required:
+ - faceId
+ title: StartStreamingSessionRequest
+ TTS_Provider:
+ type: string
+ enum:
+ - ElevenLabs
+ - PlayHT
+ - Cartesia
+ - User
+ title: TTS_Provider
+ TokenRequest:
+ properties:
+ expiryStamp:
+ anyOf:
+ - type: integer
+ - type: "null"
+ title: Expirystamp
+ default: -1
+ simliAPIKey:
+ type: string
+ title: Simliapikey
+ llmAPIKey:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Llmapikey
+ default: ""
+ ttsAPIKey:
+ anyOf:
+ - type: string
+ - type: "null"
+ title: Ttsapikey
+ default: ""
+ createTranscript:
+ type: boolean
+ title: Createtranscript
+ default: false
+ originAllowList:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ uniqueItems: true
+ - type: "null"
+ title: Originallowlist
+ default: []
+ type: object
+ required:
+ - simliAPIKey
+ title: TokenRequest
+ ValidationError:
+ properties:
+ loc:
+ items:
+ anyOf:
+ - type: string
+ - type: integer
+ type: array
+ title: Location
+ msg:
+ type: string
+ title: Message
+ type:
+ type: string
+ title: Error Type
+ type: object
+ required:
+ - loc
+ - msg
+ - type
+ title: ValidationError
+ HistoryRecord:
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: Firebase unique identifier for the session
+ face_id:
+ type: string
+ description: face_id used in session
+ kind:
+ type: string
+ description: Interaction Method
+ endUserAggregator:
+ type: string
+ description: (optional) Aggregation identifier provided in request by customer for grouping their end-users
+ apiKeyName:
+ type: string
+ description: (optional) Name of the API key used for this session
+ sessionTotalTime:
+ type: number
+ format: double
+ description: Total session duration in seconds
+ startTime:
+ type: integer
+ description: Session start time as Unix timestamp
+ endTime:
+ type: integer
+ description: Session end time as Unix timestamp
+ required:
+ - id
+ - userId
+ - sessionTokenId
+ - sessionTotalTime
+ - startTime
+ - endTime
+
+ Error:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Error code
+ required:
+ - error
+ Body_generateFaceIDAPI_faces_legacy_create_post:
+ properties:
+ image:
+ type: string
+ format: binary
+ title: Image
+ type: object
+ required:
+ - image
+ title: Body_generateFaceIDAPI_faces_legacy_create_post
+ CharacterVersion:
+ type: string
+ enum:
+ - "1.5"
+ title: CharacterVersion
+ Body_enqueueGSAGeneration_faces_gs_create_post:
+ properties:
+ image:
+ type: string
+ format: binary
+ title: Image
+ type: object
+ required:
+ - image
+ title: Body_enqueueGSAGeneration_faces_gs_create_post
+ Body_preprocess_image_faces_trinity_preprocess_post:
+ properties:
+ image:
+ type: string
+ format: binary
+ title: Image
+ description: >-
+ 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.
+ type: object
+ required:
+ - image
+ title: Body_preprocess_image_faces_trinity_preprocess_post
+ TrinityVersion:
+ type: string
+ enum:
+ - GSA_1.0
+ title: GSVersion