diff --git a/src/libs/Ideogram/Generated/Ideogram..JsonSerializerContext.g.cs b/src/libs/Ideogram/Generated/Ideogram..JsonSerializerContext.g.cs index 88af2d9..1ebf416 100644 --- a/src/libs/Ideogram/Generated/Ideogram..JsonSerializerContext.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram..JsonSerializerContext.g.cs @@ -39,14 +39,20 @@ namespace Ideogram typeof(global::Ideogram.JsonConverters.StyleTypeV3NullableJsonConverter), typeof(global::Ideogram.JsonConverters.StylePresetV3JsonConverter), typeof(global::Ideogram.JsonConverters.StylePresetV3NullableJsonConverter), + typeof(global::Ideogram.JsonConverters.UpscaleFactorJsonConverter), + typeof(global::Ideogram.JsonConverters.UpscaleFactorNullableJsonConverter), typeof(global::Ideogram.JsonConverters.InternalTestingEnumFieldJsonConverter), typeof(global::Ideogram.JsonConverters.InternalTestingEnumFieldNullableJsonConverter), + typeof(global::Ideogram.JsonConverters.TextLayerV3AlignmentJsonConverter), + typeof(global::Ideogram.JsonConverters.TextLayerV3AlignmentNullableJsonConverter), typeof(global::Ideogram.JsonConverters.ToolTypeJsonConverter), typeof(global::Ideogram.JsonConverters.ToolTypeNullableJsonConverter), typeof(global::Ideogram.JsonConverters.ModelVersionJsonConverter), typeof(global::Ideogram.JsonConverters.ModelVersionNullableJsonConverter), typeof(global::Ideogram.JsonConverters.SegmentByJsonConverter), typeof(global::Ideogram.JsonConverters.SegmentByNullableJsonConverter), + typeof(global::Ideogram.JsonConverters.UsageSourceJsonConverter), + typeof(global::Ideogram.JsonConverters.UsageSourceNullableJsonConverter), typeof(global::Ideogram.JsonConverters.ApiProfileTypeJsonConverter), typeof(global::Ideogram.JsonConverters.ApiProfileTypeNullableJsonConverter), typeof(global::Ideogram.JsonConverters.ApiProfileRoleJsonConverter), diff --git a/src/libs/Ideogram/Generated/Ideogram.BatchClient.PostBatch.g.cs b/src/libs/Ideogram/Generated/Ideogram.BatchClient.PostBatch.g.cs index 671f6b3..1f037e9 100644 --- a/src/libs/Ideogram/Generated/Ideogram.BatchClient.PostBatch.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.BatchClient.PostBatch.g.cs @@ -30,6 +30,7 @@ partial void ProcessPostBatchResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostBatchAsync( + global::Ideogram.InternalBatchRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -312,7 +313,9 @@ partial void ProcessPostBatchResponseContent( /// The experiment variant used for template selection for the magic prompts.
/// Example: MAGIC_PROMPT_NO_TEXT /// - /// + /// + /// Example: {"aspect_ratio":"1x1","style_type":"GENERAL","magic_prompt_version":"V_0","seed":12345,"negative_prompt":"brush strokes, painting","magic_prompt_option":"ON","model":"V_2_TURBO","resolution":"1280x800","num_images":1,"color_palette":{"name":"PASTEL"}} + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostBatchAsync( diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImage.g.cs index ba65adc..62147c2 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImage.g.cs @@ -32,6 +32,7 @@ partial void ProcessPostEditImageResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostEditImageAsync( + global::Ideogram.EditImageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,43 +72,57 @@ partial void ProcessPostEditImageResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImageFile = new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()), - name: "image_file", - fileName: request.ImageFilename ?? string.Empty); + content: __contentImageFile, + name: "\"image_file\"", + fileName: request.ImageFilename != null ? $"\"{request.ImageFilename}\"" : string.Empty); + if (__contentImageFile.Headers.ContentDisposition != null) + { + __contentImageFile.Headers.ContentDisposition.FileNameStar = null; + } + var __contentMask = new global::System.Net.Http.ByteArrayContent(request.Mask ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Mask ?? global::System.Array.Empty()), - name: "mask", - fileName: request.Maskname ?? string.Empty); + content: __contentMask, + name: "\"mask\"", + fileName: request.Maskname != null ? $"\"{request.Maskname}\"" : string.Empty); + if (__contentMask.Headers.ContentDisposition != null) + { + __contentMask.Headers.ContentDisposition.FileNameStar = null; + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Model.ToValueString()}"), - name: "model"); + name: "\"model\""); if (request.MagicPromptOption != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.MagicPromptOption?.ToValueString()}"), - name: "magic_prompt_option"); + name: "\"magic_prompt_option\""); } if (request.NumImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NumImages}"), - name: "num_images"); + name: "\"num_images\""); } if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.StyleType != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), - name: "style_type"); + name: "\"style_type\""); } __httpRequest.Content = __httpRequestContent; @@ -391,7 +406,7 @@ partial void ProcessPostEditImageResponseContent( byte[] mask, string maskname, string prompt, - global::Ideogram.ModelEnum model, + global::Ideogram.ModelEnum model = global::Ideogram.ModelEnum.V2, global::Ideogram.MagicPromptOption? magicPromptOption = default, int? numImages = default, int? seed = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImageV3.g.cs index a58fde3..b67c64f 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImageV3.g.cs @@ -32,6 +32,7 @@ partial void ProcessPostEditImageV3ResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostEditImageV3Async( + global::Ideogram.EditImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,82 +72,110 @@ partial void ProcessPostEditImageV3ResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()), - name: "image", - fileName: request.Imagename ?? string.Empty); + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } + var __contentMask = new global::System.Net.Http.ByteArrayContent(request.Mask ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Mask ?? global::System.Array.Empty()), - name: "mask", - fileName: request.Maskname ?? string.Empty); + content: __contentMask, + name: "\"mask\"", + fileName: request.Maskname != null ? $"\"{request.Maskname}\"" : string.Empty); + if (__contentMask.Headers.ContentDisposition != null) + { + __contentMask.Headers.ContentDisposition.FileNameStar = null; + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); if (request.MagicPrompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.MagicPrompt?.ToValueString()}"), - name: "magic_prompt"); + name: "\"magic_prompt\""); } if (request.NumImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NumImages}"), - name: "num_images"); + name: "\"num_images\""); } if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.RenderingSpeed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), - name: "rendering_speed"); + name: "\"rendering_speed\""); } if (request.StyleType != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), - name: "style_type"); + name: "\"style_type\""); } if (request.StylePreset != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StylePreset?.ToValueString()}"), - name: "style_preset"); + name: "\"style_preset\""); + } + if (request.CustomModelUri != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.CustomModelUri}"), + name: "\"custom_model_uri\""); } if (request.ColorPalette != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.ColorPalette?.ToString() ?? string.Empty), - name: "color_palette"); + name: "\"color_palette\""); } if (request.StyleCodes != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleCodes, x => x))}]"), - name: "style_codes"); + name: "\"style_codes\""); } if (request.StyleReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleReferenceImages, x => x))}]"), - name: "style_reference_images"); + name: "\"style_reference_images\""); } if (request.CharacterReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.CharacterReferenceImages, x => x))}]"), - name: "character_reference_images"); + name: "\"character_reference_images\""); } if (request.CharacterReferenceImagesMask != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.CharacterReferenceImagesMask, x => x))}]"), - name: "character_reference_images_mask"); + name: "\"character_reference_images_mask\""); } __httpRequest.Content = __httpRequestContent; @@ -426,6 +455,11 @@ partial void ProcessPostEditImageV3ResponseContent( /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -456,6 +490,7 @@ partial void ProcessPostEditImageV3ResponseContent( global::Ideogram.RenderingSpeed? renderingSpeed = default, global::Ideogram.StyleTypeV3? styleType = default, global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette = default, global::System.Collections.Generic.IList? styleCodes = default, global::System.Collections.Generic.IList? styleReferenceImages = default, @@ -476,6 +511,7 @@ partial void ProcessPostEditImageV3ResponseContent( RenderingSpeed = renderingSpeed, StyleType = styleType, StylePreset = stylePreset, + CustomModelUri = customModelUri, ColorPalette = colorPalette, StyleCodes = styleCodes, StyleReferenceImages = styleReferenceImages, diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateDesignV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateDesignV3.g.cs new file mode 100644 index 0000000..6e49845 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateDesignV3.g.cs @@ -0,0 +1,550 @@ + +#nullable enable + +namespace Ideogram +{ + public partial class GenerateClient + { + partial void PreparePostGenerateDesignV3Arguments( + global::System.Net.Http.HttpClient httpClient, + global::Ideogram.GenerateDesignRequestV3 request); + partial void PreparePostGenerateDesignV3Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Ideogram.GenerateDesignRequestV3 request); + partial void ProcessPostGenerateDesignV3Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostGenerateDesignV3ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generate a design from a text prompt with text detection and correction
+ /// Generates a design synchronously from a text prompt using the Ideogram 3.0 model, then detects and corrects text layers within the generated image.
+ /// The response includes the generated image URL along with detected text layers (with font, size, color, position) and image asset layers.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateDesignV3Async( + + global::Ideogram.GenerateDesignRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePostGenerateDesignV3Arguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::Ideogram.PathBuilder( + path: "/v1/ideogram-v3/generate-design", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + if (request.Seed != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Seed}"), + name: "\"seed\""); + } + if (request.Resolution != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Resolution?.ToValueString()}"), + name: "\"resolution\""); + } + if (request.AspectRatio != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.AspectRatio?.ToValueString()}"), + name: "\"aspect_ratio\""); + } + if (request.RenderingSpeed != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), + name: "\"rendering_speed\""); + } + if (request.MagicPrompt != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.MagicPrompt?.ToValueString()}"), + name: "\"magic_prompt\""); + } + if (request.NegativePrompt != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.NegativePrompt}"), + name: "\"negative_prompt\""); + } + if (request.NumImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.NumImages}"), + name: "\"num_images\""); + } + if (request.ColorPalette != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ColorPalette?.ToString() ?? string.Empty), + name: "\"color_palette\""); + } + if (request.StyleCodes != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleCodes, x => x))}]"), + name: "\"style_codes\""); + } + if (request.StyleType != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), + name: "\"style_type\""); + } + if (request.StylePreset != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.StylePreset?.ToValueString()}"), + name: "\"style_preset\""); + } + if (request.CustomModelUri != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.CustomModelUri}"), + name: "\"custom_model_uri\""); + } + if (request.RequestedFontFile != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.RequestedFontFile}"), + name: "\"requested_font_file\""); + } + if (request.UploadedFontFile != default) + { + + var __contentUploadedFontFile = new global::System.Net.Http.ByteArrayContent(request.UploadedFontFile ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentUploadedFontFile, + name: "\"uploaded_font_file\"", + fileName: request.UploadedFontFilename != null ? $"\"{request.UploadedFontFilename}\"" : string.Empty); + if (__contentUploadedFontFile.Headers.ContentDisposition != null) + { + __contentUploadedFontFile.Headers.ContentDisposition.FileNameStar = null; + } + } + if (request.StyleReferenceImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleReferenceImages, x => x))}]"), + name: "\"style_reference_images\""); + } + if (request.ReferenceAssetImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.ReferenceAssetImages, x => x))}]"), + name: "\"reference_asset_images\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePostGenerateDesignV3Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPostGenerateDesignV3Response( + httpClient: HttpClient, + httpResponseMessage: __response); + // + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Prompt failed the safety check. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Ideogram.GenerateImageSafetyError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::Ideogram.GenerateImageSafetyError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::Ideogram.GenerateImageSafetyError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (ReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + statusCode: __response.StatusCode) + { + ResponseBody = __content_429, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPostGenerateDesignV3ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ideogram.LayeredImageGenerationResponseV3.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ideogram.LayeredImageGenerationResponseV3.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Generate a design from a text prompt with text detection and correction
+ /// Generates a design synchronously from a text prompt using the Ideogram 3.0 model, then detects and corrects text layers within the generated image.
+ /// The response includes the generated image URL along with detected text layers (with font, size, color, position) and image asset layers.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The prompt to use to generate the design.
+ /// Example: A birthday card saying 'Happy Birthday' + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// The resolutions supported for Ideogram 3.0.
+ /// Example: 1280x800 + /// + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// Description of what to exclude from a design. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + /// + /// + /// Number of designs to generate.
+ /// Default Value: 1 + /// + /// + /// 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. + /// + /// + /// 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.
+ /// Example: [AAFF5733, 0133FF57, DE3357FF] + /// + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + /// + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// 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. + /// + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateDesignV3Async( + string prompt, + int? seed = default, + global::Ideogram.ResolutionV3? resolution = default, + global::Ideogram.AspectRatioV3? aspectRatio = default, + global::Ideogram.RenderingSpeed? renderingSpeed = default, + global::Ideogram.MagicPromptOption? magicPrompt = default, + string? negativePrompt = default, + int? numImages = default, + global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette = default, + global::System.Collections.Generic.IList? styleCodes = default, + global::Ideogram.StyleTypeV3? styleType = default, + global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, + string? requestedFontFile = default, + byte[]? uploadedFontFile = default, + string? uploadedFontFilename = default, + global::System.Collections.Generic.IList? styleReferenceImages = default, + global::System.Collections.Generic.IList? referenceAssetImages = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ideogram.GenerateDesignRequestV3 + { + Prompt = prompt, + Seed = seed, + Resolution = resolution, + AspectRatio = aspectRatio, + RenderingSpeed = renderingSpeed, + MagicPrompt = magicPrompt, + NegativePrompt = negativePrompt, + NumImages = numImages, + ColorPalette = colorPalette, + StyleCodes = styleCodes, + StyleType = styleType, + StylePreset = stylePreset, + CustomModelUri = customModelUri, + RequestedFontFile = requestedFontFile, + UploadedFontFile = uploadedFontFile, + UploadedFontFilename = uploadedFontFilename, + StyleReferenceImages = styleReferenceImages, + ReferenceAssetImages = referenceAssetImages, + }; + + return await PostGenerateDesignV3Async( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs index 61a86bf..d0fd54e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImage.g.cs @@ -30,6 +30,7 @@ partial void ProcessPostGenerateImageResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::Ideogram.GenerateImageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -308,7 +309,9 @@ partial void ProcessPostGenerateImageResponseContent( /// Generates images synchronously based on a given prompt and optional parameters.
/// Images links are available for a limited period of time; if you would like to keep the image, you must download it. /// - /// + /// + /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"AUTO","model":"V_2","prompt":"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 is 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."} + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostGenerateImageAsync( diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3.g.cs index 215fd2f..0218c6a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3.g.cs @@ -30,6 +30,7 @@ partial void ProcessPostGenerateImageV3ResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostGenerateImageV3Async( + global::Ideogram.GenerateImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,90 +72,111 @@ partial void ProcessPostGenerateImageV3ResponseContent( using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.Resolution != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Resolution?.ToValueString()}"), - name: "resolution"); + name: "\"resolution\""); } if (request.AspectRatio != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.AspectRatio?.ToValueString()}"), - name: "aspect_ratio"); + name: "\"aspect_ratio\""); } if (request.RenderingSpeed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), - name: "rendering_speed"); + name: "\"rendering_speed\""); } if (request.MagicPrompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.MagicPrompt?.ToValueString()}"), - name: "magic_prompt"); + name: "\"magic_prompt\""); } if (request.NegativePrompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NegativePrompt}"), - name: "negative_prompt"); + name: "\"negative_prompt\""); } if (request.NumImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NumImages}"), - name: "num_images"); + name: "\"num_images\""); } if (request.ColorPalette != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.ColorPalette?.ToString() ?? string.Empty), - name: "color_palette"); + name: "\"color_palette\""); } if (request.StyleCodes != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleCodes, x => x))}]"), - name: "style_codes"); + name: "\"style_codes\""); } if (request.StyleType != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), - name: "style_type"); + name: "\"style_type\""); } if (request.StylePreset != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StylePreset?.ToValueString()}"), - name: "style_preset"); + name: "\"style_preset\""); + } + if (request.CustomModelUri != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.CustomModelUri}"), + name: "\"custom_model_uri\""); } if (request.StyleReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleReferenceImages, x => x))}]"), - name: "style_reference_images"); + name: "\"style_reference_images\""); } if (request.CharacterReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.CharacterReferenceImages, x => x))}]"), - name: "character_reference_images"); + name: "\"character_reference_images\""); } if (request.CharacterReferenceImagesMask != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.CharacterReferenceImagesMask, x => x))}]"), - name: "character_reference_images_mask"); + name: "\"character_reference_images_mask\""); } __httpRequest.Content = __httpRequestContent; @@ -439,6 +461,11 @@ partial void ProcessPostGenerateImageV3ResponseContent( /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -463,6 +490,7 @@ partial void ProcessPostGenerateImageV3ResponseContent( global::System.Collections.Generic.IList? styleCodes = default, global::Ideogram.StyleTypeV3? styleType = default, global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, global::System.Collections.Generic.IList? styleReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImagesMask = default, @@ -482,6 +510,7 @@ partial void ProcessPostGenerateImageV3ResponseContent( StyleCodes = styleCodes, StyleType = styleType, StylePreset = stylePreset, + CustomModelUri = customModelUri, StyleReferenceImages = styleReferenceImages, CharacterReferenceImages = characterReferenceImages, CharacterReferenceImagesMask = characterReferenceImagesMask, diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3Transparent.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3Transparent.g.cs new file mode 100644 index 0000000..a6039f2 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3Transparent.g.cs @@ -0,0 +1,444 @@ + +#nullable enable + +namespace Ideogram +{ + public partial class GenerateClient + { + partial void PreparePostGenerateImageV3TransparentArguments( + global::System.Net.Http.HttpClient httpClient, + global::Ideogram.GenerateTransparentImageRequestV3 request); + partial void PreparePostGenerateImageV3TransparentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Ideogram.GenerateTransparentImageRequestV3 request); + partial void ProcessPostGenerateImageV3TransparentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostGenerateImageV3TransparentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generate with Ideogram 3.0 (Transparent Background)
+ /// Generates images with transparent background synchronously based on a given prompt and optional parameters using
+ /// the Ideogram 3.0 model. Images will be generated using maximum supported resolution at the specified aspect ratio
+ /// to allow best results with upscaler. The selected resolution is written to the response, not the upscaled final
+ /// resolution.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateImageV3TransparentAsync( + + global::Ideogram.GenerateTransparentImageRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePostGenerateImageV3TransparentArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::Ideogram.PathBuilder( + path: "/v1/ideogram-v3/generate-transparent", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + if (request.Seed != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Seed}"), + name: "\"seed\""); + } + if (request.UpscaleFactor != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.UpscaleFactor?.ToValueString()}"), + name: "\"upscale_factor\""); + } + if (request.AspectRatio != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.AspectRatio?.ToValueString()}"), + name: "\"aspect_ratio\""); + } + if (request.RenderingSpeed != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), + name: "\"rendering_speed\""); + } + if (request.MagicPrompt != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.MagicPrompt?.ToValueString()}"), + name: "\"magic_prompt\""); + } + if (request.NegativePrompt != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.NegativePrompt}"), + name: "\"negative_prompt\""); + } + if (request.NumImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.NumImages}"), + name: "\"num_images\""); + } + if (request.CustomModelUri != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.CustomModelUri}"), + name: "\"custom_model_uri\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePostGenerateImageV3TransparentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPostGenerateImageV3TransparentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Prompt failed the safety check. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Ideogram.GenerateImageSafetyError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::Ideogram.GenerateImageSafetyError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::Ideogram.GenerateImageSafetyError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (ReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + statusCode: __response.StatusCode) + { + ResponseBody = __content_429, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPostGenerateImageV3TransparentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ideogram.ImageGenerationResponseV3.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ideogram.ImageGenerationResponseV3.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Generate with Ideogram 3.0 (Transparent Background)
+ /// Generates images with transparent background synchronously based on a given prompt and optional parameters using
+ /// the Ideogram 3.0 model. Images will be generated using maximum supported resolution at the specified aspect ratio
+ /// to allow best results with upscaler. The selected resolution is written to the response, not the upscaled final
+ /// resolution.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The prompt to use to generate the image.
+ /// Example: A photo of a cat + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// Upscale the initially generated image by the given factor. Upscale factors other than X1 will incur additional cost.
+ /// Default Value: X1
+ /// Example: X2 + /// + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// Description of what to exclude from an image. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + /// + /// + /// Number of images to generate.
+ /// Default Value: 1 + /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// A model must be able to generate transparent background to be used for this endpoint.
+ /// Example: model/my-custom-model/version/1 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostGenerateImageV3TransparentAsync( + string prompt, + int? seed = default, + global::Ideogram.UpscaleFactor? upscaleFactor = default, + global::Ideogram.AspectRatioV3? aspectRatio = default, + global::Ideogram.RenderingSpeed? renderingSpeed = default, + global::Ideogram.MagicPromptOption? magicPrompt = default, + string? negativePrompt = default, + int? numImages = default, + string? customModelUri = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ideogram.GenerateTransparentImageRequestV3 + { + Prompt = prompt, + Seed = seed, + UpscaleFactor = upscaleFactor, + AspectRatio = aspectRatio, + RenderingSpeed = renderingSpeed, + MagicPrompt = magicPrompt, + NegativePrompt = negativePrompt, + NumImages = numImages, + CustomModelUri = customModelUri, + }; + + return await PostGenerateImageV3TransparentAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostLayerizeDesignV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostLayerizeDesignV3.g.cs new file mode 100644 index 0000000..0665a15 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostLayerizeDesignV3.g.cs @@ -0,0 +1,381 @@ + +#nullable enable + +namespace Ideogram +{ + public partial class GenerateClient + { + partial void PreparePostLayerizeDesignV3Arguments( + global::System.Net.Http.HttpClient httpClient, + global::Ideogram.LayerizeDesignRequestV3 request); + partial void PreparePostLayerizeDesignV3Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Ideogram.LayerizeDesignRequestV3 request); + partial void ProcessPostLayerizeDesignV3Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostLayerizeDesignV3ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Layerize an existing flat graphic image with text detection and correction
+ /// Processes an existing flat graphic image to detect and correct text layers without generating a new image from scratch.
+ /// The uploaded image is analyzed for text content, which is then removed and returned as structured text layers with font matching, sizing, and color information.
+ /// Supported image formats include JPEG, PNG, and WebP (max size 10MB).
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostLayerizeDesignV3Async( + + global::Ideogram.LayerizeDesignRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePostLayerizeDesignV3Arguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::Ideogram.PathBuilder( + path: "/v1/ideogram-v3/layerize-design", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFlatGraphicImage = new global::System.Net.Http.ByteArrayContent(request.FlatGraphicImage ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentFlatGraphicImage, + name: "\"flat_graphic_image\"", + fileName: request.FlatGraphicImagename != null ? $"\"{request.FlatGraphicImagename}\"" : string.Empty); + if (__contentFlatGraphicImage.Headers.ContentDisposition != null) + { + __contentFlatGraphicImage.Headers.ContentDisposition.FileNameStar = null; + } + if (request.Prompt != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + } + if (request.Seed != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Seed}"), + name: "\"seed\""); + } + if (request.RequestedFontFile != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.RequestedFontFile}"), + name: "\"requested_font_file\""); + } + if (request.UploadedFontFile != default) + { + + var __contentUploadedFontFile = new global::System.Net.Http.ByteArrayContent(request.UploadedFontFile ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentUploadedFontFile, + name: "\"uploaded_font_file\"", + fileName: request.UploadedFontFilename != null ? $"\"{request.UploadedFontFilename}\"" : string.Empty); + if (__contentUploadedFontFile.Headers.ContentDisposition != null) + { + __contentUploadedFontFile.Headers.ContentDisposition.FileNameStar = null; + } + } + if (request.ReferenceAssetImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.ReferenceAssetImages, x => x))}]"), + name: "\"reference_asset_images\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePostLayerizeDesignV3Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPostLayerizeDesignV3Response( + httpClient: HttpClient, + httpResponseMessage: __response); + // + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (ReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + statusCode: __response.StatusCode) + { + ResponseBody = __content_429, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPostLayerizeDesignV3ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ideogram.LayeredImageGenerationResponseV3.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ideogram.LayeredImageGenerationResponseV3.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Layerize an existing flat graphic image with text detection and correction
+ /// Processes an existing flat graphic image to detect and correct text layers without generating a new image from scratch.
+ /// The uploaded image is analyzed for text content, which is then removed and returned as structured text layers with font matching, sizing, and color information.
+ /// Supported image formats include JPEG, PNG, and WebP (max size 10MB).
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// An optional prompt to describe the image. If not provided, a prompt will be auto-generated from the image via captioning. + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostLayerizeDesignV3Async( + byte[] flatGraphicImage, + string flatGraphicImagename, + string? prompt = default, + int? seed = default, + string? requestedFontFile = default, + byte[]? uploadedFontFile = default, + string? uploadedFontFilename = default, + global::System.Collections.Generic.IList? referenceAssetImages = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ideogram.LayerizeDesignRequestV3 + { + FlatGraphicImage = flatGraphicImage, + FlatGraphicImagename = flatGraphicImagename, + Prompt = prompt, + Seed = seed, + RequestedFontFile = requestedFontFile, + UploadedFontFile = uploadedFontFile, + UploadedFontFilename = uploadedFontFilename, + ReferenceAssetImages = referenceAssetImages, + }; + + return await PostLayerizeDesignV3Async( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImage.g.cs index ee7b77c..3fcb9eb 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImage.g.cs @@ -30,6 +30,7 @@ partial void ProcessPostReframeImageResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostReframeImageAsync( + global::Ideogram.ReframeImageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -69,33 +70,41 @@ partial void ProcessPostReframeImageResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImageFile = new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()), - name: "image_file", - fileName: request.ImageFilename ?? string.Empty); + content: __contentImageFile, + name: "\"image_file\"", + fileName: request.ImageFilename != null ? $"\"{request.ImageFilename}\"" : string.Empty); + if (__contentImageFile.Headers.ContentDisposition != null) + { + __contentImageFile.Headers.ContentDisposition.FileNameStar = null; + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Resolution.ToValueString()}"), - name: "resolution"); + name: "\"resolution\""); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Model.ToValueString()}"), - name: "model"); + name: "\"model\""); if (request.NumImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NumImages}"), - name: "num_images"); + name: "\"num_images\""); } if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.StyleType != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), - name: "style_type"); + name: "\"style_type\""); } __httpRequest.Content = __httpRequestContent; @@ -365,7 +374,7 @@ partial void ProcessPostReframeImageResponseContent( byte[] imageFile, string imageFilename, global::Ideogram.Resolution resolution, - global::Ideogram.ModelEnum model, + global::Ideogram.ModelEnum model = global::Ideogram.ModelEnum.V2, int? numImages = default, int? seed = default, global::Ideogram.StyleType? styleType = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImageV3.g.cs index 9c7dabe..2767afc 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImageV3.g.cs @@ -30,6 +30,7 @@ partial void ProcessPostReframeImageV3ResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostReframeImageV3Async( + global::Ideogram.ReframeImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -69,54 +70,66 @@ partial void ProcessPostReframeImageV3ResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()), - name: "image", - fileName: request.Imagename ?? string.Empty); + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Resolution.ToValueString()}"), - name: "resolution"); + name: "\"resolution\""); if (request.NumImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NumImages}"), - name: "num_images"); + name: "\"num_images\""); } if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.RenderingSpeed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), - name: "rendering_speed"); + name: "\"rendering_speed\""); } if (request.StylePreset != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StylePreset?.ToValueString()}"), - name: "style_preset"); + name: "\"style_preset\""); } if (request.ColorPalette != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.ColorPalette?.ToString() ?? string.Empty), - name: "color_palette"); + name: "\"color_palette\""); } if (request.StyleCodes != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleCodes, x => x))}]"), - name: "style_codes"); + name: "\"style_codes\""); } if (request.StyleReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleReferenceImages, x => x))}]"), - name: "style_reference_images"); + name: "\"style_reference_images\""); } __httpRequest.Content = __httpRequestContent; diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs index 8c1a7e1..cd8d65c 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImage.g.cs @@ -32,6 +32,7 @@ partial void ProcessPostRemixImageResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostRemixImageAsync( + global::Ideogram.RemixImageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -73,11 +74,16 @@ partial void ProcessPostRemixImageResponseContent( using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ImageRequest}"), - name: "image_request"); + name: "\"image_request\""); + var __contentImageFile = new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()), - name: "image_file", - fileName: request.ImageFilename ?? string.Empty); + content: __contentImageFile, + name: "\"image_file\"", + fileName: request.ImageFilename != null ? $"\"{request.ImageFilename}\"" : string.Empty); + if (__contentImageFile.Headers.ContentDisposition != null) + { + __contentImageFile.Headers.ContentDisposition.FileNameStar = null; + } __httpRequest.Content = __httpRequestContent; PrepareRequest( @@ -316,7 +322,8 @@ partial void ProcessPostRemixImageResponseContent( /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. /// /// - /// A request to generate a new image using a provided image and a prompt. + /// A request to generate a new image using a provided image and a prompt.
+ /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"ON","model":"V_2","prompt":"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 is 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.","image_weight":50} /// /// /// An image binary (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImageV3.g.cs index 656610d..6e9e4d6 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImageV3.g.cs @@ -32,6 +32,7 @@ partial void ProcessPostRemixImageV3ResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostRemixImageV3Async( + global::Ideogram.RemixImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,102 +72,129 @@ partial void ProcessPostRemixImageV3ResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()), - name: "image", - fileName: request.Imagename ?? string.Empty); + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); if (request.ImageWeight != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ImageWeight}"), - name: "image_weight"); + name: "\"image_weight\""); } if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.Resolution != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Resolution?.ToValueString()}"), - name: "resolution"); + name: "\"resolution\""); } if (request.AspectRatio != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.AspectRatio?.ToValueString()}"), - name: "aspect_ratio"); + name: "\"aspect_ratio\""); } if (request.RenderingSpeed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), - name: "rendering_speed"); + name: "\"rendering_speed\""); } if (request.MagicPrompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.MagicPrompt?.ToValueString()}"), - name: "magic_prompt"); + name: "\"magic_prompt\""); } if (request.NegativePrompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NegativePrompt}"), - name: "negative_prompt"); + name: "\"negative_prompt\""); } if (request.NumImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NumImages}"), - name: "num_images"); + name: "\"num_images\""); } if (request.ColorPalette != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.ColorPalette?.ToString() ?? string.Empty), - name: "color_palette"); + name: "\"color_palette\""); } if (request.StyleCodes != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleCodes, x => x))}]"), - name: "style_codes"); + name: "\"style_codes\""); } if (request.StyleType != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), - name: "style_type"); + name: "\"style_type\""); } if (request.StylePreset != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StylePreset?.ToValueString()}"), - name: "style_preset"); + name: "\"style_preset\""); + } + if (request.CustomModelUri != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.CustomModelUri}"), + name: "\"custom_model_uri\""); } if (request.StyleReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleReferenceImages, x => x))}]"), - name: "style_reference_images"); + name: "\"style_reference_images\""); } if (request.CharacterReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.CharacterReferenceImages, x => x))}]"), - name: "character_reference_images"); + name: "\"character_reference_images\""); } if (request.CharacterReferenceImagesMask != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.CharacterReferenceImagesMask, x => x))}]"), - name: "character_reference_images_mask"); + name: "\"character_reference_images_mask\""); } __httpRequest.Content = __httpRequestContent; @@ -463,6 +491,11 @@ partial void ProcessPostRemixImageV3ResponseContent( /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -490,6 +523,7 @@ partial void ProcessPostRemixImageV3ResponseContent( global::System.Collections.Generic.IList? styleCodes = default, global::Ideogram.StyleTypeV3? styleType = default, global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, global::System.Collections.Generic.IList? styleReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImagesMask = default, @@ -512,6 +546,7 @@ partial void ProcessPostRemixImageV3ResponseContent( StyleCodes = styleCodes, StyleType = styleType, StylePreset = stylePreset, + CustomModelUri = customModelUri, StyleReferenceImages = styleReferenceImages, CharacterReferenceImages = characterReferenceImages, CharacterReferenceImagesMask = characterReferenceImagesMask, diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReplaceBackgroundV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReplaceBackgroundV3.g.cs index ecd2ce2..1484d2a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReplaceBackgroundV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReplaceBackgroundV3.g.cs @@ -32,6 +32,7 @@ partial void ProcessPostReplaceBackgroundV3ResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostReplaceBackgroundV3Async( + global::Ideogram.ReplaceBackgroundRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,60 +72,73 @@ partial void ProcessPostReplaceBackgroundV3ResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()), - name: "image", - fileName: request.Imagename ?? string.Empty); + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); if (request.MagicPrompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.MagicPrompt?.ToValueString()}"), - name: "magic_prompt"); + name: "\"magic_prompt\""); } if (request.NumImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NumImages}"), - name: "num_images"); + name: "\"num_images\""); } if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.RenderingSpeed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), - name: "rendering_speed"); + name: "\"rendering_speed\""); } if (request.StylePreset != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StylePreset?.ToValueString()}"), - name: "style_preset"); + name: "\"style_preset\""); } if (request.ColorPalette != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.ColorPalette?.ToString() ?? string.Empty), - name: "color_palette"); + name: "\"color_palette\""); } if (request.StyleCodes != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleCodes, x => x))}]"), - name: "style_codes"); + name: "\"style_codes\""); } if (request.StyleReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.StyleReferenceImages, x => x))}]"), - name: "style_reference_images"); + name: "\"style_reference_images\""); } __httpRequest.Content = __httpRequestContent; diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostTryOnV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostTryOnV3.g.cs new file mode 100644 index 0000000..cb9b193 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostTryOnV3.g.cs @@ -0,0 +1,443 @@ + +#nullable enable + +namespace Ideogram +{ + public partial class GenerateClient + { + partial void PreparePostTryOnV3Arguments( + global::System.Net.Http.HttpClient httpClient, + global::Ideogram.TryOnRequestV3 request); + partial void PreparePostTryOnV3Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Ideogram.TryOnRequestV3 request); + partial void ProcessPostTryOnV3Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostTryOnV3ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Virtual Try-On with Ideogram 3.0
+ /// Performs virtual clothing try-on by automatically segmenting the clothing in the provided image
+ /// and replacing it based on the prompt. The user provides an image and a prompt describing the
+ /// desired clothing change (e.g., "change his shirt to a pink shirt").
+ /// Supported image formats include JPEG, PNG, and WebP.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostTryOnV3Async( + + global::Ideogram.TryOnRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PreparePostTryOnV3Arguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::Ideogram.PathBuilder( + path: "/v1/ideogram-v3/try-on", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + if (request.MagicPrompt != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.MagicPrompt?.ToValueString()}"), + name: "\"magic_prompt\""); + } + if (request.NumImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.NumImages}"), + name: "\"num_images\""); + } + if (request.Seed != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Seed}"), + name: "\"seed\""); + } + if (request.RenderingSpeed != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.RenderingSpeed?.ToValueString()}"), + name: "\"rendering_speed\""); + } + if (request.StyleType != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), + name: "\"style_type\""); + } + if (request.StylePreset != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.StylePreset?.ToValueString()}"), + name: "\"style_preset\""); + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.ProductReferenceImages, x => x))}]"), + name: "\"product_reference_images\""); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePostTryOnV3Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPostTryOnV3Response( + httpClient: HttpClient, + httpResponseMessage: __response); + // + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Prompt or provided image failed safety check, or clothing segmentation failed. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Ideogram.GenerateImageSafetyError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::Ideogram.GenerateImageSafetyError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::Ideogram.GenerateImageSafetyError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (ReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + } + else + { + var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + throw new global::Ideogram.ApiException( + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + statusCode: __response.StatusCode) + { + ResponseBody = __content_429, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPostTryOnV3ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ideogram.ImageGenerationResponseV3.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ideogram.ImageGenerationResponseV3.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ideogram.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Virtual Try-On with Ideogram 3.0
+ /// Performs virtual clothing try-on by automatically segmenting the clothing in the provided image
+ /// and replacing it based on the prompt. The user provides an image and a prompt describing the
+ /// desired clothing change (e.g., "change his shirt to a pink shirt").
+ /// Supported image formats include JPEG, PNG, and WebP.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + /// + /// The prompt describing the desired clothing change.
+ /// Example: Change his shirt to a pink shirt + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// The number of images to generate.
+ /// Default Value: 1 + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + /// + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + /// + /// + /// An image to use as the product reference for the try-on (exactly 1 image required). The image should be in JPEG, PNG or WebP format. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostTryOnV3Async( + byte[] image, + string imagename, + string prompt, + global::System.Collections.Generic.IList productReferenceImages, + global::Ideogram.MagicPromptOption? magicPrompt = default, + int? numImages = default, + int? seed = default, + global::Ideogram.RenderingSpeed? renderingSpeed = default, + global::Ideogram.StyleTypeV3? styleType = default, + global::Ideogram.StylePresetV3? stylePreset = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ideogram.TryOnRequestV3 + { + Image = image, + Imagename = imagename, + Prompt = prompt, + MagicPrompt = magicPrompt, + NumImages = numImages, + Seed = seed, + RenderingSpeed = renderingSpeed, + StyleType = styleType, + StylePreset = stylePreset, + ProductReferenceImages = productReferenceImages, + }; + + return await PostTryOnV3Async( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs index 3b0a48b..e25ebc7 100644 --- a/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostUpscaleImage.g.cs @@ -31,6 +31,7 @@ partial void ProcessPostUpscaleImageResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::Ideogram.UpscaleImageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,11 +73,16 @@ partial void ProcessPostUpscaleImageResponseContent( using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ImageRequest}"), - name: "image_request"); + name: "\"image_request\""); + var __contentImageFile = new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()), - name: "image_file", - fileName: request.ImageFilename ?? string.Empty); + content: __contentImageFile, + name: "\"image_file\"", + fileName: request.ImageFilename != null ? $"\"{request.ImageFilename}\"" : string.Empty); + if (__contentImageFile.Headers.ContentDisposition != null) + { + __contentImageFile.Headers.ContentDisposition.FileNameStar = null; + } __httpRequest.Content = __httpRequestContent; PrepareRequest( diff --git a/src/libs/Ideogram/Generated/Ideogram.IBatchClient.PostBatch.g.cs b/src/libs/Ideogram/Generated/Ideogram.IBatchClient.PostBatch.g.cs index 9121698..0f5b4f6 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IBatchClient.PostBatch.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IBatchClient.PostBatch.g.cs @@ -13,6 +13,7 @@ public partial interface IBatchClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostBatchAsync( + global::Ideogram.InternalBatchRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -29,7 +30,9 @@ public partial interface IBatchClient /// The experiment variant used for template selection for the magic prompts.
/// Example: MAGIC_PROMPT_NO_TEXT /// - /// + /// + /// Example: {"aspect_ratio":"1x1","style_type":"GENERAL","magic_prompt_version":"V_0","seed":12345,"negative_prompt":"brush strokes, painting","magic_prompt_option":"ON","model":"V_2_TURBO","resolution":"1280x800","num_images":1,"color_palette":{"name":"PASTEL"}} + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostBatchAsync( diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImage.g.cs index f38b192..bd7a750 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImage.g.cs @@ -15,6 +15,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostEditImageAsync( + global::Ideogram.EditImageRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -70,7 +71,7 @@ public partial interface IGenerateClient byte[] mask, string maskname, string prompt, - global::Ideogram.ModelEnum model, + global::Ideogram.ModelEnum model = global::Ideogram.ModelEnum.V2, global::Ideogram.MagicPromptOption? magicPromptOption = default, int? numImages = default, int? seed = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImageV3.g.cs index 88d15bd..d2ecde5 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImageV3.g.cs @@ -15,6 +15,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostEditImageV3Async( + global::Ideogram.EditImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default); @@ -66,6 +67,11 @@ public partial interface IGenerateClient /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -96,6 +102,7 @@ public partial interface IGenerateClient global::Ideogram.RenderingSpeed? renderingSpeed = default, global::Ideogram.StyleTypeV3? styleType = default, global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette = default, global::System.Collections.Generic.IList? styleCodes = default, global::System.Collections.Generic.IList? styleReferenceImages = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateDesignV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateDesignV3.g.cs new file mode 100644 index 0000000..38e9312 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateDesignV3.g.cs @@ -0,0 +1,119 @@ +#nullable enable + +namespace Ideogram +{ + public partial interface IGenerateClient + { + /// + /// Generate a design from a text prompt with text detection and correction
+ /// Generates a design synchronously from a text prompt using the Ideogram 3.0 model, then detects and corrects text layers within the generated image.
+ /// The response includes the generated image URL along with detected text layers (with font, size, color, position) and image asset layers.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateDesignV3Async( + + global::Ideogram.GenerateDesignRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Generate a design from a text prompt with text detection and correction
+ /// Generates a design synchronously from a text prompt using the Ideogram 3.0 model, then detects and corrects text layers within the generated image.
+ /// The response includes the generated image URL along with detected text layers (with font, size, color, position) and image asset layers.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The prompt to use to generate the design.
+ /// Example: A birthday card saying 'Happy Birthday' + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// The resolutions supported for Ideogram 3.0.
+ /// Example: 1280x800 + /// + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// Description of what to exclude from a design. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + /// + /// + /// Number of designs to generate.
+ /// Default Value: 1 + /// + /// + /// 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. + /// + /// + /// 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.
+ /// Example: [AAFF5733, 0133FF57, DE3357FF] + /// + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + /// + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// 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. + /// + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateDesignV3Async( + string prompt, + int? seed = default, + global::Ideogram.ResolutionV3? resolution = default, + global::Ideogram.AspectRatioV3? aspectRatio = default, + global::Ideogram.RenderingSpeed? renderingSpeed = default, + global::Ideogram.MagicPromptOption? magicPrompt = default, + string? negativePrompt = default, + int? numImages = default, + global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette = default, + global::System.Collections.Generic.IList? styleCodes = default, + global::Ideogram.StyleTypeV3? styleType = default, + global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, + string? requestedFontFile = default, + byte[]? uploadedFontFile = default, + string? uploadedFontFilename = default, + global::System.Collections.Generic.IList? styleReferenceImages = default, + global::System.Collections.Generic.IList? referenceAssetImages = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImage.g.cs index 7150531..dc9899f 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImage.g.cs @@ -13,6 +13,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostGenerateImageAsync( + global::Ideogram.GenerateImageRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -21,7 +22,9 @@ public partial interface IGenerateClient /// Generates images synchronously based on a given prompt and optional parameters.
/// Images links are available for a limited period of time; if you would like to keep the image, you must download it. /// - /// + /// + /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"AUTO","model":"V_2","prompt":"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 is 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."} + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostGenerateImageAsync( diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3.g.cs index e5baf93..cb76061 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3.g.cs @@ -13,6 +13,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostGenerateImageV3Async( + global::Ideogram.GenerateImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default); @@ -69,6 +70,11 @@ public partial interface IGenerateClient /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -93,6 +99,7 @@ public partial interface IGenerateClient global::System.Collections.Generic.IList? styleCodes = default, global::Ideogram.StyleTypeV3? styleType = default, global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, global::System.Collections.Generic.IList? styleReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImagesMask = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3Transparent.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3Transparent.g.cs new file mode 100644 index 0000000..11f5757 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3Transparent.g.cs @@ -0,0 +1,84 @@ +#nullable enable + +namespace Ideogram +{ + public partial interface IGenerateClient + { + /// + /// Generate with Ideogram 3.0 (Transparent Background)
+ /// Generates images with transparent background synchronously based on a given prompt and optional parameters using
+ /// the Ideogram 3.0 model. Images will be generated using maximum supported resolution at the specified aspect ratio
+ /// to allow best results with upscaler. The selected resolution is written to the response, not the upscaled final
+ /// resolution.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateImageV3TransparentAsync( + + global::Ideogram.GenerateTransparentImageRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Generate with Ideogram 3.0 (Transparent Background)
+ /// Generates images with transparent background synchronously based on a given prompt and optional parameters using
+ /// the Ideogram 3.0 model. Images will be generated using maximum supported resolution at the specified aspect ratio
+ /// to allow best results with upscaler. The selected resolution is written to the response, not the upscaled final
+ /// resolution.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The prompt to use to generate the image.
+ /// Example: A photo of a cat + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// Upscale the initially generated image by the given factor. Upscale factors other than X1 will incur additional cost.
+ /// Default Value: X1
+ /// Example: X2 + /// + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// Description of what to exclude from an image. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + /// + /// + /// Number of images to generate.
+ /// Default Value: 1 + /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// A model must be able to generate transparent background to be used for this endpoint.
+ /// Example: model/my-custom-model/version/1 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostGenerateImageV3TransparentAsync( + string prompt, + int? seed = default, + global::Ideogram.UpscaleFactor? upscaleFactor = default, + global::Ideogram.AspectRatioV3? aspectRatio = default, + global::Ideogram.RenderingSpeed? renderingSpeed = default, + global::Ideogram.MagicPromptOption? magicPrompt = default, + string? negativePrompt = default, + int? numImages = default, + string? customModelUri = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostLayerizeDesignV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostLayerizeDesignV3.g.cs new file mode 100644 index 0000000..23682c9 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostLayerizeDesignV3.g.cs @@ -0,0 +1,68 @@ +#nullable enable + +namespace Ideogram +{ + public partial interface IGenerateClient + { + /// + /// Layerize an existing flat graphic image with text detection and correction
+ /// Processes an existing flat graphic image to detect and correct text layers without generating a new image from scratch.
+ /// The uploaded image is analyzed for text content, which is then removed and returned as structured text layers with font matching, sizing, and color information.
+ /// Supported image formats include JPEG, PNG, and WebP (max size 10MB).
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostLayerizeDesignV3Async( + + global::Ideogram.LayerizeDesignRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Layerize an existing flat graphic image with text detection and correction
+ /// Processes an existing flat graphic image to detect and correct text layers without generating a new image from scratch.
+ /// The uploaded image is analyzed for text content, which is then removed and returned as structured text layers with font matching, sizing, and color information.
+ /// Supported image formats include JPEG, PNG, and WebP (max size 10MB).
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// An optional prompt to describe the image. If not provided, a prompt will be auto-generated from the image via captioning. + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostLayerizeDesignV3Async( + byte[] flatGraphicImage, + string flatGraphicImagename, + string? prompt = default, + int? seed = default, + string? requestedFontFile = default, + byte[]? uploadedFontFile = default, + string? uploadedFontFilename = default, + global::System.Collections.Generic.IList? referenceAssetImages = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImage.g.cs index f3522ee..c622c11 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImage.g.cs @@ -13,6 +13,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostReframeImageAsync( + global::Ideogram.ReframeImageRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -54,7 +55,7 @@ public partial interface IGenerateClient byte[] imageFile, string imageFilename, global::Ideogram.Resolution resolution, - global::Ideogram.ModelEnum model, + global::Ideogram.ModelEnum model = global::Ideogram.ModelEnum.V2, int? numImages = default, int? seed = default, global::Ideogram.StyleType? styleType = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImageV3.g.cs index 4709d08..eff1ef1 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImageV3.g.cs @@ -13,6 +13,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostReframeImageV3Async( + global::Ideogram.ReframeImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImage.g.cs index a656d50..de33950 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImage.g.cs @@ -15,6 +15,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostRemixImageAsync( + global::Ideogram.RemixImageRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -26,7 +27,8 @@ public partial interface IGenerateClient /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. /// /// - /// A request to generate a new image using a provided image and a prompt. + /// A request to generate a new image using a provided image and a prompt.
+ /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"ON","model":"V_2","prompt":"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 is 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.","image_weight":50} /// /// /// An image binary (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImageV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImageV3.g.cs index a7a89be..d7f2a13 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImageV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImageV3.g.cs @@ -15,6 +15,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostRemixImageV3Async( + global::Ideogram.RemixImageRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default); @@ -83,6 +84,11 @@ public partial interface IGenerateClient /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -110,6 +116,7 @@ public partial interface IGenerateClient global::System.Collections.Generic.IList? styleCodes = default, global::Ideogram.StyleTypeV3? styleType = default, global::Ideogram.StylePresetV3? stylePreset = default, + string? customModelUri = default, global::System.Collections.Generic.IList? styleReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImages = default, global::System.Collections.Generic.IList? characterReferenceImagesMask = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReplaceBackgroundV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReplaceBackgroundV3.g.cs index f210554..aa3a1d3 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReplaceBackgroundV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReplaceBackgroundV3.g.cs @@ -15,6 +15,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostReplaceBackgroundV3Async( + global::Ideogram.ReplaceBackgroundRequestV3 request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostTryOnV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostTryOnV3.g.cs new file mode 100644 index 0000000..ca72610 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostTryOnV3.g.cs @@ -0,0 +1,84 @@ +#nullable enable + +namespace Ideogram +{ + public partial interface IGenerateClient + { + /// + /// Virtual Try-On with Ideogram 3.0
+ /// Performs virtual clothing try-on by automatically segmenting the clothing in the provided image
+ /// and replacing it based on the prompt. The user provides an image and a prompt describing the
+ /// desired clothing change (e.g., "change his shirt to a pink shirt").
+ /// Supported image formats include JPEG, PNG, and WebP.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostTryOnV3Async( + + global::Ideogram.TryOnRequestV3 request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Virtual Try-On with Ideogram 3.0
+ /// Performs virtual clothing try-on by automatically segmenting the clothing in the provided image
+ /// and replacing it based on the prompt. The user provides an image and a prompt describing the
+ /// desired clothing change (e.g., "change his shirt to a pink shirt").
+ /// Supported image formats include JPEG, PNG, and WebP.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + ///
+ /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + /// + /// The prompt describing the desired clothing change.
+ /// Example: Change his shirt to a pink shirt + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// The number of images to generate.
+ /// Default Value: 1 + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + /// + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + /// + /// + /// An image to use as the product reference for the try-on (exactly 1 image required). The image should be in JPEG, PNG or WebP format. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PostTryOnV3Async( + byte[] image, + string imagename, + string prompt, + global::System.Collections.Generic.IList productReferenceImages, + global::Ideogram.MagicPromptOption? magicPrompt = default, + int? numImages = default, + int? seed = default, + global::Ideogram.RenderingSpeed? renderingSpeed = default, + global::Ideogram.StyleTypeV3? styleType = default, + global::Ideogram.StylePresetV3? stylePreset = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostUpscaleImage.g.cs b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostUpscaleImage.g.cs index 53070f2..55fe847 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostUpscaleImage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostUpscaleImage.g.cs @@ -14,6 +14,7 @@ public partial interface IGenerateClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostUpscaleImageAsync( + global::Ideogram.UpscaleImageRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IInternalTestingClient.PostInternalTesting.g.cs b/src/libs/Ideogram/Generated/Ideogram.IInternalTestingClient.PostInternalTesting.g.cs index 8cb07db..8b9fbc5 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IInternalTestingClient.PostInternalTesting.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IInternalTestingClient.PostInternalTesting.g.cs @@ -14,6 +14,7 @@ public partial interface IInternalTestingClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostInternalTestingAsync( + global::Ideogram.InternalTestingRequest request, string? xTestHeader = default, string? xTestHeader2 = default, diff --git a/src/libs/Ideogram/Generated/Ideogram.IManageClient.AddOrganizationMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.IManageClient.AddOrganizationMembers.g.cs index 0d642bb..0801726 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IManageClient.AddOrganizationMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IManageClient.AddOrganizationMembers.g.cs @@ -13,6 +13,7 @@ public partial interface IManageClient /// global::System.Threading.Tasks.Task AddOrganizationMembersAsync( string organizationId, + global::Ideogram.AddOrganizationMembersRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IManageClient.GetUsageInfo.g.cs b/src/libs/Ideogram/Generated/Ideogram.IManageClient.GetUsageInfo.g.cs index e91fabd..a5000f6 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IManageClient.GetUsageInfo.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IManageClient.GetUsageInfo.g.cs @@ -17,6 +17,11 @@ public partial interface IManageClient /// /// /// + /// + /// + /// Filter usage by source - API for programmatic API usage, APP for web application usage
+ /// Default Value: API + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task GetUsageInfoAsync( @@ -27,6 +32,8 @@ public partial interface IManageClient global::System.Collections.Generic.IList? modelVersions = default, global::System.Collections.Generic.IList? tools = default, global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? userEmails = default, + global::Ideogram.UsageSource? source = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostAddCreditsForApi.g.cs b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostAddCreditsForApi.g.cs index ce55ecc..09b55b1 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostAddCreditsForApi.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostAddCreditsForApi.g.cs @@ -11,6 +11,7 @@ public partial interface IManageClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostAddCreditsForApiAsync( + global::Ideogram.PostAddCreditsRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -18,7 +19,8 @@ public partial interface IManageClient /// Add credits to an API user's account. /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// The token to cancel the operation with /// diff --git a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiSubscription.g.cs b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiSubscription.g.cs index 9b94a2b..e9490d4 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiSubscription.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiSubscription.g.cs @@ -11,6 +11,7 @@ public partial interface IManageClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::Ideogram.PostApiSubscriptionRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -18,7 +19,8 @@ public partial interface IManageClient /// Update API subscription settings /// /// - /// The current recharge settings for the API subscription. + /// The current recharge settings for the API subscription.
+ /// Example: {"minimum_balance_threshold":{"amount":1050,"currency_code":"USD"},"top_up_balance":{"amount":1050,"currency_code":"USD"}} /// /// /// Whether to enable or disable auto recharge. diff --git a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiTerms.g.cs b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiTerms.g.cs index 089d326..cb90b6a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiTerms.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PostApiTerms.g.cs @@ -11,6 +11,7 @@ public partial interface IManageClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostApiTermsAsync( + global::Ideogram.PostApiTermsRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PromoteOrganizationMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PromoteOrganizationMembers.g.cs index 1de7b7a..0e1da8a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IManageClient.PromoteOrganizationMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IManageClient.PromoteOrganizationMembers.g.cs @@ -13,6 +13,7 @@ public partial interface IManageClient /// global::System.Threading.Tasks.Task PromoteOrganizationMembersAsync( string organizationId, + global::Ideogram.PromoteOrganizationMembersRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IManageClient.RemoveOrganizationMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.IManageClient.RemoveOrganizationMembers.g.cs index e277f95..28b3241 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IManageClient.RemoveOrganizationMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IManageClient.RemoveOrganizationMembers.g.cs @@ -13,6 +13,7 @@ public partial interface IManageClient /// global::System.Threading.Tasks.Task RemoveOrganizationMembersAsync( string organizationId, + global::Ideogram.RemoveOrganizationMembersRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IPromptClient.PostMagicPrompt.g.cs b/src/libs/Ideogram/Generated/Ideogram.IPromptClient.PostMagicPrompt.g.cs index 4268f32..0639d83 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IPromptClient.PostMagicPrompt.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IPromptClient.PostMagicPrompt.g.cs @@ -12,6 +12,7 @@ public partial interface IPromptClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostMagicPromptAsync( + global::Ideogram.MagicPromptRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.IVisionClient.PostDescribe.g.cs b/src/libs/Ideogram/Generated/Ideogram.IVisionClient.PostDescribe.g.cs index b3e5496..bfcdeaa 100644 --- a/src/libs/Ideogram/Generated/Ideogram.IVisionClient.PostDescribe.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.IVisionClient.PostDescribe.g.cs @@ -13,6 +13,7 @@ public partial interface IVisionClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task PostDescribeAsync( + global::Ideogram.DescribeRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Ideogram/Generated/Ideogram.InternalTestingClient.PostInternalTesting.g.cs b/src/libs/Ideogram/Generated/Ideogram.InternalTestingClient.PostInternalTesting.g.cs index d2d21c0..11126eb 100644 --- a/src/libs/Ideogram/Generated/Ideogram.InternalTestingClient.PostInternalTesting.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.InternalTestingClient.PostInternalTesting.g.cs @@ -35,6 +35,7 @@ partial void ProcessPostInternalTestingResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostInternalTestingAsync( + global::Ideogram.InternalTestingRequest request, string? xTestHeader = default, string? xTestHeader2 = default, @@ -90,86 +91,109 @@ partial void ProcessPostInternalTestingResponseContent( using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (xTestHeader != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{xTestHeader}"), - name: "X-Test-Header"); + name: "\"X-Test-Header\""); } if (xTestHeader2 != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{xTestHeader2}"), - name: "X-Test-Header-2"); + name: "\"X-Test-Header-2\""); } if (request.XPosition != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.XPosition}"), - name: "x_position"); + name: "\"x_position\""); } if (request.ImageFile != default) { + + var __contentImageFile = new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()), - name: "image_file", - fileName: request.ImageFilename ?? string.Empty); + content: __contentImageFile, + name: "\"image_file\"", + fileName: request.ImageFilename != null ? $"\"{request.ImageFilename}\"" : string.Empty); + if (__contentImageFile.Headers.ContentDisposition != null) + { + __contentImageFile.Headers.ContentDisposition.FileNameStar = null; + } } if (request.AnotherImageFile != default) { + + var __contentAnotherImageFile = new global::System.Net.Http.ByteArrayContent(request.AnotherImageFile ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.AnotherImageFile ?? global::System.Array.Empty()), - name: "another_image_file", - fileName: request.AnotherImageFilename ?? string.Empty); + content: __contentAnotherImageFile, + name: "\"another_image_file\"", + fileName: request.AnotherImageFilename != null ? $"\"{request.AnotherImageFilename}\"" : string.Empty); + if (__contentAnotherImageFile.Headers.ContentDisposition != null) + { + __contentAnotherImageFile.Headers.ContentDisposition.FileNameStar = null; + } } if (request.SomeText != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.SomeText}"), - name: "some_text"); + name: "\"some_text\""); } if (request.NestedObject != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NestedObject}"), - name: "nested_object"); + name: "\"nested_object\""); } if (request.NestedObjectRequiredFields != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.NestedObjectRequiredFields}"), - name: "nested_object_required_fields"); + name: "\"nested_object_required_fields\""); } if (request.DateTypeField != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.DateTypeField}"), - name: "date_type_field"); - } + name: "\"date_type_field\""); + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.RequiredDateTypeField}"), - name: "required_date_type_field"); + name: "\"required_date_type_field\""); if (request.DateTimeTypeField != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.DateTimeTypeField}"), - name: "date_time_type_field"); + name: "\"date_time_type_field\""); } if (request.RepeatedPrimitiveField != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.RepeatedPrimitiveField, x => x))}]"), - name: "repeated_primitive_field"); + name: "\"repeated_primitive_field\""); } if (request.RepeatedComplexField != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.RepeatedComplexField, x => x))}]"), - name: "repeated_complex_field"); + name: "\"repeated_complex_field\""); } if (request.EnumTypeField != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.EnumTypeField?.ToValueString()}"), - name: "enum_type_field"); + name: "\"enum_type_field\""); } __httpRequest.Content = __httpRequestContent; diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.ColorPaletteWithPresetNameOrMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.ColorPaletteWithPresetNameOrMembers.g.cs index 74467e1..7e10a53 100644 --- a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.ColorPaletteWithPresetNameOrMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.ColorPaletteWithPresetNameOrMembers.g.cs @@ -17,41 +17,41 @@ public class ColorPaletteWithPresetNameOrMembersJsonConverter : global::System.T var readerCopy = reader; - global::Ideogram.ColorPaletteWithPresetName? value1 = default; + global::Ideogram.ColorPaletteWithPresetName? colorPaletteWithPresetName = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ideogram.ColorPaletteWithPresetName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ideogram.ColorPaletteWithPresetName).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + colorPaletteWithPresetName = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::Ideogram.ColorPaletteWithMembers? value2 = default; + global::Ideogram.ColorPaletteWithMembers? colorPaletteWithMembers = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ideogram.ColorPaletteWithMembers), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ideogram.ColorPaletteWithMembers).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + colorPaletteWithMembers = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::Ideogram.ColorPaletteWithPresetNameOrMembers( - value1, - value2 + colorPaletteWithPresetName, + colorPaletteWithMembers ); - if (value1 != null) + if (colorPaletteWithPresetName != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ideogram.ColorPaletteWithPresetName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ideogram.ColorPaletteWithPresetName).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (colorPaletteWithMembers != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ideogram.ColorPaletteWithMembers), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ideogram.ColorPaletteWithMembers).Name}"); @@ -70,17 +70,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsColorPaletteWithPresetName) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ideogram.ColorPaletteWithPresetName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ideogram.ColorPaletteWithPresetName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ColorPaletteWithPresetName, typeInfo); } - else if (value.IsValue2) + else if (value.IsColorPaletteWithMembers) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ideogram.ColorPaletteWithMembers), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ideogram.ColorPaletteWithMembers).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ColorPaletteWithMembers, typeInfo); } } } diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.TextLayerV3Alignment.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.TextLayerV3Alignment.g.cs new file mode 100644 index 0000000..6bc3940 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.TextLayerV3Alignment.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Ideogram.JsonConverters +{ + /// + public sealed class TextLayerV3AlignmentJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Ideogram.TextLayerV3Alignment 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::Ideogram.TextLayerV3AlignmentExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Ideogram.TextLayerV3Alignment)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Ideogram.TextLayerV3Alignment); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Ideogram.TextLayerV3Alignment value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Ideogram.TextLayerV3AlignmentExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.TextLayerV3AlignmentNullable.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.TextLayerV3AlignmentNullable.g.cs new file mode 100644 index 0000000..5afc798 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.TextLayerV3AlignmentNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Ideogram.JsonConverters +{ + /// + public sealed class TextLayerV3AlignmentNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Ideogram.TextLayerV3Alignment? 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::Ideogram.TextLayerV3AlignmentExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Ideogram.TextLayerV3Alignment)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Ideogram.TextLayerV3Alignment?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Ideogram.TextLayerV3Alignment? 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::Ideogram.TextLayerV3AlignmentExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UpscaleFactor.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UpscaleFactor.g.cs new file mode 100644 index 0000000..137e5bb --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UpscaleFactor.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Ideogram.JsonConverters +{ + /// + public sealed class UpscaleFactorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Ideogram.UpscaleFactor 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::Ideogram.UpscaleFactorExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Ideogram.UpscaleFactor)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Ideogram.UpscaleFactor); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Ideogram.UpscaleFactor value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Ideogram.UpscaleFactorExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UpscaleFactorNullable.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UpscaleFactorNullable.g.cs new file mode 100644 index 0000000..b3374bd --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UpscaleFactorNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Ideogram.JsonConverters +{ + /// + public sealed class UpscaleFactorNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Ideogram.UpscaleFactor? 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::Ideogram.UpscaleFactorExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Ideogram.UpscaleFactor)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Ideogram.UpscaleFactor?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Ideogram.UpscaleFactor? 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::Ideogram.UpscaleFactorExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UsageSource.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UsageSource.g.cs new file mode 100644 index 0000000..2deaa05 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UsageSource.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Ideogram.JsonConverters +{ + /// + public sealed class UsageSourceJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Ideogram.UsageSource 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::Ideogram.UsageSourceExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Ideogram.UsageSource)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Ideogram.UsageSource); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Ideogram.UsageSource value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Ideogram.UsageSourceExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UsageSourceNullable.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UsageSourceNullable.g.cs new file mode 100644 index 0000000..8387f76 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.JsonConverters.UsageSourceNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Ideogram.JsonConverters +{ + /// + public sealed class UsageSourceNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Ideogram.UsageSource? 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::Ideogram.UsageSourceExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Ideogram.UsageSource)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Ideogram.UsageSource?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Ideogram.UsageSource? 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::Ideogram.UsageSourceExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.JsonSerializerContextTypes.g.cs b/src/libs/Ideogram/Generated/Ideogram.JsonSerializerContextTypes.g.cs index 4868e93..942a6b0 100644 --- a/src/libs/Ideogram/Generated/Ideogram.JsonSerializerContextTypes.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.JsonSerializerContextTypes.g.cs @@ -14,10 +14,12 @@ public sealed partial class JsonSerializerContextTypes /// /// public global::System.Collections.Generic.Dictionary? StringStringDictionary { get; set; } + /// /// /// public global::System.Collections.Generic.Dictionary? StringObjectDictionary { get; set; } + /// /// /// @@ -154,390 +156,555 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Ideogram.RemixImageRequestV3? Type32 { get; set; } + public global::Ideogram.GenerateGraphicRequestV3? Type32 { get; set; } + /// + /// + /// + public global::Ideogram.GenerateDesignRequestV3? Type33 { get; set; } + /// + /// + /// + public global::Ideogram.LayerizeDesignRequestV3? Type34 { get; set; } + /// + /// + /// + public global::Ideogram.GenerateTransparentImageRequestV3? Type35 { get; set; } + /// + /// + /// + public global::Ideogram.UpscaleFactor? Type36 { get; set; } + /// + /// + /// + public global::Ideogram.RemixImageRequestV3? Type37 { get; set; } + /// + /// + /// + public global::Ideogram.EditImageRequestV3? Type38 { get; set; } + /// + /// + /// + public global::Ideogram.TryOnRequestV3? Type39 { get; set; } + /// + /// + /// + public global::Ideogram.ReframeImageRequestV3? Type40 { get; set; } + /// + /// + /// + public global::Ideogram.ReplaceBackgroundRequestV3? Type41 { get; set; } + /// + /// + /// + public global::Ideogram.InternalTestingRequest? Type42 { get; set; } + /// + /// + /// + public global::Ideogram.InternalTestingNestedObject? Type43 { get; set; } + /// + /// + /// + public global::Ideogram.InternalTestingNestedObjectRequiredFields? Type44 { get; set; } + /// + /// + /// + public global::System.DateTime? Type45 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type46 { get; set; } + /// + /// + /// + public global::Ideogram.InternalTestingEnumField? Type47 { get; set; } + /// + /// + /// + public global::Ideogram.RemixImageRequest? Type48 { get; set; } + /// + /// + /// + public global::Ideogram.InitialImageRequest? Type49 { get; set; } + /// + /// + /// + public global::Ideogram.ReframeImageRequest? Type50 { get; set; } + /// + /// + /// + public global::Ideogram.UpscaleImageRequest? Type51 { get; set; } + /// + /// + /// + public global::Ideogram.UpscaleInitialImageRequest? Type52 { get; set; } + /// + /// + /// + public global::Ideogram.GenerateImageResponse? Type53 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type54 { get; set; } + /// + /// + /// + public global::Ideogram.ImageObject? Type55 { get; set; } + /// + /// + /// + public bool? Type56 { get; set; } + /// + /// + /// + public global::Ideogram.ImageGenerationResponseV3? Type57 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type58 { get; set; } + /// + /// + /// + public global::Ideogram.ImageGenerationObjectV3? Type59 { get; set; } + /// + /// + /// + public global::Ideogram.LayeredImageGenerationObjectV3? Type60 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type61 { get; set; } + /// + /// + /// + public global::Ideogram.TextLayerV3? Type62 { get; set; } + /// + /// + /// + public float? Type63 { get; set; } /// /// /// - public global::Ideogram.EditImageRequestV3? Type33 { get; set; } + public global::Ideogram.TextLayerV3Alignment? Type64 { get; set; } /// /// /// - public global::Ideogram.ReframeImageRequestV3? Type34 { get; set; } + public global::System.Collections.Generic.IList? Type65 { get; set; } /// /// /// - public global::Ideogram.ReplaceBackgroundRequestV3? Type35 { get; set; } + public global::Ideogram.ImageLayerV3? Type66 { get; set; } /// /// /// - public global::Ideogram.InternalTestingRequest? Type36 { get; set; } + public global::Ideogram.LayeredImageGenerationResponseV3? Type67 { get; set; } /// /// /// - public global::Ideogram.InternalTestingNestedObject? Type37 { get; set; } + public global::System.Collections.Generic.IList? Type68 { get; set; } /// /// /// - public global::Ideogram.InternalTestingNestedObjectRequiredFields? Type38 { get; set; } + public global::Ideogram.GenerateImageSafetyError? Type69 { get; set; } /// /// /// - public global::System.DateTime? Type39 { get; set; } + public global::Ideogram.MagicPromptRequest? Type70 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type40 { get; set; } + public global::Ideogram.MagicPromptResponse? Type71 { get; set; } /// /// /// - public global::Ideogram.InternalTestingEnumField? Type41 { get; set; } + public global::Ideogram.InternalBatchRequest? Type72 { get; set; } /// /// /// - public global::Ideogram.RemixImageRequest? Type42 { get; set; } + public global::Ideogram.SamplingRequestParams? Type73 { get; set; } /// /// /// - public global::Ideogram.InitialImageRequest? Type43 { get; set; } + public global::Ideogram.InternalBatchResponse? Type74 { get; set; } /// /// /// - public global::Ideogram.ReframeImageRequest? Type44 { get; set; } + public global::Ideogram.InternalBatchResultsResponse? Type75 { get; set; } /// /// /// - public global::Ideogram.UpscaleImageRequest? Type45 { get; set; } + public global::System.Collections.Generic.IList? Type76 { get; set; } /// /// /// - public global::Ideogram.UpscaleInitialImageRequest? Type46 { get; set; } + public global::Ideogram.InternalBatchResultsResponseResultsInner? Type77 { get; set; } /// /// /// - public global::Ideogram.GenerateImageResponse? Type47 { get; set; } + public global::Ideogram.ImageSafetyError? Type78 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type48 { get; set; } + public global::Ideogram.ManageApiSubscriptionResponse? Type79 { get; set; } /// /// /// - public global::Ideogram.ImageObject? Type49 { get; set; } + public global::Ideogram.MetronomeLinks? Type80 { get; set; } /// /// /// - public bool? Type50 { get; set; } + public global::Ideogram.RechargeSettingsResponse? Type81 { get; set; } /// /// /// - public global::Ideogram.ImageGenerationResponseV3? Type51 { get; set; } + public global::Ideogram.RechargeSettings? Type82 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type52 { get; set; } + public global::Ideogram.Price? Type83 { get; set; } /// /// /// - public global::Ideogram.ImageGenerationObjectV3? Type53 { get; set; } + public global::Ideogram.PostApiSubscriptionResponse? Type84 { get; set; } /// /// /// - public global::Ideogram.GenerateImageSafetyError? Type54 { get; set; } + public global::Ideogram.PostApiSubscriptionError? Type85 { get; set; } /// /// /// - public global::Ideogram.MagicPromptRequest? Type55 { get; set; } + public global::Ideogram.PostApiSubscriptionRequest? Type86 { get; set; } /// /// /// - public global::Ideogram.MagicPromptResponse? Type56 { get; set; } + public global::Ideogram.PostApiReactivateResponse? Type87 { get; set; } /// /// /// - public global::Ideogram.InternalBatchRequest? Type57 { get; set; } + public global::Ideogram.GetApiKeysResponse? Type88 { get; set; } /// /// /// - public global::Ideogram.SamplingRequestParams? Type58 { get; set; } + public global::System.Collections.Generic.IList? Type89 { get; set; } /// /// /// - public global::Ideogram.InternalBatchResponse? Type59 { get; set; } + public global::Ideogram.RedactedApiKey? Type90 { get; set; } /// /// /// - public global::Ideogram.InternalBatchResultsResponse? Type60 { get; set; } + public global::Ideogram.PostApiKeyResponse? Type91 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type61 { get; set; } + public global::Ideogram.ManageApiStripeSubscriptionResponse? Type92 { get; set; } /// /// /// - public global::Ideogram.InternalBatchResultsResponseResultsInner? Type62 { get; set; } + public global::Ideogram.GetApiTermsResponse? Type93 { get; set; } /// /// /// - public global::Ideogram.ImageSafetyError? Type63 { get; set; } + public global::Ideogram.ApiTerms? Type94 { get; set; } /// /// /// - public global::Ideogram.ManageApiSubscriptionResponse? Type64 { get; set; } + public global::Ideogram.PostApiTermsRequest? Type95 { get; set; } /// /// /// - public global::Ideogram.MetronomeLinks? Type65 { get; set; } + public global::Ideogram.PostAddCreditsResponse? Type96 { get; set; } /// /// /// - public global::Ideogram.RechargeSettingsResponse? Type66 { get; set; } + public global::Ideogram.PostAddCreditsError? Type97 { get; set; } /// /// /// - public global::Ideogram.RechargeSettings? Type67 { get; set; } + public global::Ideogram.PostAddCreditsRequest? Type98 { get; set; } /// /// /// - public global::Ideogram.Price? Type68 { get; set; } + public global::Ideogram.GetUserCreditsResponse? Type99 { get; set; } /// /// /// - public global::Ideogram.PostApiSubscriptionResponse? Type69 { get; set; } + public global::Ideogram.SpendCommitInfoResponse? Type100 { get; set; } /// /// /// - public global::Ideogram.PostApiSubscriptionError? Type70 { get; set; } + public global::System.Collections.Generic.IList? Type101 { get; set; } /// /// /// - public global::Ideogram.PostApiSubscriptionRequest? Type71 { get; set; } + public global::Ideogram.SpendCommitInfo? Type102 { get; set; } /// /// /// - public global::Ideogram.PostApiReactivateResponse? Type72 { get; set; } + public global::Ideogram.GetUsageInfoResponse? Type103 { get; set; } /// /// /// - public global::Ideogram.GetApiKeysResponse? Type73 { get; set; } + public global::System.Collections.Generic.IList? Type104 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type74 { get; set; } + public global::Ideogram.UsageSegment? Type105 { get; set; } /// /// /// - public global::Ideogram.RedactedApiKey? Type75 { get; set; } + public global::System.Collections.Generic.IList? Type106 { get; set; } /// /// /// - public global::Ideogram.PostApiKeyResponse? Type76 { get; set; } + public global::Ideogram.ToolUsage? Type107 { get; set; } /// /// /// - public global::Ideogram.ManageApiStripeSubscriptionResponse? Type77 { get; set; } + public global::Ideogram.ToolType? Type108 { get; set; } /// /// /// - public global::Ideogram.GetApiTermsResponse? Type78 { get; set; } + public global::Ideogram.ModelVersion? Type109 { get; set; } /// /// /// - public global::Ideogram.ApiTerms? Type79 { get; set; } + public global::Ideogram.SegmentBy? Type110 { get; set; } /// /// /// - public global::Ideogram.PostApiTermsRequest? Type80 { get; set; } + public global::Ideogram.UsageSource? Type111 { get; set; } /// /// /// - public global::Ideogram.PostAddCreditsResponse? Type81 { get; set; } + public global::Ideogram.GetApiProfilesResponse? Type112 { get; set; } /// /// /// - public global::Ideogram.PostAddCreditsError? Type82 { get; set; } + public global::System.Collections.Generic.IList? Type113 { get; set; } /// /// /// - public global::Ideogram.PostAddCreditsRequest? Type83 { get; set; } + public global::Ideogram.ApiProfile? Type114 { get; set; } /// /// /// - public global::Ideogram.GetUserCreditsResponse? Type84 { get; set; } + public global::Ideogram.ApiProfileType? Type115 { get; set; } /// /// /// - public global::Ideogram.SpendCommitInfoResponse? Type85 { get; set; } + public global::Ideogram.ApiProfileRole? Type116 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type86 { get; set; } + public global::System.Collections.Generic.IList? Type117 { get; set; } /// /// /// - public global::Ideogram.SpendCommitInfo? Type87 { get; set; } + public global::Ideogram.ApiProfileApiKey? Type118 { get; set; } /// /// /// - public global::Ideogram.GetUsageInfoResponse? Type88 { get; set; } + public global::Ideogram.ApiKeyStatus? Type119 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type89 { get; set; } + public global::Ideogram.GetApiOrganizationUserSuggestionsResponse? Type120 { get; set; } /// /// /// - public global::Ideogram.UsageSegment? Type90 { get; set; } + public global::System.Collections.Generic.IList? Type121 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type91 { get; set; } + public global::Ideogram.ApiOrganizationUserSuggestion? Type122 { get; set; } /// /// /// - public global::Ideogram.ToolUsage? Type92 { get; set; } + public global::Ideogram.GetOrganizationMembersResponse? Type123 { get; set; } /// /// /// - public global::Ideogram.ToolType? Type93 { get; set; } + public global::System.Collections.Generic.IList? Type124 { get; set; } /// /// /// - public global::Ideogram.ModelVersion? Type94 { get; set; } + public global::Ideogram.OrganizationMember? Type125 { get; set; } /// /// /// - public global::Ideogram.SegmentBy? Type95 { get; set; } + public global::Ideogram.CreateApiKeyResponse? Type126 { get; set; } /// /// /// - public global::Ideogram.GetApiProfilesResponse? Type96 { get; set; } + public global::Ideogram.GetApiKeysV2Response? Type127 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type97 { get; set; } + public global::Ideogram.OrganizationMemberOperationResponse? Type128 { get; set; } /// /// /// - public global::Ideogram.ApiProfile? Type98 { get; set; } + public global::System.Collections.Generic.IList? Type129 { get; set; } /// /// /// - public global::Ideogram.ApiProfileType? Type99 { get; set; } + public global::Ideogram.OrganizationMemberOperationResult? Type130 { get; set; } /// /// /// - public global::Ideogram.ApiProfileRole? Type100 { get; set; } + public global::Ideogram.AddOrganizationMembersRequest? Type131 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type101 { get; set; } + public global::System.Collections.Generic.IList? Type132 { get; set; } /// /// /// - public global::Ideogram.ApiProfileApiKey? Type102 { get; set; } + public global::Ideogram.LiteOrganizationMember? Type133 { get; set; } /// /// /// - public global::Ideogram.ApiKeyStatus? Type103 { get; set; } + public global::Ideogram.RemoveOrganizationMembersRequest? Type134 { get; set; } + /// + /// + /// + public global::Ideogram.PromoteOrganizationMembersRequest? Type135 { get; set; } + /// + /// + /// + public global::Ideogram.ListOrganizationInvoicesResponse? Type136 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type137 { get; set; } + /// + /// + /// + public global::Ideogram.Invoice? Type138 { get; set; } + /// + /// + /// + public global::Ideogram.InvoiceStatus? Type139 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type140 { get; set; } + /// + /// + /// + public global::Ideogram.InvoiceLineItem? Type141 { get; set; } + /// + /// + /// + public global::Ideogram.PostInternalTesting200Response? Type142 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type143 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type144 { get; set; } + /// /// /// - public global::Ideogram.GetApiOrganizationUserSuggestionsResponse? Type104 { get; set; } + public global::System.Collections.Generic.List? ListType0 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type105 { get; set; } + public global::System.Collections.Generic.List? ListType1 { get; set; } /// /// /// - public global::Ideogram.ApiOrganizationUserSuggestion? Type106 { get; set; } + public global::System.Collections.Generic.List? ListType2 { get; set; } /// /// /// - public global::Ideogram.GetOrganizationMembersResponse? Type107 { get; set; } + public global::System.Collections.Generic.List? ListType3 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type108 { get; set; } + public global::System.Collections.Generic.List? ListType4 { get; set; } /// /// /// - public global::Ideogram.OrganizationMember? Type109 { get; set; } + public global::System.Collections.Generic.List? ListType5 { get; set; } /// /// /// - public global::Ideogram.CreateApiKeyResponse? Type110 { get; set; } + public global::System.Collections.Generic.List? ListType6 { get; set; } /// /// /// - public global::Ideogram.GetApiKeysV2Response? Type111 { get; set; } + public global::System.Collections.Generic.List? ListType7 { get; set; } /// /// /// - public global::Ideogram.OrganizationMemberOperationResponse? Type112 { get; set; } + public global::System.Collections.Generic.List? ListType8 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type113 { get; set; } + public global::System.Collections.Generic.List? ListType9 { get; set; } /// /// /// - public global::Ideogram.OrganizationMemberOperationResult? Type114 { get; set; } + public global::System.Collections.Generic.List? ListType10 { get; set; } /// /// /// - public global::Ideogram.AddOrganizationMembersRequest? Type115 { get; set; } + public global::System.Collections.Generic.List? ListType11 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type116 { get; set; } + public global::System.Collections.Generic.List? ListType12 { get; set; } /// /// /// - public global::Ideogram.LiteOrganizationMember? Type117 { get; set; } + public global::System.Collections.Generic.List? ListType13 { get; set; } /// /// /// - public global::Ideogram.RemoveOrganizationMembersRequest? Type118 { get; set; } + public global::System.Collections.Generic.List? ListType14 { get; set; } /// /// /// - public global::Ideogram.PromoteOrganizationMembersRequest? Type119 { get; set; } + public global::System.Collections.Generic.List? ListType15 { get; set; } /// /// /// - public global::Ideogram.ListOrganizationInvoicesResponse? Type120 { get; set; } + public global::System.Collections.Generic.List? ListType16 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type121 { get; set; } + public global::System.Collections.Generic.List? ListType17 { get; set; } /// /// /// - public global::Ideogram.Invoice? Type122 { get; set; } + public global::System.Collections.Generic.List? ListType18 { get; set; } /// /// /// - public global::Ideogram.InvoiceStatus? Type123 { get; set; } + public global::System.Collections.Generic.List? ListType19 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type124 { get; set; } + public global::System.Collections.Generic.List? ListType20 { get; set; } /// /// /// - public global::Ideogram.InvoiceLineItem? Type125 { get; set; } + public global::System.Collections.Generic.List? ListType21 { get; set; } /// /// /// - public global::Ideogram.PostInternalTesting200Response? Type126 { get; set; } + public global::System.Collections.Generic.List? ListType22 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type127 { get; set; } + public global::System.Collections.Generic.List? ListType23 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type128 { get; set; } + public global::System.Collections.Generic.List? ListType24 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.AddOrganizationMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.AddOrganizationMembers.g.cs index 82d71e8..cfe7119 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.AddOrganizationMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.AddOrganizationMembers.g.cs @@ -32,6 +32,7 @@ partial void ProcessAddOrganizationMembersResponseContent( /// public async global::System.Threading.Tasks.Task AddOrganizationMembersAsync( string organizationId, + global::Ideogram.AddOrganizationMembersRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -47,7 +48,7 @@ partial void ProcessAddOrganizationMembersResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/add_members", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("organization_id", organizationId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKeyV2.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKeyV2.g.cs index 1982542..aecb384 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKeyV2.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.CreateApiKeyV2.g.cs @@ -40,7 +40,7 @@ partial void ProcessCreateApiKeyV2ResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/api_keys_v2", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("organization_id", organizationId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.DeactivateOrganizationApiKey.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.DeactivateOrganizationApiKey.g.cs index cf4f4cc..17ad8a2 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.DeactivateOrganizationApiKey.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.DeactivateOrganizationApiKey.g.cs @@ -35,7 +35,7 @@ partial void ProcessDeactivateOrganizationApiKeyResponse( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/deactivate_api_key", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("api_key_id", apiKeyId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeysV2.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeysV2.g.cs index 0689b77..e46591a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeysV2.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeysV2.g.cs @@ -40,7 +40,7 @@ partial void ProcessGetApiKeysV2ResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/api_keys", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("organization_id", organizationId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiOrganizationUserSuggestions.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiOrganizationUserSuggestions.g.cs index 73e6b87..1f5248d 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiOrganizationUserSuggestions.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiOrganizationUserSuggestions.g.cs @@ -52,9 +52,9 @@ partial void ProcessGetApiOrganizationUserSuggestionsResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/user_suggestions", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("organization_id", organizationId) - .AddOptionalParameter("user_handle_prefix", userHandlePrefix) + __pathBuilder + .AddRequiredParameter("organization_id", organizationId) + .AddOptionalParameter("user_handle_prefix", userHandlePrefix) .AddOptionalParameter("maxItems", maxItems?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs index c1f485c..4d49516 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiStripeSubscription.g.cs @@ -40,7 +40,7 @@ partial void ProcessGetApiStripeSubscriptionResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/stripe_subscription", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddOptionalParameter("isBusiness", isBusiness?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetOrganizationMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetOrganizationMembers.g.cs index 7b54fae..888d519 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetOrganizationMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetOrganizationMembers.g.cs @@ -40,7 +40,7 @@ partial void ProcessGetOrganizationMembersResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/members", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("organization_id", organizationId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUsageInfo.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUsageInfo.g.cs index 42ef253..a7e7310 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUsageInfo.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUsageInfo.g.cs @@ -13,7 +13,9 @@ partial void PrepareGetUsageInfoArguments( ref global::System.DateTime? endTime, global::System.Collections.Generic.IList? modelVersions, global::System.Collections.Generic.IList? tools, - global::System.Collections.Generic.IList? apiKeyIds); + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? userEmails, + ref global::Ideogram.UsageSource? source); partial void PrepareGetUsageInfoRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, @@ -23,7 +25,9 @@ partial void PrepareGetUsageInfoRequest( global::System.DateTime? endTime, global::System.Collections.Generic.IList? modelVersions, global::System.Collections.Generic.IList? tools, - global::System.Collections.Generic.IList? apiKeyIds); + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? userEmails, + global::Ideogram.UsageSource? source); partial void ProcessGetUsageInfoResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -46,6 +50,11 @@ partial void ProcessGetUsageInfoResponseContent( /// /// /// + /// + /// + /// Filter usage by source - API for programmatic API usage, APP for web application usage
+ /// Default Value: API + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task GetUsageInfoAsync( @@ -56,6 +65,8 @@ partial void ProcessGetUsageInfoResponseContent( global::System.Collections.Generic.IList? modelVersions = default, global::System.Collections.Generic.IList? tools = default, global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? userEmails = default, + global::Ideogram.UsageSource? source = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( @@ -68,19 +79,23 @@ partial void ProcessGetUsageInfoResponseContent( endTime: ref endTime, modelVersions: modelVersions, tools: tools, - apiKeyIds: apiKeyIds); + apiKeyIds: apiKeyIds, + userEmails: userEmails, + source: ref source); var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/usage", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("organization_id", organizationId) - .AddRequiredParameter("segment_by", segmentBy.ToValueString()) - .AddRequiredParameter("start_time", startTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) - .AddOptionalParameter("end_time", endTime?.ToString("yyyy-MM-ddTHH:mm:ssZ")) - .AddOptionalParameter("model_versions", modelVersions, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("tools", tools, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + __pathBuilder + .AddRequiredParameter("organization_id", organizationId) + .AddRequiredParameter("segment_by", segmentBy.ToValueString()) + .AddRequiredParameter("start_time", startTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("end_time", endTime?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("model_versions", modelVersions, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("tools", tools, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_emails", userEmails, delimiter: ",", explode: true) + .AddOptionalParameter("source", source?.ToValueString()) ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( @@ -119,7 +134,9 @@ partial void ProcessGetUsageInfoResponseContent( endTime: endTime, modelVersions: modelVersions, tools: tools, - apiKeyIds: apiKeyIds); + apiKeyIds: apiKeyIds, + userEmails: userEmails, + source: source); using var __response = await HttpClient.SendAsync( request: __httpRequest, diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserCredits.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserCredits.g.cs index d46c4b3..7cc8ab7 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserCredits.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserCredits.g.cs @@ -50,9 +50,9 @@ partial void ProcessGetUserCreditsResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/credits", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("organization_id", organizationId) - .AddRequiredParameter("start_time", startTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) + __pathBuilder + .AddRequiredParameter("organization_id", organizationId) + .AddRequiredParameter("start_time", startTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) .AddOptionalParameter("end_time", endTime?.ToString("yyyy-MM-ddTHH:mm:ssZ")) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserSpendCommitInfo.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserSpendCommitInfo.g.cs index 9485bea..7f462ae 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserSpendCommitInfo.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.GetUserSpendCommitInfo.g.cs @@ -45,8 +45,8 @@ partial void ProcessGetUserSpendCommitInfoResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/spend_commit", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("organization_id", organizationId) + __pathBuilder + .AddRequiredParameter("organization_id", organizationId) .AddOptionalParameter("postpaid_only", postpaidOnly?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.ListOrganizationInvoices.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.ListOrganizationInvoices.g.cs index e53c909..70a1617 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.ListOrganizationInvoices.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.ListOrganizationInvoices.g.cs @@ -40,7 +40,7 @@ partial void ProcessListOrganizationInvoicesResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/list_invoices", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("organization_id", organizationId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostAddCreditsForApi.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostAddCreditsForApi.g.cs index f81b462..f5f6cf0 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostAddCreditsForApi.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostAddCreditsForApi.g.cs @@ -28,6 +28,7 @@ partial void ProcessPostAddCreditsForApiResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostAddCreditsForApiAsync( + global::Ideogram.PostAddCreditsRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -272,7 +273,8 @@ partial void ProcessPostAddCreditsForApiResponseContent( /// Add credits to an API user's account. /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// The token to cancel the operation with /// diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs index 4dfce05..6d5df2b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiSubscription.g.cs @@ -28,6 +28,7 @@ partial void ProcessPostApiSubscriptionResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostApiSubscriptionAsync( + global::Ideogram.PostApiSubscriptionRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -272,7 +273,8 @@ partial void ProcessPostApiSubscriptionResponseContent( /// Update API subscription settings /// /// - /// The current recharge settings for the API subscription. + /// The current recharge settings for the API subscription.
+ /// Example: {"minimum_balance_threshold":{"amount":1050,"currency_code":"USD"},"top_up_balance":{"amount":1050,"currency_code":"USD"}} /// /// /// Whether to enable or disable auto recharge. diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs index 4f00daa..050bbd4 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PostApiTerms.g.cs @@ -23,6 +23,7 @@ partial void ProcessPostApiTermsResponse( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostApiTermsAsync( + global::Ideogram.PostApiTermsRequest request, global::System.Threading.CancellationToken cancellationToken = default) { diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PromoteOrganizationMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PromoteOrganizationMembers.g.cs index 4c1c220..5d0d7dd 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.PromoteOrganizationMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.PromoteOrganizationMembers.g.cs @@ -32,6 +32,7 @@ partial void ProcessPromoteOrganizationMembersResponseContent( /// public async global::System.Threading.Tasks.Task PromoteOrganizationMembersAsync( string organizationId, + global::Ideogram.PromoteOrganizationMembersRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -47,7 +48,7 @@ partial void ProcessPromoteOrganizationMembersResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/promote_members", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("organization_id", organizationId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.ManageClient.RemoveOrganizationMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.ManageClient.RemoveOrganizationMembers.g.cs index 67afc9d..d342410 100644 --- a/src/libs/Ideogram/Generated/Ideogram.ManageClient.RemoveOrganizationMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.ManageClient.RemoveOrganizationMembers.g.cs @@ -32,6 +32,7 @@ partial void ProcessRemoveOrganizationMembersResponseContent( /// public async global::System.Threading.Tasks.Task RemoveOrganizationMembersAsync( string organizationId, + global::Ideogram.RemoveOrganizationMembersRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -47,7 +48,7 @@ partial void ProcessRemoveOrganizationMembersResponseContent( var __pathBuilder = new global::Ideogram.PathBuilder( path: "/manage/api/organization/remove_members", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddRequiredParameter("organization_id", organizationId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.AddOrganizationMembersRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.AddOrganizationMembersRequest.g.cs index 1df41ea..5841a9c 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.AddOrganizationMembersRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.AddOrganizationMembersRequest.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"members":[{"display_handle":"john_doe","email_address":"john.doe@example.com","user_id":"dXNlcl8xMjM"},{"display_handle":"john_doe","email_address":"john.doe@example.com","user_id":"dXNlcl8xMjM"}]} /// public sealed partial class AddOrganizationMembersRequest { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ApiKeyStatus.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ApiKeyStatus.g.cs index 9ea916a..e49588b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ApiKeyStatus.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ApiKeyStatus.g.cs @@ -11,11 +11,11 @@ public enum ApiKeyStatus /// /// /// - ACTIVE, + Active, /// /// /// - DISABLED, + Disabled, } /// @@ -30,8 +30,8 @@ public static string ToValueString(this ApiKeyStatus value) { return value switch { - ApiKeyStatus.ACTIVE => "ACTIVE", - ApiKeyStatus.DISABLED => "DISABLED", + ApiKeyStatus.Active => "ACTIVE", + ApiKeyStatus.Disabled => "DISABLED", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -42,8 +42,8 @@ public static string ToValueString(this ApiKeyStatus value) { return value switch { - "ACTIVE" => ApiKeyStatus.ACTIVE, - "DISABLED" => ApiKeyStatus.DISABLED, + "ACTIVE" => ApiKeyStatus.Active, + "DISABLED" => ApiKeyStatus.Disabled, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ApiOrganizationUserSuggestion.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ApiOrganizationUserSuggestion.g.cs index 965b92c..228782e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ApiOrganizationUserSuggestion.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ApiOrganizationUserSuggestion.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"display_handle":"john_doe","joined":false,"profile_pic":"https://example.com/avatars/user123.jpg","name":"John Doe"} /// public sealed partial class ApiOrganizationUserSuggestion { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfile.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfile.g.cs index 38c8efd..52db050 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfile.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfile.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"is_metronome_2_user":true,"role":"OWNER","avatar_url":"https://example.com/avatar.jpg","organization_id":"b3JnYW5pemF0aW9uXzEyMw","name":"Gamma","type":"INDIVIDUAL","api_keys":[{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""},{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""}],"max_num_inflight_requests_permitted":10} /// public sealed partial class ApiProfile { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileApiKey.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileApiKey.g.cs index 401cb69..07a042d 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileApiKey.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileApiKey.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""} /// public sealed partial class ApiProfileApiKey { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileRole.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileRole.g.cs index 57fd8ce..d5db523 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileRole.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileRole.g.cs @@ -12,11 +12,11 @@ public enum ApiProfileRole /// /// /// - OWNER, + Owner, /// /// /// - MEMBER, + Member, } /// @@ -31,8 +31,8 @@ public static string ToValueString(this ApiProfileRole value) { return value switch { - ApiProfileRole.OWNER => "OWNER", - ApiProfileRole.MEMBER => "MEMBER", + ApiProfileRole.Owner => "OWNER", + ApiProfileRole.Member => "MEMBER", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -43,8 +43,8 @@ public static string ToValueString(this ApiProfileRole value) { return value switch { - "OWNER" => ApiProfileRole.OWNER, - "MEMBER" => ApiProfileRole.MEMBER, + "OWNER" => ApiProfileRole.Owner, + "MEMBER" => ApiProfileRole.Member, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileType.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileType.g.cs index a822fc1..0976fc9 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileType.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ApiProfileType.g.cs @@ -12,11 +12,11 @@ public enum ApiProfileType /// /// /// - INDIVIDUAL, + Individual, /// /// /// - ENTERPRISE, + Enterprise, } /// @@ -31,8 +31,8 @@ public static string ToValueString(this ApiProfileType value) { return value switch { - ApiProfileType.INDIVIDUAL => "INDIVIDUAL", - ApiProfileType.ENTERPRISE => "ENTERPRISE", + ApiProfileType.Individual => "INDIVIDUAL", + ApiProfileType.Enterprise => "ENTERPRISE", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -43,8 +43,8 @@ public static string ToValueString(this ApiProfileType value) { return value switch { - "INDIVIDUAL" => ApiProfileType.INDIVIDUAL, - "ENTERPRISE" => ApiProfileType.ENTERPRISE, + "INDIVIDUAL" => ApiProfileType.Individual, + "ENTERPRISE" => ApiProfileType.Enterprise, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ApiTerms.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ApiTerms.g.cs index f3a9cf7..70c489d 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ApiTerms.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ApiTerms.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"terms_url":"terms_url","terms_id":"terms_id"} /// public sealed partial class ApiTerms { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.AspectRatio.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.AspectRatio.g.cs index 5add4e1..a4b9812 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.AspectRatio.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.AspectRatio.g.cs @@ -12,47 +12,47 @@ public enum AspectRatio /// /// /// - ASPECT1016, + Aspect1016, /// /// /// - ASPECT1610, + Aspect1610, /// /// /// - ASPECT916, + Aspect916, /// /// /// - ASPECT169, + Aspect169, /// /// /// - ASPECT32, + Aspect32, /// /// /// - ASPECT23, + Aspect23, /// /// /// - ASPECT43, + Aspect43, /// /// /// - ASPECT34, + Aspect34, /// /// /// - ASPECT11, + Aspect11, /// /// /// - ASPECT13, + Aspect13, /// /// /// - ASPECT31, + Aspect31, } /// @@ -67,17 +67,17 @@ public static string ToValueString(this AspectRatio value) { return value switch { - AspectRatio.ASPECT1016 => "ASPECT_10_16", - AspectRatio.ASPECT1610 => "ASPECT_16_10", - AspectRatio.ASPECT916 => "ASPECT_9_16", - AspectRatio.ASPECT169 => "ASPECT_16_9", - AspectRatio.ASPECT32 => "ASPECT_3_2", - AspectRatio.ASPECT23 => "ASPECT_2_3", - AspectRatio.ASPECT43 => "ASPECT_4_3", - AspectRatio.ASPECT34 => "ASPECT_3_4", - AspectRatio.ASPECT11 => "ASPECT_1_1", - AspectRatio.ASPECT13 => "ASPECT_1_3", - AspectRatio.ASPECT31 => "ASPECT_3_1", + AspectRatio.Aspect1016 => "ASPECT_10_16", + AspectRatio.Aspect1610 => "ASPECT_16_10", + AspectRatio.Aspect916 => "ASPECT_9_16", + AspectRatio.Aspect169 => "ASPECT_16_9", + AspectRatio.Aspect32 => "ASPECT_3_2", + AspectRatio.Aspect23 => "ASPECT_2_3", + AspectRatio.Aspect43 => "ASPECT_4_3", + AspectRatio.Aspect34 => "ASPECT_3_4", + AspectRatio.Aspect11 => "ASPECT_1_1", + AspectRatio.Aspect13 => "ASPECT_1_3", + AspectRatio.Aspect31 => "ASPECT_3_1", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -88,17 +88,17 @@ public static string ToValueString(this AspectRatio value) { return value switch { - "ASPECT_10_16" => AspectRatio.ASPECT1016, - "ASPECT_16_10" => AspectRatio.ASPECT1610, - "ASPECT_9_16" => AspectRatio.ASPECT916, - "ASPECT_16_9" => AspectRatio.ASPECT169, - "ASPECT_3_2" => AspectRatio.ASPECT32, - "ASPECT_2_3" => AspectRatio.ASPECT23, - "ASPECT_4_3" => AspectRatio.ASPECT43, - "ASPECT_3_4" => AspectRatio.ASPECT34, - "ASPECT_1_1" => AspectRatio.ASPECT11, - "ASPECT_1_3" => AspectRatio.ASPECT13, - "ASPECT_3_1" => AspectRatio.ASPECT31, + "ASPECT_10_16" => AspectRatio.Aspect1016, + "ASPECT_16_10" => AspectRatio.Aspect1610, + "ASPECT_9_16" => AspectRatio.Aspect916, + "ASPECT_16_9" => AspectRatio.Aspect169, + "ASPECT_3_2" => AspectRatio.Aspect32, + "ASPECT_2_3" => AspectRatio.Aspect23, + "ASPECT_4_3" => AspectRatio.Aspect43, + "ASPECT_3_4" => AspectRatio.Aspect34, + "ASPECT_1_1" => AspectRatio.Aspect11, + "ASPECT_1_3" => AspectRatio.Aspect13, + "ASPECT_3_1" => AspectRatio.Aspect31, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPalettePresetName.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPalettePresetName.g.cs index 0e5f1c2..2714133 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPalettePresetName.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPalettePresetName.g.cs @@ -12,35 +12,35 @@ public enum ColorPalettePresetName /// /// /// - EMBER, + Ember, /// /// /// - FRESH, + Fresh, /// /// /// - JUNGLE, + Jungle, /// /// /// - MAGIC, + Magic, /// /// /// - MELON, + Melon, /// /// /// - MOSAIC, + Mosaic, /// /// /// - PASTEL, + Pastel, /// /// /// - ULTRAMARINE, + Ultramarine, } /// @@ -55,14 +55,14 @@ public static string ToValueString(this ColorPalettePresetName value) { return value switch { - ColorPalettePresetName.EMBER => "EMBER", - ColorPalettePresetName.FRESH => "FRESH", - ColorPalettePresetName.JUNGLE => "JUNGLE", - ColorPalettePresetName.MAGIC => "MAGIC", - ColorPalettePresetName.MELON => "MELON", - ColorPalettePresetName.MOSAIC => "MOSAIC", - ColorPalettePresetName.PASTEL => "PASTEL", - ColorPalettePresetName.ULTRAMARINE => "ULTRAMARINE", + ColorPalettePresetName.Ember => "EMBER", + ColorPalettePresetName.Fresh => "FRESH", + ColorPalettePresetName.Jungle => "JUNGLE", + ColorPalettePresetName.Magic => "MAGIC", + ColorPalettePresetName.Melon => "MELON", + ColorPalettePresetName.Mosaic => "MOSAIC", + ColorPalettePresetName.Pastel => "PASTEL", + ColorPalettePresetName.Ultramarine => "ULTRAMARINE", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -73,14 +73,14 @@ public static string ToValueString(this ColorPalettePresetName value) { return value switch { - "EMBER" => ColorPalettePresetName.EMBER, - "FRESH" => ColorPalettePresetName.FRESH, - "JUNGLE" => ColorPalettePresetName.JUNGLE, - "MAGIC" => ColorPalettePresetName.MAGIC, - "MELON" => ColorPalettePresetName.MELON, - "MOSAIC" => ColorPalettePresetName.MOSAIC, - "PASTEL" => ColorPalettePresetName.PASTEL, - "ULTRAMARINE" => ColorPalettePresetName.ULTRAMARINE, + "EMBER" => ColorPalettePresetName.Ember, + "FRESH" => ColorPalettePresetName.Fresh, + "JUNGLE" => ColorPalettePresetName.Jungle, + "MAGIC" => ColorPalettePresetName.Magic, + "MELON" => ColorPalettePresetName.Melon, + "MOSAIC" => ColorPalettePresetName.Mosaic, + "PASTEL" => ColorPalettePresetName.Pastel, + "ULTRAMARINE" => ColorPalettePresetName.Ultramarine, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithMembers.g.cs index 8e4f597..066478a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithMembers.g.cs @@ -12,9 +12,9 @@ public sealed partial class ColorPaletteWithMembers /// A list of ColorPaletteMembers that define the color palette. Each color palette member
/// consists of a required color hex and an optional weight between 0.05 and 1.0 (inclusive).
/// It is recommended that these weights descend from highest to lowest for the color hexes provided.
- /// Example: [, , , , ] + /// Example: [{"ColorPaletteMember":{"color_hex":"#b470b3","color_weight":0.49}}, {"ColorPaletteMember":{"color_hex":"#7a79e3","color_weight":0.16}}, {"ColorPaletteMember":{"color_hex":"#a26563","color_weight":0.1}}, {"ColorPaletteMember":{"color_hex":"#5c7d76","color_weight":0.07}}, {"ColorPaletteMember":{"color_hex":"#642a9c","color_weight":0.05}}] ///
- /// [, , , , ] + /// [{"ColorPaletteMember":{"color_hex":"#b470b3","color_weight":0.49}}, {"ColorPaletteMember":{"color_hex":"#7a79e3","color_weight":0.16}}, {"ColorPaletteMember":{"color_hex":"#a26563","color_weight":0.1}}, {"ColorPaletteMember":{"color_hex":"#5c7d76","color_weight":0.07}}, {"ColorPaletteMember":{"color_hex":"#642a9c","color_weight":0.05}}] [global::System.Text.Json.Serialization.JsonPropertyName("members")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Members { get; set; } @@ -32,7 +32,7 @@ public sealed partial class ColorPaletteWithMembers /// A list of ColorPaletteMembers that define the color palette. Each color palette member
/// consists of a required color hex and an optional weight between 0.05 and 1.0 (inclusive).
/// It is recommended that these weights descend from highest to lowest for the color hexes provided.
- /// Example: [, , , , ] + /// Example: [{"ColorPaletteMember":{"color_hex":"#b470b3","color_weight":0.49}}, {"ColorPaletteMember":{"color_hex":"#7a79e3","color_weight":0.16}}, {"ColorPaletteMember":{"color_hex":"#a26563","color_weight":0.1}}, {"ColorPaletteMember":{"color_hex":"#5c7d76","color_weight":0.07}}, {"ColorPaletteMember":{"color_hex":"#642a9c","color_weight":0.05}}] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetName.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetName.g.cs index ead7bb4..1554691 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetName.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetName.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"name":"PASTEL"} /// public sealed partial class ColorPaletteWithPresetName { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetNameOrMembers.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetNameOrMembers.g.cs index 0f7164a..cf23734 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetNameOrMembers.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetNameOrMembers.g.cs @@ -10,56 +10,55 @@ namespace Ideogram public readonly partial struct ColorPaletteWithPresetNameOrMembers : global::System.IEquatable { /// - /// + /// Example: {"name":"PASTEL"} /// #if NET6_0_OR_GREATER - public global::Ideogram.ColorPaletteWithPresetName? Value1 { get; init; } + public global::Ideogram.ColorPaletteWithPresetName? ColorPaletteWithPresetName { get; init; } #else - public global::Ideogram.ColorPaletteWithPresetName? Value1 { get; } + public global::Ideogram.ColorPaletteWithPresetName? ColorPaletteWithPresetName { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ColorPaletteWithPresetName))] #endif - public bool IsValue1 => Value1 != null; + public bool IsColorPaletteWithPresetName => ColorPaletteWithPresetName != null; /// - /// + /// A color palette represented only via its members. Cannot be used in conjunction with preset name. /// - public static implicit operator ColorPaletteWithPresetNameOrMembers(global::Ideogram.ColorPaletteWithPresetName value) => new ColorPaletteWithPresetNameOrMembers((global::Ideogram.ColorPaletteWithPresetName?)value); +#if NET6_0_OR_GREATER + public global::Ideogram.ColorPaletteWithMembers? ColorPaletteWithMembers { get; init; } +#else + public global::Ideogram.ColorPaletteWithMembers? ColorPaletteWithMembers { get; } +#endif /// /// /// - public static implicit operator global::Ideogram.ColorPaletteWithPresetName?(ColorPaletteWithPresetNameOrMembers @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ColorPaletteWithMembers))] +#endif + public bool IsColorPaletteWithMembers => ColorPaletteWithMembers != null; /// /// /// - public ColorPaletteWithPresetNameOrMembers(global::Ideogram.ColorPaletteWithPresetName? value) - { - Value1 = value; - } + public static implicit operator ColorPaletteWithPresetNameOrMembers(global::Ideogram.ColorPaletteWithPresetName value) => new ColorPaletteWithPresetNameOrMembers((global::Ideogram.ColorPaletteWithPresetName?)value); /// - /// A color palette represented only via its members. Cannot be used in conjunction with preset name. + /// /// -#if NET6_0_OR_GREATER - public global::Ideogram.ColorPaletteWithMembers? Value2 { get; init; } -#else - public global::Ideogram.ColorPaletteWithMembers? Value2 { get; } -#endif + public static implicit operator global::Ideogram.ColorPaletteWithPresetName?(ColorPaletteWithPresetNameOrMembers @this) => @this.ColorPaletteWithPresetName; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public ColorPaletteWithPresetNameOrMembers(global::Ideogram.ColorPaletteWithPresetName? value) + { + ColorPaletteWithPresetName = value; + } /// /// @@ -69,42 +68,42 @@ public ColorPaletteWithPresetNameOrMembers(global::Ideogram.ColorPaletteWithPres /// /// /// - public static implicit operator global::Ideogram.ColorPaletteWithMembers?(ColorPaletteWithPresetNameOrMembers @this) => @this.Value2; + public static implicit operator global::Ideogram.ColorPaletteWithMembers?(ColorPaletteWithPresetNameOrMembers @this) => @this.ColorPaletteWithMembers; /// /// /// public ColorPaletteWithPresetNameOrMembers(global::Ideogram.ColorPaletteWithMembers? value) { - Value2 = value; + ColorPaletteWithMembers = value; } /// /// /// public ColorPaletteWithPresetNameOrMembers( - global::Ideogram.ColorPaletteWithPresetName? value1, - global::Ideogram.ColorPaletteWithMembers? value2 + global::Ideogram.ColorPaletteWithPresetName? colorPaletteWithPresetName, + global::Ideogram.ColorPaletteWithMembers? colorPaletteWithMembers ) { - Value1 = value1; - Value2 = value2; + ColorPaletteWithPresetName = colorPaletteWithPresetName; + ColorPaletteWithMembers = colorPaletteWithMembers; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + ColorPaletteWithMembers as object ?? + ColorPaletteWithPresetName as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + ColorPaletteWithPresetName?.ToString() ?? + ColorPaletteWithMembers?.ToString() ; /// @@ -112,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + return IsColorPaletteWithPresetName && !IsColorPaletteWithMembers || !IsColorPaletteWithPresetName && IsColorPaletteWithMembers; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? colorPaletteWithPresetName = null, + global::System.Func? colorPaletteWithMembers = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsColorPaletteWithPresetName && colorPaletteWithPresetName != null) { - return value1(Value1!); + return colorPaletteWithPresetName(ColorPaletteWithPresetName!); } - else if (IsValue2 && value2 != null) + else if (IsColorPaletteWithMembers && colorPaletteWithMembers != null) { - return value2(Value2!); + return colorPaletteWithMembers(ColorPaletteWithMembers!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? colorPaletteWithPresetName = null, + global::System.Action? colorPaletteWithMembers = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsColorPaletteWithPresetName) { - value1?.Invoke(Value1!); + colorPaletteWithPresetName?.Invoke(ColorPaletteWithPresetName!); } - else if (IsValue2) + else if (IsColorPaletteWithMembers) { - value2?.Invoke(Value2!); + colorPaletteWithMembers?.Invoke(ColorPaletteWithMembers!); } } @@ -170,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + ColorPaletteWithPresetName, typeof(global::Ideogram.ColorPaletteWithPresetName), - Value2, + ColorPaletteWithMembers, typeof(global::Ideogram.ColorPaletteWithMembers), }; const int offset = unchecked((int)2166136261); @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ColorPaletteWithPresetNameOrMembers other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ColorPaletteWithPresetName, other.ColorPaletteWithPresetName) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ColorPaletteWithMembers, other.ColorPaletteWithMembers) ; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.CreateApiKeyResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.CreateApiKeyResponse.g.cs index 9b26429..35d4223 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.CreateApiKeyResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.CreateApiKeyResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"creation_time":"2024-05-25T02:00:30.0000000\u002B00:00","api_key":"vkpDjaKdMNR8QJ83GjfNvFZJbnoi65XUp70MgZNtA2H9XE8yfDnmr_6BaRyQkF9hnJzu6mUPRLBmqlnZMwetJA","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg=="} /// public sealed partial class CreateApiKeyResponse { @@ -27,8 +27,10 @@ public sealed partial class CreateApiKeyResponse public required string ApiKeyId { get; set; } /// - /// The time at which the API key was created + /// The time at which the API key was created
+ /// Example: 2024-05-25T02:00:30.0000000+00:00 ///
+ /// 2024-05-25T02:00:30.0000000+00:00 [global::System.Text.Json.Serialization.JsonPropertyName("creation_time")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTime CreationTime { get; set; } @@ -51,7 +53,8 @@ public sealed partial class CreateApiKeyResponse /// Example: JRPVD7jWR1aTBYiJ0UFVOg== /// /// - /// The time at which the API key was created + /// The time at which the API key was created
+ /// Example: 2024-05-25T02:00:30.0000000+00:00 /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.DescribeModelVersion.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.DescribeModelVersion.g.cs index f685510..5aef366 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.DescribeModelVersion.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.DescribeModelVersion.g.cs @@ -20,7 +20,7 @@ public enum DescribeModelVersion /// /// /// - CUSTOM, + Custom, } /// @@ -37,7 +37,7 @@ public static string ToValueString(this DescribeModelVersion value) { DescribeModelVersion.V2 => "V_2", DescribeModelVersion.V3 => "V_3", - DescribeModelVersion.CUSTOM => "CUSTOM", + DescribeModelVersion.Custom => "CUSTOM", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -50,7 +50,7 @@ public static string ToValueString(this DescribeModelVersion value) { "V_2" => DescribeModelVersion.V2, "V_3" => DescribeModelVersion.V3, - "CUSTOM" => DescribeModelVersion.CUSTOM, + "CUSTOM" => DescribeModelVersion.Custom, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.DescribeResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.DescribeResponse.g.cs index 8a4c17c..f48c749 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.DescribeResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.DescribeResponse.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// The response for a describe request encapsulates a list of descriptions. + /// The response for a describe request encapsulates a list of descriptions.
+ /// Example: {"descriptions":[{"text":"A meticulously illustrated cat with striped patterns, sitting upright. The cat\u0027s eyes are a captivating shade of yellow, and it appears to be gazing intently at something. The background consists of abstract, swirling patterns in shades of black, white, and beige, creating an almost fluid or wavy appearance. The cat is positioned in the foreground, with the background elements fading into the distance, giving a sense of depth to the image."}]} ///
public sealed partial class DescribeResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.EditImageRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.EditImageRequestV3.g.cs index 8658263..0a67f85 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.EditImageRequestV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.EditImageRequestV3.g.cs @@ -96,6 +96,15 @@ public sealed partial class EditImageRequestV3 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StylePresetV3JsonConverter))] public global::Ideogram.StylePresetV3? StylePreset { get; set; } + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + ///
+ /// model/my-custom-model/version/1 + [global::System.Text.Json.Serialization.JsonPropertyName("custom_model_uri")] + public string? CustomModelUri { get; set; } + /// /// 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. /// @@ -179,6 +188,11 @@ public sealed partial class EditImageRequestV3 /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -210,6 +224,7 @@ public EditImageRequestV3( global::Ideogram.RenderingSpeed? renderingSpeed, global::Ideogram.StyleTypeV3? styleType, global::Ideogram.StylePresetV3? stylePreset, + string? customModelUri, global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette, global::System.Collections.Generic.IList? styleCodes, global::System.Collections.Generic.IList? styleReferenceImages, @@ -227,6 +242,7 @@ public EditImageRequestV3( this.RenderingSpeed = renderingSpeed; this.StyleType = styleType; this.StylePreset = stylePreset; + this.CustomModelUri = customModelUri; this.ColorPalette = colorPalette; this.StyleCodes = styleCodes; this.StyleReferenceImages = styleReferenceImages; diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateDesignRequestV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateDesignRequestV3.Json.g.cs new file mode 100644 index 0000000..0386297 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateDesignRequestV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class GenerateDesignRequestV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.GenerateDesignRequestV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.GenerateDesignRequestV3), + jsonSerializerContext) as global::Ideogram.GenerateDesignRequestV3; + } + + /// + /// 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::Ideogram.GenerateDesignRequestV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.GenerateDesignRequestV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.GenerateDesignRequestV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateDesignRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateDesignRequestV3.g.cs new file mode 100644 index 0000000..ad541d7 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateDesignRequestV3.g.cs @@ -0,0 +1,280 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// + /// + public sealed partial class GenerateDesignRequestV3 + { + /// + /// The prompt to use to generate the design.
+ /// Example: A birthday card saying 'Happy Birthday' + ///
+ /// A birthday card saying 'Happy Birthday' + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + ///
+ /// 12345 + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// The resolutions supported for Ideogram 3.0.
+ /// Example: 1280x800 + ///
+ /// 1280x800 + [global::System.Text.Json.Serialization.JsonPropertyName("resolution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.ResolutionV3JsonConverter))] + public global::Ideogram.ResolutionV3? Resolution { get; set; } + + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("aspect_ratio")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.AspectRatioV3JsonConverter))] + public global::Ideogram.AspectRatioV3? AspectRatio { get; set; } + + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rendering_speed")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.RenderingSpeedJsonConverter))] + public global::Ideogram.RenderingSpeed? RenderingSpeed { get; set; } + + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + ///
+ /// ON + [global::System.Text.Json.Serialization.JsonPropertyName("magic_prompt")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.MagicPromptOptionJsonConverter))] + public global::Ideogram.MagicPromptOption? MagicPrompt { get; set; } + + /// + /// Description of what to exclude from a design. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + ///
+ /// brush strokes, painting + [global::System.Text.Json.Serialization.JsonPropertyName("negative_prompt")] + public string? NegativePrompt { get; set; } + + /// + /// Number of designs to generate.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_images")] + public int? NumImages { get; set; } + + /// + /// 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. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("color_palette")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.ColorPaletteWithPresetNameOrMembersJsonConverter))] + public global::Ideogram.ColorPaletteWithPresetNameOrMembers? ColorPalette { get; set; } + + /// + /// 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.
+ /// Example: [AAFF5733, 0133FF57, DE3357FF] + ///
+ /// [AAFF5733, 0133FF57, DE3357FF] + [global::System.Text.Json.Serialization.JsonPropertyName("style_codes")] + public global::System.Collections.Generic.IList? StyleCodes { get; set; } + + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + ///
+ /// GENERAL + [global::System.Text.Json.Serialization.JsonPropertyName("style_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StyleTypeV3JsonConverter))] + public global::Ideogram.StyleTypeV3? StyleType { get; set; } + + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + ///
+ /// BRIGHT_ART + [global::System.Text.Json.Serialization.JsonPropertyName("style_preset")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StylePresetV3JsonConverter))] + public global::Ideogram.StylePresetV3? StylePreset { get; set; } + + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + ///
+ /// model/my-custom-model/version/1 + [global::System.Text.Json.Serialization.JsonPropertyName("custom_model_uri")] + public string? CustomModelUri { get; set; } + + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + ///
+ /// Ubuntu-Regular.ttf + [global::System.Text.Json.Serialization.JsonPropertyName("requested_font_file")] + public string? RequestedFontFile { get; set; } + + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uploaded_font_file")] + public byte[]? UploadedFontFile { get; set; } + + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uploaded_font_filename")] + public string? UploadedFontFilename { get; set; } + + /// + /// 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. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("style_reference_images")] + public global::System.Collections.Generic.IList? StyleReferenceImages { get; set; } + + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reference_asset_images")] + public global::System.Collections.Generic.IList? ReferenceAssetImages { 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. + /// + /// + /// The prompt to use to generate the design.
+ /// Example: A birthday card saying 'Happy Birthday' + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// The resolutions supported for Ideogram 3.0.
+ /// Example: 1280x800 + /// + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// Description of what to exclude from a design. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + /// + /// + /// Number of designs to generate.
+ /// Default Value: 1 + /// + /// + /// 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. + /// + /// + /// 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.
+ /// Example: [AAFF5733, 0133FF57, DE3357FF] + /// + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + /// + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// 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. + /// + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GenerateDesignRequestV3( + string prompt, + int? seed, + global::Ideogram.ResolutionV3? resolution, + global::Ideogram.AspectRatioV3? aspectRatio, + global::Ideogram.RenderingSpeed? renderingSpeed, + global::Ideogram.MagicPromptOption? magicPrompt, + string? negativePrompt, + int? numImages, + global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette, + global::System.Collections.Generic.IList? styleCodes, + global::Ideogram.StyleTypeV3? styleType, + global::Ideogram.StylePresetV3? stylePreset, + string? customModelUri, + string? requestedFontFile, + byte[]? uploadedFontFile, + string? uploadedFontFilename, + global::System.Collections.Generic.IList? styleReferenceImages, + global::System.Collections.Generic.IList? referenceAssetImages) + { + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.Seed = seed; + this.Resolution = resolution; + this.AspectRatio = aspectRatio; + this.RenderingSpeed = renderingSpeed; + this.MagicPrompt = magicPrompt; + this.NegativePrompt = negativePrompt; + this.NumImages = numImages; + this.ColorPalette = colorPalette; + this.StyleCodes = styleCodes; + this.StyleType = styleType; + this.StylePreset = stylePreset; + this.CustomModelUri = customModelUri; + this.RequestedFontFile = requestedFontFile; + this.UploadedFontFile = uploadedFontFile; + this.UploadedFontFilename = uploadedFontFilename; + this.StyleReferenceImages = styleReferenceImages; + this.ReferenceAssetImages = referenceAssetImages; + } + + /// + /// Initializes a new instance of the class. + /// + public GenerateDesignRequestV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateGraphicRequestV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateGraphicRequestV3.Json.g.cs new file mode 100644 index 0000000..1bfc340 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateGraphicRequestV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class GenerateGraphicRequestV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.GenerateGraphicRequestV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.GenerateGraphicRequestV3), + jsonSerializerContext) as global::Ideogram.GenerateGraphicRequestV3; + } + + /// + /// 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::Ideogram.GenerateGraphicRequestV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.GenerateGraphicRequestV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.GenerateGraphicRequestV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateGraphicRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateGraphicRequestV3.g.cs new file mode 100644 index 0000000..214092d --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateGraphicRequestV3.g.cs @@ -0,0 +1,301 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// + /// + public sealed partial class GenerateGraphicRequestV3 + { + /// + /// The prompt to use to generate the graphic.
+ /// Example: A birthday card saying 'Happy Birthday' + ///
+ /// A birthday card saying 'Happy Birthday' + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + ///
+ /// 12345 + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// The resolutions supported for Ideogram 3.0.
+ /// Example: 1280x800 + ///
+ /// 1280x800 + [global::System.Text.Json.Serialization.JsonPropertyName("resolution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.ResolutionV3JsonConverter))] + public global::Ideogram.ResolutionV3? Resolution { get; set; } + + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("aspect_ratio")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.AspectRatioV3JsonConverter))] + public global::Ideogram.AspectRatioV3? AspectRatio { get; set; } + + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rendering_speed")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.RenderingSpeedJsonConverter))] + public global::Ideogram.RenderingSpeed? RenderingSpeed { get; set; } + + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + ///
+ /// ON + [global::System.Text.Json.Serialization.JsonPropertyName("magic_prompt")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.MagicPromptOptionJsonConverter))] + public global::Ideogram.MagicPromptOption? MagicPrompt { get; set; } + + /// + /// Description of what to exclude from a graphic. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + ///
+ /// brush strokes, painting + [global::System.Text.Json.Serialization.JsonPropertyName("negative_prompt")] + public string? NegativePrompt { get; set; } + + /// + /// Number of graphics to generate.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_images")] + public int? NumImages { get; set; } + + /// + /// 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. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("color_palette")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.ColorPaletteWithPresetNameOrMembersJsonConverter))] + public global::Ideogram.ColorPaletteWithPresetNameOrMembers? ColorPalette { get; set; } + + /// + /// 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.
+ /// Example: [AAFF5733, 0133FF57, DE3357FF] + ///
+ /// [AAFF5733, 0133FF57, DE3357FF] + [global::System.Text.Json.Serialization.JsonPropertyName("style_codes")] + public global::System.Collections.Generic.IList? StyleCodes { get; set; } + + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + ///
+ /// GENERAL + [global::System.Text.Json.Serialization.JsonPropertyName("style_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StyleTypeV3JsonConverter))] + public global::Ideogram.StyleTypeV3? StyleType { get; set; } + + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + ///
+ /// BRIGHT_ART + [global::System.Text.Json.Serialization.JsonPropertyName("style_preset")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StylePresetV3JsonConverter))] + public global::Ideogram.StylePresetV3? StylePreset { get; set; } + + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + ///
+ /// model/my-custom-model/version/1 + [global::System.Text.Json.Serialization.JsonPropertyName("custom_model_uri")] + public string? CustomModelUri { get; set; } + + /// + /// An existing flat graphic image to process for text detection and correction without generating a new image. When provided, image generation is bypassed. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("flat_graphic_image")] + public byte[]? FlatGraphicImage { get; set; } + + /// + /// An existing flat graphic image to process for text detection and correction without generating a new image. When provided, image generation is bypassed. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("flat_graphic_imagename")] + public string? FlatGraphicImagename { get; set; } + + /// + /// A font name from the available font library to use for text rendering. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + ///
+ /// Ubuntu-Regular.ttf + [global::System.Text.Json.Serialization.JsonPropertyName("requested_font_file")] + public string? RequestedFontFile { get; set; } + + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). Cannot be used together with requested_font_file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uploaded_font_file")] + public byte[]? UploadedFontFile { get; set; } + + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). Cannot be used together with requested_font_file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uploaded_font_filename")] + public string? UploadedFontFilename { get; set; } + + /// + /// 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. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("style_reference_images")] + public global::System.Collections.Generic.IList? StyleReferenceImages { get; set; } + + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reference_asset_images")] + public global::System.Collections.Generic.IList? ReferenceAssetImages { 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. + /// + /// + /// The prompt to use to generate the graphic.
+ /// Example: A birthday card saying 'Happy Birthday' + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// The resolutions supported for Ideogram 3.0.
+ /// Example: 1280x800 + /// + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// Description of what to exclude from a graphic. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + /// + /// + /// Number of graphics to generate.
+ /// Default Value: 1 + /// + /// + /// 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. + /// + /// + /// 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.
+ /// Example: [AAFF5733, 0133FF57, DE3357FF] + /// + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + /// + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// + /// + /// An existing flat graphic image to process for text detection and correction without generating a new image. When provided, image generation is bypassed. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// An existing flat graphic image to process for text detection and correction without generating a new image. When provided, image generation is bypassed. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// A font name from the available font library to use for text rendering. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). Cannot be used together with requested_font_file. + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). Cannot be used together with requested_font_file. + /// + /// + /// 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. + /// + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GenerateGraphicRequestV3( + string? prompt, + int? seed, + global::Ideogram.ResolutionV3? resolution, + global::Ideogram.AspectRatioV3? aspectRatio, + global::Ideogram.RenderingSpeed? renderingSpeed, + global::Ideogram.MagicPromptOption? magicPrompt, + string? negativePrompt, + int? numImages, + global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette, + global::System.Collections.Generic.IList? styleCodes, + global::Ideogram.StyleTypeV3? styleType, + global::Ideogram.StylePresetV3? stylePreset, + string? customModelUri, + byte[]? flatGraphicImage, + string? flatGraphicImagename, + string? requestedFontFile, + byte[]? uploadedFontFile, + string? uploadedFontFilename, + global::System.Collections.Generic.IList? styleReferenceImages, + global::System.Collections.Generic.IList? referenceAssetImages) + { + this.Prompt = prompt; + this.Seed = seed; + this.Resolution = resolution; + this.AspectRatio = aspectRatio; + this.RenderingSpeed = renderingSpeed; + this.MagicPrompt = magicPrompt; + this.NegativePrompt = negativePrompt; + this.NumImages = numImages; + this.ColorPalette = colorPalette; + this.StyleCodes = styleCodes; + this.StyleType = styleType; + this.StylePreset = stylePreset; + this.CustomModelUri = customModelUri; + this.FlatGraphicImage = flatGraphicImage; + this.FlatGraphicImagename = flatGraphicImagename; + this.RequestedFontFile = requestedFontFile; + this.UploadedFontFile = uploadedFontFile; + this.UploadedFontFilename = uploadedFontFilename; + this.StyleReferenceImages = styleReferenceImages; + this.ReferenceAssetImages = referenceAssetImages; + } + + /// + /// Initializes a new instance of the class. + /// + public GenerateGraphicRequestV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequest.g.cs index 029175b..2f4ae6b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequest.g.cs @@ -4,13 +4,14 @@ namespace Ideogram { /// - /// + /// Example: {"image_request":{"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"AUTO","model":"V_2","prompt":"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 is 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."}} /// public sealed partial class GenerateImageRequest { /// - /// + /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"AUTO","model":"V_2","prompt":"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 is 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."} /// + /// {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"AUTO","model":"V_2","prompt":"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 is 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."} [global::System.Text.Json.Serialization.JsonPropertyName("image_request")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.ImageRequest ImageRequest { get; set; } @@ -24,7 +25,9 @@ public sealed partial class GenerateImageRequest /// /// Initializes a new instance of the class. /// - /// + /// + /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"AUTO","model":"V_2","prompt":"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 is 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."} + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequestV3.g.cs index ae436cf..49bf5d8 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequestV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequestV3.g.cs @@ -108,6 +108,15 @@ public sealed partial class GenerateImageRequestV3 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StylePresetV3JsonConverter))] public global::Ideogram.StylePresetV3? StylePreset { get; set; } + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + ///
+ /// model/my-custom-model/version/1 + [global::System.Text.Json.Serialization.JsonPropertyName("custom_model_uri")] + public string? CustomModelUri { get; set; } + /// /// 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. /// @@ -183,6 +192,11 @@ public sealed partial class GenerateImageRequestV3 /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -208,6 +222,7 @@ public GenerateImageRequestV3( global::System.Collections.Generic.IList? styleCodes, global::Ideogram.StyleTypeV3? styleType, global::Ideogram.StylePresetV3? stylePreset, + string? customModelUri, global::System.Collections.Generic.IList? styleReferenceImages, global::System.Collections.Generic.IList? characterReferenceImages, global::System.Collections.Generic.IList? characterReferenceImagesMask) @@ -224,6 +239,7 @@ public GenerateImageRequestV3( this.StyleCodes = styleCodes; this.StyleType = styleType; this.StylePreset = stylePreset; + this.CustomModelUri = customModelUri; this.StyleReferenceImages = styleReferenceImages; this.CharacterReferenceImages = characterReferenceImages; this.CharacterReferenceImagesMask = characterReferenceImagesMask; diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageResponse.g.cs index ee4d338..b3c7b6e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageResponse.g.cs @@ -5,7 +5,8 @@ namespace Ideogram { /// /// The response which contains information about the generated image, including the download link.
- /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + /// Images links are available for a limited period of time; if you would like to keep the image, you must download it.
+ /// Example: {"data":[{"style_type":"REALISTIC","seed":12345,"upscaled_resolution":"4096x4096","prompt":"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\u0027s 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.","resolution":"1024x1024","url":"https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g","is_image_safe":true},{"style_type":"REALISTIC","seed":12345,"upscaled_resolution":"4096x4096","prompt":"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\u0027s 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.","resolution":"1024x1024","url":"https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g","is_image_safe":true}],"created":"2000-01-23T04:56:07.0000000\u002B00:00"} ///
public sealed partial class GenerateImageResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageSafetyError.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageSafetyError.g.cs index 1291629..67159ac 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageSafetyError.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageSafetyError.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"error":"Prompt provided failed safety check due to the inclusion of prohibited content."} /// public sealed partial class GenerateImageSafetyError { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateTransparentImageRequestV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateTransparentImageRequestV3.Json.g.cs new file mode 100644 index 0000000..7bb9118 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateTransparentImageRequestV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class GenerateTransparentImageRequestV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.GenerateTransparentImageRequestV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.GenerateTransparentImageRequestV3), + jsonSerializerContext) as global::Ideogram.GenerateTransparentImageRequestV3; + } + + /// + /// 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::Ideogram.GenerateTransparentImageRequestV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.GenerateTransparentImageRequestV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.GenerateTransparentImageRequestV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GenerateTransparentImageRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateTransparentImageRequestV3.g.cs new file mode 100644 index 0000000..a9aec53 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GenerateTransparentImageRequestV3.g.cs @@ -0,0 +1,168 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// + /// + public sealed partial class GenerateTransparentImageRequestV3 + { + /// + /// The prompt to use to generate the image.
+ /// Example: A photo of a cat + ///
+ /// A photo of a cat + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + ///
+ /// 12345 + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// Upscale the initially generated image by the given factor. Upscale factors other than X1 will incur additional cost.
+ /// Default Value: X1
+ /// Example: X2 + ///
+ /// X2 + [global::System.Text.Json.Serialization.JsonPropertyName("upscale_factor")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.UpscaleFactorJsonConverter))] + public global::Ideogram.UpscaleFactor? UpscaleFactor { get; set; } + + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("aspect_ratio")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.AspectRatioV3JsonConverter))] + public global::Ideogram.AspectRatioV3? AspectRatio { get; set; } + + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rendering_speed")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.RenderingSpeedJsonConverter))] + public global::Ideogram.RenderingSpeed? RenderingSpeed { get; set; } + + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + ///
+ /// ON + [global::System.Text.Json.Serialization.JsonPropertyName("magic_prompt")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.MagicPromptOptionJsonConverter))] + public global::Ideogram.MagicPromptOption? MagicPrompt { get; set; } + + /// + /// Description of what to exclude from an image. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + ///
+ /// brush strokes, painting + [global::System.Text.Json.Serialization.JsonPropertyName("negative_prompt")] + public string? NegativePrompt { get; set; } + + /// + /// Number of images to generate.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_images")] + public int? NumImages { get; set; } + + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// A model must be able to generate transparent background to be used for this endpoint.
+ /// Example: model/my-custom-model/version/1 + ///
+ /// model/my-custom-model/version/1 + [global::System.Text.Json.Serialization.JsonPropertyName("custom_model_uri")] + public string? CustomModelUri { 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. + /// + /// + /// The prompt to use to generate the image.
+ /// Example: A photo of a cat + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// Upscale the initially generated image by the given factor. Upscale factors other than X1 will incur additional cost.
+ /// Default Value: X1
+ /// Example: X2 + /// + /// + /// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1. + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// Description of what to exclude from an image. Descriptions in the prompt take precedence
+ /// to descriptions in the negative prompt.
+ /// Example: brush strokes, painting + /// + /// + /// Number of images to generate.
+ /// Default Value: 1 + /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// A model must be able to generate transparent background to be used for this endpoint.
+ /// Example: model/my-custom-model/version/1 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GenerateTransparentImageRequestV3( + string prompt, + int? seed, + global::Ideogram.UpscaleFactor? upscaleFactor, + global::Ideogram.AspectRatioV3? aspectRatio, + global::Ideogram.RenderingSpeed? renderingSpeed, + global::Ideogram.MagicPromptOption? magicPrompt, + string? negativePrompt, + int? numImages, + string? customModelUri) + { + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.Seed = seed; + this.UpscaleFactor = upscaleFactor; + this.AspectRatio = aspectRatio; + this.RenderingSpeed = renderingSpeed; + this.MagicPrompt = magicPrompt; + this.NegativePrompt = negativePrompt; + this.NumImages = numImages; + this.CustomModelUri = customModelUri; + } + + /// + /// Initializes a new instance of the class. + /// + public GenerateTransparentImageRequestV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysResponse.g.cs index 26b9362..69e568c 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"current_api_keys":[{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"vkpDja","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg=="},{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"vkpDja","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg=="}]} /// public sealed partial class GetApiKeysResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.g.cs index d66d80f..0c18d0b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"api_keys":[{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""},{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""}]} /// public sealed partial class GetApiKeysV2Response { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiOrganizationUserSuggestionsResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiOrganizationUserSuggestionsResponse.g.cs index 4f356aa..8de3e4e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiOrganizationUserSuggestionsResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiOrganizationUserSuggestionsResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"user_suggestions":[{"display_handle":"john_doe","joined":false,"profile_pic":"https://example.com/avatars/user123.jpg","name":"John Doe"},{"display_handle":"john_doe","joined":false,"profile_pic":"https://example.com/avatars/user123.jpg","name":"John Doe"}]} /// public sealed partial class GetApiOrganizationUserSuggestionsResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiProfilesResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiProfilesResponse.g.cs index 08577be..a39d741 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiProfilesResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiProfilesResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"profiles":[{"is_metronome_2_user":true,"role":"OWNER","avatar_url":"https://example.com/avatar.jpg","organization_id":"b3JnYW5pemF0aW9uXzEyMw","name":"Gamma","type":"INDIVIDUAL","api_keys":[{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""},{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""}],"max_num_inflight_requests_permitted":10},{"is_metronome_2_user":true,"role":"OWNER","avatar_url":"https://example.com/avatar.jpg","organization_id":"b3JnYW5pemF0aW9uXzEyMw","name":"Gamma","type":"INDIVIDUAL","api_keys":[{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""},{"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"ATG56\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg","status":""}],"max_num_inflight_requests_permitted":10}]} /// public sealed partial class GetApiProfilesResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiTermsResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiTermsResponse.g.cs index 670fc1c..f095053 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetApiTermsResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetApiTermsResponse.g.cs @@ -4,13 +4,14 @@ namespace Ideogram { /// - /// + /// Example: {"api_terms":{"terms_url":"terms_url","terms_id":"terms_id"}} /// public sealed partial class GetApiTermsResponse { /// - /// + /// Example: {"terms_url":"terms_url","terms_id":"terms_id"} /// + /// {"terms_url":"terms_url","terms_id":"terms_id"} [global::System.Text.Json.Serialization.JsonPropertyName("api_terms")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.ApiTerms ApiTerms { get; set; } @@ -24,7 +25,9 @@ public sealed partial class GetApiTermsResponse /// /// Initializes a new instance of the class. /// - /// + /// + /// Example: {"terms_url":"terms_url","terms_id":"terms_id"} + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetOrganizationMembersResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetOrganizationMembersResponse.g.cs index 5147ac5..2d7dc8b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetOrganizationMembersResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetOrganizationMembersResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"members":[{"display_handle":"john_doe","email_address":"john.doe@example.com","role":"OWNER","full_name":"full_name","avatar_url":"https://example.com/avatars/user123.jpg","user_id":"dXNlcl8xMjM"},{"display_handle":"john_doe","email_address":"john.doe@example.com","role":"OWNER","full_name":"full_name","avatar_url":"https://example.com/avatars/user123.jpg","user_id":"dXNlcl8xMjM"}]} /// public sealed partial class GetOrganizationMembersResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetUsageInfoResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetUsageInfoResponse.g.cs index 643aa62..d70ef61 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetUsageInfoResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetUsageInfoResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"usage_segments":[{"segment_start":"2023-08-09","tool_usage":[{"user_email_address":"user@company.com","model_version":"V_0_3","full_tool_name":"Turbo Image Generation V3","amount":{"amount":1050,"currency_code":"USD"},"tool_type":"GENERATE","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg"},{"user_email_address":"user@company.com","model_version":"V_0_3","full_tool_name":"Turbo Image Generation V3","amount":{"amount":1050,"currency_code":"USD"},"tool_type":"GENERATE","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg"}],"segment_end":"2023-08-09T23:59:59.0000000\u002B00:00"},{"segment_start":"2023-08-09","tool_usage":[{"user_email_address":"user@company.com","model_version":"V_0_3","full_tool_name":"Turbo Image Generation V3","amount":{"amount":1050,"currency_code":"USD"},"tool_type":"GENERATE","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg"},{"user_email_address":"user@company.com","model_version":"V_0_3","full_tool_name":"Turbo Image Generation V3","amount":{"amount":1050,"currency_code":"USD"},"tool_type":"GENERATE","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg"}],"segment_end":"2023-08-09T23:59:59.0000000\u002B00:00"}]} /// public sealed partial class GetUsageInfoResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.GetUserCreditsResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.GetUserCreditsResponse.g.cs index 9598dee..b602324 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.GetUserCreditsResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.GetUserCreditsResponse.g.cs @@ -4,26 +4,32 @@ namespace Ideogram { /// - /// + /// Example: {"total_spend":{"amount":1050,"currency_code":"USD"},"average_daily_spend":{"amount":1050,"currency_code":"USD"},"available_credits":{"amount":1050,"currency_code":"USD"}} /// public sealed partial class GetUserCreditsResponse { /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("available_credits")] public global::Ideogram.Price? AvailableCredits { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("total_spend")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price TotalSpend { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("average_daily_spend")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price AverageDailySpend { get; set; } @@ -38,13 +44,16 @@ public sealed partial class GetUserCreditsResponse /// Initializes a new instance of the class. ///
/// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationObjectV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationObjectV3.g.cs index 6744d5a..6c9d92f 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationObjectV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationObjectV3.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"style_type":"GENERAL","seed":12345,"upscaled_resolution":"4096x4096","prompt":"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\u0027s 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.","resolution":"1280x800","url":"https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804\u0026sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89","is_image_safe":true} /// public sealed partial class ImageGenerationObjectV3 { @@ -35,6 +35,14 @@ public sealed partial class ImageGenerationObjectV3 [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.ResolutionV3 Resolution { get; set; } + /// + /// Output resolution, only used if operations alters image dimensions, such as upscale, crop etc.
+ /// Example: 4096x4096 + ///
+ /// 4096x4096 + [global::System.Text.Json.Serialization.JsonPropertyName("upscaled_resolution")] + public string? UpscaledResolution { get; set; } + /// /// Whether this request passes safety checks. If false, the url field will be empty. /// @@ -82,6 +90,10 @@ public sealed partial class ImageGenerationObjectV3 /// The resolutions supported for Ideogram 3.0.
/// Example: 1280x800 /// + /// + /// Output resolution, only used if operations alters image dimensions, such as upscale, crop etc.
+ /// Example: 4096x4096 + /// /// /// Whether this request passes safety checks. If false, the url field will be empty. /// @@ -103,6 +115,7 @@ public ImageGenerationObjectV3( bool isImageSafe, int seed, string? url, + string? upscaledResolution, global::Ideogram.StyleTypeV3? styleType) { this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); @@ -110,6 +123,7 @@ public ImageGenerationObjectV3( this.IsImageSafe = isImageSafe; this.Seed = seed; this.Url = url; + this.UpscaledResolution = upscaledResolution; this.StyleType = styleType; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationResponseV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationResponseV3.g.cs index 5baa787..832ea88 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationResponseV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationResponseV3.g.cs @@ -5,7 +5,8 @@ namespace Ideogram { /// /// The response which contains information about the generated image, including the download link.
- /// Images links are available for a limited period of time; if you would like to keep the image, you must download it. + /// Images links are available for a limited period of time; if you would like to keep the image, you must download it.
+ /// Example: {"data":[{"style_type":"GENERAL","seed":12345,"upscaled_resolution":"4096x4096","prompt":"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\u0027s 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.","resolution":"1280x800","url":"https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804\u0026sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89","is_image_safe":true},{"style_type":"GENERAL","seed":12345,"upscaled_resolution":"4096x4096","prompt":"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\u0027s 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.","resolution":"1280x800","url":"https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804\u0026sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89","is_image_safe":true}],"created":"2000-01-23T04:56:07.0000000\u002B00:00"} ///
public sealed partial class ImageGenerationResponseV3 { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ImageLayerV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ImageLayerV3.Json.g.cs new file mode 100644 index 0000000..c4534b8 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ImageLayerV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class ImageLayerV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.ImageLayerV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.ImageLayerV3), + jsonSerializerContext) as global::Ideogram.ImageLayerV3; + } + + /// + /// 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::Ideogram.ImageLayerV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.ImageLayerV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.ImageLayerV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ImageLayerV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ImageLayerV3.g.cs new file mode 100644 index 0000000..951774c --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ImageLayerV3.g.cs @@ -0,0 +1,97 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// An image layer (logo, brand asset, icon) for a layered image generation.
+ /// Example: {"ref_id":"REF_0","x":7,"width":3,"y":9,"height":2} + ///
+ public sealed partial class ImageLayerV3 + { + /// + /// The x coordinate of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y coordinate of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { get; set; } + + /// + /// The width of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("width")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Width { get; set; } + + /// + /// The height of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("height")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Height { get; set; } + + /// + /// Reference ID matching a provided reference image (e.g., "REF_0"), or -1 if no match.
+ /// Example: REF_0 + ///
+ /// REF_0 + [global::System.Text.Json.Serialization.JsonPropertyName("ref_id")] + public string? RefId { 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. + /// + /// + /// The x coordinate of the layer. + /// + /// + /// The y coordinate of the layer. + /// + /// + /// The width of the layer. + /// + /// + /// The height of the layer. + /// + /// + /// Reference ID matching a provided reference image (e.g., "REF_0"), or -1 if no match.
+ /// Example: REF_0 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ImageLayerV3( + int x, + int y, + int width, + int height, + string? refId) + { + this.X = x; + this.Y = y; + this.Width = width; + this.Height = height; + this.RefId = refId; + } + + /// + /// Initializes a new instance of the class. + /// + public ImageLayerV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ImageObject.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ImageObject.g.cs index 757bd35..b5b5da2 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ImageObject.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ImageObject.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"style_type":"REALISTIC","seed":12345,"upscaled_resolution":"4096x4096","prompt":"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\u0027s 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.","resolution":"1024x1024","url":"https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g","is_image_safe":true} /// public sealed partial class ImageObject { @@ -34,6 +34,14 @@ public sealed partial class ImageObject [global::System.Text.Json.Serialization.JsonRequired] public required string Resolution { get; set; } + /// + /// Output resolution, only used if operations alters image dimensions, such as upscale, crop etc.
+ /// Example: 4096x4096 + ///
+ /// 4096x4096 + [global::System.Text.Json.Serialization.JsonPropertyName("upscaled_resolution")] + public string? UpscaledResolution { get; set; } + /// /// Whether this request passes safety checks. If false, the url field will be empty. /// @@ -80,6 +88,10 @@ public sealed partial class ImageObject /// The resolution of the final image.
/// Example: 1024x1024 /// + /// + /// Output resolution, only used if operations alters image dimensions, such as upscale, crop etc.
+ /// Example: 4096x4096 + /// /// /// Whether this request passes safety checks. If false, the url field will be empty. /// @@ -100,6 +112,7 @@ public ImageObject( bool isImageSafe, int seed, string? url, + string? upscaledResolution, global::Ideogram.StyleType? styleType) { this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); @@ -107,6 +120,7 @@ public ImageObject( this.IsImageSafe = isImageSafe; this.Seed = seed; this.Url = url; + this.UpscaledResolution = upscaledResolution; this.StyleType = styleType; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ImageRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ImageRequest.g.cs index 5c805ba..b501b5e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ImageRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ImageRequest.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"AUTO","model":"V_2","prompt":"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 is 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."} /// public sealed partial class ImageRequest { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ImageSafetyError.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ImageSafetyError.g.cs index b57f08f..7d2149d 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ImageSafetyError.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ImageSafetyError.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"error":"Image provided failed safety check due to the inclusion of prohibited content."} /// public sealed partial class ImageSafetyError { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InitialImageRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InitialImageRequest.g.cs index 4de9508..b9b5737 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InitialImageRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InitialImageRequest.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// A request to generate a new image using a provided image and a prompt. + /// A request to generate a new image using a provided image and a prompt.
+ /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"ON","model":"V_2","prompt":"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 is 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.","image_weight":50} ///
public sealed partial class InitialImageRequest { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchRequest.g.cs index be2bbfc..2b4bf40 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchRequest.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// A request for batch magic prompt evalution. + /// A request for batch magic prompt evalution.
+ /// Example: {"user_prompts":["a cat","a dog"],"sampling_request_params":{"aspect_ratio":"1x1","style_type":"GENERAL","magic_prompt_version":"V_0","seed":12345,"negative_prompt":"brush strokes, painting","magic_prompt_option":"ON","model":"V_2_TURBO","resolution":"1280x800","num_images":1,"color_palette":{"name":"PASTEL"}},"experiment_variant":"MAGIC_PROMPT_NO_TEXT"} ///
public sealed partial class InternalBatchRequest { @@ -26,8 +27,9 @@ public sealed partial class InternalBatchRequest public string? ExperimentVariant { get; set; } /// - /// + /// Example: {"aspect_ratio":"1x1","style_type":"GENERAL","magic_prompt_version":"V_0","seed":12345,"negative_prompt":"brush strokes, painting","magic_prompt_option":"ON","model":"V_2_TURBO","resolution":"1280x800","num_images":1,"color_palette":{"name":"PASTEL"}} /// + /// {"aspect_ratio":"1x1","style_type":"GENERAL","magic_prompt_version":"V_0","seed":12345,"negative_prompt":"brush strokes, painting","magic_prompt_option":"ON","model":"V_2_TURBO","resolution":"1280x800","num_images":1,"color_palette":{"name":"PASTEL"}} [global::System.Text.Json.Serialization.JsonPropertyName("sampling_request_params")] public global::Ideogram.SamplingRequestParams? SamplingRequestParams { get; set; } @@ -48,7 +50,9 @@ public sealed partial class InternalBatchRequest /// The experiment variant used for template selection for the magic prompts.
/// Example: MAGIC_PROMPT_NO_TEXT /// - /// + /// + /// Example: {"aspect_ratio":"1x1","style_type":"GENERAL","magic_prompt_version":"V_0","seed":12345,"negative_prompt":"brush strokes, painting","magic_prompt_option":"ON","model":"V_2_TURBO","resolution":"1280x800","num_images":1,"color_palette":{"name":"PASTEL"}} + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResponse.g.cs index 34132bd..feffa93 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResponse.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// A response for batch magic prompt evalution containing relavent information for /internal/batch/status GET request to find out if the batch generation has completed. + /// A response for batch magic prompt evalution containing relavent information for /internal/batch/status GET request to find out if the batch generation has completed.
+ /// Example: {"job_id":"job_id"} ///
public sealed partial class InternalBatchResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponse.g.cs index 414f4a5..afd461e 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponse.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// A response for batch magic prompt job results. + /// A response for batch magic prompt job results.
+ /// Example: {"job_status":"COMPLETE","results":[{"image_url":"image_url","prompt":"a cat"},{"image_url":"image_url","prompt":"a cat"}]} ///
public sealed partial class InternalBatchResultsResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponseResultsInner.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponseResultsInner.g.cs index 917412e..11123a0 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponseResultsInner.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InternalBatchResultsResponseResultsInner.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"image_url":"image_url","prompt":"a cat"} /// public sealed partial class InternalBatchResultsResponseResultsInner { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InternalTestingEnumField.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InternalTestingEnumField.g.cs index 6584e36..6f3b618 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InternalTestingEnumField.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InternalTestingEnumField.g.cs @@ -11,15 +11,15 @@ public enum InternalTestingEnumField /// /// /// - EIN, + Ein, /// /// /// - ZWEI, + Zwei, /// /// /// - DREI, + Drei, } /// @@ -34,9 +34,9 @@ public static string ToValueString(this InternalTestingEnumField value) { return value switch { - InternalTestingEnumField.EIN => "EIN", - InternalTestingEnumField.ZWEI => "ZWEI", - InternalTestingEnumField.DREI => "DREI", + InternalTestingEnumField.Ein => "EIN", + InternalTestingEnumField.Zwei => "ZWEI", + InternalTestingEnumField.Drei => "DREI", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -47,9 +47,9 @@ public static string ToValueString(this InternalTestingEnumField value) { return value switch { - "EIN" => InternalTestingEnumField.EIN, - "ZWEI" => InternalTestingEnumField.ZWEI, - "DREI" => InternalTestingEnumField.DREI, + "EIN" => InternalTestingEnumField.Ein, + "ZWEI" => InternalTestingEnumField.Zwei, + "DREI" => InternalTestingEnumField.Drei, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.Invoice.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.Invoice.g.cs index bc988f0..1874fbc 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.Invoice.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.Invoice.g.cs @@ -4,34 +4,42 @@ namespace Ideogram { /// - /// + /// Example: {"total_spend":{"amount":1050,"currency_code":"USD"},"start_time":"2024-01-01T00:00:00.0000000\u002B00:00","end_time":"2024-01-31T23:59:59.0000000\u002B00:00","line_items":[{"charge_name":"Image Generation - V3","total":{"amount":1050,"currency_code":"USD"},"quantity":1000,"unit_price":{"amount":1050,"currency_code":"USD"}},{"charge_name":"Image Generation - V3","total":{"amount":1050,"currency_code":"USD"},"quantity":1000,"unit_price":{"amount":1050,"currency_code":"USD"}}],"issued_time":"2024-01-01T00:00:00.0000000\u002B00:00","invoice_status":"PAID"} /// public sealed partial class Invoice { /// - /// The start time of the invoice period + /// The start time of the invoice period
+ /// Example: 2024-01-01T00:00:00.0000000+00:00 ///
+ /// 2024-01-01T00:00:00.0000000+00:00 [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTime StartTime { get; set; } /// - /// The end time of the invoice period + /// The end time of the invoice period
+ /// Example: 2024-01-31T23:59:59.0000000+00:00 ///
+ /// 2024-01-31T23:59:59.0000000+00:00 [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTime EndTime { get; set; } /// - /// The date when the invoice was issued + /// The date when the invoice was issued
+ /// Example: 2024-01-01T00:00:00.0000000+00:00 ///
+ /// 2024-01-01T00:00:00.0000000+00:00 [global::System.Text.Json.Serialization.JsonPropertyName("issued_time")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTime IssuedTime { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("total_spend")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price TotalSpend { get; set; } @@ -63,16 +71,20 @@ public sealed partial class Invoice /// Initializes a new instance of the class. ///
/// - /// The start time of the invoice period + /// The start time of the invoice period
+ /// Example: 2024-01-01T00:00:00.0000000+00:00 /// /// - /// The end time of the invoice period + /// The end time of the invoice period
+ /// Example: 2024-01-31T23:59:59.0000000+00:00 /// /// - /// The date when the invoice was issued + /// The date when the invoice was issued
+ /// Example: 2024-01-01T00:00:00.0000000+00:00 /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// /// Status of the invoice
diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.g.cs index 77e7453..764b67f 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"charge_name":"Image Generation - V3","total":{"amount":1050,"currency_code":"USD"},"quantity":1000,"unit_price":{"amount":1050,"currency_code":"USD"}} /// public sealed partial class InvoiceLineItem { @@ -27,15 +27,19 @@ public sealed partial class InvoiceLineItem public required int Quantity { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("unit_price")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price UnitPrice { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("total")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price Total { get; set; } @@ -58,10 +62,12 @@ public sealed partial class InvoiceLineItem /// Example: 1000 /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceStatus.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceStatus.g.cs index b2c998d..87b3d85 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceStatus.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.InvoiceStatus.g.cs @@ -12,15 +12,15 @@ public enum InvoiceStatus /// /// /// - DRAFT, + Draft, /// /// /// - PENDINGPAYMENT, + PendingPayment, /// /// /// - PAID, + Paid, } /// @@ -35,9 +35,9 @@ public static string ToValueString(this InvoiceStatus value) { return value switch { - InvoiceStatus.DRAFT => "DRAFT", - InvoiceStatus.PENDINGPAYMENT => "PENDING_PAYMENT", - InvoiceStatus.PAID => "PAID", + InvoiceStatus.Draft => "DRAFT", + InvoiceStatus.PendingPayment => "PENDING_PAYMENT", + InvoiceStatus.Paid => "PAID", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -48,9 +48,9 @@ public static string ToValueString(this InvoiceStatus value) { return value switch { - "DRAFT" => InvoiceStatus.DRAFT, - "PENDING_PAYMENT" => InvoiceStatus.PENDINGPAYMENT, - "PAID" => InvoiceStatus.PAID, + "DRAFT" => InvoiceStatus.Draft, + "PENDING_PAYMENT" => InvoiceStatus.PendingPayment, + "PAID" => InvoiceStatus.Paid, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationObjectV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationObjectV3.Json.g.cs new file mode 100644 index 0000000..48990ba --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationObjectV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class LayeredImageGenerationObjectV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.LayeredImageGenerationObjectV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.LayeredImageGenerationObjectV3), + jsonSerializerContext) as global::Ideogram.LayeredImageGenerationObjectV3; + } + + /// + /// 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::Ideogram.LayeredImageGenerationObjectV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.LayeredImageGenerationObjectV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.LayeredImageGenerationObjectV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationObjectV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationObjectV3.g.cs new file mode 100644 index 0000000..d3ad3a3 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationObjectV3.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// Example: {"text_layers":[{"font_candidates":["font_candidates","font_candidates"],"line_height":2.302136,"color":"#FF0000","font_size":5,"x":0,"width":1,"y":6,"angle":0,"text":"text","font_file":"font_file","alignment":"center","height":5},{"font_candidates":["font_candidates","font_candidates"],"line_height":2.302136,"color":"#FF0000","font_size":5,"x":0,"width":1,"y":6,"angle":0,"text":"text","font_file":"font_file","alignment":"center","height":5}],"image_layers":[{"ref_id":"REF_0","x":7,"width":3,"y":9,"height":2},{"ref_id":"REF_0","x":7,"width":3,"y":9,"height":2}]} + /// + public sealed partial class LayeredImageGenerationObjectV3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text_layers")] + public global::System.Collections.Generic.IList? TextLayers { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_layers")] + public global::System.Collections.Generic.IList? ImageLayers { 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. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LayeredImageGenerationObjectV3( + global::System.Collections.Generic.IList? textLayers, + global::System.Collections.Generic.IList? imageLayers) + { + this.TextLayers = textLayers; + this.ImageLayers = imageLayers; + } + + /// + /// Initializes a new instance of the class. + /// + public LayeredImageGenerationObjectV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationResponseV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationResponseV3.Json.g.cs new file mode 100644 index 0000000..a9b9ff8 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationResponseV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class LayeredImageGenerationResponseV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.LayeredImageGenerationResponseV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.LayeredImageGenerationResponseV3), + jsonSerializerContext) as global::Ideogram.LayeredImageGenerationResponseV3; + } + + /// + /// 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::Ideogram.LayeredImageGenerationResponseV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.LayeredImageGenerationResponseV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.LayeredImageGenerationResponseV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationResponseV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationResponseV3.g.cs new file mode 100644 index 0000000..654c513 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.LayeredImageGenerationResponseV3.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// The response which contains information about the generated image, including the download link and other text layeres.
+ /// Images links are available for a limited period of time; if you would like to keep the image, you must download it.
+ /// Example: {"data":[{"text_layers":[{"font_candidates":["font_candidates","font_candidates"],"line_height":2.302136,"color":"#FF0000","font_size":5,"x":0,"width":1,"y":6,"angle":0,"text":"text","font_file":"font_file","alignment":"center","height":5},{"font_candidates":["font_candidates","font_candidates"],"line_height":2.302136,"color":"#FF0000","font_size":5,"x":0,"width":1,"y":6,"angle":0,"text":"text","font_file":"font_file","alignment":"center","height":5}],"image_layers":[{"ref_id":"REF_0","x":7,"width":3,"y":9,"height":2},{"ref_id":"REF_0","x":7,"width":3,"y":9,"height":2}]},{"text_layers":[{"font_candidates":["font_candidates","font_candidates"],"line_height":2.302136,"color":"#FF0000","font_size":5,"x":0,"width":1,"y":6,"angle":0,"text":"text","font_file":"font_file","alignment":"center","height":5},{"font_candidates":["font_candidates","font_candidates"],"line_height":2.302136,"color":"#FF0000","font_size":5,"x":0,"width":1,"y":6,"angle":0,"text":"text","font_file":"font_file","alignment":"center","height":5}],"image_layers":[{"ref_id":"REF_0","x":7,"width":3,"y":9,"height":2},{"ref_id":"REF_0","x":7,"width":3,"y":9,"height":2}]}],"created":"2000-01-23T04:56:07.0000000\u002B00:00"} + ///
+ public sealed partial class LayeredImageGenerationResponseV3 + { + /// + /// The time the request was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Created { get; set; } + + /// + /// A list of ImageObjects that contain the generated image(s). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { 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. + /// + /// + /// The time the request was created. + /// + /// + /// A list of ImageObjects that contain the generated image(s). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LayeredImageGenerationResponseV3( + global::System.DateTime created, + global::System.Collections.Generic.IList data) + { + this.Created = created; + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + } + + /// + /// Initializes a new instance of the class. + /// + public LayeredImageGenerationResponseV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.LayerizeDesignRequestV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.LayerizeDesignRequestV3.Json.g.cs new file mode 100644 index 0000000..37c422a --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.LayerizeDesignRequestV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class LayerizeDesignRequestV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.LayerizeDesignRequestV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.LayerizeDesignRequestV3), + jsonSerializerContext) as global::Ideogram.LayerizeDesignRequestV3; + } + + /// + /// 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::Ideogram.LayerizeDesignRequestV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.LayerizeDesignRequestV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.LayerizeDesignRequestV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.LayerizeDesignRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.LayerizeDesignRequestV3.g.cs new file mode 100644 index 0000000..c61a179 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.LayerizeDesignRequestV3.g.cs @@ -0,0 +1,130 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// + /// + public sealed partial class LayerizeDesignRequestV3 + { + /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("flat_graphic_image")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] FlatGraphicImage { get; set; } + + /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("flat_graphic_imagename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FlatGraphicImagename { get; set; } + + /// + /// An optional prompt to describe the image. If not provided, a prompt will be auto-generated from the image via captioning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + ///
+ /// 12345 + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + ///
+ /// Ubuntu-Regular.ttf + [global::System.Text.Json.Serialization.JsonPropertyName("requested_font_file")] + public string? RequestedFontFile { get; set; } + + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uploaded_font_file")] + public byte[]? UploadedFontFile { get; set; } + + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uploaded_font_filename")] + public string? UploadedFontFilename { get; set; } + + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reference_asset_images")] + public global::System.Collections.Generic.IList? ReferenceAssetImages { 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. + /// + /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB). + /// + /// + /// An optional prompt to describe the image. If not provided, a prompt will be auto-generated from the image via captioning. + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.
+ /// Example: Ubuntu-Regular.ttf + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file. + /// + /// + /// A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LayerizeDesignRequestV3( + byte[] flatGraphicImage, + string flatGraphicImagename, + string? prompt, + int? seed, + string? requestedFontFile, + byte[]? uploadedFontFile, + string? uploadedFontFilename, + global::System.Collections.Generic.IList? referenceAssetImages) + { + this.FlatGraphicImage = flatGraphicImage ?? throw new global::System.ArgumentNullException(nameof(flatGraphicImage)); + this.FlatGraphicImagename = flatGraphicImagename ?? throw new global::System.ArgumentNullException(nameof(flatGraphicImagename)); + this.Prompt = prompt; + this.Seed = seed; + this.RequestedFontFile = requestedFontFile; + this.UploadedFontFile = uploadedFontFile; + this.UploadedFontFilename = uploadedFontFilename; + this.ReferenceAssetImages = referenceAssetImages; + } + + /// + /// Initializes a new instance of the class. + /// + public LayerizeDesignRequestV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.g.cs index a66c9ff..095f02c 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"invoices":[{"total_spend":{"amount":1050,"currency_code":"USD"},"start_time":"2024-01-01","end_time":"2024-01-31T23:59:59.0000000\u002B00:00","line_items":[{"charge_name":"Image Generation - V3","total":{"amount":1050,"currency_code":"USD"},"quantity":1000,"unit_price":{"amount":1050,"currency_code":"USD"}},{"charge_name":"Image Generation - V3","total":{"amount":1050,"currency_code":"USD"},"quantity":1000,"unit_price":{"amount":1050,"currency_code":"USD"}}],"issued_time":"2024-01-01","invoice_status":"PAID"},{"total_spend":{"amount":1050,"currency_code":"USD"},"start_time":"2024-01-01","end_time":"2024-01-31T23:59:59.0000000\u002B00:00","line_items":[{"charge_name":"Image Generation - V3","total":{"amount":1050,"currency_code":"USD"},"quantity":1000,"unit_price":{"amount":1050,"currency_code":"USD"}},{"charge_name":"Image Generation - V3","total":{"amount":1050,"currency_code":"USD"},"quantity":1000,"unit_price":{"amount":1050,"currency_code":"USD"}}],"issued_time":"2024-01-01","invoice_status":"PAID"}]} /// public sealed partial class ListOrganizationInvoicesResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.LiteOrganizationMember.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.LiteOrganizationMember.g.cs index f2a2851..40df771 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.LiteOrganizationMember.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.LiteOrganizationMember.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// A lite representation of an organization member with optional fields for identification + /// A lite representation of an organization member with optional fields for identification
+ /// Example: {"display_handle":"john_doe","email_address":"john.doe@example.com","user_id":"dXNlcl8xMjM"} ///
public sealed partial class LiteOrganizationMember { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptOption.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptOption.g.cs index 462696c..6e5edaa 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptOption.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptOption.g.cs @@ -12,15 +12,15 @@ public enum MagicPromptOption /// /// /// - AUTO, + Auto, /// /// /// - ON, + On, /// /// /// - OFF, + Off, } /// @@ -35,9 +35,9 @@ public static string ToValueString(this MagicPromptOption value) { return value switch { - MagicPromptOption.AUTO => "AUTO", - MagicPromptOption.ON => "ON", - MagicPromptOption.OFF => "OFF", + MagicPromptOption.Auto => "AUTO", + MagicPromptOption.On => "ON", + MagicPromptOption.Off => "OFF", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -48,9 +48,9 @@ public static string ToValueString(this MagicPromptOption value) { return value switch { - "AUTO" => MagicPromptOption.AUTO, - "ON" => MagicPromptOption.ON, - "OFF" => MagicPromptOption.OFF, + "AUTO" => MagicPromptOption.Auto, + "ON" => MagicPromptOption.On, + "OFF" => MagicPromptOption.Off, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptRequest.g.cs index c23d35c..b1af1fb 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptRequest.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// A request to generate a magic prompt + /// A request to generate a magic prompt
+ /// Example: {"prompt":"a cat","magic_prompt_version":"V_0_4","classify_prompt_category":true,"style_type":"AUTO","seed":12345} ///
public sealed partial class MagicPromptRequest { @@ -32,11 +33,10 @@ public sealed partial class MagicPromptRequest /// Default Value: true
/// Example: false ///
- /// true /// false [global::System.Text.Json.Serialization.JsonPropertyName("classify_prompt_category")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool ClassifyPromptCategory { get; set; } = true; + public required bool ClassifyPromptCategory { get; set; } /// /// The style type to generate with.
diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptResponse.g.cs index 2b73c93..7e4ea19 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptResponse.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// The response containing generated magic prompt + /// The response containing generated magic prompt
+ /// Example: {"magic_prompt":"A photorealistic cat with striking green eyes, sitting gracefully on a vintage wooden chair. The cat\u0027s fur has beautiful orange and white markings, and soft natural lighting illuminates the scene from a nearby window."} ///
public sealed partial class MagicPromptResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiStripeSubscriptionResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiStripeSubscriptionResponse.g.cs index e3fca98..1ac7ebd 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiStripeSubscriptionResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiStripeSubscriptionResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"stripe_subscription_url":"stripe_subscription_url","stripe_billing_url":"stripe_billing_url"} /// public sealed partial class ManageApiStripeSubscriptionResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiSubscriptionResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiSubscriptionResponse.g.cs index 762bf28..91ecee8 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiSubscriptionResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ManageApiSubscriptionResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"recharge_settings":{"is_active":true},"has_stripe_setup":true,"metronome_dashboard_dark_mode_url":"metronome_dashboard_dark_mode_url","stripe_billing_url":"stripe_billing_url","current_balance":{"amount":1050,"currency_code":"USD"},"has_accepted_terms":true,"metronome_dashboard_url":"metronome_dashboard_url","metronome_links":{"usage_iframe_url":"usage_iframe_url","usage_iframe_dark_mode_url":"usage_iframe_dark_mode_url","credits_iframe_dark_mode_url":"credits_iframe_dark_mode_url","invoices_iframe_dark_mode_url":"invoices_iframe_dark_mode_url","invoices_iframe_url":"invoices_iframe_url","credits_iframe_url":"credits_iframe_url"}} /// public sealed partial class ManageApiSubscriptionResponse { @@ -37,14 +37,16 @@ public sealed partial class ManageApiSubscriptionResponse public string? MetronomeDashboardDarkModeUrl { get; set; } /// - /// + /// Example: {"usage_iframe_url":"usage_iframe_url","usage_iframe_dark_mode_url":"usage_iframe_dark_mode_url","credits_iframe_dark_mode_url":"credits_iframe_dark_mode_url","invoices_iframe_dark_mode_url":"invoices_iframe_dark_mode_url","invoices_iframe_url":"invoices_iframe_url","credits_iframe_url":"credits_iframe_url"} /// + /// {"usage_iframe_url":"usage_iframe_url","usage_iframe_dark_mode_url":"usage_iframe_dark_mode_url","credits_iframe_dark_mode_url":"credits_iframe_dark_mode_url","invoices_iframe_dark_mode_url":"invoices_iframe_dark_mode_url","invoices_iframe_url":"invoices_iframe_url","credits_iframe_url":"credits_iframe_url"} [global::System.Text.Json.Serialization.JsonPropertyName("metronome_links")] public global::Ideogram.MetronomeLinks? MetronomeLinks { get; set; } /// - /// + /// Example: {"is_active":true} /// + /// {"is_active":true} [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] public global::Ideogram.RechargeSettingsResponse? RechargeSettings { get; set; } @@ -55,8 +57,10 @@ public sealed partial class ManageApiSubscriptionResponse public string? StripeBillingUrl { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("current_balance")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price CurrentBalance { get; set; } @@ -76,13 +80,18 @@ public sealed partial class ManageApiSubscriptionResponse /// /// Whether or not Stripe is setup for API usage. /// - /// - /// + /// + /// Example: {"usage_iframe_url":"usage_iframe_url","usage_iframe_dark_mode_url":"usage_iframe_dark_mode_url","credits_iframe_dark_mode_url":"credits_iframe_dark_mode_url","invoices_iframe_dark_mode_url":"invoices_iframe_dark_mode_url","invoices_iframe_url":"invoices_iframe_url","credits_iframe_url":"credits_iframe_url"} + /// + /// + /// Example: {"is_active":true} + /// /// /// The URL for the user to manage the existing Stripe subscription plan. /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.MetronomeLinks.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.MetronomeLinks.g.cs index 43ffc64..6c8c890 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.MetronomeLinks.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.MetronomeLinks.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"usage_iframe_url":"usage_iframe_url","usage_iframe_dark_mode_url":"usage_iframe_dark_mode_url","credits_iframe_dark_mode_url":"credits_iframe_dark_mode_url","invoices_iframe_dark_mode_url":"invoices_iframe_dark_mode_url","invoices_iframe_url":"invoices_iframe_url","credits_iframe_url":"credits_iframe_url"} /// public sealed partial class MetronomeLinks { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ModelEnum.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ModelEnum.g.cs index 4bdaade..64157b4 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ModelEnum.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ModelEnum.g.cs @@ -17,7 +17,7 @@ public enum ModelEnum /// /// /// - V1TURBO, + V1Turbo, /// /// /// @@ -25,19 +25,23 @@ public enum ModelEnum /// /// /// - V2TURBO, + V2Turbo, /// /// /// - V2A, + V2a, /// /// /// - V2ATURBO, + V2aTurbo, /// /// /// V3, + /// + /// + /// + Auto, } /// @@ -53,12 +57,13 @@ public static string ToValueString(this ModelEnum value) return value switch { ModelEnum.V1 => "V_1", - ModelEnum.V1TURBO => "V_1_TURBO", + ModelEnum.V1Turbo => "V_1_TURBO", ModelEnum.V2 => "V_2", - ModelEnum.V2TURBO => "V_2_TURBO", - ModelEnum.V2A => "V_2A", - ModelEnum.V2ATURBO => "V_2A_TURBO", + ModelEnum.V2Turbo => "V_2_TURBO", + ModelEnum.V2a => "V_2A", + ModelEnum.V2aTurbo => "V_2A_TURBO", ModelEnum.V3 => "V_3", + ModelEnum.Auto => "AUTO", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -70,12 +75,13 @@ public static string ToValueString(this ModelEnum value) return value switch { "V_1" => ModelEnum.V1, - "V_1_TURBO" => ModelEnum.V1TURBO, + "V_1_TURBO" => ModelEnum.V1Turbo, "V_2" => ModelEnum.V2, - "V_2_TURBO" => ModelEnum.V2TURBO, - "V_2A" => ModelEnum.V2A, - "V_2A_TURBO" => ModelEnum.V2ATURBO, + "V_2_TURBO" => ModelEnum.V2Turbo, + "V_2A" => ModelEnum.V2a, + "V_2A_TURBO" => ModelEnum.V2aTurbo, "V_3" => ModelEnum.V3, + "AUTO" => ModelEnum.Auto, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ModelVersion.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ModelVersion.g.cs index 2069133..b00cebe 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ModelVersion.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ModelVersion.g.cs @@ -11,6 +11,7 @@ namespace Ideogram /// - V_2_1: Model 2a
/// - V_3_0: Model 3.0 March 26
/// - V_3_1: Model 3.0 Latest
+ /// - AUTO: Automatically select the best model version based on the request.
/// Example: V_0_3 ///
public enum ModelVersion @@ -50,15 +51,23 @@ public enum ModelVersion /// /// /// - EXTERNALGOOGLEVEO30, + ExternalGoogleVeo30, /// /// /// - EXTERNALBYTEDANCESEEDANCE10PRO, + ExternalBytedanceSeedance10Pro, /// /// /// - EXTERNALMINIMAXHAILUO02, + ExternalMinimaxHailuo02, + /// + /// + /// + ExternalModel, + /// + /// Automatically select the best model version based on the request. + /// + Auto, } /// @@ -81,9 +90,11 @@ public static string ToValueString(this ModelVersion value) ModelVersion.V21 => "V_2_1", ModelVersion.V30 => "V_3_0", ModelVersion.V31 => "V_3_1", - ModelVersion.EXTERNALGOOGLEVEO30 => "EXTERNAL_GOOGLE_VEO_3_0", - ModelVersion.EXTERNALBYTEDANCESEEDANCE10PRO => "EXTERNAL_BYTEDANCE_SEEDANCE_1_0_PRO", - ModelVersion.EXTERNALMINIMAXHAILUO02 => "EXTERNAL_MINIMAX_HAILUO_02", + ModelVersion.ExternalGoogleVeo30 => "EXTERNAL_GOOGLE_VEO_3_0", + ModelVersion.ExternalBytedanceSeedance10Pro => "EXTERNAL_BYTEDANCE_SEEDANCE_1_0_PRO", + ModelVersion.ExternalMinimaxHailuo02 => "EXTERNAL_MINIMAX_HAILUO_02", + ModelVersion.ExternalModel => "EXTERNAL_MODEL", + ModelVersion.Auto => "AUTO", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -102,9 +113,11 @@ public static string ToValueString(this ModelVersion value) "V_2_1" => ModelVersion.V21, "V_3_0" => ModelVersion.V30, "V_3_1" => ModelVersion.V31, - "EXTERNAL_GOOGLE_VEO_3_0" => ModelVersion.EXTERNALGOOGLEVEO30, - "EXTERNAL_BYTEDANCE_SEEDANCE_1_0_PRO" => ModelVersion.EXTERNALBYTEDANCESEEDANCE10PRO, - "EXTERNAL_MINIMAX_HAILUO_02" => ModelVersion.EXTERNALMINIMAXHAILUO02, + "EXTERNAL_GOOGLE_VEO_3_0" => ModelVersion.ExternalGoogleVeo30, + "EXTERNAL_BYTEDANCE_SEEDANCE_1_0_PRO" => ModelVersion.ExternalBytedanceSeedance10Pro, + "EXTERNAL_MINIMAX_HAILUO_02" => ModelVersion.ExternalMinimaxHailuo02, + "EXTERNAL_MODEL" => ModelVersion.ExternalModel, + "AUTO" => ModelVersion.Auto, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMember.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMember.g.cs index 6a9998b..7cf1f3a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMember.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMember.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"display_handle":"john_doe","email_address":"john.doe@example.com","role":"OWNER","full_name":"full_name","avatar_url":"https://example.com/avatars/user123.jpg","user_id":"dXNlcl8xMjM"} /// public sealed partial class OrganizationMember { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.g.cs index 176b41f..dc063a7 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"results":[{"success":true,"message":"message"},{"success":true,"message":"message"}]} /// public sealed partial class OrganizationMemberOperationResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.g.cs index f366cb0..49360b7 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"success":true,"message":"message"} /// public sealed partial class OrganizationMemberOperationResult { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsError.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsError.g.cs index b5c0bdb..8db6c29 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsError.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsError.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// Represents an error when attempting to add credits to an API user's account. + /// Represents an error when attempting to add credits to an API user's account.
+ /// Example: {"messages":["messages","messages"]} ///
public sealed partial class PostAddCreditsError { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsRequest.g.cs index 3f41324..314dc2a 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsRequest.g.cs @@ -4,13 +4,15 @@ namespace Ideogram { /// - /// + /// Example: {"amount":{"amount":1050,"currency_code":"USD"}} /// public sealed partial class PostAddCreditsRequest { /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("amount")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price Amount { get; set; } @@ -25,7 +27,8 @@ public sealed partial class PostAddCreditsRequest /// Initializes a new instance of the class. ///
/// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsResponse.g.cs index 9a81184..1ba74ca 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostAddCreditsResponse.g.cs @@ -4,13 +4,15 @@ namespace Ideogram { /// - /// + /// Example: {"amount":{"amount":1050,"currency_code":"USD"}} /// public sealed partial class PostAddCreditsResponse { /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("amount")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price Amount { get; set; } @@ -25,7 +27,8 @@ public sealed partial class PostAddCreditsResponse /// Initializes a new instance of the class. ///
/// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiKeyResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiKeyResponse.g.cs index 0a54420..c3d9c81 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiKeyResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiKeyResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"api_key":"vkpDjaKdMNR8QJ83GjfNvFZJbnoi65XUp70MgZNtA2H9XE8yfDnmr_6BaRyQkF9hnJzu6mUPRLBmqlnZMwetJA","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg=="} /// public sealed partial class PostApiKeyResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiReactivateResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiReactivateResponse.g.cs index 26b5cc7..9bcfb5d 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiReactivateResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiReactivateResponse.g.cs @@ -4,13 +4,15 @@ namespace Ideogram { /// - /// Response to re-activating API settings. + /// Response to re-activating API settings.
+ /// Example: {"recharge_settings":{"is_active":true}} ///
public sealed partial class PostApiReactivateResponse { /// - /// + /// Example: {"is_active":true} /// + /// {"is_active":true} [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] public global::Ideogram.RechargeSettingsResponse? RechargeSettings { get; set; } @@ -23,7 +25,9 @@ public sealed partial class PostApiReactivateResponse /// /// Initializes a new instance of the class. /// - /// + /// + /// Example: {"is_active":true} + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionError.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionError.g.cs index f026189..88f73db 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionError.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionError.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// Represents an error when attempting to update the API subscription. + /// Represents an error when attempting to update the API subscription.
+ /// Example: {"messages":["messages","messages"]} ///
public sealed partial class PostApiSubscriptionError { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionRequest.g.cs index f0b0a21..a41128f 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionRequest.g.cs @@ -4,13 +4,16 @@ namespace Ideogram { /// - /// Request to update API settings. Fields which are omitted will be ignored. + /// Request to update API settings. Fields which are omitted will be ignored.
+ /// Example: {"recharge_settings":{"minimum_balance_threshold":{"amount":1050,"currency_code":"USD"},"top_up_balance":{"amount":1050,"currency_code":"USD"}},"is_active":true} ///
public sealed partial class PostApiSubscriptionRequest { /// - /// The current recharge settings for the API subscription. + /// The current recharge settings for the API subscription.
+ /// Example: {"minimum_balance_threshold":{"amount":1050,"currency_code":"USD"},"top_up_balance":{"amount":1050,"currency_code":"USD"}} ///
+ /// {"minimum_balance_threshold":{"amount":1050,"currency_code":"USD"},"top_up_balance":{"amount":1050,"currency_code":"USD"}} [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] public global::Ideogram.RechargeSettings? RechargeSettings { get; set; } @@ -30,7 +33,8 @@ public sealed partial class PostApiSubscriptionRequest /// Initializes a new instance of the class. ///
/// - /// The current recharge settings for the API subscription. + /// The current recharge settings for the API subscription.
+ /// Example: {"minimum_balance_threshold":{"amount":1050,"currency_code":"USD"},"top_up_balance":{"amount":1050,"currency_code":"USD"}} /// /// /// Whether to enable or disable auto recharge. diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionResponse.g.cs index 15a8db7..3e84979 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiSubscriptionResponse.g.cs @@ -4,13 +4,15 @@ namespace Ideogram { /// - /// The updated API subscription. + /// The updated API subscription.
+ /// Example: {"recharge_settings":{"is_active":true}} ///
public sealed partial class PostApiSubscriptionResponse { /// - /// + /// Example: {"is_active":true} /// + /// {"is_active":true} [global::System.Text.Json.Serialization.JsonPropertyName("recharge_settings")] public global::Ideogram.RechargeSettingsResponse? RechargeSettings { get; set; } @@ -23,7 +25,9 @@ public sealed partial class PostApiSubscriptionResponse /// /// Initializes a new instance of the class. /// - /// + /// + /// Example: {"is_active":true} + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiTermsRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiTermsRequest.g.cs index de5a2b2..ce692b9 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostApiTermsRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostApiTermsRequest.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"terms_id":"TOS_2024_04_20"} /// public sealed partial class PostApiTermsRequest { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PostInternalTesting200Response.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PostInternalTesting200Response.g.cs index fa3986e..832dddb 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PostInternalTesting200Response.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PostInternalTesting200Response.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"response_content":"response_content"} /// public sealed partial class PostInternalTesting200Response { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.Price.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.Price.g.cs index 5986a46..82c4903 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.Price.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.Price.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
public sealed partial class Price { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.PromoteOrganizationMembersRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.PromoteOrganizationMembersRequest.g.cs index 76d55b9..e9cabf9 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.PromoteOrganizationMembersRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.PromoteOrganizationMembersRequest.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"members":[{"display_handle":"john_doe","email_address":"john.doe@example.com","user_id":"dXNlcl8xMjM"},{"display_handle":"john_doe","email_address":"john.doe@example.com","user_id":"dXNlcl8xMjM"}]} /// public sealed partial class PromoteOrganizationMembersRequest { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettings.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettings.g.cs index c24efc9..c55cb79 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettings.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettings.g.cs @@ -4,20 +4,25 @@ namespace Ideogram { /// - /// The current recharge settings for the API subscription. + /// The current recharge settings for the API subscription.
+ /// Example: {"minimum_balance_threshold":{"amount":1050,"currency_code":"USD"},"top_up_balance":{"amount":1050,"currency_code":"USD"}} ///
public sealed partial class RechargeSettings { /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("top_up_balance")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price TopUpBalance { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("minimum_balance_threshold")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price MinimumBalanceThreshold { get; set; } @@ -32,10 +37,12 @@ public sealed partial class RechargeSettings /// Initializes a new instance of the class. ///
/// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettingsResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettingsResponse.g.cs index 1d544db..91211b7 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettingsResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.RechargeSettingsResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"is_active":true} /// public sealed partial class RechargeSettingsResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.RedactedApiKey.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.RedactedApiKey.g.cs index ee3c087..b1b959b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.RedactedApiKey.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.RedactedApiKey.g.cs @@ -4,7 +4,8 @@ namespace Ideogram { /// - /// A representation of an API key that does not contain the full key. + /// A representation of an API key that does not contain the full key.
+ /// Example: {"creation_time":"2000-01-23T04:56:07.0000000\u002B00:00","redacted_api_key":"vkpDja","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg=="} ///
public sealed partial class RedactedApiKey { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequest.g.cs index 1712966..e838d16 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequest.g.cs @@ -9,8 +9,10 @@ namespace Ideogram public sealed partial class RemixImageRequest { /// - /// A request to generate a new image using a provided image and a prompt. + /// A request to generate a new image using a provided image and a prompt.
+ /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"ON","model":"V_2","prompt":"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 is 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.","image_weight":50} ///
+ /// {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"ON","model":"V_2","prompt":"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 is 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.","image_weight":50} [global::System.Text.Json.Serialization.JsonPropertyName("image_request")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.InitialImageRequest ImageRequest { get; set; } @@ -39,7 +41,8 @@ public sealed partial class RemixImageRequest /// Initializes a new instance of the class. ///
/// - /// A request to generate a new image using a provided image and a prompt. + /// A request to generate a new image using a provided image and a prompt.
+ /// Example: {"aspect_ratio":"ASPECT_10_16","magic_prompt_option":"ON","model":"V_2","prompt":"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 is 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.","image_weight":50} /// /// /// An image binary (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequestV3.g.cs index c72ac97..2782121 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequestV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequestV3.g.cs @@ -130,6 +130,15 @@ public sealed partial class RemixImageRequestV3 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StylePresetV3JsonConverter))] public global::Ideogram.StylePresetV3? StylePreset { get; set; } + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + ///
+ /// model/my-custom-model/version/1 + [global::System.Text.Json.Serialization.JsonPropertyName("custom_model_uri")] + public string? CustomModelUri { get; set; } + /// /// 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. /// @@ -215,6 +224,11 @@ public sealed partial class RemixImageRequestV3 /// A predefined style preset that applies a specific artistic style to the generated image.
/// Example: BRIGHT_ART /// + /// + /// A custom model URI in the format model/<model_name>/version/<version_name>.
+ /// When provided, the model version and style will be resolved from this URI, and style_type is not required.
+ /// Example: model/my-custom-model/version/1 + /// /// /// 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. /// @@ -243,6 +257,7 @@ public RemixImageRequestV3( global::System.Collections.Generic.IList? styleCodes, global::Ideogram.StyleTypeV3? styleType, global::Ideogram.StylePresetV3? stylePreset, + string? customModelUri, global::System.Collections.Generic.IList? styleReferenceImages, global::System.Collections.Generic.IList? characterReferenceImages, global::System.Collections.Generic.IList? characterReferenceImagesMask) @@ -262,6 +277,7 @@ public RemixImageRequestV3( this.StyleCodes = styleCodes; this.StyleType = styleType; this.StylePreset = stylePreset; + this.CustomModelUri = customModelUri; this.StyleReferenceImages = styleReferenceImages; this.CharacterReferenceImages = characterReferenceImages; this.CharacterReferenceImagesMask = characterReferenceImagesMask; diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.RemoveOrganizationMembersRequest.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.RemoveOrganizationMembersRequest.g.cs index 730de02..966e584 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.RemoveOrganizationMembersRequest.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.RemoveOrganizationMembersRequest.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"members":[{"display_handle":"john_doe","email_address":"john.doe@example.com","user_id":"dXNlcl8xMjM"},{"display_handle":"john_doe","email_address":"john.doe@example.com","user_id":"dXNlcl8xMjM"}]} /// public sealed partial class RemoveOrganizationMembersRequest { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.RenderingSpeed.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.RenderingSpeed.g.cs index 4cf4952..a2a2543 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.RenderingSpeed.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.RenderingSpeed.g.cs @@ -12,23 +12,23 @@ public enum RenderingSpeed /// /// /// - FLASH, + Flash, /// /// /// - TURBO, + Turbo, /// /// /// - BALANCED, + Balanced, /// /// /// - DEFAULT, + Default, /// /// /// - QUALITY, + Quality, } /// @@ -43,11 +43,11 @@ public static string ToValueString(this RenderingSpeed value) { return value switch { - RenderingSpeed.FLASH => "FLASH", - RenderingSpeed.TURBO => "TURBO", - RenderingSpeed.BALANCED => "BALANCED", - RenderingSpeed.DEFAULT => "DEFAULT", - RenderingSpeed.QUALITY => "QUALITY", + RenderingSpeed.Flash => "FLASH", + RenderingSpeed.Turbo => "TURBO", + RenderingSpeed.Balanced => "BALANCED", + RenderingSpeed.Default => "DEFAULT", + RenderingSpeed.Quality => "QUALITY", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -58,11 +58,11 @@ public static string ToValueString(this RenderingSpeed value) { return value switch { - "FLASH" => RenderingSpeed.FLASH, - "TURBO" => RenderingSpeed.TURBO, - "BALANCED" => RenderingSpeed.BALANCED, - "DEFAULT" => RenderingSpeed.DEFAULT, - "QUALITY" => RenderingSpeed.QUALITY, + "FLASH" => RenderingSpeed.Flash, + "TURBO" => RenderingSpeed.Turbo, + "BALANCED" => RenderingSpeed.Balanced, + "DEFAULT" => RenderingSpeed.Default, + "QUALITY" => RenderingSpeed.Quality, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.SamplingRequestParams.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.SamplingRequestParams.g.cs index 7302111..f7a8b58 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.SamplingRequestParams.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.SamplingRequestParams.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"aspect_ratio":"1x1","style_type":"GENERAL","magic_prompt_version":"V_0","seed":12345,"negative_prompt":"brush strokes, painting","magic_prompt_option":"ON","model":"V_2_TURBO","resolution":"1280x800","num_images":1,"color_palette":{"name":"PASTEL"}} /// public sealed partial class SamplingRequestParams { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.SegmentBy.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.SegmentBy.g.cs index 3576bc0..f9d8869 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.SegmentBy.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.SegmentBy.g.cs @@ -12,11 +12,11 @@ public enum SegmentBy /// /// /// - DAY, + Day, /// /// /// - HOUR, + Hour, } /// @@ -31,8 +31,8 @@ public static string ToValueString(this SegmentBy value) { return value switch { - SegmentBy.DAY => "DAY", - SegmentBy.HOUR => "HOUR", + SegmentBy.Day => "DAY", + SegmentBy.Hour => "HOUR", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -43,8 +43,8 @@ public static string ToValueString(this SegmentBy value) { return value switch { - "DAY" => SegmentBy.DAY, - "HOUR" => SegmentBy.HOUR, + "DAY" => SegmentBy.Day, + "HOUR" => SegmentBy.Hour, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfo.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfo.g.cs index 167234c..50a54e7 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfo.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfo.g.cs @@ -4,20 +4,24 @@ namespace Ideogram { /// - /// + /// Example: {"commit_start_time":"2000-01-23T04:56:07.0000000\u002B00:00","is_postpaid_commit":true,"commit_amount_spent":{"amount":1050,"currency_code":"USD"},"commit_amount":{"amount":1050,"currency_code":"USD"},"commit_end_time":"2000-01-23T04:56:07.0000000\u002B00:00"} /// public sealed partial class SpendCommitInfo { /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("commit_amount_spent")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price CommitAmountSpent { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("commit_amount")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price CommitAmount { get; set; } @@ -53,10 +57,12 @@ public sealed partial class SpendCommitInfo /// Initializes a new instance of the class. ///
/// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// /// The start time of the commit period diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfoResponse.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfoResponse.g.cs index c201ddf..4f0d0e1 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfoResponse.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.SpendCommitInfoResponse.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"commits":[{"commit_start_time":"2000-01-23T04:56:07.0000000\u002B00:00","is_postpaid_commit":true,"commit_amount_spent":{"amount":1050,"currency_code":"USD"},"commit_amount":{"amount":1050,"currency_code":"USD"},"commit_end_time":"2000-01-23T04:56:07.0000000\u002B00:00"},{"commit_start_time":"2000-01-23T04:56:07.0000000\u002B00:00","is_postpaid_commit":true,"commit_amount_spent":{"amount":1050,"currency_code":"USD"},"commit_amount":{"amount":1050,"currency_code":"USD"},"commit_end_time":"2000-01-23T04:56:07.0000000\u002B00:00"}]} /// public sealed partial class SpendCommitInfoResponse { diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.StylePresetV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.StylePresetV3.g.cs index 535f14c..5deb79b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.StylePresetV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.StylePresetV3.g.cs @@ -12,251 +12,251 @@ public enum StylePresetV3 /// /// /// - x80SILLUSTRATION, + x80sIllustration, /// /// /// - x90SNOSTALGIA, + x90sNostalgia, /// /// /// - ABSTRACTORGANIC, + AbstractOrganic, /// /// /// - ANALOGNOSTALGIA, + AnalogNostalgia, /// /// /// - ARTBRUT, + ArtBrut, /// /// /// - ARTDECO, + ArtDeco, /// /// /// - ARTPOSTER, + ArtPoster, /// /// /// - AURA, + Aura, /// /// /// - AVANTGARDE, + AvantGarde, /// /// /// - BAUHAUS, + Bauhaus, /// /// /// - BLUEPRINT, + Blueprint, /// /// /// - BLURRYMOTION, + BlurryMotion, /// /// /// - BRIGHTART, + BrightArt, /// /// /// - C4DCARTOON, + C4dCartoon, /// /// /// - CHILDRENSBOOK, + ChildrensBook, /// /// /// - COLLAGE, + Collage, /// /// /// - COLORINGBOOKI, + ColoringBookI, /// /// /// - COLORINGBOOKII, + ColoringBookIi, /// /// /// - CUBISM, + Cubism, /// /// /// - DARKAURA, + DarkAura, /// /// /// - DOODLE, + Doodle, /// /// /// - DOUBLEEXPOSURE, + DoubleExposure, /// /// /// - DRAMATICCINEMA, + DramaticCinema, /// /// /// - EDITORIAL, + Editorial, /// /// /// - EMOTIONALMINIMAL, + EmotionalMinimal, /// /// /// - ETHEREALPARTY, + EtherealParty, /// /// /// - EXPIREDFILM, + ExpiredFilm, /// /// /// - FLATART, + FlatArt, /// /// /// - FLATVECTOR, + FlatVector, /// /// /// - FORESTREVERIE, + ForestReverie, /// /// /// - GEOMINIMALIST, + GeoMinimalist, /// /// /// - GLASSPRISM, + GlassPrism, /// /// /// - GOLDENHOUR, + GoldenHour, /// /// /// - GRAFFITII, + GraffitiI, /// /// /// - GRAFFITIII, + GraffitiIi, /// /// /// - HALFTONEPRINT, + HalftonePrint, /// /// /// - HIGHCONTRAST, + HighContrast, /// /// /// - HIPPIEERA, + HippieEra, /// /// /// - ICONIC, + Iconic, /// /// /// - JAPANDIFUSION, + JapandiFusion, /// /// /// - JAZZY, + Jazzy, /// /// /// - LONGEXPOSURE, + LongExposure, /// /// /// - MAGAZINEEDITORIAL, + MagazineEditorial, /// /// /// - MINIMALILLUSTRATION, + MinimalIllustration, /// /// /// - MIXEDMEDIA, + MixedMedia, /// /// /// - MONOCHROME, + Monochrome, /// /// /// - NIGHTLIFE, + Nightlife, /// /// /// - OILPAINTING, + OilPainting, /// /// /// - OLDCARTOONS, + OldCartoons, /// /// /// - PAINTGESTURE, + PaintGesture, /// /// /// - POPART, + PopArt, /// /// /// - RETROETCHING, + RetroEtching, /// /// /// - RIVIERAPOP, + RivieraPop, /// /// /// - SPOTLIGHT80S, + Spotlight80s, /// /// /// - STYLIZEDRED, + StylizedRed, /// /// /// - SURREALCOLLAGE, + SurrealCollage, /// /// /// - TRAVELPOSTER, + TravelPoster, /// /// /// - VINTAGEGEO, + VintageGeo, /// /// /// - VINTAGEPOSTER, + VintagePoster, /// /// /// - WATERCOLOR, + Watercolor, /// /// /// - WEIRD, + Weird, /// /// /// - WOODBLOCKPRINT, + WoodblockPrint, } /// @@ -271,68 +271,68 @@ public static string ToValueString(this StylePresetV3 value) { return value switch { - StylePresetV3.x80SILLUSTRATION => "80S_ILLUSTRATION", - StylePresetV3.x90SNOSTALGIA => "90S_NOSTALGIA", - StylePresetV3.ABSTRACTORGANIC => "ABSTRACT_ORGANIC", - StylePresetV3.ANALOGNOSTALGIA => "ANALOG_NOSTALGIA", - StylePresetV3.ARTBRUT => "ART_BRUT", - StylePresetV3.ARTDECO => "ART_DECO", - StylePresetV3.ARTPOSTER => "ART_POSTER", - StylePresetV3.AURA => "AURA", - StylePresetV3.AVANTGARDE => "AVANT_GARDE", - StylePresetV3.BAUHAUS => "BAUHAUS", - StylePresetV3.BLUEPRINT => "BLUEPRINT", - StylePresetV3.BLURRYMOTION => "BLURRY_MOTION", - StylePresetV3.BRIGHTART => "BRIGHT_ART", - StylePresetV3.C4DCARTOON => "C4D_CARTOON", - StylePresetV3.CHILDRENSBOOK => "CHILDRENS_BOOK", - StylePresetV3.COLLAGE => "COLLAGE", - StylePresetV3.COLORINGBOOKI => "COLORING_BOOK_I", - StylePresetV3.COLORINGBOOKII => "COLORING_BOOK_II", - StylePresetV3.CUBISM => "CUBISM", - StylePresetV3.DARKAURA => "DARK_AURA", - StylePresetV3.DOODLE => "DOODLE", - StylePresetV3.DOUBLEEXPOSURE => "DOUBLE_EXPOSURE", - StylePresetV3.DRAMATICCINEMA => "DRAMATIC_CINEMA", - StylePresetV3.EDITORIAL => "EDITORIAL", - StylePresetV3.EMOTIONALMINIMAL => "EMOTIONAL_MINIMAL", - StylePresetV3.ETHEREALPARTY => "ETHEREAL_PARTY", - StylePresetV3.EXPIREDFILM => "EXPIRED_FILM", - StylePresetV3.FLATART => "FLAT_ART", - StylePresetV3.FLATVECTOR => "FLAT_VECTOR", - StylePresetV3.FORESTREVERIE => "FOREST_REVERIE", - StylePresetV3.GEOMINIMALIST => "GEO_MINIMALIST", - StylePresetV3.GLASSPRISM => "GLASS_PRISM", - StylePresetV3.GOLDENHOUR => "GOLDEN_HOUR", - StylePresetV3.GRAFFITII => "GRAFFITI_I", - StylePresetV3.GRAFFITIII => "GRAFFITI_II", - StylePresetV3.HALFTONEPRINT => "HALFTONE_PRINT", - StylePresetV3.HIGHCONTRAST => "HIGH_CONTRAST", - StylePresetV3.HIPPIEERA => "HIPPIE_ERA", - StylePresetV3.ICONIC => "ICONIC", - StylePresetV3.JAPANDIFUSION => "JAPANDI_FUSION", - StylePresetV3.JAZZY => "JAZZY", - StylePresetV3.LONGEXPOSURE => "LONG_EXPOSURE", - StylePresetV3.MAGAZINEEDITORIAL => "MAGAZINE_EDITORIAL", - StylePresetV3.MINIMALILLUSTRATION => "MINIMAL_ILLUSTRATION", - StylePresetV3.MIXEDMEDIA => "MIXED_MEDIA", - StylePresetV3.MONOCHROME => "MONOCHROME", - StylePresetV3.NIGHTLIFE => "NIGHTLIFE", - StylePresetV3.OILPAINTING => "OIL_PAINTING", - StylePresetV3.OLDCARTOONS => "OLD_CARTOONS", - StylePresetV3.PAINTGESTURE => "PAINT_GESTURE", - StylePresetV3.POPART => "POP_ART", - StylePresetV3.RETROETCHING => "RETRO_ETCHING", - StylePresetV3.RIVIERAPOP => "RIVIERA_POP", - StylePresetV3.SPOTLIGHT80S => "SPOTLIGHT_80S", - StylePresetV3.STYLIZEDRED => "STYLIZED_RED", - StylePresetV3.SURREALCOLLAGE => "SURREAL_COLLAGE", - StylePresetV3.TRAVELPOSTER => "TRAVEL_POSTER", - StylePresetV3.VINTAGEGEO => "VINTAGE_GEO", - StylePresetV3.VINTAGEPOSTER => "VINTAGE_POSTER", - StylePresetV3.WATERCOLOR => "WATERCOLOR", - StylePresetV3.WEIRD => "WEIRD", - StylePresetV3.WOODBLOCKPRINT => "WOODBLOCK_PRINT", + StylePresetV3.x80sIllustration => "80S_ILLUSTRATION", + StylePresetV3.x90sNostalgia => "90S_NOSTALGIA", + StylePresetV3.AbstractOrganic => "ABSTRACT_ORGANIC", + StylePresetV3.AnalogNostalgia => "ANALOG_NOSTALGIA", + StylePresetV3.ArtBrut => "ART_BRUT", + StylePresetV3.ArtDeco => "ART_DECO", + StylePresetV3.ArtPoster => "ART_POSTER", + StylePresetV3.Aura => "AURA", + StylePresetV3.AvantGarde => "AVANT_GARDE", + StylePresetV3.Bauhaus => "BAUHAUS", + StylePresetV3.Blueprint => "BLUEPRINT", + StylePresetV3.BlurryMotion => "BLURRY_MOTION", + StylePresetV3.BrightArt => "BRIGHT_ART", + StylePresetV3.C4dCartoon => "C4D_CARTOON", + StylePresetV3.ChildrensBook => "CHILDRENS_BOOK", + StylePresetV3.Collage => "COLLAGE", + StylePresetV3.ColoringBookI => "COLORING_BOOK_I", + StylePresetV3.ColoringBookIi => "COLORING_BOOK_II", + StylePresetV3.Cubism => "CUBISM", + StylePresetV3.DarkAura => "DARK_AURA", + StylePresetV3.Doodle => "DOODLE", + StylePresetV3.DoubleExposure => "DOUBLE_EXPOSURE", + StylePresetV3.DramaticCinema => "DRAMATIC_CINEMA", + StylePresetV3.Editorial => "EDITORIAL", + StylePresetV3.EmotionalMinimal => "EMOTIONAL_MINIMAL", + StylePresetV3.EtherealParty => "ETHEREAL_PARTY", + StylePresetV3.ExpiredFilm => "EXPIRED_FILM", + StylePresetV3.FlatArt => "FLAT_ART", + StylePresetV3.FlatVector => "FLAT_VECTOR", + StylePresetV3.ForestReverie => "FOREST_REVERIE", + StylePresetV3.GeoMinimalist => "GEO_MINIMALIST", + StylePresetV3.GlassPrism => "GLASS_PRISM", + StylePresetV3.GoldenHour => "GOLDEN_HOUR", + StylePresetV3.GraffitiI => "GRAFFITI_I", + StylePresetV3.GraffitiIi => "GRAFFITI_II", + StylePresetV3.HalftonePrint => "HALFTONE_PRINT", + StylePresetV3.HighContrast => "HIGH_CONTRAST", + StylePresetV3.HippieEra => "HIPPIE_ERA", + StylePresetV3.Iconic => "ICONIC", + StylePresetV3.JapandiFusion => "JAPANDI_FUSION", + StylePresetV3.Jazzy => "JAZZY", + StylePresetV3.LongExposure => "LONG_EXPOSURE", + StylePresetV3.MagazineEditorial => "MAGAZINE_EDITORIAL", + StylePresetV3.MinimalIllustration => "MINIMAL_ILLUSTRATION", + StylePresetV3.MixedMedia => "MIXED_MEDIA", + StylePresetV3.Monochrome => "MONOCHROME", + StylePresetV3.Nightlife => "NIGHTLIFE", + StylePresetV3.OilPainting => "OIL_PAINTING", + StylePresetV3.OldCartoons => "OLD_CARTOONS", + StylePresetV3.PaintGesture => "PAINT_GESTURE", + StylePresetV3.PopArt => "POP_ART", + StylePresetV3.RetroEtching => "RETRO_ETCHING", + StylePresetV3.RivieraPop => "RIVIERA_POP", + StylePresetV3.Spotlight80s => "SPOTLIGHT_80S", + StylePresetV3.StylizedRed => "STYLIZED_RED", + StylePresetV3.SurrealCollage => "SURREAL_COLLAGE", + StylePresetV3.TravelPoster => "TRAVEL_POSTER", + StylePresetV3.VintageGeo => "VINTAGE_GEO", + StylePresetV3.VintagePoster => "VINTAGE_POSTER", + StylePresetV3.Watercolor => "WATERCOLOR", + StylePresetV3.Weird => "WEIRD", + StylePresetV3.WoodblockPrint => "WOODBLOCK_PRINT", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -343,68 +343,68 @@ public static string ToValueString(this StylePresetV3 value) { return value switch { - "80S_ILLUSTRATION" => StylePresetV3.x80SILLUSTRATION, - "90S_NOSTALGIA" => StylePresetV3.x90SNOSTALGIA, - "ABSTRACT_ORGANIC" => StylePresetV3.ABSTRACTORGANIC, - "ANALOG_NOSTALGIA" => StylePresetV3.ANALOGNOSTALGIA, - "ART_BRUT" => StylePresetV3.ARTBRUT, - "ART_DECO" => StylePresetV3.ARTDECO, - "ART_POSTER" => StylePresetV3.ARTPOSTER, - "AURA" => StylePresetV3.AURA, - "AVANT_GARDE" => StylePresetV3.AVANTGARDE, - "BAUHAUS" => StylePresetV3.BAUHAUS, - "BLUEPRINT" => StylePresetV3.BLUEPRINT, - "BLURRY_MOTION" => StylePresetV3.BLURRYMOTION, - "BRIGHT_ART" => StylePresetV3.BRIGHTART, - "C4D_CARTOON" => StylePresetV3.C4DCARTOON, - "CHILDRENS_BOOK" => StylePresetV3.CHILDRENSBOOK, - "COLLAGE" => StylePresetV3.COLLAGE, - "COLORING_BOOK_I" => StylePresetV3.COLORINGBOOKI, - "COLORING_BOOK_II" => StylePresetV3.COLORINGBOOKII, - "CUBISM" => StylePresetV3.CUBISM, - "DARK_AURA" => StylePresetV3.DARKAURA, - "DOODLE" => StylePresetV3.DOODLE, - "DOUBLE_EXPOSURE" => StylePresetV3.DOUBLEEXPOSURE, - "DRAMATIC_CINEMA" => StylePresetV3.DRAMATICCINEMA, - "EDITORIAL" => StylePresetV3.EDITORIAL, - "EMOTIONAL_MINIMAL" => StylePresetV3.EMOTIONALMINIMAL, - "ETHEREAL_PARTY" => StylePresetV3.ETHEREALPARTY, - "EXPIRED_FILM" => StylePresetV3.EXPIREDFILM, - "FLAT_ART" => StylePresetV3.FLATART, - "FLAT_VECTOR" => StylePresetV3.FLATVECTOR, - "FOREST_REVERIE" => StylePresetV3.FORESTREVERIE, - "GEO_MINIMALIST" => StylePresetV3.GEOMINIMALIST, - "GLASS_PRISM" => StylePresetV3.GLASSPRISM, - "GOLDEN_HOUR" => StylePresetV3.GOLDENHOUR, - "GRAFFITI_I" => StylePresetV3.GRAFFITII, - "GRAFFITI_II" => StylePresetV3.GRAFFITIII, - "HALFTONE_PRINT" => StylePresetV3.HALFTONEPRINT, - "HIGH_CONTRAST" => StylePresetV3.HIGHCONTRAST, - "HIPPIE_ERA" => StylePresetV3.HIPPIEERA, - "ICONIC" => StylePresetV3.ICONIC, - "JAPANDI_FUSION" => StylePresetV3.JAPANDIFUSION, - "JAZZY" => StylePresetV3.JAZZY, - "LONG_EXPOSURE" => StylePresetV3.LONGEXPOSURE, - "MAGAZINE_EDITORIAL" => StylePresetV3.MAGAZINEEDITORIAL, - "MINIMAL_ILLUSTRATION" => StylePresetV3.MINIMALILLUSTRATION, - "MIXED_MEDIA" => StylePresetV3.MIXEDMEDIA, - "MONOCHROME" => StylePresetV3.MONOCHROME, - "NIGHTLIFE" => StylePresetV3.NIGHTLIFE, - "OIL_PAINTING" => StylePresetV3.OILPAINTING, - "OLD_CARTOONS" => StylePresetV3.OLDCARTOONS, - "PAINT_GESTURE" => StylePresetV3.PAINTGESTURE, - "POP_ART" => StylePresetV3.POPART, - "RETRO_ETCHING" => StylePresetV3.RETROETCHING, - "RIVIERA_POP" => StylePresetV3.RIVIERAPOP, - "SPOTLIGHT_80S" => StylePresetV3.SPOTLIGHT80S, - "STYLIZED_RED" => StylePresetV3.STYLIZEDRED, - "SURREAL_COLLAGE" => StylePresetV3.SURREALCOLLAGE, - "TRAVEL_POSTER" => StylePresetV3.TRAVELPOSTER, - "VINTAGE_GEO" => StylePresetV3.VINTAGEGEO, - "VINTAGE_POSTER" => StylePresetV3.VINTAGEPOSTER, - "WATERCOLOR" => StylePresetV3.WATERCOLOR, - "WEIRD" => StylePresetV3.WEIRD, - "WOODBLOCK_PRINT" => StylePresetV3.WOODBLOCKPRINT, + "80S_ILLUSTRATION" => StylePresetV3.x80sIllustration, + "90S_NOSTALGIA" => StylePresetV3.x90sNostalgia, + "ABSTRACT_ORGANIC" => StylePresetV3.AbstractOrganic, + "ANALOG_NOSTALGIA" => StylePresetV3.AnalogNostalgia, + "ART_BRUT" => StylePresetV3.ArtBrut, + "ART_DECO" => StylePresetV3.ArtDeco, + "ART_POSTER" => StylePresetV3.ArtPoster, + "AURA" => StylePresetV3.Aura, + "AVANT_GARDE" => StylePresetV3.AvantGarde, + "BAUHAUS" => StylePresetV3.Bauhaus, + "BLUEPRINT" => StylePresetV3.Blueprint, + "BLURRY_MOTION" => StylePresetV3.BlurryMotion, + "BRIGHT_ART" => StylePresetV3.BrightArt, + "C4D_CARTOON" => StylePresetV3.C4dCartoon, + "CHILDRENS_BOOK" => StylePresetV3.ChildrensBook, + "COLLAGE" => StylePresetV3.Collage, + "COLORING_BOOK_I" => StylePresetV3.ColoringBookI, + "COLORING_BOOK_II" => StylePresetV3.ColoringBookIi, + "CUBISM" => StylePresetV3.Cubism, + "DARK_AURA" => StylePresetV3.DarkAura, + "DOODLE" => StylePresetV3.Doodle, + "DOUBLE_EXPOSURE" => StylePresetV3.DoubleExposure, + "DRAMATIC_CINEMA" => StylePresetV3.DramaticCinema, + "EDITORIAL" => StylePresetV3.Editorial, + "EMOTIONAL_MINIMAL" => StylePresetV3.EmotionalMinimal, + "ETHEREAL_PARTY" => StylePresetV3.EtherealParty, + "EXPIRED_FILM" => StylePresetV3.ExpiredFilm, + "FLAT_ART" => StylePresetV3.FlatArt, + "FLAT_VECTOR" => StylePresetV3.FlatVector, + "FOREST_REVERIE" => StylePresetV3.ForestReverie, + "GEO_MINIMALIST" => StylePresetV3.GeoMinimalist, + "GLASS_PRISM" => StylePresetV3.GlassPrism, + "GOLDEN_HOUR" => StylePresetV3.GoldenHour, + "GRAFFITI_I" => StylePresetV3.GraffitiI, + "GRAFFITI_II" => StylePresetV3.GraffitiIi, + "HALFTONE_PRINT" => StylePresetV3.HalftonePrint, + "HIGH_CONTRAST" => StylePresetV3.HighContrast, + "HIPPIE_ERA" => StylePresetV3.HippieEra, + "ICONIC" => StylePresetV3.Iconic, + "JAPANDI_FUSION" => StylePresetV3.JapandiFusion, + "JAZZY" => StylePresetV3.Jazzy, + "LONG_EXPOSURE" => StylePresetV3.LongExposure, + "MAGAZINE_EDITORIAL" => StylePresetV3.MagazineEditorial, + "MINIMAL_ILLUSTRATION" => StylePresetV3.MinimalIllustration, + "MIXED_MEDIA" => StylePresetV3.MixedMedia, + "MONOCHROME" => StylePresetV3.Monochrome, + "NIGHTLIFE" => StylePresetV3.Nightlife, + "OIL_PAINTING" => StylePresetV3.OilPainting, + "OLD_CARTOONS" => StylePresetV3.OldCartoons, + "PAINT_GESTURE" => StylePresetV3.PaintGesture, + "POP_ART" => StylePresetV3.PopArt, + "RETRO_ETCHING" => StylePresetV3.RetroEtching, + "RIVIERA_POP" => StylePresetV3.RivieraPop, + "SPOTLIGHT_80S" => StylePresetV3.Spotlight80s, + "STYLIZED_RED" => StylePresetV3.StylizedRed, + "SURREAL_COLLAGE" => StylePresetV3.SurrealCollage, + "TRAVEL_POSTER" => StylePresetV3.TravelPoster, + "VINTAGE_GEO" => StylePresetV3.VintageGeo, + "VINTAGE_POSTER" => StylePresetV3.VintagePoster, + "WATERCOLOR" => StylePresetV3.Watercolor, + "WEIRD" => StylePresetV3.Weird, + "WOODBLOCK_PRINT" => StylePresetV3.WoodblockPrint, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.StyleType.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.StyleType.g.cs index 4a432e0..81c6556 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.StyleType.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.StyleType.g.cs @@ -12,39 +12,39 @@ public enum StyleType /// /// /// - AUTO, + Auto, /// /// /// - GENERAL, + General, /// /// /// - FICTION, + Fiction, /// /// /// - REALISTIC, + Realistic, /// /// /// - DESIGN, + Design, /// /// /// - RENDER3D, + Render3d, /// /// /// - ANIME, + Anime, /// /// /// - CUSTOM, + Custom, /// /// /// - STYLIZED, + Stylized, } /// @@ -59,15 +59,15 @@ public static string ToValueString(this StyleType value) { return value switch { - StyleType.AUTO => "AUTO", - StyleType.GENERAL => "GENERAL", - StyleType.FICTION => "FICTION", - StyleType.REALISTIC => "REALISTIC", - StyleType.DESIGN => "DESIGN", - StyleType.RENDER3D => "RENDER_3D", - StyleType.ANIME => "ANIME", - StyleType.CUSTOM => "CUSTOM", - StyleType.STYLIZED => "STYLIZED", + StyleType.Auto => "AUTO", + StyleType.General => "GENERAL", + StyleType.Fiction => "FICTION", + StyleType.Realistic => "REALISTIC", + StyleType.Design => "DESIGN", + StyleType.Render3d => "RENDER_3D", + StyleType.Anime => "ANIME", + StyleType.Custom => "CUSTOM", + StyleType.Stylized => "STYLIZED", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -78,15 +78,15 @@ public static string ToValueString(this StyleType value) { return value switch { - "AUTO" => StyleType.AUTO, - "GENERAL" => StyleType.GENERAL, - "FICTION" => StyleType.FICTION, - "REALISTIC" => StyleType.REALISTIC, - "DESIGN" => StyleType.DESIGN, - "RENDER_3D" => StyleType.RENDER3D, - "ANIME" => StyleType.ANIME, - "CUSTOM" => StyleType.CUSTOM, - "STYLIZED" => StyleType.STYLIZED, + "AUTO" => StyleType.Auto, + "GENERAL" => StyleType.General, + "FICTION" => StyleType.Fiction, + "REALISTIC" => StyleType.Realistic, + "DESIGN" => StyleType.Design, + "RENDER_3D" => StyleType.Render3d, + "ANIME" => StyleType.Anime, + "CUSTOM" => StyleType.Custom, + "STYLIZED" => StyleType.Stylized, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.StyleTypeV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.StyleTypeV3.g.cs index 8b93228..95125e8 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.StyleTypeV3.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.StyleTypeV3.g.cs @@ -13,31 +13,31 @@ public enum StyleTypeV3 /// /// /// - AUTO, + Auto, /// /// /// - GENERAL, + General, /// /// /// - REALISTIC, + Realistic, /// /// /// - DESIGN, + Design, /// /// /// - CUSTOM, + Custom, /// /// /// - FICTION, + Fiction, /// /// /// - STYLIZED, + Stylized, } /// @@ -52,13 +52,13 @@ public static string ToValueString(this StyleTypeV3 value) { return value switch { - StyleTypeV3.AUTO => "AUTO", - StyleTypeV3.GENERAL => "GENERAL", - StyleTypeV3.REALISTIC => "REALISTIC", - StyleTypeV3.DESIGN => "DESIGN", - StyleTypeV3.CUSTOM => "CUSTOM", - StyleTypeV3.FICTION => "FICTION", - StyleTypeV3.STYLIZED => "STYLIZED", + StyleTypeV3.Auto => "AUTO", + StyleTypeV3.General => "GENERAL", + StyleTypeV3.Realistic => "REALISTIC", + StyleTypeV3.Design => "DESIGN", + StyleTypeV3.Custom => "CUSTOM", + StyleTypeV3.Fiction => "FICTION", + StyleTypeV3.Stylized => "STYLIZED", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -69,13 +69,13 @@ public static string ToValueString(this StyleTypeV3 value) { return value switch { - "AUTO" => StyleTypeV3.AUTO, - "GENERAL" => StyleTypeV3.GENERAL, - "REALISTIC" => StyleTypeV3.REALISTIC, - "DESIGN" => StyleTypeV3.DESIGN, - "CUSTOM" => StyleTypeV3.CUSTOM, - "FICTION" => StyleTypeV3.FICTION, - "STYLIZED" => StyleTypeV3.STYLIZED, + "AUTO" => StyleTypeV3.Auto, + "GENERAL" => StyleTypeV3.General, + "REALISTIC" => StyleTypeV3.Realistic, + "DESIGN" => StyleTypeV3.Design, + "CUSTOM" => StyleTypeV3.Custom, + "FICTION" => StyleTypeV3.Fiction, + "STYLIZED" => StyleTypeV3.Stylized, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3.Json.g.cs new file mode 100644 index 0000000..298047f --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class TextLayerV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.TextLayerV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.TextLayerV3), + jsonSerializerContext) as global::Ideogram.TextLayerV3; + } + + /// + /// 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::Ideogram.TextLayerV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.TextLayerV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.TextLayerV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3.g.cs new file mode 100644 index 0000000..c8a87e1 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3.g.cs @@ -0,0 +1,183 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// A text layer for a layered image generation.
+ /// Example: {"font_candidates":["font_candidates","font_candidates"],"line_height":2.302136,"color":"#FF0000","font_size":5,"x":0,"width":1,"y":6,"angle":0,"text":"text","font_file":"font_file","alignment":"center","height":5} + ///
+ public sealed partial class TextLayerV3 + { + /// + /// The text of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// The x coordinate of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y coordinate of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { get; set; } + + /// + /// The width of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("width")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Width { get; set; } + + /// + /// The height of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("height")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Height { get; set; } + + /// + /// The font file of the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("font_file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FontFile { get; set; } + + /// + /// A list of alternate matching font files for the layer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("font_candidates")] + public global::System.Collections.Generic.IList? FontCandidates { get; set; } + + /// + /// The font size in points. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("font_size")] + public int? FontSize { get; set; } + + /// + /// The line height multiplier (e.g., 1.2). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("line_height")] + public float? LineHeight { get; set; } + + /// + /// The hex color of the text in the layer (e.g. "#FF0000" for red).
+ /// Example: #FF0000 + ///
+ /// #FF0000 + [global::System.Text.Json.Serialization.JsonPropertyName("color")] + public string? Color { get; set; } + + /// + /// The text alignment of the layer.
+ /// Example: center + ///
+ /// center + [global::System.Text.Json.Serialization.JsonPropertyName("alignment")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.TextLayerV3AlignmentJsonConverter))] + public global::Ideogram.TextLayerV3Alignment? Alignment { get; set; } + + /// + /// The angle rotation of the text in the layer, measured clockwise.
+ /// Example: 0 + ///
+ /// 0 + [global::System.Text.Json.Serialization.JsonPropertyName("angle")] + public float? Angle { 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. + /// + /// + /// The text of the layer. + /// + /// + /// The x coordinate of the layer. + /// + /// + /// The y coordinate of the layer. + /// + /// + /// The width of the layer. + /// + /// + /// The height of the layer. + /// + /// + /// The font file of the layer. + /// + /// + /// A list of alternate matching font files for the layer. + /// + /// + /// The font size in points. + /// + /// + /// The line height multiplier (e.g., 1.2). + /// + /// + /// The hex color of the text in the layer (e.g. "#FF0000" for red).
+ /// Example: #FF0000 + /// + /// + /// The text alignment of the layer.
+ /// Example: center + /// + /// + /// The angle rotation of the text in the layer, measured clockwise.
+ /// Example: 0 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TextLayerV3( + string text, + int x, + int y, + int width, + int height, + string fontFile, + global::System.Collections.Generic.IList? fontCandidates, + int? fontSize, + float? lineHeight, + string? color, + global::Ideogram.TextLayerV3Alignment? alignment, + float? angle) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.X = x; + this.Y = y; + this.Width = width; + this.Height = height; + this.FontFile = fontFile ?? throw new global::System.ArgumentNullException(nameof(fontFile)); + this.FontCandidates = fontCandidates; + this.FontSize = fontSize; + this.LineHeight = lineHeight; + this.Color = color; + this.Alignment = alignment; + this.Angle = angle; + } + + /// + /// Initializes a new instance of the class. + /// + public TextLayerV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3Alignment.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3Alignment.g.cs new file mode 100644 index 0000000..2778fa5 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.TextLayerV3Alignment.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// The text alignment of the layer.
+ /// Example: center + ///
+ public enum TextLayerV3Alignment + { + /// + /// + /// + Left, + /// + /// + /// + Center, + /// + /// + /// + Right, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TextLayerV3AlignmentExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TextLayerV3Alignment value) + { + return value switch + { + TextLayerV3Alignment.Left => "left", + TextLayerV3Alignment.Center => "center", + TextLayerV3Alignment.Right => "right", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TextLayerV3Alignment? ToEnum(string value) + { + return value switch + { + "left" => TextLayerV3Alignment.Left, + "center" => TextLayerV3Alignment.Center, + "right" => TextLayerV3Alignment.Right, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ToolType.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ToolType.g.cs index 7935096..b603883 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ToolType.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ToolType.g.cs @@ -12,23 +12,27 @@ public enum ToolType /// /// /// - GENERATE, + Generate, /// /// /// - REMIX, + Remix, /// /// /// - EDIT, + Edit, /// /// /// - UPSCALE, + Upscale, /// /// /// - DESCRIBE, + Describe, + /// + /// + /// + Other, } /// @@ -43,11 +47,12 @@ public static string ToValueString(this ToolType value) { return value switch { - ToolType.GENERATE => "GENERATE", - ToolType.REMIX => "REMIX", - ToolType.EDIT => "EDIT", - ToolType.UPSCALE => "UPSCALE", - ToolType.DESCRIBE => "DESCRIBE", + ToolType.Generate => "GENERATE", + ToolType.Remix => "REMIX", + ToolType.Edit => "EDIT", + ToolType.Upscale => "UPSCALE", + ToolType.Describe => "DESCRIBE", + ToolType.Other => "OTHER", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -58,11 +63,12 @@ public static string ToValueString(this ToolType value) { return value switch { - "GENERATE" => ToolType.GENERATE, - "REMIX" => ToolType.REMIX, - "EDIT" => ToolType.EDIT, - "UPSCALE" => ToolType.UPSCALE, - "DESCRIBE" => ToolType.DESCRIBE, + "GENERATE" => ToolType.Generate, + "REMIX" => ToolType.Remix, + "EDIT" => ToolType.Edit, + "UPSCALE" => ToolType.Upscale, + "DESCRIBE" => ToolType.Describe, + "OTHER" => ToolType.Other, _ => null, }; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.ToolUsage.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.ToolUsage.g.cs index d5fd4d7..353883b 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.ToolUsage.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.ToolUsage.g.cs @@ -4,7 +4,7 @@ namespace Ideogram { /// - /// + /// Example: {"user_email_address":"user@company.com","model_version":"V_0_3","full_tool_name":"Turbo Image Generation V3","amount":{"amount":1050,"currency_code":"USD"},"tool_type":"GENERATE","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg"} /// public sealed partial class ToolUsage { @@ -18,20 +18,29 @@ public sealed partial class ToolUsage public required string FullToolName { get; set; } /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} ///
+ /// {"amount":1050,"currency_code":"USD"} [global::System.Text.Json.Serialization.JsonPropertyName("amount")] [global::System.Text.Json.Serialization.JsonRequired] public required global::Ideogram.Price Amount { get; set; } /// - /// Base64 encoded API key ID
+ /// Base64 encoded API key ID (for API usage)
/// Example: JRPVD7jWR1aTBYiJ0UFVOg ///
/// JRPVD7jWR1aTBYiJ0UFVOg [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ApiKeyId { get; set; } + public string? ApiKeyId { get; set; } + + /// + /// User email address (for web app usage)
+ /// Example: user@company.com + ///
+ /// user@company.com + [global::System.Text.Json.Serialization.JsonPropertyName("user_email_address")] + public string? UserEmailAddress { get; set; } /// /// Tool type for filtering usage information
@@ -51,6 +60,7 @@ public sealed partial class ToolUsage /// - V_2_1: Model 2a
/// - V_3_0: Model 3.0 March 26
/// - V_3_1: Model 3.0 Latest
+ /// - AUTO: Automatically select the best model version based on the request.
/// Example: V_0_3 ///
/// V_0_3 @@ -72,12 +82,17 @@ public sealed partial class ToolUsage /// Example: Turbo Image Generation V3 /// /// - /// Represents a price. + /// Represents a price.
+ /// Example: {"amount":1050,"currency_code":"USD"} /// /// - /// Base64 encoded API key ID
+ /// Base64 encoded API key ID (for API usage)
/// Example: JRPVD7jWR1aTBYiJ0UFVOg /// + /// + /// User email address (for web app usage)
+ /// Example: user@company.com + /// /// /// Tool type for filtering usage information
/// Example: GENERATE @@ -90,6 +105,7 @@ public sealed partial class ToolUsage /// - V_2_1: Model 2a
/// - V_3_0: Model 3.0 March 26
/// - V_3_1: Model 3.0 Latest
+ /// - AUTO: Automatically select the best model version based on the request.
/// Example: V_0_3 /// #if NET7_0_OR_GREATER @@ -98,14 +114,16 @@ public sealed partial class ToolUsage public ToolUsage( string fullToolName, global::Ideogram.Price amount, - string apiKeyId, global::Ideogram.ToolType toolType, + string? apiKeyId, + string? userEmailAddress, global::Ideogram.ModelVersion? modelVersion) { this.FullToolName = fullToolName ?? throw new global::System.ArgumentNullException(nameof(fullToolName)); this.Amount = amount ?? throw new global::System.ArgumentNullException(nameof(amount)); - this.ApiKeyId = apiKeyId ?? throw new global::System.ArgumentNullException(nameof(apiKeyId)); this.ToolType = toolType; + this.ApiKeyId = apiKeyId; + this.UserEmailAddress = userEmailAddress; this.ModelVersion = modelVersion; } diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.TryOnRequestV3.Json.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.TryOnRequestV3.Json.g.cs new file mode 100644 index 0000000..16b1d5c --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.TryOnRequestV3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ideogram +{ + public sealed partial class TryOnRequestV3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ideogram.TryOnRequestV3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ideogram.TryOnRequestV3), + jsonSerializerContext) as global::Ideogram.TryOnRequestV3; + } + + /// + /// 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::Ideogram.TryOnRequestV3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ideogram.TryOnRequestV3), + jsonSerializerContext).ConfigureAwait(false)) as global::Ideogram.TryOnRequestV3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.TryOnRequestV3.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.TryOnRequestV3.g.cs new file mode 100644 index 0000000..2660b36 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.TryOnRequestV3.g.cs @@ -0,0 +1,173 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// + /// + public sealed partial class TryOnRequestV3 + { + /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] Image { get; set; } + + /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("imagename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Imagename { get; set; } + + /// + /// The prompt describing the desired clothing change.
+ /// Example: Change his shirt to a pink shirt + ///
+ /// Change his shirt to a pink shirt + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + ///
+ /// ON + [global::System.Text.Json.Serialization.JsonPropertyName("magic_prompt")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.MagicPromptOptionJsonConverter))] + public global::Ideogram.MagicPromptOption? MagicPrompt { get; set; } + + /// + /// The number of images to generate.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_images")] + public int? NumImages { get; set; } + + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + ///
+ /// 12345 + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rendering_speed")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.RenderingSpeedJsonConverter))] + public global::Ideogram.RenderingSpeed? RenderingSpeed { get; set; } + + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + ///
+ /// GENERAL + [global::System.Text.Json.Serialization.JsonPropertyName("style_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StyleTypeV3JsonConverter))] + public global::Ideogram.StyleTypeV3? StyleType { get; set; } + + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + ///
+ /// BRIGHT_ART + [global::System.Text.Json.Serialization.JsonPropertyName("style_preset")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StylePresetV3JsonConverter))] + public global::Ideogram.StylePresetV3? StylePreset { get; set; } + + /// + /// An image to use as the product reference for the try-on (exactly 1 image required). The image should be in JPEG, PNG or WebP format. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("product_reference_images")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList ProductReferenceImages { 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. + /// + /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + /// + /// The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time. + /// + /// + /// The prompt describing the desired clothing change.
+ /// Example: Change his shirt to a pink shirt + /// + /// + /// Determine if MagicPrompt should be used in generating the request or not.
+ /// Example: ON + /// + /// + /// The number of images to generate.
+ /// Default Value: 1 + /// + /// + /// Random seed. Set for reproducible generation.
+ /// Example: 12345 + /// + /// + /// The rendering speed to use.
+ /// Default Value: DEFAULT + /// + /// + /// The style type to generate with.
+ /// Default Value: GENERAL
+ /// Example: GENERAL + /// + /// + /// A predefined style preset that applies a specific artistic style to the generated image.
+ /// Example: BRIGHT_ART + /// + /// + /// An image to use as the product reference for the try-on (exactly 1 image required). The image should be in JPEG, PNG or WebP format. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TryOnRequestV3( + byte[] image, + string imagename, + string prompt, + global::System.Collections.Generic.IList productReferenceImages, + global::Ideogram.MagicPromptOption? magicPrompt, + int? numImages, + int? seed, + global::Ideogram.RenderingSpeed? renderingSpeed, + global::Ideogram.StyleTypeV3? styleType, + global::Ideogram.StylePresetV3? stylePreset) + { + this.Image = image ?? throw new global::System.ArgumentNullException(nameof(image)); + this.Imagename = imagename ?? throw new global::System.ArgumentNullException(nameof(imagename)); + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.ProductReferenceImages = productReferenceImages ?? throw new global::System.ArgumentNullException(nameof(productReferenceImages)); + this.MagicPrompt = magicPrompt; + this.NumImages = numImages; + this.Seed = seed; + this.RenderingSpeed = renderingSpeed; + this.StyleType = styleType; + this.StylePreset = stylePreset; + } + + /// + /// Initializes a new instance of the class. + /// + public TryOnRequestV3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.UpscaleFactor.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.UpscaleFactor.g.cs new file mode 100644 index 0000000..fd0b480 --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.UpscaleFactor.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// Upscale the initially generated image by the given factor. Upscale factors other than X1 will incur additional cost.
+ /// Default Value: X1
+ /// Example: X2 + ///
+ public enum UpscaleFactor + { + /// + /// + /// + X1, + /// + /// + /// + X2, + /// + /// + /// + X4, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UpscaleFactorExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UpscaleFactor value) + { + return value switch + { + UpscaleFactor.X1 => "X1", + UpscaleFactor.X2 => "X2", + UpscaleFactor.X4 => "X4", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UpscaleFactor? ToEnum(string value) + { + return value switch + { + "X1" => UpscaleFactor.X1, + "X2" => UpscaleFactor.X2, + "X4" => UpscaleFactor.X4, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.UsageSegment.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.UsageSegment.g.cs index 8121c9a..533bc11 100644 --- a/src/libs/Ideogram/Generated/Ideogram.Models.UsageSegment.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.Models.UsageSegment.g.cs @@ -4,20 +4,24 @@ namespace Ideogram { /// - /// + /// Example: {"segment_start":"2023-08-09T00:00:00.0000000\u002B00:00","tool_usage":[{"user_email_address":"user@company.com","model_version":"V_0_3","full_tool_name":"Turbo Image Generation V3","amount":{"amount":1050,"currency_code":"USD"},"tool_type":"GENERATE","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg"},{"user_email_address":"user@company.com","model_version":"V_0_3","full_tool_name":"Turbo Image Generation V3","amount":{"amount":1050,"currency_code":"USD"},"tool_type":"GENERATE","api_key_id":"JRPVD7jWR1aTBYiJ0UFVOg"}],"segment_end":"2023-08-09T23:59:59.0000000\u002B00:00"} /// public sealed partial class UsageSegment { /// - /// Start time of the usage segment + /// Start time of the usage segment
+ /// Example: 2023-08-09T00:00:00.0000000+00:00 ///
+ /// 2023-08-09T00:00:00.0000000+00:00 [global::System.Text.Json.Serialization.JsonPropertyName("segment_start")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTime SegmentStart { get; set; } /// - /// End time of the usage segment + /// End time of the usage segment
+ /// Example: 2023-08-09T23:59:59.0000000+00:00 ///
+ /// 2023-08-09T23:59:59.0000000+00:00 [global::System.Text.Json.Serialization.JsonPropertyName("segment_end")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTime SegmentEnd { get; set; } @@ -39,10 +43,12 @@ public sealed partial class UsageSegment /// Initializes a new instance of the class. ///
/// - /// Start time of the usage segment + /// Start time of the usage segment
+ /// Example: 2023-08-09T00:00:00.0000000+00:00 /// /// - /// End time of the usage segment + /// End time of the usage segment
+ /// Example: 2023-08-09T23:59:59.0000000+00:00 /// /// /// Tool-specific usage breakdown within this segment diff --git a/src/libs/Ideogram/Generated/Ideogram.Models.UsageSource.g.cs b/src/libs/Ideogram/Generated/Ideogram.Models.UsageSource.g.cs new file mode 100644 index 0000000..04600bc --- /dev/null +++ b/src/libs/Ideogram/Generated/Ideogram.Models.UsageSource.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace Ideogram +{ + /// + /// Filter usage by source - API for programmatic API usage, APP for web application usage
+ /// Default Value: API + ///
+ public enum UsageSource + { + /// + /// + /// + Api, + /// + /// + /// + App, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageSourceExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageSource value) + { + return value switch + { + UsageSource.Api => "API", + UsageSource.App => "APP", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageSource? ToEnum(string value) + { + return value switch + { + "API" => UsageSource.Api, + "APP" => UsageSource.App, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Ideogram/Generated/Ideogram.PromptClient.PostMagicPrompt.g.cs b/src/libs/Ideogram/Generated/Ideogram.PromptClient.PostMagicPrompt.g.cs index 17899f2..4331fe6 100644 --- a/src/libs/Ideogram/Generated/Ideogram.PromptClient.PostMagicPrompt.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.PromptClient.PostMagicPrompt.g.cs @@ -29,6 +29,7 @@ partial void ProcessPostMagicPromptResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostMagicPromptAsync( + global::Ideogram.MagicPromptRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -70,36 +71,40 @@ partial void ProcessPostMagicPromptResponseContent( using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.MagicPromptVersion.ToValueString()}"), - name: "magic_prompt_version"); + name: "\"magic_prompt_version\""); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ClassifyPromptCategory}"), - name: "classify_prompt_category"); + name: "\"classify_prompt_category\""); if (request.StyleType != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.StyleType?.ToValueString()}"), - name: "style_type"); + name: "\"style_type\""); } if (request.Seed != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Seed}"), - name: "seed"); + name: "\"seed\""); } if (request.CharacterReferenceImages != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.CharacterReferenceImages, x => x))}]"), - name: "character_reference_images"); + name: "\"character_reference_images\""); } if (request.SystemPrompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.SystemPrompt}"), - name: "system_prompt"); + name: "\"system_prompt\""); } __httpRequest.Content = __httpRequestContent; diff --git a/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs b/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs index c1ccd04..f5222b2 100644 --- a/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs +++ b/src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs @@ -30,6 +30,7 @@ partial void ProcessPostDescribeResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task PostDescribeAsync( + global::Ideogram.DescribeRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -69,15 +70,21 @@ partial void ProcessPostDescribeResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImageFile = new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty()), - name: "image_file", - fileName: request.ImageFilename ?? string.Empty); + content: __contentImageFile, + name: "\"image_file\"", + fileName: request.ImageFilename != null ? $"\"{request.ImageFilename}\"" : string.Empty); + if (__contentImageFile.Headers.ContentDisposition != null) + { + __contentImageFile.Headers.ContentDisposition.FileNameStar = null; + } if (request.DescribeModelVersion != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.DescribeModelVersion?.ToValueString()}"), - name: "describe_model_version"); + name: "\"describe_model_version\""); } __httpRequest.Content = __httpRequestContent; diff --git a/src/libs/Ideogram/openapi.yaml b/src/libs/Ideogram/openapi.yaml index d7d38fa..512d32b 100644 --- a/src/libs/Ideogram/openapi.yaml +++ b/src/libs/Ideogram/openapi.yaml @@ -1001,6 +1001,20 @@ paths: items: type: string description: Base64 encoded API key ID + - name: user_emails + in: query + description: Filter usage information by specific user email addresses (for web app usage) + style: form + schema: + type: array + items: + type: string + description: User email address + - name: source + in: query + description: 'Filter usage by source - API for programmatic API usage, APP for web application usage. Defaults to API.' + schema: + $ref: '#/components/schemas/UsageSource' responses: '200': description: Usage information retrieved successfully @@ -1297,6 +1311,204 @@ paths: - sdk: typescript code: "const formData = new FormData();\nformData.append('prompt', 'A photo of a cat');\nformData.append('rendering_speed', 'TURBO');\n// To add style reference images, uncomment the following lines\n// formData.append('style_reference_images', '');\n// formData.append('style_reference_images', '');\nconst response = await fetch('https://api.ideogram.ai/v1/ideogram-v3/generate', {\n method: 'POST',\n headers: { 'Api-Key': '' },\n body: formData\n});\nconst data = await response.json();\nconsole.log(data);\n" x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller + /v1/ideogram-v3/generate-design: + post: + tags: + - generate + summary: Generate a design from a text prompt with text detection and correction + description: "Generates a design synchronously from a text prompt using the Ideogram 3.0 model, then detects and corrects text layers within the generated image.\n\nThe response includes the generated image URL along with detected text layers (with font, size, color, position) and image asset layers.\n\nImages links are available for a limited period of time; if you would like to keep the image, you must download it.\n" + operationId: post_generate_design_v3 + requestBody: + description: A request to generate a design with Ideogram 3.0. + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateDesignRequestV3' + encoding: + color_palette: + contentType: application/json + style: form + application/json: + schema: + $ref: '#/components/schemas/GenerateDesignRequestV3' + required: true + x-body-name: body + responses: + '200': + description: Design(s) generated successfully with text correction. + content: + application/json: + schema: + $ref: '#/components/schemas/LayeredImageGenerationResponseV3' + '400': + description: Invalid input provided. + '401': + description: Not authorized to generate an image. + '422': + description: Prompt failed the safety check. + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateImageSafetyError' + '429': + description: Too many requests. + x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller + /v1/ideogram-v3/generate-transparent: + post: + tags: + - generate + summary: Generate with Ideogram 3.0 (Transparent Background) + description: "Generates images with transparent background synchronously based on a given prompt and optional parameters using\nthe Ideogram 3.0 model. Images will be generated using maximum supported resolution at the specified aspect ratio\nto allow best results with upscaler. The selected resolution is written to the response, not the upscaled final\nresolution.\n\nImages links are available for a limited period of time; if you would like to keep the image, you must download it.\n" + operationId: post_generate_image_v3_transparent + requestBody: + description: 'A request to generate an image with transparent background using Ideogram 3.0, with optional upscaling.' + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateTransparentImageRequestV3' + application/json: + schema: + $ref: '#/components/schemas/GenerateTransparentImageRequestV3' + required: true + x-body-name: body + responses: + '200': + description: Image(s) generated successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ImageGenerationResponseV3' + '400': + description: Invalid input provided. + '401': + description: Not authorized to generate an image. + '422': + description: Prompt failed the safety check. + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateImageSafetyError' + '429': + description: Too many requests. + x-fern-examples: + - request: + prompt: A logo for Ideogram Coffee. + rendering_speed: TURBO + aspect_ratio: 1x1 + upscale_factor: X2 + response: + body: + created: '2000-01-23T04:56:07.0000000+00:00' + data: + - prompt: A logo for Ideogram Coffee. + resolution: 1024x1024 + upscaled_resolution: 2048x2028 + is_image_safe: true + seed: 12345 + url: https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89 + code-samples: + - sdk: curl + code: "curl -X POST https://api.ideogram.ai/v1/ideogram-v3/generate-transparent \\\n -H \"Api-Key: \" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F prompt=\"A logo for Ideogram Coffee.\" \\\n -F rendering_speed=\"TURBO\"\n" + - sdk: python + code: "import requests\n\n# Generate with Ideogram 3.0 (POST /v1/ideogram-v3/generate-transparent)\nresponse = requests.post(\n \"https://api.ideogram.ai/v1/ideogram-v3/generate-transparent\",\n headers={\n \"Api-Key\": \"\"\n },\n json={\n \"prompt\": \"A logo for Ideogram Coffee.\",\n \"rendering_speed\": \"TURBO\"\n }\n)\nprint(response.json())\nwith open('output.png', 'wb') as f:\n f.write(requests.get(response.json()['data'][0]['url']).content)\n" + - sdk: typescript + code: "const formData = new FormData();\nformData.append('prompt', 'A logo for Ideogram Coffee.');\nformData.append('rendering_speed', 'TURBO');\nconst response = await fetch('https://api.ideogram.ai/v1/ideogram-v3/generate-transparent', {\n method: 'POST',\n headers: { 'Api-Key': '' },\n body: formData\n});\nconst data = await response.json();\nconsole.log(data);\n" + x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller + /v1/ideogram-v3/graphic: + post: + tags: + - generate + summary: Generate graphics with Ideogram 3.0 and text correction + description: "Deprecated: Use /v1/ideogram-v3/generate-design for text-to-design or /v1/ideogram-v3/layerize-design for image-to-design.\n\nGenerates graphics synchronously based on a given prompt and optional parameters using the Ideogram 3.0 model, with text detection and correction capabilities.\n\nImages links are available for a limited period of time; if you would like to keep the image, you must download it.\n" + operationId: post_generate_graphic_v3 + requestBody: + description: A request to generate a graphic with Ideogram 3.0. + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateGraphicRequestV3' + encoding: + color_palette: + contentType: application/json + style: form + application/json: + schema: + $ref: '#/components/schemas/GenerateGraphicRequestV3' + required: true + x-body-name: body + responses: + '200': + description: Graphic(s) generated successfully with text correction. + content: + application/json: + schema: + $ref: '#/components/schemas/LayeredImageGenerationResponseV3' + '400': + description: Invalid input provided. + '401': + description: Not authorized to generate an image. + '422': + description: Prompt failed the safety check. + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateImageSafetyError' + '429': + description: Too many requests. + deprecated: true + x-fern-examples: + - request: + prompt: A birthday card saying 'Happy Birthday' + rendering_speed: TURBO + aspect_ratio: 1x1 + style_type: AUTO + response: + body: + created: '2000-01-23T04:56:07.0000000+00:00' + data: + - prompt: A birthday card saying 'Happy Birthday' + resolution: 1024x1024 + is_image_safe: true + seed: 12345 + url: https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89 + style_type: GENERAL + code-samples: + - sdk: curl + code: "curl -X POST https://api.ideogram.ai/v1/ideogram-v3/graphic \\\n -H \"Api-Key: \" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F prompt=\"A birthday card saying 'Happy Birthday'\" \\\n -F rendering_speed=\"TURBO\"\n" + - sdk: python + code: "import requests\n\nresponse = requests.post(\n \"https://api.ideogram.ai/v1/ideogram-v3/graphic\",\n headers={\n \"Api-Key\": \"\"\n },\n json={\n \"prompt\": \"A birthday card saying 'Happy Birthday'\",\n \"rendering_speed\": \"TURBO\"\n }\n)\nprint(response.json())\nwith open('output.png', 'wb') as f:\n f.write(requests.get(response.json()['data'][0]['url']).content)\n" + - sdk: typescript + code: "const formData = new FormData();\nformData.append('prompt', 'A birthday card saying Happy Birthday');\nformData.append('rendering_speed', 'TURBO');\nconst response = await fetch('https://api.ideogram.ai/v1/ideogram-v3/graphic', {\n method: 'POST',\n headers: { 'Api-Key': '' },\n body: formData\n});\nconst data = await response.json();\nconsole.log(data);\n" + x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller + /v1/ideogram-v3/layerize-design: + post: + tags: + - generate + summary: Layerize an existing flat graphic image with text detection and correction + description: "Processes an existing flat graphic image to detect and correct text layers without generating a new image from scratch.\n\nThe uploaded image is analyzed for text content, which is then removed and returned as structured text layers with font matching, sizing, and color information.\n\nSupported image formats include JPEG, PNG, and WebP (max size 10MB).\n\nImages links are available for a limited period of time; if you would like to keep the image, you must download it.\n" + operationId: post_layerize_design_v3 + requestBody: + description: A request to layerize an existing flat graphic image. + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/LayerizeDesignRequestV3' + required: true + x-body-name: body + responses: + '200': + description: Design layerized successfully with text correction. + content: + application/json: + schema: + $ref: '#/components/schemas/LayeredImageGenerationResponseV3' + '400': + description: Invalid input provided. + '401': + description: Not authorized to generate an image. + '429': + description: Too many requests. + x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller /v1/ideogram-v3/reframe: post: tags: @@ -1480,6 +1692,62 @@ paths: - sdk: typescript code: "const formData = new FormData();\nformData.append('prompt', 'Add a forest in the background');\nformData.append('image', '');\nconst response = await fetch('https://api.ideogram.ai/v1/ideogram-v3/replace-background', {\n method: 'POST',\n headers: { 'Api-Key': '' },\n body: formData\n});\nconst data = await response.json();\nconsole.log(data);\n" x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller + /v1/ideogram-v3/try-on: + post: + tags: + - generate + summary: Virtual Try-On with Ideogram 3.0 + description: "Performs virtual clothing try-on by automatically segmenting the clothing in the provided image\nand replacing it based on the prompt. The user provides an image and a prompt describing the\ndesired clothing change (e.g., \"change his shirt to a pink shirt\").\n\nSupported image formats include JPEG, PNG, and WebP.\n\nImages links are available for a limited period of time; if you would like to keep the image, you must download it.\n" + operationId: post_try_on_v3 + requestBody: + description: A request to perform virtual try-on with Ideogram 3.0. + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/TryOnRequestV3' + required: true + x-body-name: body + responses: + '200': + description: Try-on completed successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ImageGenerationResponseV3' + '400': + description: Invalid input provided. + '401': + description: Not authorized to generate an image. + '422': + description: 'Prompt or provided image failed safety check, or clothing segmentation failed.' + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateImageSafetyError' + '429': + description: Too many requests. + x-fern-examples: + - request: + prompt: Change his shirt to a pink shirt + rendering_speed: DEFAULT + response: + body: + created: '2000-01-23T04:56:07.0000000+00:00' + data: + - prompt: Change his shirt to a pink shirt + resolution: 1024x1024 + is_image_safe: true + seed: 12345 + url: https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89 + style_type: AUTO + code-samples: + - sdk: curl + code: "curl -X POST https://api.ideogram.ai/v1/ideogram-v3/try-on \\\n -H \"Api-Key: \" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F image=@ \\\n -F prompt=\"Change his shirt to a pink shirt\" \\\n -F rendering_speed=\"DEFAULT\"\n" + - sdk: python + code: "import requests\n\nresponse = requests.post(\n \"https://api.ideogram.ai/v1/ideogram-v3/try-on\",\n headers={\n \"Api-Key\": \"\"\n },\n data={\n \"prompt\": \"Change his shirt to a pink shirt\",\n \"rendering_speed\": \"DEFAULT\"\n },\n files={\n \"image\": open(\"\", \"rb\"),\n }\n)\nprint(response.json())\nwith open('output.png', 'wb') as f:\n f.write(requests.get(response.json()['data'][0]['url']).content)\n" + - sdk: typescript + code: "const formData = new FormData();\nformData.append('prompt', 'Change his shirt to a pink shirt');\nformData.append('rendering_speed', 'DEFAULT');\nformData.append('image', '');\nconst response = await fetch('https://api.ideogram.ai/v1/ideogram-v3/try-on', {\n method: 'POST',\n headers: { 'Api-Key': '' },\n body: formData\n});\nconst data = await response.json();\nconsole.log(data);\n" + x-openapi-router-controller: external_api.generated.openapi.controllers.generate_controller components: schemas: DescribeResponse: @@ -1599,6 +1867,10 @@ components: $ref: '#/components/schemas/StyleTypeV3' style_preset: $ref: '#/components/schemas/StylePresetV3' + custom_model_uri: + type: string + description: "A custom model URI in the format model//version/. \nWhen provided, the model version and style will be resolved from this URI, and style_type is not required.\n" + example: model/my-custom-model/version/1 style_reference_images: type: array items: @@ -1617,6 +1889,220 @@ components: type: string format: binary description: 'Optional masks for character reference images. When provided, must match the number of character_reference_images. Each mask should be a grayscale image of the same dimensions as the corresponding character reference image. The images should be in JPEG, PNG or WebP format.' + GenerateGraphicRequestV3: + type: object + properties: + prompt: + type: string + description: The prompt to use to generate the graphic. + example: A birthday card saying 'Happy Birthday' + seed: + title: Seed + maximum: 2147483647 + minimum: 0 + type: integer + description: Random seed. Set for reproducible generation. + example: 12345 + resolution: + $ref: '#/components/schemas/ResolutionV3' + aspect_ratio: + $ref: '#/components/schemas/AspectRatioV3' + rendering_speed: + $ref: '#/components/schemas/RenderingSpeed' + magic_prompt: + $ref: '#/components/schemas/MagicPromptOption' + negative_prompt: + type: string + description: "Description of what to exclude from a graphic. Descriptions in the prompt take precedence\nto descriptions in the negative prompt.\n" + example: 'brush strokes, painting' + num_images: + maximum: 8 + minimum: 1 + type: integer + description: Number of graphics to generate. + default: 1 + color_palette: + $ref: '#/components/schemas/ColorPaletteWithPresetNameOrMembers' + style_codes: + type: array + items: + $ref: '#/components/schemas/StyleCode' + description: 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. + example: + - AAFF5733 + - 0133FF57 + - DE3357FF + style_type: + $ref: '#/components/schemas/StyleTypeV3' + style_preset: + $ref: '#/components/schemas/StylePresetV3' + custom_model_uri: + type: string + description: "A custom model URI in the format model//version/. \nWhen provided, the model version and style will be resolved from this URI, and style_type is not required.\n" + example: model/my-custom-model/version/1 + flat_graphic_image: + type: string + description: 'An existing flat graphic image to process for text detection and correction without generating a new image. When provided, image generation is bypassed. The image should be in JPEG, PNG or WebP format (max size 10MB).' + format: binary + requested_font_file: + type: string + description: A font name from the available font library to use for text rendering. Cannot be used together with uploaded_font_file. + example: Ubuntu-Regular.ttf + uploaded_font_file: + type: string + description: 'A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). Cannot be used together with requested_font_file.' + format: binary + style_reference_images: + type: array + items: + type: string + format: binary + description: '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.' + reference_asset_images: + type: array + items: + type: string + format: binary + description: 'A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format.' + GenerateDesignRequestV3: + required: + - prompt + type: object + properties: + prompt: + type: string + description: The prompt to use to generate the design. + example: A birthday card saying 'Happy Birthday' + seed: + title: Seed + maximum: 2147483647 + minimum: 0 + type: integer + description: Random seed. Set for reproducible generation. + example: 12345 + resolution: + $ref: '#/components/schemas/ResolutionV3' + aspect_ratio: + $ref: '#/components/schemas/AspectRatioV3' + rendering_speed: + $ref: '#/components/schemas/RenderingSpeed' + magic_prompt: + $ref: '#/components/schemas/MagicPromptOption' + negative_prompt: + type: string + description: "Description of what to exclude from a design. Descriptions in the prompt take precedence\nto descriptions in the negative prompt.\n" + example: 'brush strokes, painting' + num_images: + maximum: 8 + minimum: 1 + type: integer + description: Number of designs to generate. + default: 1 + color_palette: + $ref: '#/components/schemas/ColorPaletteWithPresetNameOrMembers' + style_codes: + type: array + items: + $ref: '#/components/schemas/StyleCode' + description: 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. + example: + - AAFF5733 + - 0133FF57 + - DE3357FF + style_type: + $ref: '#/components/schemas/StyleTypeV3' + style_preset: + $ref: '#/components/schemas/StylePresetV3' + custom_model_uri: + type: string + description: "A custom model URI in the format model//version/. \nWhen provided, the model version and style will be resolved from this URI, and style_type is not required.\n" + example: model/my-custom-model/version/1 + requested_font_file: + type: string + description: 'A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.' + example: Ubuntu-Regular.ttf + uploaded_font_file: + type: string + description: 'A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file.' + format: binary + style_reference_images: + type: array + items: + type: string + format: binary + description: '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.' + reference_asset_images: + type: array + items: + type: string + format: binary + description: 'A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format.' + LayerizeDesignRequestV3: + required: + - flat_graphic_image + type: object + properties: + flat_graphic_image: + type: string + description: 'The flat graphic image to process for text detection and correction. The image should be in JPEG, PNG or WebP format (max size 10MB).' + format: binary + prompt: + type: string + description: 'An optional prompt to describe the image. If not provided, a prompt will be auto-generated from the image via captioning.' + seed: + $ref: '#/components/schemas/Seed' + requested_font_file: + type: string + description: 'A font name from the available font library to use for text rendering. When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with uploaded_font_file.' + example: Ubuntu-Regular.ttf + uploaded_font_file: + type: string + description: 'A custom font file to use for text rendering. Supported formats are .ttf, .otf, .woff, and .woff2 (max size 5MB). When provided, font matching is skipped and this font is used for all text layers. Cannot be used together with requested_font_file.' + format: binary + reference_asset_images: + type: array + items: + type: string + format: binary + description: 'A set of asset images (e.g., logos, icons) to use as references for detection and replacement (maximum 10 images). The images should be in JPEG, PNG or WebP format.' + GenerateTransparentImageRequestV3: + required: + - prompt + type: object + properties: + prompt: + type: string + description: The prompt to use to generate the image. + example: A photo of a cat + seed: + title: Seed + maximum: 2147483647 + minimum: 0 + type: integer + description: Random seed. Set for reproducible generation. + example: 12345 + upscale_factor: + $ref: '#/components/schemas/UpscaleFactor' + aspect_ratio: + $ref: '#/components/schemas/AspectRatioV3' + rendering_speed: + $ref: '#/components/schemas/RenderingSpeed' + magic_prompt: + $ref: '#/components/schemas/MagicPromptOption' + negative_prompt: + type: string + description: "Description of what to exclude from an image. Descriptions in the prompt take precedence\nto descriptions in the negative prompt.\n" + example: 'brush strokes, painting' + num_images: + maximum: 8 + minimum: 1 + type: integer + description: Number of images to generate. + default: 1 + custom_model_uri: + type: string + description: "A custom model URI in the format model//version/. \nWhen provided, the model version and style will be resolved from this URI, and style_type is not required.\nA model must be able to generate transparent background to be used for this endpoint.\n" + example: model/my-custom-model/version/1 RemixImageRequestV3: required: - image @@ -1665,6 +2151,10 @@ components: $ref: '#/components/schemas/StyleTypeV3' style_preset: $ref: '#/components/schemas/StylePresetV3' + custom_model_uri: + type: string + description: "A custom model URI in the format model//version/. \nWhen provided, the model version and style will be resolved from this URI, and style_type is not required.\n" + example: model/my-custom-model/version/1 style_reference_images: type: array items: @@ -1714,6 +2204,10 @@ components: $ref: '#/components/schemas/StyleTypeV3' style_preset: $ref: '#/components/schemas/StylePresetV3' + custom_model_uri: + type: string + description: "A custom model URI in the format model//version/. \nWhen provided, the model version and style will be resolved from this URI, and style_type is not required.\n" + example: model/my-custom-model/version/1 color_palette: $ref: '#/components/schemas/ColorPaletteWithPresetNameOrMembers' style_codes: @@ -1736,6 +2230,41 @@ components: type: string format: binary description: 'Optional masks for character reference images. When provided, must match the number of character_reference_images. Each mask should be a grayscale image of the same dimensions as the corresponding character reference image. The images should be in JPEG, PNG or WebP format.' + TryOnRequestV3: + required: + - image + - product_reference_images + - prompt + type: object + properties: + image: + type: string + description: 'The image containing a person wearing clothing to be modified (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.' + format: binary + prompt: + type: string + description: The prompt describing the desired clothing change. + example: Change his shirt to a pink shirt + magic_prompt: + $ref: '#/components/schemas/MagicPromptOption' + num_images: + $ref: '#/components/schemas/NumImages' + seed: + $ref: '#/components/schemas/Seed' + rendering_speed: + $ref: '#/components/schemas/RenderingSpeed' + style_type: + $ref: '#/components/schemas/StyleTypeV3' + style_preset: + $ref: '#/components/schemas/StylePresetV3' + product_reference_images: + maxItems: 1 + minItems: 1 + type: array + items: + type: string + format: binary + description: 'An image to use as the product reference for the try-on (exactly 1 image required). The image should be in JPEG, PNG or WebP format.' ReframeImageRequestV3: required: - image @@ -2048,12 +2577,14 @@ components: data: - style_type: REALISTIC seed: 12345 + upscaled_resolution: 4096x4096 prompt: '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.' resolution: 1024x1024 url: https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g is_image_safe: true - style_type: REALISTIC seed: 12345 + upscaled_resolution: 4096x4096 prompt: '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.' resolution: 1024x1024 url: https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g @@ -2082,12 +2613,14 @@ components: data: - style_type: GENERAL seed: 12345 + upscaled_resolution: 4096x4096 prompt: '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.' resolution: 1280x800 url: https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89 is_image_safe: true - style_type: GENERAL seed: 12345 + upscaled_resolution: 4096x4096 prompt: '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.' resolution: 1280x800 url: https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89 @@ -2116,6 +2649,12 @@ components: 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.' resolution: $ref: '#/components/schemas/ResolutionV3' + upscaled_resolution: + title: FreeformResolution + pattern: '^\d{2,5}x\d{2,5}$' + type: string + description: 'Output resolution, only used if operations alters image dimensions, such as upscale, crop etc.' + example: 4096x4096 is_image_safe: title: is_image_safe type: boolean @@ -2132,6 +2671,7 @@ components: example: style_type: GENERAL seed: 12345 + upscaled_resolution: 4096x4096 prompt: '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.' resolution: 1280x800 url: https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89 @@ -2162,6 +2702,12 @@ components: type: string description: The resolution of the final image. example: 1024x1024 + upscaled_resolution: + title: FreeformResolution + pattern: '^\d{2,5}x\d{2,5}$' + type: string + description: 'Output resolution, only used if operations alters image dimensions, such as upscale, crop etc.' + example: 4096x4096 is_image_safe: title: is_image_safe type: boolean @@ -2178,10 +2724,170 @@ components: example: style_type: REALISTIC seed: 12345 + upscaled_resolution: 4096x4096 prompt: '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.' resolution: 1024x1024 url: https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g is_image_safe: true + LayeredImageGenerationObjectV3: + title: LayeredImageGenerationObjectV3 + type: object + allOf: + - $ref: '#/components/schemas/ImageGenerationObjectV3' + properties: + text_layers: + title: text_layers + type: array + items: + $ref: '#/components/schemas/TextLayerV3' + image_layers: + title: image_layers + type: array + items: + $ref: '#/components/schemas/ImageLayerV3' + example: + text_layers: + - font_candidates: + - font_candidates + - font_candidates + line_height: 2.302136 + color: '#FF0000' + font_size: 5 + x: 0 + width: 1 + y: 6 + angle: 0 + text: text + font_file: font_file + alignment: center + height: 5 + - font_candidates: + - font_candidates + - font_candidates + line_height: 2.302136 + color: '#FF0000' + font_size: 5 + x: 0 + width: 1 + y: 6 + angle: 0 + text: text + font_file: font_file + alignment: center + height: 5 + image_layers: + - ref_id: REF_0 + x: 7 + width: 3 + y: 9 + height: 2 + - ref_id: REF_0 + x: 7 + width: 3 + y: 9 + height: 2 + LayeredImageGenerationResponseV3: + title: LayeredImageGenerationResponseV3 + required: + - created + - data + type: object + properties: + created: + title: created + type: string + description: The time the request was created. + format: date-time + data: + title: data + type: array + items: + $ref: '#/components/schemas/LayeredImageGenerationObjectV3' + description: A list of ImageObjects that contain the generated image(s). + description: "The response which contains information about the generated image, including the download link and other text layeres.\nImages links are available for a limited period of time; if you would like to keep the image, you must download it." + example: + data: + - text_layers: + - font_candidates: + - font_candidates + - font_candidates + line_height: 2.302136 + color: '#FF0000' + font_size: 5 + x: 0 + width: 1 + y: 6 + angle: 0 + text: text + font_file: font_file + alignment: center + height: 5 + - font_candidates: + - font_candidates + - font_candidates + line_height: 2.302136 + color: '#FF0000' + font_size: 5 + x: 0 + width: 1 + y: 6 + angle: 0 + text: text + font_file: font_file + alignment: center + height: 5 + image_layers: + - ref_id: REF_0 + x: 7 + width: 3 + y: 9 + height: 2 + - ref_id: REF_0 + x: 7 + width: 3 + y: 9 + height: 2 + - text_layers: + - font_candidates: + - font_candidates + - font_candidates + line_height: 2.302136 + color: '#FF0000' + font_size: 5 + x: 0 + width: 1 + y: 6 + angle: 0 + text: text + font_file: font_file + alignment: center + height: 5 + - font_candidates: + - font_candidates + - font_candidates + line_height: 2.302136 + color: '#FF0000' + font_size: 5 + x: 0 + width: 1 + y: 6 + angle: 0 + text: text + font_file: font_file + alignment: center + height: 5 + image_layers: + - ref_id: REF_0 + x: 7 + width: 3 + y: 9 + height: 2 + - ref_id: REF_0 + x: 7 + width: 3 + y: 9 + height: 2 + created: '2000-01-23T04:56:07.0000000+00:00' MagicPromptVersionEnum: title: MagicPromptVersionEnum enum: @@ -2207,6 +2913,7 @@ components: - V_2A - V_2A_TURBO - V_3 + - AUTO type: string description: 'The model used to generate an image or edit one. /generate and /remix supports all model types, however, /edit is only supported for V_2 and V_2_TURBO.' default: V_2 @@ -2382,6 +3089,130 @@ components: num_images: 1 color_palette: name: PASTEL + TextLayerV3: + title: TextLayerV3 + required: + - font_file + - height + - text + - width + - x + - y + type: object + properties: + text: + title: text + type: string + description: The text of the layer. + x: + title: x + type: integer + description: The x coordinate of the layer. + y: + title: y + type: integer + description: The y coordinate of the layer. + width: + title: width + type: integer + description: The width of the layer. + height: + title: height + type: integer + description: The height of the layer. + font_file: + title: font_file + type: string + description: The font file of the layer. + font_candidates: + title: font_candidates + type: array + items: + type: string + description: A list of alternate matching font files for the layer. + font_size: + title: font_size + type: integer + description: The font size in points. + line_height: + title: line_height + type: number + description: 'The line height multiplier (e.g., 1.2).' + format: float + color: + title: color + pattern: '^#[0-9A-Fa-f]{6}$' + type: string + description: The hex color of the text in the layer (e.g. "#FF0000" for red). + example: '#FF0000' + alignment: + title: alignment + enum: + - left + - center + - right + type: string + description: The text alignment of the layer. + example: center + angle: + title: angle + type: number + description: 'The angle rotation of the text in the layer, measured clockwise.' + format: float + example: 0 + description: A text layer for a layered image generation. + example: + font_candidates: + - font_candidates + - font_candidates + line_height: 2.302136 + color: '#FF0000' + font_size: 5 + x: 0 + width: 1 + y: 6 + angle: 0 + text: text + font_file: font_file + alignment: center + height: 5 + ImageLayerV3: + title: ImageLayerV3 + required: + - height + - width + - x + - y + type: object + properties: + x: + title: x + type: integer + description: The x coordinate of the layer. + y: + title: y + type: integer + description: The y coordinate of the layer. + width: + title: width + type: integer + description: The width of the layer. + height: + title: height + type: integer + description: The height of the layer. + ref_id: + title: ref_id + type: string + description: 'Reference ID matching a provided reference image (e.g., "REF_0"), or -1 if no match.' + example: REF_0 + description: 'An image layer (logo, brand asset, icon) for a layered image generation.' + example: + ref_id: REF_0 + x: 7 + width: 3 + y: 9 + height: 2 InternalBatchResultsResponse: title: InternalBatchResultsResponse required: @@ -2870,14 +3701,16 @@ components: usage_segments: - segment_start: '2023-08-09' tool_usage: - - model_version: V_0_3 + - user_email_address: user@company.com + model_version: V_0_3 full_tool_name: Turbo Image Generation V3 amount: amount: 1050 currency_code: USD tool_type: GENERATE api_key_id: JRPVD7jWR1aTBYiJ0UFVOg - - model_version: V_0_3 + - user_email_address: user@company.com + model_version: V_0_3 full_tool_name: Turbo Image Generation V3 amount: amount: 1050 @@ -2887,14 +3720,16 @@ components: segment_end: '2023-08-09T23:59:59.0000000+00:00' - segment_start: '2023-08-09' tool_usage: - - model_version: V_0_3 + - user_email_address: user@company.com + model_version: V_0_3 full_tool_name: Turbo Image Generation V3 amount: amount: 1050 currency_code: USD tool_type: GENERATE api_key_id: JRPVD7jWR1aTBYiJ0UFVOg - - model_version: V_0_3 + - user_email_address: user@company.com + model_version: V_0_3 full_tool_name: Turbo Image Generation V3 amount: amount: 1050 @@ -2931,14 +3766,16 @@ components: example: segment_start: '2023-08-09T00:00:00.0000000+00:00' tool_usage: - - model_version: V_0_3 + - user_email_address: user@company.com + model_version: V_0_3 full_tool_name: Turbo Image Generation V3 amount: amount: 1050 currency_code: USD tool_type: GENERATE api_key_id: JRPVD7jWR1aTBYiJ0UFVOg - - model_version: V_0_3 + - user_email_address: user@company.com + model_version: V_0_3 full_tool_name: Turbo Image Generation V3 amount: amount: 1050 @@ -2950,7 +3787,6 @@ components: title: ToolUsage required: - amount - - api_key_id - full_tool_name - tool_type type: object @@ -2965,13 +3801,19 @@ components: api_key_id: title: api_key_id type: string - description: Base64 encoded API key ID + description: Base64 encoded API key ID (for API usage) example: JRPVD7jWR1aTBYiJ0UFVOg + user_email_address: + title: user_email_address + type: string + description: User email address (for web app usage) + example: user@company.com tool_type: $ref: '#/components/schemas/ToolType' model_version: $ref: '#/components/schemas/ModelVersion' example: + user_email_address: user@company.com model_version: V_0_3 full_tool_name: Turbo Image Generation V3 amount: @@ -2987,6 +3829,7 @@ components: - EDIT - UPSCALE - DESCRIBE + - OTHER type: string description: Tool type for filtering usage information example: GENERATE @@ -2998,6 +3841,14 @@ components: type: string description: Time segment granularity for usage breakdown example: DAY + UsageSource: + title: UsageSource + enum: + - API + - APP + type: string + description: 'Filter usage by source - API for programmatic API usage, APP for web application usage' + default: API ModelVersion: title: ModelVersion enum: @@ -3012,8 +3863,10 @@ components: - EXTERNAL_GOOGLE_VEO_3_0 - EXTERNAL_BYTEDANCE_SEEDANCE_1_0_PRO - EXTERNAL_MINIMAX_HAILUO_02 + - EXTERNAL_MODEL + - AUTO type: string - description: "The model_version to use.\n- V_0_3: Model 1.0\n- V_1_1: Model 1.1\n- V_1_5: Model 2.0\n- V_2_1: Model 2a\n- V_3_0: Model 3.0 March 26\n- V_3_1: Model 3.0 Latest\n" + description: "The model_version to use.\n- V_0_3: Model 1.0\n- V_1_1: Model 1.1\n- V_1_5: Model 2.0\n- V_2_1: Model 2a\n- V_3_0: Model 3.0 March 26\n- V_3_1: Model 3.0 Latest\n- AUTO: Automatically select the best model version based on the request.\n" example: V_0_3 GetApiProfilesResponse: title: GetApiProfilesResponse @@ -4005,6 +4858,16 @@ components: type: string description: A predefined style preset that applies a specific artistic style to the generated image. example: BRIGHT_ART + UpscaleFactor: + title: UpscaleFactor + enum: + - X1 + - X2 + - X4 + type: string + description: Upscale the initially generated image by the given factor. Upscale factors other than X1 will incur additional cost. + default: X1 + example: X2 Resolution: title: Resolution enum: @@ -4108,6 +4971,12 @@ components: externalDocs: url: https://docs.ideogram.ai/usage/advanced-prompting/aspect-ratios example: ASPECT_10_16 + FreeformResolution: + title: FreeformResolution + pattern: '^\d{2,5}x\d{2,5}$' + type: string + description: 'Output resolution, only used if operations alters image dimensions, such as upscale, crop etc.' + example: 4096x4096 Price: title: Price required: