diff --git a/src/libs/Photoroom/Generated/Photoroom.IPhotoroomClient.VisualQa.g.cs b/src/libs/Photoroom/Generated/Photoroom.IPhotoroomClient.VisualQa.g.cs
index 59f3004..e0f0ad5 100644
--- a/src/libs/Photoroom/Generated/Photoroom.IPhotoroomClient.VisualQa.g.cs
+++ b/src/libs/Photoroom/Generated/Photoroom.IPhotoroomClient.VisualQa.g.cs
@@ -61,6 +61,10 @@ public partial interface IPhotoroomClient
/// Features to run, as an array or a comma-separated string (e.g. "aiGenerated,text"). If omitted, you still receive the caption and metadata.
/// Example: [aiGenerated, text]
///
+ ///
+ /// Detect distinct clothing/footwear/accessory items in the image.
+ /// Default Value: false
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -72,6 +76,7 @@ public partial interface IPhotoroomClient
string? referenceImageFilename = default,
string? referenceImageUrl = default,
global::System.Collections.Generic.IList? features = default,
+ bool? clothingItemDetection = default,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Photoroom/Generated/Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategory.g.cs b/src/libs/Photoroom/Generated/Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategory.g.cs
new file mode 100644
index 0000000..c897970
--- /dev/null
+++ b/src/libs/Photoroom/Generated/Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategory.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Photoroom.JsonConverters
+{
+ ///
+ public sealed class VisualQaResponseClothingItemDetectionItemCategoryJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Photoroom.VisualQaResponseClothingItemDetectionItemCategoryExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Photoroom.VisualQaResponseClothingItemDetectionItemCategoryExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Photoroom/Generated/Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategoryNullable.g.cs b/src/libs/Photoroom/Generated/Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategoryNullable.g.cs
new file mode 100644
index 0000000..f74a8de
--- /dev/null
+++ b/src/libs/Photoroom/Generated/Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategoryNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Photoroom.JsonConverters
+{
+ ///
+ public sealed class VisualQaResponseClothingItemDetectionItemCategoryNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Photoroom.VisualQaResponseClothingItemDetectionItemCategoryExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Photoroom.VisualQaResponseClothingItemDetectionItemCategoryExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContext.g.cs b/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContext.g.cs
index 9eaca6c..23e5a61 100644
--- a/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContext.g.cs
+++ b/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContext.g.cs
@@ -181,6 +181,10 @@ namespace Photoroom
typeof(global::Photoroom.JsonConverters.EditImageGetVirtualModelSizeNullableJsonConverter),
+ typeof(global::Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategoryJsonConverter),
+
+ typeof(global::Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategoryNullableJsonConverter),
+
typeof(global::Photoroom.JsonConverters.AnyOfJsonConverter),
typeof(global::Photoroom.JsonConverters.AnyOfJsonConverter),
@@ -292,6 +296,10 @@ namespace Photoroom
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.AccountDetailsV2Response2))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.AccountDetailsV2ResponseError))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.VisualQaResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.VisualQaResponseClothingItemDetection))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.VisualQaResponseClothingItemDetectionItem))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory), TypeInfoPropertyName = "VisualQaResponseClothingItemDetectionItemCategory2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.VisualQaResponseMetadata))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.VisualQaResponseFeatures))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.VisualQaResponseFeaturesAiGenerated))]
@@ -327,6 +335,7 @@ namespace Photoroom
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Photoroom.EditImagePostResponseError3))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
diff --git a/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContextTypes.g.cs b/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContextTypes.g.cs
index 0e5a9ba..7a121fe 100644
--- a/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Photoroom/Generated/Photoroom.JsonSerializerContextTypes.g.cs
@@ -404,135 +404,151 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Photoroom.VisualQaResponseMetadata? Type94 { get; set; }
+ public global::Photoroom.VisualQaResponseClothingItemDetection? Type94 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeatures? Type95 { get; set; }
+ public global::System.Collections.Generic.IList? Type95 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesAiGenerated? Type96 { get; set; }
+ public global::Photoroom.VisualQaResponseClothingItemDetectionItem? Type96 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesHate? Type97 { get; set; }
+ public global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory? Type97 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesViolence? Type98 { get; set; }
+ public global::Photoroom.VisualQaResponseMetadata? Type98 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesText? Type99 { get; set; }
+ public global::Photoroom.VisualQaResponseFeatures? Type99 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesOverallImageQuality? Type100 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesAiGenerated? Type100 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesHumanElements? Type101 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesHate? Type101 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesIsEcommerceProduct? Type102 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesViolence? Type102 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesIsFoodOrBeverage? Type103 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesText? Type103 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesCropped? Type104 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesOverallImageQuality? Type104 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesCroppedSubjectBoundingBox? Type105 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesHumanElements? Type105 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesShadowCastOverProduct? Type106 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesIsEcommerceProduct? Type106 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesFashionFidelity? Type107 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesIsFoodOrBeverage? Type107 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseFeaturesFoodFidelity? Type108 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesCropped? Type108 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponse2? Type109 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesCroppedSubjectBoundingBox? Type109 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseError? Type110 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesShadowCastOverProduct? Type110 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponse3? Type111 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesFashionFidelity? Type111 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseError2? Type112 { get; set; }
+ public global::Photoroom.VisualQaResponseFeaturesFoodFidelity? Type112 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponse4? Type113 { get; set; }
+ public global::Photoroom.VisualQaResponse2? Type113 { get; set; }
///
///
///
- public global::Photoroom.VisualQaResponseError3? Type114 { get; set; }
+ public global::Photoroom.VisualQaResponseError? Type114 { get; set; }
///
///
///
- public global::Photoroom.EditImageGetResponse? Type115 { get; set; }
+ public global::Photoroom.VisualQaResponse3? Type115 { get; set; }
///
///
///
- public global::Photoroom.EditImageGetResponseError? Type116 { get; set; }
+ public global::Photoroom.VisualQaResponseError2? Type116 { get; set; }
///
///
///
- public global::Photoroom.EditImageGetResponse2? Type117 { get; set; }
+ public global::Photoroom.VisualQaResponse4? Type117 { get; set; }
///
///
///
- public global::Photoroom.EditImageGetResponseError2? Type118 { get; set; }
+ public global::Photoroom.VisualQaResponseError3? Type118 { get; set; }
///
///
///
- public global::Photoroom.EditImageGetResponse3? Type119 { get; set; }
+ public global::Photoroom.EditImageGetResponse? Type119 { get; set; }
///
///
///
- public global::Photoroom.EditImageGetResponseError3? Type120 { get; set; }
+ public global::Photoroom.EditImageGetResponseError? Type120 { get; set; }
///
///
///
- public global::Photoroom.EditImagePostResponse? Type121 { get; set; }
+ public global::Photoroom.EditImageGetResponse2? Type121 { get; set; }
///
///
///
- public global::Photoroom.EditImagePostResponseError? Type122 { get; set; }
+ public global::Photoroom.EditImageGetResponseError2? Type122 { get; set; }
///
///
///
- public global::Photoroom.EditImagePostResponse2? Type123 { get; set; }
+ public global::Photoroom.EditImageGetResponse3? Type123 { get; set; }
///
///
///
- public global::Photoroom.EditImagePostResponseError2? Type124 { get; set; }
+ public global::Photoroom.EditImageGetResponseError3? Type124 { get; set; }
///
///
///
- public global::Photoroom.EditImagePostResponse3? Type125 { get; set; }
+ public global::Photoroom.EditImagePostResponse? Type125 { get; set; }
///
///
///
- public global::Photoroom.EditImagePostResponseError3? Type126 { get; set; }
+ public global::Photoroom.EditImagePostResponseError? Type126 { get; set; }
+ ///
+ ///
+ ///
+ public global::Photoroom.EditImagePostResponse2? Type127 { get; set; }
+ ///
+ ///
+ ///
+ public global::Photoroom.EditImagePostResponseError2? Type128 { get; set; }
+ ///
+ ///
+ ///
+ public global::Photoroom.EditImagePostResponse3? Type129 { get; set; }
+ ///
+ ///
+ ///
+ public global::Photoroom.EditImagePostResponseError3? Type130 { get; set; }
///
///
@@ -542,5 +558,9 @@ public sealed partial class JsonSerializerContextTypes
///
///
public global::System.Collections.Generic.List? ListType1 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType2 { get; set; }
}
}
\ No newline at end of file
diff --git a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaRequest.g.cs b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaRequest.g.cs
index 5192468..2e55b2e 100644
--- a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaRequest.g.cs
+++ b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaRequest.g.cs
@@ -56,6 +56,13 @@ public sealed partial class VisualQaRequest
[global::System.Text.Json.Serialization.JsonPropertyName("features")]
public global::System.Collections.Generic.IList? Features { get; set; }
+ ///
+ /// Detect distinct clothing/footwear/accessory items in the image.
+ /// Default Value: false
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("clothingItemDetection")]
+ public bool? ClothingItemDetection { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
@@ -89,6 +96,10 @@ public sealed partial class VisualQaRequest
/// Features to run, as an array or a comma-separated string (e.g. "aiGenerated,text"). If omitted, you still receive the caption and metadata.
/// Example: [aiGenerated, text]
///
+ ///
+ /// Detect distinct clothing/footwear/accessory items in the image.
+ /// Default Value: false
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
@@ -99,7 +110,8 @@ public VisualQaRequest(
byte[]? referenceImageFile,
string? referenceImageFilename,
string? referenceImageUrl,
- global::System.Collections.Generic.IList? features)
+ global::System.Collections.Generic.IList? features,
+ bool? clothingItemDetection)
{
this.ImageFile = imageFile;
this.ImageFilename = imageFilename;
@@ -108,6 +120,7 @@ public VisualQaRequest(
this.ReferenceImageFilename = referenceImageFilename;
this.ReferenceImageUrl = referenceImageUrl;
this.Features = features;
+ this.ClothingItemDetection = clothingItemDetection;
}
///
diff --git a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponse.g.cs b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponse.g.cs
index 829cef3..a2648dd 100644
--- a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponse.g.cs
+++ b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponse.g.cs
@@ -16,6 +16,12 @@ public sealed partial class VisualQaResponse
[global::System.Text.Json.Serialization.JsonPropertyName("caption")]
public string? Caption { get; set; }
+ ///
+ /// Distinct clothing, footwear, and accessory items detected in the image. Only present when clothingItemDetection is requested.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("clothingItemDetection")]
+ public global::Photoroom.VisualQaResponseClothingItemDetection? ClothingItemDetection { get; set; }
+
///
/// Basic image metadata.
///
@@ -49,15 +55,20 @@ public sealed partial class VisualQaResponse
/// A generated caption describing the image. Omitted if no caption could be produced.
/// Example: Three gold rings with blue stones on a marble surface.
///
+ ///
+ /// Distinct clothing, footwear, and accessory items detected in the image. Only present when clothingItemDetection is requested.
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public VisualQaResponse(
global::Photoroom.VisualQaResponseMetadata metadata,
global::Photoroom.VisualQaResponseFeatures features,
- string? caption)
+ string? caption,
+ global::Photoroom.VisualQaResponseClothingItemDetection? clothingItemDetection)
{
this.Caption = caption;
+ this.ClothingItemDetection = clothingItemDetection;
this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata));
this.Features = features ?? throw new global::System.ArgumentNullException(nameof(features));
}
diff --git a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetection.Json.g.cs b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetection.Json.g.cs
new file mode 100644
index 0000000..0486e78
--- /dev/null
+++ b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetection.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Photoroom
+{
+ public sealed partial class VisualQaResponseClothingItemDetection
+ {
+ ///
+ /// 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::Photoroom.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::Photoroom.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Photoroom.VisualQaResponseClothingItemDetection? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Photoroom.VisualQaResponseClothingItemDetection),
+ jsonSerializerContext) as global::Photoroom.VisualQaResponseClothingItemDetection;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Photoroom.VisualQaResponseClothingItemDetection? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Photoroom.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::Photoroom.VisualQaResponseClothingItemDetection? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Photoroom.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::Photoroom.VisualQaResponseClothingItemDetection),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Photoroom.VisualQaResponseClothingItemDetection;
+ }
+
+ ///
+ /// 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::Photoroom.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::Photoroom.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetection.g.cs b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetection.g.cs
new file mode 100644
index 0000000..4fb4ada
--- /dev/null
+++ b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetection.g.cs
@@ -0,0 +1,47 @@
+
+#nullable enable
+
+namespace Photoroom
+{
+ ///
+ /// Distinct clothing, footwear, and accessory items detected in the image. Only present when clothingItemDetection is requested.
+ ///
+ public sealed partial class VisualQaResponseClothingItemDetection
+ {
+ ///
+ /// Distinct clothing items, footwear, and accessories detected in the image, each with a short name and a category from a fixed list.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("items")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList Items { 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.
+ ///
+ ///
+ /// Distinct clothing items, footwear, and accessories detected in the image, each with a short name and a category from a fixed list.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public VisualQaResponseClothingItemDetection(
+ global::System.Collections.Generic.IList items)
+ {
+ this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public VisualQaResponseClothingItemDetection()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItem.Json.g.cs b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItem.Json.g.cs
new file mode 100644
index 0000000..1048609
--- /dev/null
+++ b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItem.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Photoroom
+{
+ public sealed partial class VisualQaResponseClothingItemDetectionItem
+ {
+ ///
+ /// 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::Photoroom.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::Photoroom.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Photoroom.VisualQaResponseClothingItemDetectionItem? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Photoroom.VisualQaResponseClothingItemDetectionItem),
+ jsonSerializerContext) as global::Photoroom.VisualQaResponseClothingItemDetectionItem;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Photoroom.VisualQaResponseClothingItemDetectionItem? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Photoroom.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::Photoroom.VisualQaResponseClothingItemDetectionItem? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Photoroom.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::Photoroom.VisualQaResponseClothingItemDetectionItem),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Photoroom.VisualQaResponseClothingItemDetectionItem;
+ }
+
+ ///
+ /// 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::Photoroom.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::Photoroom.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItem.g.cs b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItem.g.cs
new file mode 100644
index 0000000..13c00a0
--- /dev/null
+++ b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItem.g.cs
@@ -0,0 +1,60 @@
+
+#nullable enable
+
+namespace Photoroom
+{
+ ///
+ ///
+ ///
+ public sealed partial class VisualQaResponseClothingItemDetectionItem
+ {
+ ///
+ /// Short, descriptive name of the item (e.g. "black leather jacket"). Plain name only — no bounding boxes — intended for direct use as a text-guided-segmentation prompt.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Name { get; set; }
+
+ ///
+ /// The clothing category this item was classified into, from a fixed, versioned list (e.g. pumps or sneakers are classified as "shoes").
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("category")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Photoroom.JsonConverters.VisualQaResponseClothingItemDetectionItemCategoryJsonConverter))]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory Category { 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.
+ ///
+ ///
+ /// Short, descriptive name of the item (e.g. "black leather jacket"). Plain name only — no bounding boxes — intended for direct use as a text-guided-segmentation prompt.
+ ///
+ ///
+ /// The clothing category this item was classified into, from a fixed, versioned list (e.g. pumps or sneakers are classified as "shoes").
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public VisualQaResponseClothingItemDetectionItem(
+ string name,
+ global::Photoroom.VisualQaResponseClothingItemDetectionItemCategory category)
+ {
+ this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
+ this.Category = category;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public VisualQaResponseClothingItemDetectionItem()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItemCategory.g.cs b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItemCategory.g.cs
new file mode 100644
index 0000000..ee1c2c3
--- /dev/null
+++ b/src/libs/Photoroom/Generated/Photoroom.Models.VisualQaResponseClothingItemDetectionItemCategory.g.cs
@@ -0,0 +1,123 @@
+
+#nullable enable
+
+namespace Photoroom
+{
+ ///
+ /// The clothing category this item was classified into, from a fixed, versioned list (e.g. pumps or sneakers are classified as "shoes").
+ ///
+ public enum VisualQaResponseClothingItemDetectionItemCategory
+ {
+ ///
+ ///
+ ///
+ Accessory,
+ ///
+ ///
+ ///
+ Blouse,
+ ///
+ ///
+ ///
+ Coat,
+ ///
+ ///
+ ///
+ Dress,
+ ///
+ ///
+ ///
+ Jacket,
+ ///
+ ///
+ ///
+ Other,
+ ///
+ ///
+ ///
+ Shirt,
+ ///
+ ///
+ ///
+ Shoes,
+ ///
+ ///
+ ///
+ Shorts,
+ ///
+ ///
+ ///
+ Skirt,
+ ///
+ ///
+ ///
+ Sweater,
+ ///
+ ///
+ ///
+ TShirt,
+ ///
+ ///
+ ///
+ Top,
+ ///
+ ///
+ ///
+ Trousers,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class VisualQaResponseClothingItemDetectionItemCategoryExtensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this VisualQaResponseClothingItemDetectionItemCategory value)
+ {
+ return value switch
+ {
+ VisualQaResponseClothingItemDetectionItemCategory.Accessory => "accessory",
+ VisualQaResponseClothingItemDetectionItemCategory.Blouse => "blouse",
+ VisualQaResponseClothingItemDetectionItemCategory.Coat => "coat",
+ VisualQaResponseClothingItemDetectionItemCategory.Dress => "dress",
+ VisualQaResponseClothingItemDetectionItemCategory.Jacket => "jacket",
+ VisualQaResponseClothingItemDetectionItemCategory.Other => "other",
+ VisualQaResponseClothingItemDetectionItemCategory.Shirt => "shirt",
+ VisualQaResponseClothingItemDetectionItemCategory.Shoes => "shoes",
+ VisualQaResponseClothingItemDetectionItemCategory.Shorts => "shorts",
+ VisualQaResponseClothingItemDetectionItemCategory.Skirt => "skirt",
+ VisualQaResponseClothingItemDetectionItemCategory.Sweater => "sweater",
+ VisualQaResponseClothingItemDetectionItemCategory.TShirt => "t-shirt",
+ VisualQaResponseClothingItemDetectionItemCategory.Top => "top",
+ VisualQaResponseClothingItemDetectionItemCategory.Trousers => "trousers",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static VisualQaResponseClothingItemDetectionItemCategory? ToEnum(string value)
+ {
+ return value switch
+ {
+ "accessory" => VisualQaResponseClothingItemDetectionItemCategory.Accessory,
+ "blouse" => VisualQaResponseClothingItemDetectionItemCategory.Blouse,
+ "coat" => VisualQaResponseClothingItemDetectionItemCategory.Coat,
+ "dress" => VisualQaResponseClothingItemDetectionItemCategory.Dress,
+ "jacket" => VisualQaResponseClothingItemDetectionItemCategory.Jacket,
+ "other" => VisualQaResponseClothingItemDetectionItemCategory.Other,
+ "shirt" => VisualQaResponseClothingItemDetectionItemCategory.Shirt,
+ "shoes" => VisualQaResponseClothingItemDetectionItemCategory.Shoes,
+ "shorts" => VisualQaResponseClothingItemDetectionItemCategory.Shorts,
+ "skirt" => VisualQaResponseClothingItemDetectionItemCategory.Skirt,
+ "sweater" => VisualQaResponseClothingItemDetectionItemCategory.Sweater,
+ "t-shirt" => VisualQaResponseClothingItemDetectionItemCategory.TShirt,
+ "top" => VisualQaResponseClothingItemDetectionItemCategory.Top,
+ "trousers" => VisualQaResponseClothingItemDetectionItemCategory.Trousers,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Photoroom/Generated/Photoroom.PhotoroomClient.VisualQa.g.cs b/src/libs/Photoroom/Generated/Photoroom.PhotoroomClient.VisualQa.g.cs
index 29e6ce9..b00bc2a 100644
--- a/src/libs/Photoroom/Generated/Photoroom.PhotoroomClient.VisualQa.g.cs
+++ b/src/libs/Photoroom/Generated/Photoroom.PhotoroomClient.VisualQa.g.cs
@@ -262,6 +262,14 @@ request.ReferenceImageFilename is null
content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.Features!, x => x.ToValueString()))}]"),
name: "\"features\"");
+ }
+ if (request.ClothingItemDetection != default)
+ {
+
+ __httpRequestContent.Add(
+ content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.ClothingItemDetection, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
+ name: "\"clothingItemDetection\"");
+
}
__httpRequest.Content = __httpRequestContent;
@@ -692,6 +700,10 @@ request.ReferenceImageFilename is null
/// Features to run, as an array or a comma-separated string (e.g. "aiGenerated,text"). If omitted, you still receive the caption and metadata.
/// Example: [aiGenerated, text]
///
+ ///
+ /// Detect distinct clothing/footwear/accessory items in the image.
+ /// Default Value: false
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -703,6 +715,7 @@ request.ReferenceImageFilename is null
string? referenceImageFilename = default,
string? referenceImageUrl = default,
global::System.Collections.Generic.IList? features = default,
+ bool? clothingItemDetection = default,
global::Photoroom.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -715,6 +728,7 @@ request.ReferenceImageFilename is null
ReferenceImageFilename = referenceImageFilename,
ReferenceImageUrl = referenceImageUrl,
Features = features,
+ ClothingItemDetection = clothingItemDetection,
};
return await VisualQaAsync(
diff --git a/src/libs/Photoroom/openapi.yaml b/src/libs/Photoroom/openapi.yaml
index c8fa0f2..76149f5 100644
--- a/src/libs/Photoroom/openapi.yaml
+++ b/src/libs/Photoroom/openapi.yaml
@@ -2861,6 +2861,11 @@
"aiGenerated",
"text"
]
+ },
+ "clothingItemDetection": {
+ "type": "boolean",
+ "default": false,
+ "description": "Detect distinct clothing/footwear/accessory items in the image."
}
},
"title": "Visual QA Request"
@@ -2881,6 +2886,52 @@
"description": "A generated caption describing the image. Omitted if no caption could be produced.",
"example": "Three gold rings with blue stones on a marble surface."
},
+ "clothingItemDetection": {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Short, descriptive name of the item (e.g. \"black leather jacket\"). Plain name only — no bounding boxes — intended for direct use as a text-guided-segmentation prompt."
+ },
+ "category": {
+ "type": "string",
+ "enum": [
+ "top",
+ "t-shirt",
+ "shirt",
+ "blouse",
+ "sweater",
+ "dress",
+ "skirt",
+ "shorts",
+ "trousers",
+ "jacket",
+ "coat",
+ "shoes",
+ "accessory",
+ "other"
+ ],
+ "description": "The clothing category this item was classified into, from a fixed, versioned list (e.g. pumps or sneakers are classified as \"shoes\")."
+ }
+ },
+ "required": [
+ "name",
+ "category"
+ ]
+ },
+ "description": "Distinct clothing items, footwear, and accessories detected in the image, each with a short name and a category from a fixed list."
+ }
+ },
+ "required": [
+ "items"
+ ],
+ "description": "Distinct clothing, footwear, and accessory items detected in the image. Only present when clothingItemDetection is requested."
+ },
"metadata": {
"type": "object",
"properties": {