diff --git a/src/libs/StabilityAI/Generated/StabilityAI.AutoSDKHttpResponse.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.AutoSDKHttpResponse.g.cs
new file mode 100644
index 0000000..9b2abe5
--- /dev/null
+++ b/src/libs/StabilityAI/Generated/StabilityAI.AutoSDKHttpResponse.g.cs
@@ -0,0 +1,86 @@
+
+#nullable enable
+
+namespace StabilityAI
+{
+ ///
+ /// Represents a successful HTTP response with status code and headers.
+ ///
+ public partial class AutoSDKHttpResponse
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers)
+ {
+ StatusCode = statusCode;
+ Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers));
+ }
+
+ ///
+ /// Gets the HTTP status code.
+ ///
+ public global::System.Net.HttpStatusCode StatusCode { get; }
+ ///
+ /// Gets the response headers.
+ ///
+ public global::System.Collections.Generic.Dictionary> Headers { get; }
+
+ internal static global::System.Collections.Generic.Dictionary> CreateHeaders(
+ global::System.Net.Http.HttpResponseMessage response)
+ {
+ response = response ?? throw new global::System.ArgumentNullException(nameof(response));
+
+ var headers = global::System.Linq.Enumerable.ToDictionary(
+ response.Headers,
+ static header => header.Key,
+ static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value),
+ global::System.StringComparer.OrdinalIgnoreCase);
+
+ if (response.Content?.Headers == null)
+ {
+ return headers;
+ }
+
+ foreach (var header in response.Content.Headers)
+ {
+ if (headers.TryGetValue(header.Key, out var existingValues))
+ {
+ headers[header.Key] = global::System.Linq.Enumerable.ToArray(
+ global::System.Linq.Enumerable.Concat(existingValues, header.Value));
+ }
+ else
+ {
+ headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value);
+ }
+ }
+
+ return headers;
+ }
+ }
+
+ ///
+ /// Represents a successful HTTP response with status code, headers, and body.
+ ///
+ public partial class AutoSDKHttpResponse : AutoSDKHttpResponse
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ T body)
+ : base(statusCode, headers)
+ {
+ Body = body;
+ }
+
+ ///
+ /// Gets the response body.
+ ///
+ public T Body { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.ImageToImage.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.ImageToImage.g.cs
index 8b68a5f..f74f4a0 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.ImageToImage.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.ImageToImage.g.cs
@@ -58,6 +58,49 @@ public partial interface IV1GenerationClient
/// Default Value: application/json
///
///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_img2img.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/stable-diffusion-v1-5/image-to-image"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: multipart/form-data' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// -F 'init_image=@"../init_image.png"' \
+ /// -F 'init_image_mode=IMAGE_STRENGTH' \
+ /// -F 'image_strength=0.35' \
+ /// -F 'text_prompts[0][text]=A galactic dog in space' \
+ /// -F 'cfg_scale=7' \
+ /// -F 'clip_guidance_preset=FAST_BLUE' \
+ /// -F 'samples=1' \
+ /// -F 'steps=30' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ global::System.Threading.Tasks.Task>> ImageToImageAsResponseAsync(
+ string engineId,
+
+ global::StabilityAI.ImageToImageRequestBody request,
+ global::StabilityAI.ImageToImageAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// image-to-image
+ /// Modify an image based on a text prompt
+ ///
+ ///
+ /// Example: stable-diffusion-v1-5
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
///
/// An array of text prompts to use for generation.
/// Due to how arrays are represented in `multipart/form-data` requests, prompts must adhear to the format `text_prompts[index][text|weight]`,
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.Masking.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.Masking.g.cs
index ece6a52..3749c13 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.Masking.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.Masking.g.cs
@@ -56,6 +56,49 @@ public partial interface IV1GenerationClient
/// Default Value: application/json
///
///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// #!/bin/sh
+ /// set -e
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_img2img_masking.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/stable-inpainting-512-v2-0/image-to-image/masking"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: multipart/form-data' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// -F 'init_image=@"../init_image.png"' \
+ /// -F 'mask_image=@"../mask_image_white.png"' \
+ /// -F 'mask_source=MASK_IMAGE_WHITE' \
+ /// -F 'text_prompts[0][text]=A large spiral galaxy with a bright central bulge and a ring of stars around it' \
+ /// -F 'cfg_scale=7' \
+ /// -F 'clip_guidance_preset=FAST_BLUE' \
+ /// -F 'samples=1' \
+ /// -F 'steps=30' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ global::System.Threading.Tasks.Task>> MaskingAsResponseAsync(
+ string engineId,
+
+ global::StabilityAI.MaskingRequestBody request,
+ global::StabilityAI.MaskingAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// image-to-image/masking
+ /// Selectively modify portions of an image using a mask
+ ///
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
///
/// Image used to initialize the diffusion process, in lieu of random noise.
/// Example: <image binary>
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.TextToImage.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.TextToImage.g.cs
index 96d56a5..b659d83 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.TextToImage.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.TextToImage.g.cs
@@ -63,6 +63,54 @@ public partial interface IV1GenerationClient
/// Default Value: application/json
///
///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_txt2img.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/stable-diffusion-v1-5/text-to-image"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: application/json' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// --data-raw '{
+ /// "text_prompts": [
+ /// {
+ /// "text": "A lighthouse on a cliff"
+ /// }
+ /// ],
+ /// "cfg_scale": 7,
+ /// "clip_guidance_preset": "FAST_BLUE",
+ /// "height": 512,
+ /// "width": 512,
+ /// "samples": 1,
+ /// "steps": 30
+ /// }' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ global::System.Threading.Tasks.Task>> TextToImageAsResponseAsync(
+ string engineId,
+
+ global::StabilityAI.TextToImageRequestBody request,
+ global::StabilityAI.TextToImageAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// text-to-image
+ /// Generate a new image from a text prompt
+ ///
+ ///
+ /// Example: stable-diffusion-v1-5
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task> TextToImageAsync(
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.UpscaleImage.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.UpscaleImage.g.cs
index 9bf66d8..59ac599 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.UpscaleImage.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.IV1GenerationClient.UpscaleImage.g.cs
@@ -52,6 +52,43 @@ public partial interface IV1GenerationClient
/// Default Value: application/json
///
///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_upscaled_image.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/esrgan-v1-x2plus/image-to-image/upscale"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: multipart/form-data' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// -F 'image=@"../init_image.png"' \
+ /// -F 'width=1024' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ global::System.Threading.Tasks.Task>> UpscaleImageAsResponseAsync(
+ string engineId,
+
+ global::StabilityAI.UpscaleImageRequestBody request,
+ global::StabilityAI.UpscaleImageAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// image-to-image/upscale
+ /// Create a higher resolution version of an input image.
+ /// This operation outputs an image with a maximum pixel count of **4,194,304**. This is equivalent to dimensions such as `2048x2048` and `4096x1024`.
+ /// By default, the input image will be upscaled by a factor of 2. For additional control over the output dimensions, a `width` or `height` parameter may be specified.
+ ///
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
///
/// Example: <image binary>
///
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.ImageToImage.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.ImageToImage.g.cs
index f5e174a..496e7c9 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.ImageToImage.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.ImageToImage.g.cs
@@ -66,6 +66,61 @@ partial void ProcessImageToImageResponseContent(
public async global::System.Threading.Tasks.Task> ImageToImageAsync(
string engineId,
+ global::StabilityAI.ImageToImageRequestBody request,
+ global::StabilityAI.ImageToImageAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ImageToImageAsResponseAsync(
+ engineId: engineId,
+
+ request: request,
+ accept: accept,
+ organization: organization,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// image-to-image
+ /// Modify an image based on a text prompt
+ ///
+ ///
+ /// Example: stable-diffusion-v1-5
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_img2img.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/stable-diffusion-v1-5/image-to-image"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: multipart/form-data' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// -F 'init_image=@"../init_image.png"' \
+ /// -F 'init_image_mode=IMAGE_STRENGTH' \
+ /// -F 'image_strength=0.35' \
+ /// -F 'text_prompts[0][text]=A galactic dog in space' \
+ /// -F 'cfg_scale=7' \
+ /// -F 'clip_guidance_preset=FAST_BLUE' \
+ /// -F 'samples=1' \
+ /// -F 'steps=30' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ public async global::System.Threading.Tasks.Task>> ImageToImageAsResponseAsync(
+ string engineId,
+
global::StabilityAI.ImageToImageRequestBody request,
global::StabilityAI.ImageToImageAccept? accept = default,
string? organization = default,
@@ -448,9 +503,12 @@ partial void ProcessImageToImageResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
+ var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -479,9 +537,12 @@ partial void ProcessImageToImageResponseContent(
#endif
).ConfigureAwait(false);
- return
- (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.Masking.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.Masking.g.cs
index b19d9d0..d95c417 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.Masking.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.Masking.g.cs
@@ -66,6 +66,61 @@ partial void ProcessMaskingResponseContent(
public async global::System.Threading.Tasks.Task> MaskingAsync(
string engineId,
+ global::StabilityAI.MaskingRequestBody request,
+ global::StabilityAI.MaskingAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await MaskingAsResponseAsync(
+ engineId: engineId,
+
+ request: request,
+ accept: accept,
+ organization: organization,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// image-to-image/masking
+ /// Selectively modify portions of an image using a mask
+ ///
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// #!/bin/sh
+ /// set -e
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_img2img_masking.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/stable-inpainting-512-v2-0/image-to-image/masking"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: multipart/form-data' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// -F 'init_image=@"../init_image.png"' \
+ /// -F 'mask_image=@"../mask_image_white.png"' \
+ /// -F 'mask_source=MASK_IMAGE_WHITE' \
+ /// -F 'text_prompts[0][text]=A large spiral galaxy with a bright central bulge and a ring of stars around it' \
+ /// -F 'cfg_scale=7' \
+ /// -F 'clip_guidance_preset=FAST_BLUE' \
+ /// -F 'samples=1' \
+ /// -F 'steps=30' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ public async global::System.Threading.Tasks.Task>> MaskingAsResponseAsync(
+ string engineId,
+
global::StabilityAI.MaskingRequestBody request,
global::StabilityAI.MaskingAccept? accept = default,
string? organization = default,
@@ -440,9 +495,12 @@ partial void ProcessMaskingResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
+ var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -471,9 +529,12 @@ partial void ProcessMaskingResponseContent(
#endif
).ConfigureAwait(false);
- return
- (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.TextToImage.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.TextToImage.g.cs
index 4b5a422..e29b81b 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.TextToImage.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.TextToImage.g.cs
@@ -71,6 +71,66 @@ partial void ProcessTextToImageResponseContent(
public async global::System.Threading.Tasks.Task> TextToImageAsync(
string engineId,
+ global::StabilityAI.TextToImageRequestBody request,
+ global::StabilityAI.TextToImageAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await TextToImageAsResponseAsync(
+ engineId: engineId,
+
+ request: request,
+ accept: accept,
+ organization: organization,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// text-to-image
+ /// Generate a new image from a text prompt
+ ///
+ ///
+ /// Example: stable-diffusion-v1-5
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_txt2img.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/stable-diffusion-v1-5/text-to-image"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: application/json' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// --data-raw '{
+ /// "text_prompts": [
+ /// {
+ /// "text": "A lighthouse on a cliff"
+ /// }
+ /// ],
+ /// "cfg_scale": 7,
+ /// "clip_guidance_preset": "FAST_BLUE",
+ /// "height": 512,
+ /// "width": 512,
+ /// "samples": 1,
+ /// "steps": 30
+ /// }' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ public async global::System.Threading.Tasks.Task>> TextToImageAsResponseAsync(
+ string engineId,
+
global::StabilityAI.TextToImageRequestBody request,
global::StabilityAI.TextToImageAccept? accept = default,
string? organization = default,
@@ -363,9 +423,12 @@ partial void ProcessTextToImageResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
+ var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -394,9 +457,12 @@ partial void ProcessTextToImageResponseContent(
#endif
).ConfigureAwait(false);
- return
- (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.UpscaleImage.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.UpscaleImage.g.cs
index 85ee122..3ec8f05 100644
--- a/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.UpscaleImage.g.cs
+++ b/src/libs/StabilityAI/Generated/StabilityAI.V1GenerationClient.UpscaleImage.g.cs
@@ -60,6 +60,55 @@ partial void ProcessUpscaleImageResponseContent(
public async global::System.Threading.Tasks.Task> UpscaleImageAsync(
string engineId,
+ global::StabilityAI.UpscaleImageRequestBody request,
+ global::StabilityAI.UpscaleImageAccept? accept = default,
+ string? organization = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpscaleImageAsResponseAsync(
+ engineId: engineId,
+
+ request: request,
+ accept: accept,
+ organization: organization,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// image-to-image/upscale
+ /// Create a higher resolution version of an input image.
+ /// This operation outputs an image with a maximum pixel count of **4,194,304**. This is equivalent to dimensions such as `2048x2048` and `4096x1024`.
+ /// By default, the input image will be upscaled by a factor of 2. For additional control over the output dimensions, a `width` or `height` parameter may be specified.
+ ///
+ ///
+ ///
+ /// Default Value: application/json
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ ///
+ /// if [ -z "$STABILITY_API_KEY" ]; then
+ /// echo "STABILITY_API_KEY environment variable is not set"
+ /// exit 1
+ /// fi
+ /// OUTPUT_FILE=./out/v1_upscaled_image.png
+ /// BASE_URL=${API_HOST:-https://api.stability.ai}
+ /// URL="$BASE_URL/v1/generation/esrgan-v1-x2plus/image-to-image/upscale"
+ /// curl -f -sS -X POST "$URL" \
+ /// -H 'Content-Type: multipart/form-data' \
+ /// -H 'Accept: image/png' \
+ /// -H "Authorization: Bearer $STABILITY_API_KEY" \
+ /// -F 'image=@"../init_image.png"' \
+ /// -F 'width=1024' \
+ /// -o "$OUTPUT_FILE"
+ ///
+ public async global::System.Threading.Tasks.Task>> UpscaleImageAsResponseAsync(
+ string engineId,
+
global::StabilityAI.UpscaleImageRequestBody request,
global::StabilityAI.UpscaleImageAccept? accept = default,
string? organization = default,
@@ -390,9 +439,12 @@ partial void ProcessUpscaleImageResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
+ var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -421,9 +473,12 @@ partial void ProcessUpscaleImageResponseContent(
#endif
).ConfigureAwait(false);
- return
- (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::StabilityAI.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::StabilityAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ body: __value);
}
catch (global::System.Exception __ex)
{