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 @@ -29,6 +29,7 @@ namespace Ideogram
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundQuality), TypeInfoPropertyName = "ReplaceBackgroundQuality2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundIdeogramV3Request))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundIdeogramV3RequestRenderingSpeed), TypeInfoPropertyName = "ReplaceBackgroundIdeogramV3RequestRenderingSpeed2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundIdeogram45Request))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.LookbookResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.LookbookRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.LookbookRequestCategory), TypeInfoPropertyName = "LookbookRequestCategory2")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public partial interface IImagesGenerateClient
/// The custom model URI, in the form `model/&lt;model_name&gt;/version/&lt;version_name&gt;`. You or your organization must have access to the model. The model determines which rendering speeds are supported and whether backgrounds are removed automatically.<br/>
/// Example: model/my-custom-model/version/1
/// </param>
/// <param name="transparentBackground">
/// Remove the background after generation and return transparent PNG images. Included in the custom model generation price at no extra charge. When false, the model's automatic background removal behavior still applies.<br/>
/// Default Value: false
/// </param>
/// <param name="negativePrompt">
/// Description of what to exclude from the images. The prompt takes precedence over the negative prompt.
/// </param>
Expand Down Expand Up @@ -136,6 +140,7 @@ public partial interface IImagesGenerateClient
string prompt,
string customModelUri,
bool? dryRun = default,
bool? transparentBackground = default,
string? negativePrompt = default,
int? seed = default,
global::Ideogram.ResolutionV3? resolution = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public partial interface IImagesGenerateClient
/// The custom model URI, in the form `model/&lt;model_name&gt;/version/&lt;version_name&gt;`. You or your organization must have access to the model. The model determines which rendering speeds are supported.<br/>
/// Example: model/my-custom-v4-model/version/1
/// </param>
/// <param name="transparentBackground">
/// Remove the background after generation and return transparent PNG images. Included in the custom model generation price at no extra charge. When false, the model's automatic background removal behavior still applies.<br/>
/// Default Value: false
/// </param>
/// <param name="stackedCustomModels">
/// Custom models whose pLoRA checkpoints are fused beneath the `custom_model_uri` model, in list order: the first entry is applied first and `custom_model_uri` last. Every entry must be an accessible Ideogram 4.0 LoRA with a registered checkpoint and must not repeat `custom_model_uri`.<br/>
/// Example: [{"custom_model_uri":"model/my-base-plora/version/1","weight":0.5}]
Expand Down Expand Up @@ -122,6 +126,7 @@ public partial interface IImagesGenerateClient
string prompt,
string customModelUri,
bool? dryRun = default,
bool? transparentBackground = default,
global::System.Collections.Generic.IList<global::Ideogram.StackedCustomModel>? stackedCustomModels = default,
global::Ideogram.MagicPromptMode? magicPrompt = default,
int? seed = default,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#nullable enable

namespace Ideogram
{
public partial interface IToolClient
{
/// <summary>
/// Replace background with Ideogram 4.5<br/>
/// Rebuild the background of an image as the setting shown in a<br/>
/// `background_reference` image, with Ideogram 4.5 at its highest<br/>
/// quality. The people in the source image are kept, people in the<br/>
/// reference are left out, and results keep the source image's aspect<br/>
/// ratio. Returns a `generation_id`; poll<br/>
/// `GET /v2/generations/{generation_id}` or supply a `webhook_url`.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</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.ReplaceBackgroundResponse> ReplaceBackgroundIdeogram45Async(

global::Ideogram.ReplaceBackgroundIdeogram45Request request,
bool? dryRun = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Replace background with Ideogram 4.5<br/>
/// Rebuild the background of an image as the setting shown in a<br/>
/// `background_reference` image, with Ideogram 4.5 at its highest<br/>
/// quality. The people in the source image are kept, people in the<br/>
/// reference are left out, and results keep the source image's aspect<br/>
/// ratio. Returns a `generation_id`; poll<br/>
/// `GET /v2/generations/{generation_id}` or supply a `webhook_url`.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</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.AutoSDKHttpResponse<global::Ideogram.ReplaceBackgroundResponse>> ReplaceBackgroundIdeogram45AsResponseAsync(

global::Ideogram.ReplaceBackgroundIdeogram45Request request,
bool? dryRun = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Replace background with Ideogram 4.5<br/>
/// Rebuild the background of an image as the setting shown in a<br/>
/// `background_reference` image, with Ideogram 4.5 at its highest<br/>
/// quality. The people in the source image are kept, people in the<br/>
/// reference are left out, and results keep the source image's aspect<br/>
/// ratio. Returns a `generation_id`; poll<br/>
/// `GET /v2/generations/{generation_id}` or supply a `webhook_url`.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <param name="imageAssetIdentifier">
/// An identifier for an ideogram asset.<br/>
/// Example: {"asset_type":"RESPONSE","asset_id":"7uS_VESkRI6O3-sVgHQp_A"}
/// </param>
/// <param name="image">
/// The source image. JPEG, PNG, WEBP, HEIF, AVIF, GIF, BMP, TIFF, and<br/>
/// MPO are supported, up to 50 MB. Its longer side may be at most the<br/>
/// model's maximum aspect ratio times its shorter side; a more extreme<br/>
/// proportion is rejected with a 400 that states the allowed range.<br/>
/// Multipart requests only.
/// </param>
/// <param name="imagename">
/// The source image. JPEG, PNG, WEBP, HEIF, AVIF, GIF, BMP, TIFF, and<br/>
/// MPO are supported, up to 50 MB. Its longer side may be at most the<br/>
/// model's maximum aspect ratio times its shorter side; a more extreme<br/>
/// proportion is rejected with a 400 that states the allowed range.<br/>
/// Multipart requests only.
/// </param>
/// <param name="backgroundReferenceAssetIdentifier">
/// An identifier for an ideogram asset.<br/>
/// Example: {"asset_type":"RESPONSE","asset_id":"7uS_VESkRI6O3-sVgHQp_A"}
/// </param>
/// <param name="backgroundReference">
/// A photo of the setting the new background should match. Its people<br/>
/// are not copied. It is held to the same aspect-ratio limit as<br/>
/// `image`. Multipart requests only.
/// </param>
/// <param name="backgroundReferencename">
/// A photo of the setting the new background should match. Its people<br/>
/// are not copied. It is held to the same aspect-ratio limit as<br/>
/// `image`. Multipart requests only.
/// </param>
/// <param name="numImages">
/// The number of images to generate.<br/>
/// Default Value: 1
/// </param>
/// <param name="private">
/// Whether to keep the result private. When omitted, the result is<br/>
/// private. Enterprise generations are always private.
/// </param>
/// <param name="webhookUrl">
/// HTTPS URL that Ideogram delivers the generated result to. Ideogram sends a<br/>
/// JSON POST to this URL once all images for the request have finished<br/>
/// generating. The body mirrors the synchronous generate response:<br/>
/// `request_id`, `created`, and a `data` array<br/>
/// containing every generated image (`url`, `prompt`, `resolution`, `seed`,<br/>
/// `is_image_safe`). Each delivery is signed with Ed25519 and verifiable<br/>
/// against the public keys at `https://api.ideogram.ai/v1/.well-known/jwks.json`. Must be HTTPS;<br/>
/// private and loopback hosts and the cloud metadata service are rejected.<br/>
/// Example: https://api.example.com/webhooks/ideogram
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</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.ReplaceBackgroundResponse> ReplaceBackgroundIdeogram45Async(
bool? dryRun = default,
global::Ideogram.AssetIdentifier? imageAssetIdentifier = default,
byte[]? image = default,
string? imagename = default,
global::Ideogram.AssetIdentifier? backgroundReferenceAssetIdentifier = default,
byte[]? backgroundReference = default,
string? backgroundReferencename = default,
int? numImages = default,
bool? @private = default,
string? webhookUrl = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ partial void ProcessPostGenerateImageV2IdeogramV3CustomModelResponseContent(
content: new global::System.Net.Http.StringContent(request.CustomModelUri ?? string.Empty),
name: "\"custom_model_uri\"");

if (request.TransparentBackground != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.TransparentBackground, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"transparent_background\"");

}
if (request.NegativePrompt != default)
{

Expand Down Expand Up @@ -923,6 +931,10 @@ partial void ProcessPostGenerateImageV2IdeogramV3CustomModelResponseContent(
/// The custom model URI, in the form `model/&lt;model_name&gt;/version/&lt;version_name&gt;`. You or your organization must have access to the model. The model determines which rendering speeds are supported and whether backgrounds are removed automatically.<br/>
/// Example: model/my-custom-model/version/1
/// </param>
/// <param name="transparentBackground">
/// Remove the background after generation and return transparent PNG images. Included in the custom model generation price at no extra charge. When false, the model's automatic background removal behavior still applies.<br/>
/// Default Value: false
/// </param>
/// <param name="negativePrompt">
/// Description of what to exclude from the images. The prompt takes precedence over the negative prompt.
/// </param>
Expand Down Expand Up @@ -998,6 +1010,7 @@ partial void ProcessPostGenerateImageV2IdeogramV3CustomModelResponseContent(
string prompt,
string customModelUri,
bool? dryRun = default,
bool? transparentBackground = default,
string? negativePrompt = default,
int? seed = default,
global::Ideogram.ResolutionV3? resolution = default,
Expand All @@ -1022,6 +1035,7 @@ partial void ProcessPostGenerateImageV2IdeogramV3CustomModelResponseContent(
{
Prompt = prompt,
CustomModelUri = customModelUri,
TransparentBackground = transparentBackground,
NegativePrompt = negativePrompt,
Seed = seed,
Resolution = resolution,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,10 @@ partial void ProcessPostGenerateImageV2IdeogramV4CustomModelResponseContent(
/// The custom model URI, in the form `model/&lt;model_name&gt;/version/&lt;version_name&gt;`. You or your organization must have access to the model. The model determines which rendering speeds are supported.<br/>
/// Example: model/my-custom-v4-model/version/1
/// </param>
/// <param name="transparentBackground">
/// Remove the background after generation and return transparent PNG images. Included in the custom model generation price at no extra charge. When false, the model's automatic background removal behavior still applies.<br/>
/// Default Value: false
/// </param>
/// <param name="stackedCustomModels">
/// Custom models whose pLoRA checkpoints are fused beneath the `custom_model_uri` model, in list order: the first entry is applied first and `custom_model_uri` last. Every entry must be an accessible Ideogram 4.0 LoRA with a registered checkpoint and must not repeat `custom_model_uri`.<br/>
/// Example: [{"custom_model_uri":"model/my-base-plora/version/1","weight":0.5}]
Expand Down Expand Up @@ -799,6 +803,7 @@ partial void ProcessPostGenerateImageV2IdeogramV4CustomModelResponseContent(
string prompt,
string customModelUri,
bool? dryRun = default,
bool? transparentBackground = default,
global::System.Collections.Generic.IList<global::Ideogram.StackedCustomModel>? stackedCustomModels = default,
global::Ideogram.MagicPromptMode? magicPrompt = default,
int? seed = default,
Expand All @@ -817,6 +822,7 @@ partial void ProcessPostGenerateImageV2IdeogramV4CustomModelResponseContent(
{
Prompt = prompt,
CustomModelUri = customModelUri,
TransparentBackground = transparentBackground,
StackedCustomModels = stackedCustomModels,
MagicPrompt = magicPrompt,
Seed = seed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ namespace Ideogram
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundQuality), TypeInfoPropertyName = "ReplaceBackgroundQuality2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundIdeogramV3Request))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundIdeogramV3RequestRenderingSpeed), TypeInfoPropertyName = "ReplaceBackgroundIdeogramV3RequestRenderingSpeed2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ReplaceBackgroundIdeogram45Request))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ListAccountApiKeysResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Ideogram.AccountApiKey>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.AccountApiKey))]
Expand Down Expand Up @@ -508,7 +509,6 @@ namespace Ideogram
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.RechargeSettings))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.PostApiSubscriptionResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.PostApiSubscriptionError))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.PostApiSubscriptionRequest))]
internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
Expand All @@ -519,6 +519,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSourceGenerationOptions(
DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull
)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.PostApiSubscriptionRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ManageApiCreditSummaryResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Ideogram.CreditGrant>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.CreditGrant))]
Expand Down
Loading
Loading