diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs index 22a8453..d5c2599 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs @@ -41,6 +41,8 @@ namespace TypeSafeAI.Generated typeof(global::TypeSafeAI.Generated.JsonConverters.AnyOfJsonConverter>), + typeof(global::TypeSafeAI.Generated.JsonConverters.AnyOfJsonConverter), + typeof(global::TypeSafeAI.Generated.JsonConverters.AnyOfJsonConverter>), typeof(global::TypeSafeAI.Generated.JsonConverters.AnyOfJsonConverter>), @@ -80,6 +82,8 @@ namespace TypeSafeAI.Generated [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.ChoiceQuestion))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.HTTPBadRequestError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.AnyOf), TypeInfoPropertyName = "AnyOfStringObject2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.HTTPValidationError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.ValidationError))] diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs index e34c138..e623fc4 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs @@ -105,107 +105,115 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::TypeSafeAI.Generated.HTTPValidationError? Type18 { get; set; } + public global::TypeSafeAI.Generated.HTTPBadRequestError? Type18 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type19 { get; set; } + public global::TypeSafeAI.Generated.AnyOf? Type19 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.ValidationError? Type20 { get; set; } + public global::TypeSafeAI.Generated.HTTPValidationError? Type20 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.ModelMetadata? Type21 { get; set; } + public global::System.Collections.Generic.IList? Type21 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.ModelMetadataList? Type22 { get; set; } + public global::TypeSafeAI.Generated.ValidationError? Type22 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type23 { get; set; } + public global::TypeSafeAI.Generated.ModelMetadata? Type23 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.NoulCriteria? Type24 { get; set; } + public global::TypeSafeAI.Generated.ModelMetadataList? Type24 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.NoulQuestion? Type25 { get; set; } + public global::System.Collections.Generic.IList? Type25 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.Question? Type26 { get; set; } + public global::TypeSafeAI.Generated.NoulCriteria? Type26 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.ScoreQuestion? Type27 { get; set; } + public global::TypeSafeAI.Generated.NoulQuestion? Type27 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.QuestionDiscriminator? Type28 { get; set; } + public global::TypeSafeAI.Generated.Question? Type28 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.QuestionDiscriminatorType? Type29 { get; set; } + public global::TypeSafeAI.Generated.ScoreQuestion? Type29 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>>? Type30 { get; set; } + public global::TypeSafeAI.Generated.QuestionDiscriminator? Type30 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.SystemOneRequest? Type31 { get; set; } + public global::TypeSafeAI.Generated.QuestionDiscriminatorType? Type31 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type32 { get; set; } + public global::System.Collections.Generic.IList>>? Type32 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type33 { get; set; } + public global::TypeSafeAI.Generated.SystemOneRequest? Type33 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.SystemOneResponse? Type34 { get; set; } + public global::System.Collections.Generic.Dictionary? Type34 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type35 { get; set; } + public global::System.Collections.Generic.Dictionary? Type35 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.Usage? Type36 { get; set; } + public global::TypeSafeAI.Generated.SystemOneResponse? Type36 { get; set; } /// /// /// - public int? Type37 { get; set; } + public global::System.Collections.Generic.Dictionary? Type37 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type38 { get; set; } + public global::TypeSafeAI.Generated.Usage? Type38 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.AnyOf? Type39 { get; set; } + public int? Type39 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.SystemoneV1SystemonePostRequest? Type40 { get; set; } + public global::System.Collections.Generic.IList>? Type40 { get; set; } /// /// /// - public byte[]? Type41 { get; set; } + public global::TypeSafeAI.Generated.AnyOf? Type41 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneImages? Type42 { get; set; } + public global::TypeSafeAI.Generated.SystemoneV1SystemonePostRequest? Type42 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneLongContext? Type43 { get; set; } + public byte[]? Type43 { get; set; } + /// + /// + /// + public global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneImages? Type44 { get; set; } + /// + /// + /// + public global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneLongContext? Type45 { get; set; } /// /// diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorInput.Json.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestError.Json.g.cs similarity index 89% rename from src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorInput.Json.g.cs rename to src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestError.Json.g.cs index a727996..3860d4b 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorInput.Json.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestError.Json.g.cs @@ -2,7 +2,7 @@ namespace TypeSafeAI.Generated { - public sealed partial class ValidationErrorInput + public sealed partial class HTTPBadRequestError { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::TypeSafeAI.Generated.ValidationErrorInput? FromJson( + public static global::TypeSafeAI.Generated.HTTPBadRequestError? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::TypeSafeAI.Generated.ValidationErrorInput), - jsonSerializerContext) as global::TypeSafeAI.Generated.ValidationErrorInput; + typeof(global::TypeSafeAI.Generated.HTTPBadRequestError), + jsonSerializerContext) as global::TypeSafeAI.Generated.HTTPBadRequestError; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::TypeSafeAI.Generated.ValidationErrorInput? FromJson( + public static global::TypeSafeAI.Generated.HTTPBadRequestError? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::TypeSafeAI.Generated.ValidationErrorInput? FromJson( + public static global::TypeSafeAI.Generated.HTTPBadRequestError? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::TypeSafeAI.Generated.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::TypeSafeAI.Generated.ValidationErrorInput), - jsonSerializerContext).ConfigureAwait(false)) as global::TypeSafeAI.Generated.ValidationErrorInput; + typeof(global::TypeSafeAI.Generated.HTTPBadRequestError), + jsonSerializerContext).ConfigureAwait(false)) as global::TypeSafeAI.Generated.HTTPBadRequestError; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::TypeSafeAI.Generated.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } @@ -176,7 +176,7 @@ public string ToRawJson( /// /// Deserializes raw JSON while preserving unknown JSON properties. /// - public static global::TypeSafeAI.Generated.ValidationErrorInput? FromRawUnchecked( + public static global::TypeSafeAI.Generated.HTTPBadRequestError? FromRawUnchecked( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { @@ -186,7 +186,7 @@ public string ToRawJson( /// /// Deserializes raw JSON while preserving unknown JSON properties using the generated default JsonSerializerContext. /// - public static global::TypeSafeAI.Generated.ValidationErrorInput? FromRawUnchecked( + public static global::TypeSafeAI.Generated.HTTPBadRequestError? FromRawUnchecked( string json) { return FromRawUnchecked( @@ -201,7 +201,7 @@ public string ToRawJson( [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::TypeSafeAI.Generated.ValidationErrorInput? FromRawUnchecked( + public static global::TypeSafeAI.Generated.HTTPBadRequestError? FromRawUnchecked( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestError.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestError.g.cs new file mode 100644 index 0000000..da699fc --- /dev/null +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestError.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace TypeSafeAI.Generated +{ + /// + /// Application validation failures returned with HTTP status 400. + /// + public sealed partial class HTTPBadRequestError + { + /// + /// Explanation of the invalid request. String details and message fields are bounded, with shortened text ending with …. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::TypeSafeAI.Generated.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::TypeSafeAI.Generated.AnyOf Detail { get; set; } + + /// + /// Raw JSON 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. + /// + /// + /// Explanation of the invalid request. String details and message fields are bounded, with shortened text ending with …. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HTTPBadRequestError( + global::TypeSafeAI.Generated.AnyOf detail) + { + this.Detail = detail; + } + + /// + /// Initializes a new instance of the class. + /// + public HTTPBadRequestError() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestErrorDetail.Json.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestErrorDetail.Json.g.cs new file mode 100644 index 0000000..22afcde --- /dev/null +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestErrorDetail.Json.g.cs @@ -0,0 +1,218 @@ +#nullable enable + +namespace TypeSafeAI.Generated +{ + public sealed partial class HTTPBadRequestErrorDetail + { + /// + /// 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::TypeSafeAI.Generated.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::TypeSafeAI.Generated.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::TypeSafeAI.Generated.HTTPBadRequestErrorDetail? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::TypeSafeAI.Generated.HTTPBadRequestErrorDetail), + jsonSerializerContext) as global::TypeSafeAI.Generated.HTTPBadRequestErrorDetail; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TypeSafeAI.Generated.HTTPBadRequestErrorDetail? FromJson( + string json) + { + return FromJson( + json, + global::TypeSafeAI.Generated.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::TypeSafeAI.Generated.HTTPBadRequestErrorDetail? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TypeSafeAI.Generated.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::TypeSafeAI.Generated.HTTPBadRequestErrorDetail), + jsonSerializerContext).ConfigureAwait(false)) as global::TypeSafeAI.Generated.HTTPBadRequestErrorDetail; + } + + /// + /// 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::TypeSafeAI.Generated.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::TypeSafeAI.Generated.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + + /// + /// Serializes the current instance to raw JSON using the provided JsonSerializerContext. + /// + public string ToRawJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return ToJson(jsonSerializerContext); + } + + /// + /// Serializes the current instance to raw JSON using the generated default JsonSerializerContext. + /// + public string ToRawJson() + { + return ToRawJson(global::TypeSafeAI.Generated.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to raw JSON 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 ToRawJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToRawJson(global::TypeSafeAI.Generated.SourceGenerationContext.Default); + } + + return ToJson(jsonSerializerOptions); + } + + /// + /// Deserializes raw JSON while preserving unknown JSON properties. + /// + public static global::TypeSafeAI.Generated.HTTPBadRequestErrorDetail? FromRawUnchecked( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return FromJson(json, jsonSerializerContext); + } + + /// + /// Deserializes raw JSON while preserving unknown JSON properties using the generated default JsonSerializerContext. + /// + public static global::TypeSafeAI.Generated.HTTPBadRequestErrorDetail? FromRawUnchecked( + string json) + { + return FromRawUnchecked( + json, + global::TypeSafeAI.Generated.SourceGenerationContext.Default); + } + + /// + /// Deserializes raw JSON while preserving unknown JSON properties. + /// +#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::TypeSafeAI.Generated.HTTPBadRequestErrorDetail? FromRawUnchecked( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromRawUnchecked( + json, + global::TypeSafeAI.Generated.SourceGenerationContext.Default); + } + + return FromJson(json, jsonSerializerOptions); + } + } +} diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorInput.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestErrorDetail.g.cs similarity index 84% rename from src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorInput.g.cs rename to src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestErrorDetail.g.cs index 934d2a2..430466b 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorInput.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.HTTPBadRequestErrorDetail.g.cs @@ -4,9 +4,9 @@ namespace TypeSafeAI.Generated { /// - /// The input value that failed validation. + /// /// - public sealed partial class ValidationErrorInput + public sealed partial class HTTPBadRequestErrorDetail { /// diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationError.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationError.g.cs index 09024f0..bb5f195 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationError.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationError.g.cs @@ -9,14 +9,14 @@ namespace TypeSafeAI.Generated public sealed partial class ValidationError { /// - /// Path to the invalid value: the request location followed by field names and array indices. + /// Path to the invalid value: the request location followed by field names and array indices. May be empty. /// [global::System.Text.Json.Serialization.JsonPropertyName("loc")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList> Loc { get; set; } /// - /// Human-readable explanation of the validation failure. + /// Human-readable explanation of the validation failure. May be shortened with …. /// [global::System.Text.Json.Serialization.JsonPropertyName("msg")] [global::System.Text.Json.Serialization.JsonRequired] @@ -30,13 +30,13 @@ public sealed partial class ValidationError public required string Type { get; set; } /// - /// The input value that failed validation. + /// Text preview of the rejected input. May be shortened with …. /// [global::System.Text.Json.Serialization.JsonPropertyName("input")] - public object? Input { get; set; } + public string? Input { get; set; } /// - /// Additional context used to explain the validation failure. + /// Additional context used to explain the validation failure. Entries may be omitted or shortened. /// [global::System.Text.Json.Serialization.JsonPropertyName("ctx")] public object? Ctx { get; set; } @@ -51,19 +51,19 @@ public sealed partial class ValidationError /// Initializes a new instance of the class. /// /// - /// Path to the invalid value: the request location followed by field names and array indices. + /// Path to the invalid value: the request location followed by field names and array indices. May be empty. /// /// - /// Human-readable explanation of the validation failure. + /// Human-readable explanation of the validation failure. May be shortened with …. /// /// /// Machine-readable validation error code. /// /// - /// The input value that failed validation. + /// Text preview of the rejected input. May be shortened with …. /// /// - /// Additional context used to explain the validation failure. + /// Additional context used to explain the validation failure. Entries may be omitted or shortened. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -72,7 +72,7 @@ public ValidationError( global::System.Collections.Generic.IList> loc, string msg, string type, - object? input, + string? input, object? ctx) { this.Loc = loc ?? throw new global::System.ArgumentNullException(nameof(loc)); diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorCtx.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorCtx.g.cs index 9c3370b..645ea9b 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorCtx.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.ValidationErrorCtx.g.cs @@ -4,7 +4,7 @@ namespace TypeSafeAI.Generated { /// - /// Additional context used to explain the validation failure. + /// Additional context used to explain the validation failure. Entries may be omitted or shortened. /// public sealed partial class ValidationErrorCtx { diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs index 44ccbd5..0d9ca85 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs @@ -319,6 +319,43 @@ partial void ProcessModelsV1V1ModelsGetResponseContent( retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::TypeSafeAI.Generated.HTTPBadRequestError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::TypeSafeAI.Generated.HTTPBadRequestError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::TypeSafeAI.Generated.HTTPBadRequestError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::TypeSafeAI.Generated.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Validation Error if ((int)__response.StatusCode == 422) { diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs index 0aa8f0b..25ce793 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs @@ -371,6 +371,43 @@ partial void ProcessSystemoneV1SystemonePostResponseContent( retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::TypeSafeAI.Generated.HTTPBadRequestError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::TypeSafeAI.Generated.HTTPBadRequestError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::TypeSafeAI.Generated.HTTPBadRequestError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::TypeSafeAI.Generated.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Validation Error if ((int)__response.StatusCode == 422) { diff --git a/src/libs/TypeSafeAI/openapi.yaml b/src/libs/TypeSafeAI/openapi.yaml index f4d3196..25f234c 100644 --- a/src/libs/TypeSafeAI/openapi.yaml +++ b/src/libs/TypeSafeAI/openapi.yaml @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"TypeSafe","description":"Ask yes/no questions, evaluate statements, select choices, or assign ratings to your content. Send your API key in the Authorization header as `Bearer `. Use GET /v1/models to discover available model names.","version":"0.2.0"},"servers":[{"url":"https://api.typesafe.ai"}],"paths":{"/v1/models":{"get":{"summary":"List models","description":"List the models and aliases available to the authenticated account.\n\nPass a returned model name as `model` in a POST /v1/systemone request.","operationId":"models_v1_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMetadataList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/systemone":{"post":{"summary":"System One","description":"Answer one or more questions about the content supplied in `state`.\n\nYou can mix question types in one request. Answers use the same names as the\nquestions, so you can match each result to its question. The response also includes\nthe model used and token usage.","operationId":"systemone_v1_systemone_post","parameters":[{"name":"TypeSafe-Danger-Zone-Images","in":"header","description":"Set to true to use assets or box questions.","schema":{"type":"string","enum":["true"]},"example":"true"},{"name":"TypeSafe-Danger-Zone-Long-Context","in":"header","description":"Set to true to use long context.","schema":{"type":"string","enum":["true"]},"example":"true"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneRequest"},"examples":{"noul":{"summary":"Noul","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"billing":{"type":"noul","instructions":"Is this message about billing?"}}}},"choice":{"summary":"Choice","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"tone":{"type":"choice","instructions":"What is the tone of this message?","criteria":{"angry":"An upset or hostile message","calm":"A neutral or polite message","excited":"An enthusiastic or eager message"}}}}},"score":{"summary":"Score","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"urgency":{"type":"score","instructions":"How urgent is this message?","criteria":["Can wait","Needs attention this week","Needs attention today"]}}}},"box":{"summary":"Box (requires TypeSafe-Danger-Zone-Images: true)","value":{"model":"jev-preview","state":"photo","questions":{"red_rectangle":{"type":"box","instructions":"Locate the red rectangle."}},"assets":{"photo":{"type":"image","format":"png","data_base64":"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAHElEQVR4nGP4TyJgoKcGBgbsaFQDfTUQB4aDBgDAen2fpitsVAAAAABJRU5ErkJggg=="}}}}}},"multipart/form-data":{"schema":{"type":"object","description":"The JSON request as the first part, named request, then each image as its own part. Every image part needs a unique, non-empty name and must be used by exactly one asset's part.","properties":{"request":{"description":"The JSON request, as the first part.","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/SystemOneRequest"}}},"required":["request"],"additionalProperties":{"type":"string","description":"An image, named by the asset part that uses it.","contentMediaType":"image/*"}},"encoding":{"request":{"contentType":"application/json"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneResponse"},"examples":{"noul":{"summary":"Noul","value":{"model":"jev-latest","answers":{"billing":{"type":"noul","noul":0.98}},"usage":{"input_tokens":120,"output_tokens":12}}},"choice":{"summary":"Choice","value":{"model":"jev-latest","answers":{"tone":{"type":"choice","choice":"calm","confidence":0.7,"probabilities":{"angry":0.15,"calm":0.8,"excited":0.05}}},"usage":{"input_tokens":120,"output_tokens":12}}},"score":{"summary":"Score","value":{"model":"jev-latest","answers":{"urgency":{"type":"score","score":1.7,"confidence":0.55,"legend":{"0":"Can wait","1":"Needs attention this week","2":"Needs attention today"},"probabilities":{"0":0.1,"1":0.1,"2":0.8}}},"usage":{"input_tokens":120,"output_tokens":12}}},"box":{"summary":"Box","value":{"model":"jev-preview","answers":{"red_rectangle":{"type":"box","box":{"top":0.2,"bottom":0.66,"left":0.19,"right":0.68},"confidence":null}},"usage":{"input_tokens":285,"output_tokens":20}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"Answer":{"oneOf":[{"$ref":"#/components/schemas/NoulAnswer","title":"Noul"},{"$ref":"#/components/schemas/ChoiceAnswer","title":"Choice"},{"$ref":"#/components/schemas/ScoreAnswer","title":"Score"},{"$ref":"#/components/schemas/BoxAnswer","title":"Box"}],"discriminator":{"propertyName":"type","mapping":{"noul":"#/components/schemas/NoulAnswer","choice":"#/components/schemas/ChoiceAnswer","score":"#/components/schemas/ScoreAnswer","box":"#/components/schemas/BoxAnswer"}},"description":"An answer whose type matches the corresponding question."},"Asset":{"properties":{"type":{"type":"string","const":"image","title":"Type","description":"Identifies an image asset."},"format":{"type":"string","enum":["png","jpg","jpeg"],"title":"Format","description":"The image format, required with data_base64. The actual format is detected from the bytes."},"data_base64":{"type":"string","title":"Data Base64","description":"Base64-encoded image data."},"part":{"type":"string","title":"Part","description":"In a multipart request, the name of the image part this asset uses. With part, data_base64 is ignored."}},"type":"object","title":"Asset","description":"An image that replaces its placeholder: its bytes in data_base64 with their format, or, in a multipart request, the name of the image part that holds them. Requests with images must send the header TypeSafe-Danger-Zone-Images: true."},"BoxAnswer":{"properties":{"type":{"type":"string","const":"box","title":"Type","description":"Identifies a box answer.","examples":["box"]},"box":{"$ref":"#/components/schemas/BoxCoordinates","description":"The box's edges as fractions of image height and width, from 0 to 1. Each coordinate is the expected value of its edge's predicted position.","examples":[{"bottom":0.66,"left":0.19,"right":0.68,"top":0.2}]},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"Confidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence.","examples":[null,0.9]}},"type":"object","required":["type","box","confidence"],"title":"BoxAnswer","description":"A located box with normalized edge coordinates and confidence."},"BoxCoordinates":{"properties":{"top":{"type":"number","title":"Top","description":"Top edge of the box, as a fraction of image height from the top (0-1).","examples":[0.2]},"bottom":{"type":"number","title":"Bottom","description":"Bottom edge of the box, as a fraction of image height from the top (0-1).","examples":[0.66]},"left":{"type":"number","title":"Left","description":"Left edge of the box, as a fraction of image width from the left (0-1).","examples":[0.19]},"right":{"type":"number","title":"Right","description":"Right edge of the box, as a fraction of image width from the left (0-1).","examples":[0.68]}},"type":"object","required":["top","bottom","left","right"],"title":"BoxCoordinates","description":"Normalized box edges. Vertical coordinates are measured from the top of the image; horizontal coordinates are measured from the left."},"BoxQuestion":{"properties":{"type":{"type":"string","const":"box","title":"Type","description":"Identifies a box question."},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What to locate in the image."}},"type":"object","required":["type"],"title":"BoxQuestion","description":"A question that locates what its instructions describe in the request's image. Requests with box questions must send the header TypeSafe-Danger-Zone-Images: true."},"ChoiceAnswer":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a selection from the requested choices.","examples":["choice"]},"choice":{"type":"string","title":"Choice","description":"The name of the choice with the highest probability among the question's criteria.","examples":["angry"]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.","examples":[0.9]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"angry":0.8,"calm":0.1,"excited":0.1}]}},"type":"object","required":["type","choice","confidence","probabilities"],"title":"ChoiceAnswer","description":"The selected choice, confidence, and probabilities for a choice question."},"ChoiceQuestion":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a question that selects one of the choices in criteria.","examples":["choice"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What the model should decide when choosing an option.","examples":["What is the tone of this message?"]},"criteria":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array"},"type":"object","minProperties":1,"maxProperties":255,"title":"Criteria","description":"Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.","examples":[{"angry":"An upset or hostile message","calm":"A neutral or polite message","excited":"An enthusiastic or eager message"}]}},"type":"object","required":["type","criteria"],"title":"ChoiceQuestion","description":"A question that selects one option from the choices you define."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail","description":"Validation errors describing which request values are missing or invalid.","examples":[[{"loc":["body","state"],"msg":"Field required","type":"missing"}]]}},"type":"object","title":"HTTPValidationError","description":"Request validation failures returned with HTTP status 422."},"ModelMetadata":{"properties":{"name":{"type":"string","title":"Name","description":"Model name or alias accepted by the request's model field.","examples":["jev-latest"]},"description":{"type":"string","title":"Description","description":"Human-readable description of the model and its capabilities.","examples":["General-purpose system one model."]},"release_date":{"type":"string","title":"Release Date","description":"Model release date, formatted as YYYY-MM-DD.","examples":["2026-09-15"]}},"type":"object","required":["name","description","release_date"],"title":"ModelMetadata","description":"A model or model alias available to the authenticated account."},"ModelMetadataList":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelMetadata"},"type":"array","title":"Models","description":"Available models and aliases. Use a model's name in POST /v1/systemone requests.","examples":[[{"description":"General-purpose system one model.","name":"jev-latest","release_date":"2026-09-15"}]]}},"type":"object","required":["models"],"title":"ModelMetadataList","description":"Models and aliases available to the authenticated account."},"NoulAnswer":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no answer.","examples":["noul"]},"noul":{"type":"number","title":"Noul","description":"Probability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty.","examples":[0.98]}},"type":"object","required":["type","noul"],"title":"NoulAnswer","description":"The probability of a yes answer or a true statement."},"NoulCriteria":{"properties":{"true":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"True","description":"What counts as a yes answer.","examples":["The message is unsolicited advertising."]},"false":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"False","description":"What counts as a no answer.","examples":["The message is a legitimate conversation."]}},"type":"object","title":"NoulCriteria","description":"Criteria defining what counts as a yes or no answer."},"NoulQuestion":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no question or statement.","examples":["noul"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"The yes/no question or statement to evaluate.","examples":["Is this message spam?","This message contains unsolicited advertising.",{"task":"Identify unsolicited advertising."}]},"criteria":{"anyOf":[{"$ref":"#/components/schemas/NoulCriteria"},{"type":"null"}],"description":"Criteria clarifying what counts as a yes or no answer.","examples":[{"false":"A legitimate conversation","true":"Unsolicited advertising"}]}},"type":"object","required":["type"],"title":"NoulQuestion","description":"A yes/no question or statement, answered with the probability of yes or true."},"Question":{"oneOf":[{"$ref":"#/components/schemas/NoulQuestion","title":"Noul"},{"$ref":"#/components/schemas/ChoiceQuestion","title":"Choice"},{"$ref":"#/components/schemas/ScoreQuestion","title":"Score"},{"$ref":"#/components/schemas/BoxQuestion","title":"Box"}],"discriminator":{"propertyName":"type","mapping":{"noul":"#/components/schemas/NoulQuestion","choice":"#/components/schemas/ChoiceQuestion","score":"#/components/schemas/ScoreQuestion","box":"#/components/schemas/BoxQuestion"}},"description":"A question about the supplied content."},"ScoreAnswer":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a rating against the requested score levels.","examples":["score"]},"score":{"type":"number","title":"Score","description":"Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.","examples":[1.7]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.","examples":[0.9]},"legend":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array"},"type":"object","title":"Legend","description":"The requested criteria mapped to their score levels, so you can interpret the score.","examples":[{"0":"Can wait","1":"Needs attention this week","2":"Needs attention today"}]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"0":0.1,"1":0.1,"2":0.8}]}},"type":"object","required":["type","score","confidence","legend","probabilities"],"title":"ScoreAnswer","description":"An expected score with its rubric, confidence, and score-level probabilities."},"ScoreQuestion":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a question that rates the content using the levels in criteria.","examples":["score"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What the model should rate.","examples":["How urgent is this message?"]},"criteria":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array"},"type":"array","minItems":1,"maxItems":10,"title":"Criteria","description":"Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.","examples":[["Can wait","Needs attention this week","Needs attention today"]]}},"type":"object","required":["type","criteria"],"title":"ScoreQuestion","description":"A question that assigns a score using an ordered rubric."},"SystemOneRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Name or alias of the model to use. Available names are returned by GET /v1/models.","examples":["jev-latest"]},"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array","title":"State","description":"The content all questions in this request refer to.","examples":["I was charged twice. Please help.",{"message":"Please help.","subject":"Duplicate charge"}]},"questions":{"additionalProperties":{"$ref":"#/components/schemas/Question"},"type":"object","minProperties":1,"title":"Questions","description":"Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.","examples":[{"billing":{"instructions":"Is this message about billing?","type":"noul"}}]},"assets":{"additionalProperties":{"$ref":"#/components/schemas/Asset"},"type":"object","minProperties":1,"title":"Assets","description":"Media assets keyed by an opaque placeholder (recommend a per-image UUID). Each placeholder, wherever it appears as or inside a string in state, question instructions, or criteria, is replaced with the asset. Image assets require a vision-language model."}},"type":"object","required":["model","state","questions"],"title":"SystemOneRequest","description":"Content and named questions to evaluate together using a TypeSafe model."},"SystemOneResponse":{"properties":{"model":{"type":"string","title":"Model","description":"Name of the model that answered the questions. May differ from the alias supplied in the request.","examples":["jev-latest"]},"answers":{"additionalProperties":{"$ref":"#/components/schemas/Answer"},"type":"object","minProperties":1,"title":"Answers","description":"Answers keyed by the question names supplied in the request. Each answer's type matches its question's type.","examples":[{"billing":{"noul":0.98,"type":"noul"}}]},"usage":{"$ref":"#/components/schemas/Usage","description":"Input and output token counts for this evaluation.","examples":[{"input_tokens":120,"output_tokens":12}]}},"type":"object","required":["model","answers","usage"],"title":"SystemOneResponse","description":"Answers grouped by question name, with the model used and token usage."},"Usage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Number of billable input tokens used to evaluate the request.","examples":[120]},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Number of output tokens used to answer the questions. Output tokens are currently free of charge.","examples":[12]}},"type":"object","required":["input_tokens","output_tokens"],"title":"Usage","description":"Token usage for the request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location","description":"Path to the invalid value: the request location followed by field names and array indices.","examples":[["body","questions","urgency","score","criteria"]]},"msg":{"type":"string","title":"Message","description":"Human-readable explanation of the validation failure.","examples":["Field required"]},"type":{"type":"string","title":"Error Type","description":"Machine-readable validation error code.","examples":["missing"]},"input":{"title":"Input","description":"The input value that failed validation.","examples":[{"type":"score"}]},"ctx":{"type":"object","title":"Context","description":"Additional context used to explain the validation failure.","examples":[{"min_length":1}]}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","description":"A request validation error at a specific field or array element."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"TypeSafe","description":"Ask yes/no questions, evaluate statements, select choices, or assign ratings to your content. Send your API key in the Authorization header as `Bearer `. Use GET /v1/models to discover available model names.","version":"0.2.0"},"servers":[{"url":"https://api.typesafe.ai"}],"paths":{"/v1/models":{"get":{"summary":"List models","description":"List the models and aliases available to the authenticated account.\n\nPass a returned model name as `model` in a POST /v1/systemone request.","operationId":"models_v1_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMetadataList"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPBadRequestError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/systemone":{"post":{"summary":"System One","description":"Answer one or more questions about the content supplied in `state`.\n\nYou can mix question types in one request. Answers use the same names as the\nquestions, so you can match each result to its question. The response also includes\nthe model used and token usage.","operationId":"systemone_v1_systemone_post","parameters":[{"name":"TypeSafe-Danger-Zone-Images","in":"header","description":"Set to true to use assets or box questions.","schema":{"type":"string","enum":["true"]},"example":"true"},{"name":"TypeSafe-Danger-Zone-Long-Context","in":"header","description":"Set to true to use long context.","schema":{"type":"string","enum":["true"]},"example":"true"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneRequest"},"examples":{"noul":{"summary":"Noul","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"billing":{"type":"noul","instructions":"Is this message about billing?"}}}},"choice":{"summary":"Choice","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"tone":{"type":"choice","instructions":"What is the tone of this message?","criteria":{"angry":"An upset or hostile message","calm":"A neutral or polite message","excited":"An enthusiastic or eager message"}}}}},"score":{"summary":"Score","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"urgency":{"type":"score","instructions":"How urgent is this message?","criteria":["Can wait","Needs attention this week","Needs attention today"]}}}},"box":{"summary":"Box (requires TypeSafe-Danger-Zone-Images: true)","value":{"model":"jev-preview","state":"photo","questions":{"red_rectangle":{"type":"box","instructions":"Locate the red rectangle."}},"assets":{"photo":{"type":"image","format":"png","data_base64":"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAHElEQVR4nGP4TyJgoKcGBgbsaFQDfTUQB4aDBgDAen2fpitsVAAAAABJRU5ErkJggg=="}}}}}},"multipart/form-data":{"schema":{"type":"object","description":"The JSON request as the first part, named request, then each image as its own part. Every image part needs a unique, non-empty name and must be used by exactly one asset's part.","properties":{"request":{"description":"The JSON request, as the first part.","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/SystemOneRequest"}}},"required":["request"],"additionalProperties":{"type":"string","description":"An image, named by the asset part that uses it.","contentMediaType":"image/*"}},"encoding":{"request":{"contentType":"application/json"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneResponse"},"examples":{"noul":{"summary":"Noul","value":{"model":"jev-latest","answers":{"billing":{"type":"noul","noul":0.98}},"usage":{"input_tokens":120,"output_tokens":12}}},"choice":{"summary":"Choice","value":{"model":"jev-latest","answers":{"tone":{"type":"choice","choice":"calm","confidence":0.7,"probabilities":{"angry":0.15,"calm":0.8,"excited":0.05}}},"usage":{"input_tokens":120,"output_tokens":12}}},"score":{"summary":"Score","value":{"model":"jev-latest","answers":{"urgency":{"type":"score","score":1.7,"confidence":0.55,"legend":{"0":"Can wait","1":"Needs attention this week","2":"Needs attention today"},"probabilities":{"0":0.1,"1":0.1,"2":0.8}}},"usage":{"input_tokens":120,"output_tokens":12}}},"box":{"summary":"Box","value":{"model":"jev-preview","answers":{"red_rectangle":{"type":"box","box":{"top":0.2,"bottom":0.66,"left":0.19,"right":0.68},"confidence":null}},"usage":{"input_tokens":285,"output_tokens":20}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPBadRequestError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"Answer":{"oneOf":[{"$ref":"#/components/schemas/NoulAnswer","title":"Noul"},{"$ref":"#/components/schemas/ChoiceAnswer","title":"Choice"},{"$ref":"#/components/schemas/ScoreAnswer","title":"Score"},{"$ref":"#/components/schemas/BoxAnswer","title":"Box"}],"discriminator":{"propertyName":"type","mapping":{"noul":"#/components/schemas/NoulAnswer","choice":"#/components/schemas/ChoiceAnswer","score":"#/components/schemas/ScoreAnswer","box":"#/components/schemas/BoxAnswer"}},"description":"An answer whose type matches the corresponding question."},"Asset":{"properties":{"type":{"type":"string","const":"image","title":"Type","description":"Identifies an image asset."},"format":{"type":"string","enum":["png","jpg","jpeg"],"title":"Format","description":"The image format, required with data_base64. The actual format is detected from the bytes."},"data_base64":{"type":"string","title":"Data Base64","description":"Base64-encoded image data."},"part":{"type":"string","title":"Part","description":"In a multipart request, the name of the image part this asset uses. With part, data_base64 is ignored."}},"type":"object","title":"Asset","description":"An image that replaces its placeholder: its bytes in data_base64 with their format, or, in a multipart request, the name of the image part that holds them. Requests with images must send the header TypeSafe-Danger-Zone-Images: true."},"BoxAnswer":{"properties":{"type":{"type":"string","const":"box","title":"Type","description":"Identifies a box answer.","examples":["box"]},"box":{"$ref":"#/components/schemas/BoxCoordinates","description":"The box's edges as fractions of image height and width, from 0 to 1. Each coordinate is the expected value of its edge's predicted position.","examples":[{"bottom":0.66,"left":0.19,"right":0.68,"top":0.2}]},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"Confidence for the given box, from 0 to 1, with 1 being more confident. Null when the model does not provide confidence.","examples":[null,0.9]}},"type":"object","required":["type","box","confidence"],"title":"BoxAnswer","description":"A located box with normalized edge coordinates and confidence."},"BoxCoordinates":{"properties":{"top":{"type":"number","title":"Top","description":"Top edge of the box, as a fraction of image height from the top (0-1).","examples":[0.2]},"bottom":{"type":"number","title":"Bottom","description":"Bottom edge of the box, as a fraction of image height from the top (0-1).","examples":[0.66]},"left":{"type":"number","title":"Left","description":"Left edge of the box, as a fraction of image width from the left (0-1).","examples":[0.19]},"right":{"type":"number","title":"Right","description":"Right edge of the box, as a fraction of image width from the left (0-1).","examples":[0.68]}},"type":"object","required":["top","bottom","left","right"],"title":"BoxCoordinates","description":"Normalized box edges. Vertical coordinates are measured from the top of the image; horizontal coordinates are measured from the left."},"BoxQuestion":{"properties":{"type":{"type":"string","const":"box","title":"Type","description":"Identifies a box question."},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What to locate in the image."}},"type":"object","required":["type"],"title":"BoxQuestion","description":"A question that locates what its instructions describe in the request's image. Requests with box questions must send the header TypeSafe-Danger-Zone-Images: true."},"ChoiceAnswer":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a selection from the requested choices.","examples":["choice"]},"choice":{"type":"string","title":"Choice","description":"The name of the choice with the highest probability among the question's criteria.","examples":["angry"]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.","examples":[0.9]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"angry":0.8,"calm":0.1,"excited":0.1}]}},"type":"object","required":["type","choice","confidence","probabilities"],"title":"ChoiceAnswer","description":"The selected choice, confidence, and probabilities for a choice question."},"ChoiceQuestion":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a question that selects one of the choices in criteria.","examples":["choice"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What the model should decide when choosing an option.","examples":["What is the tone of this message?"]},"criteria":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array"},"type":"object","minProperties":1,"maxProperties":255,"title":"Criteria","description":"Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.","examples":[{"angry":"An upset or hostile message","calm":"A neutral or polite message","excited":"An enthusiastic or eager message"}]}},"type":"object","required":["type","criteria"],"title":"ChoiceQuestion","description":"A question that selects one option from the choices you define."},"HTTPBadRequestError":{"type":"object","title":"HTTPBadRequestError","required":["detail"],"description":"Application validation failures returned with HTTP status 400.","properties":{"detail":{"title":"Detail","anyOf":[{"type":"string"},{"type":"object","additionalProperties":true}],"description":"Explanation of the invalid request. String details and message fields are bounded, with shortened text ending with …."}}},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail","description":"Validation errors describing which request values are missing or invalid.","examples":[[{"loc":["body","state"],"msg":"Field required","type":"missing"}]]}},"type":"object","title":"HTTPValidationError","description":"Request validation failures returned with HTTP status 422."},"ModelMetadata":{"properties":{"name":{"type":"string","title":"Name","description":"Model name or alias accepted by the request's model field.","examples":["jev-latest"]},"description":{"type":"string","title":"Description","description":"Human-readable description of the model and its capabilities.","examples":["General-purpose system one model."]},"release_date":{"type":"string","title":"Release Date","description":"Model release date, formatted as YYYY-MM-DD.","examples":["2026-09-15"]}},"type":"object","required":["name","description","release_date"],"title":"ModelMetadata","description":"A model or model alias available to the authenticated account."},"ModelMetadataList":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelMetadata"},"type":"array","title":"Models","description":"Available models and aliases. Use a model's name in POST /v1/systemone requests.","examples":[[{"description":"General-purpose system one model.","name":"jev-latest","release_date":"2026-09-15"}]]}},"type":"object","required":["models"],"title":"ModelMetadataList","description":"Models and aliases available to the authenticated account."},"NoulAnswer":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no answer.","examples":["noul"]},"noul":{"type":"number","title":"Noul","description":"Probability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty.","examples":[0.98]}},"type":"object","required":["type","noul"],"title":"NoulAnswer","description":"The probability of a yes answer or a true statement."},"NoulCriteria":{"properties":{"true":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"True","description":"What counts as a yes answer.","examples":["The message is unsolicited advertising."]},"false":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"False","description":"What counts as a no answer.","examples":["The message is a legitimate conversation."]}},"type":"object","title":"NoulCriteria","description":"Criteria defining what counts as a yes or no answer."},"NoulQuestion":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no question or statement.","examples":["noul"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"The yes/no question or statement to evaluate.","examples":["Is this message spam?","This message contains unsolicited advertising.",{"task":"Identify unsolicited advertising."}]},"criteria":{"anyOf":[{"$ref":"#/components/schemas/NoulCriteria"},{"type":"null"}],"description":"Criteria clarifying what counts as a yes or no answer.","examples":[{"false":"A legitimate conversation","true":"Unsolicited advertising"}]}},"type":"object","required":["type"],"title":"NoulQuestion","description":"A yes/no question or statement, answered with the probability of yes or true."},"Question":{"oneOf":[{"$ref":"#/components/schemas/NoulQuestion","title":"Noul"},{"$ref":"#/components/schemas/ChoiceQuestion","title":"Choice"},{"$ref":"#/components/schemas/ScoreQuestion","title":"Score"},{"$ref":"#/components/schemas/BoxQuestion","title":"Box"}],"discriminator":{"propertyName":"type","mapping":{"noul":"#/components/schemas/NoulQuestion","choice":"#/components/schemas/ChoiceQuestion","score":"#/components/schemas/ScoreQuestion","box":"#/components/schemas/BoxQuestion"}},"description":"A question about the supplied content."},"ScoreAnswer":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a rating against the requested score levels.","examples":["score"]},"score":{"type":"number","title":"Score","description":"Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.","examples":[1.7]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.","examples":[0.9]},"legend":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array"},"type":"object","title":"Legend","description":"The requested criteria mapped to their score levels, so you can interpret the score.","examples":[{"0":"Can wait","1":"Needs attention this week","2":"Needs attention today"}]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"0":0.1,"1":0.1,"2":0.8}]}},"type":"object","required":["type","score","confidence","legend","probabilities"],"title":"ScoreAnswer","description":"An expected score with its rubric, confidence, and score-level probabilities."},"ScoreQuestion":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a question that rates the content using the levels in criteria.","examples":["score"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What the model should rate.","examples":["How urgent is this message?"]},"criteria":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array"},"type":"array","minItems":1,"maxItems":10,"title":"Criteria","description":"Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.","examples":[["Can wait","Needs attention this week","Needs attention today"]]}},"type":"object","required":["type","criteria"],"title":"ScoreQuestion","description":"A question that assigns a score using an ordered rubric."},"SystemOneRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Name or alias of the model to use. Available names are returned by GET /v1/models.","examples":["jev-latest"]},"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array","title":"State","description":"The content all questions in this request refer to.","examples":["I was charged twice. Please help.",{"message":"Please help.","subject":"Duplicate charge"}]},"questions":{"additionalProperties":{"$ref":"#/components/schemas/Question"},"type":"object","minProperties":1,"title":"Questions","description":"Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.","examples":[{"billing":{"instructions":"Is this message about billing?","type":"noul"}}]},"assets":{"additionalProperties":{"$ref":"#/components/schemas/Asset"},"type":"object","minProperties":1,"title":"Assets","description":"Media assets keyed by an opaque placeholder (recommend a per-image UUID). Each placeholder, wherever it appears as or inside a string in state, question instructions, or criteria, is replaced with the asset. Image assets require a vision-language model."}},"type":"object","required":["model","state","questions"],"title":"SystemOneRequest","description":"Content and named questions to evaluate together using a TypeSafe model."},"SystemOneResponse":{"properties":{"model":{"type":"string","title":"Model","description":"Name of the model that answered the questions. May differ from the alias supplied in the request.","examples":["jev-latest"]},"answers":{"additionalProperties":{"$ref":"#/components/schemas/Answer"},"type":"object","minProperties":1,"title":"Answers","description":"Answers keyed by the question names supplied in the request. Each answer's type matches its question's type.","examples":[{"billing":{"noul":0.98,"type":"noul"}}]},"usage":{"$ref":"#/components/schemas/Usage","description":"Input and output token counts for this evaluation.","examples":[{"input_tokens":120,"output_tokens":12}]}},"type":"object","required":["model","answers","usage"],"title":"SystemOneResponse","description":"Answers grouped by question name, with the model used and token usage."},"Usage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Number of billable input tokens used to evaluate the request.","examples":[120]},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Number of output tokens used to answer the questions. Output tokens are currently free of charge.","examples":[12]}},"type":"object","required":["input_tokens","output_tokens"],"title":"Usage","description":"Token usage for the request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location","description":"Path to the invalid value: the request location followed by field names and array indices. May be empty.","examples":[["body","questions","urgency","score","criteria"]]},"msg":{"type":"string","title":"Message","description":"Human-readable explanation of the validation failure. May be shortened with ….","examples":["Field required"]},"type":{"type":"string","title":"Error Type","description":"Machine-readable validation error code.","examples":["missing"]},"input":{"type":"string","title":"Input","description":"Text preview of the rejected input. May be shortened with ….","examples":["{\"type\":\"score\"}"]},"ctx":{"type":"object","title":"Context","description":"Additional context used to explain the validation failure. Entries may be omitted or shortened.","examples":[{"min_length":1}]}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","description":"A request validation error at a specific field or array element."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}} \ No newline at end of file