Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ partial void ProcessPostGenerateImageV3ResponseContent(
/// Example: 12345
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="aspectRatio">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ partial void ProcessPostReframeImageV3ResponseContent(
/// The image being reframed (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="numImages">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ partial void ProcessPostRemixImageV3ResponseContent(
/// Example: 12345
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="aspectRatio">
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial interface IGenerateClient
/// Example: 12345
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="aspectRatio">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public partial interface IGenerateClient
/// The image being reframed (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="numImages">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public partial interface IGenerateClient
/// Example: 12345
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="aspectRatio">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#nullable enable

namespace Ideogram
{
public partial interface IGenerateClient
{
/// <summary>
/// Replace Background with Ideogram 3.0<br/>
/// Replace the background of a given image synchronously using a prompt with Ideogram 3.0. The foreground subject<br/>
/// will be identified and kept, while the background is replaced based on the prompt and chosen style.<br/>
/// Supported image formats include JPEG, PNG, and WebP.<br/>
/// Images links are available for a limited period of time; if you would like to keep the image, you must download it.
/// </summary>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.ImageGenerationResponseV3> PostReplaceBackgroundV3Async(
global::Ideogram.ReplaceBackgroundRequestV3 request,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Replace Background with Ideogram 3.0<br/>
/// Replace the background of a given image synchronously using a prompt with Ideogram 3.0. The foreground subject<br/>
/// will be identified and kept, while the background is replaced based on the prompt and chosen style.<br/>
/// Supported image formats include JPEG, PNG, and WebP.<br/>
/// Images links are available for a limited period of time; if you would like to keep the image, you must download it.
/// </summary>
/// <param name="image">
/// The image whose background is being replaced (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.
/// </param>
/// <param name="imagename">
/// The image whose background is being replaced (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.
/// </param>
/// <param name="prompt">
/// The prompt describing the desired new background.<br/>
/// Example: A vibrant cityscape at night.
/// </param>
/// <param name="magicPrompt">
/// Determine if MagicPrompt should be used in generating the request or not.<br/>
/// Example: ON
/// </param>
/// <param name="numImages">
/// The number of images to generate.<br/>
/// Default Value: 1
/// </param>
/// <param name="seed">
/// Random seed. Set for reproducible generation.<br/>
/// Example: 12345
/// </param>
/// <param name="renderingSpeed">
/// The rendering speed to use.<br/>
/// Default Value: BALANCED
/// </param>
/// <param name="colorPalette">
/// A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members). Not supported by V_1, V_1_TURBO, V_2A and V_2A_TURBO models.
/// </param>
/// <param name="styleCodes">
/// A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style_type.<br/>
/// Example: [AAFF5733, 0133FF57, DE3357FF]
/// </param>
/// <param name="styleReferenceImages">
/// A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.ImageGenerationResponseV3> PostReplaceBackgroundV3Async(
byte[] image,
string imagename,
string prompt,
global::Ideogram.MagicPromptOption? magicPrompt = default,
int? numImages = default,
int? seed = default,
global::Ideogram.RenderingSpeed? renderingSpeed = default,
global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette = default,
global::System.Collections.Generic.IList<string>? styleCodes = default,
global::System.Collections.Generic.IList<byte[]>? styleReferenceImages = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public sealed partial class GenerateImageRequestV3
public int? Seed { get; set; }

/// <summary>
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </summary>
/// <example>1280x800</example>
Expand Down Expand Up @@ -122,7 +122,7 @@ public sealed partial class GenerateImageRequestV3
/// Example: 12345
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="aspectRatio">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public sealed partial class ImageGenerationObjectV3
public required string Prompt { get; set; }

/// <summary>
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </summary>
/// <example>1280x800</example>
Expand Down Expand Up @@ -78,7 +78,7 @@ public sealed partial class ImageGenerationObjectV3
/// Example: A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="isImageSafe">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class ReframeImageRequestV3
public required string Imagename { get; set; }

/// <summary>
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </summary>
/// <example>1280x800</example>
Expand Down Expand Up @@ -92,7 +92,7 @@ public sealed partial class ReframeImageRequestV3
/// The image being reframed (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="numImages">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public sealed partial class RemixImageRequestV3
public int? Seed { get; set; }

/// <summary>
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </summary>
/// <example>1280x800</example>
Expand Down Expand Up @@ -154,7 +154,7 @@ public sealed partial class RemixImageRequestV3
/// Example: 12345
/// </param>
/// <param name="resolution">
/// The resolutions supported for model version V_3.<br/>
/// The resolutions supported for Ideogram 3.0.<br/>
/// Example: 1280x800
/// </param>
/// <param name="aspectRatio">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace Ideogram
{
public sealed partial class ReplaceBackgroundRequestV3
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::Ideogram.ReplaceBackgroundRequestV3? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Ideogram.ReplaceBackgroundRequestV3),
jsonSerializerContext) as global::Ideogram.ReplaceBackgroundRequestV3;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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::Ideogram.ReplaceBackgroundRequestV3? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Ideogram.ReplaceBackgroundRequestV3>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Ideogram.ReplaceBackgroundRequestV3?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Ideogram.ReplaceBackgroundRequestV3),
jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.ReplaceBackgroundRequestV3;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#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<global::Ideogram.ReplaceBackgroundRequestV3?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Ideogram.ReplaceBackgroundRequestV3?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Loading
Loading