Skip to content

Commit 4b22eea

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent 9457e4a commit 4b22eea

File tree

3 files changed

+50
-33
lines changed

3 files changed

+50
-33
lines changed

src/libs/Ideogram/Generated/Ideogram.Models.ManageApiSubscriptionResponse.g.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public sealed partial class ManageApiSubscriptionResponse
5454
[global::System.Text.Json.Serialization.JsonPropertyName("stripe_billing_url")]
5555
public string? StripeBillingUrl { get; set; }
5656

57+
/// <summary>
58+
/// Represents a price.
59+
/// </summary>
60+
[global::System.Text.Json.Serialization.JsonPropertyName("current_balance")]
61+
[global::System.Text.Json.Serialization.JsonRequired]
62+
public required global::Ideogram.Price CurrentBalance { get; set; }
63+
5764
/// <summary>
5865
/// Additional properties that are not explicitly defined in the schema
5966
/// </summary>
@@ -74,18 +81,23 @@ public sealed partial class ManageApiSubscriptionResponse
7481
/// <param name="stripeBillingUrl">
7582
/// The URL for the user to manage the existing Stripe subscription plan.
7683
/// </param>
84+
/// <param name="currentBalance">
85+
/// Represents a price.
86+
/// </param>
7787
#if NET7_0_OR_GREATER
7888
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
7989
#endif
8090
public ManageApiSubscriptionResponse(
8191
bool hasAcceptedTerms,
8292
bool hasStripeSetup,
93+
global::Ideogram.Price currentBalance,
8394
global::Ideogram.MetronomeLinks? metronomeLinks,
8495
global::Ideogram.RechargeSettingsResponse? rechargeSettings,
8596
string? stripeBillingUrl)
8697
{
8798
this.HasAcceptedTerms = hasAcceptedTerms;
8899
this.HasStripeSetup = hasStripeSetup;
100+
this.CurrentBalance = currentBalance ?? throw new global::System.ArgumentNullException(nameof(currentBalance));
89101
this.MetronomeLinks = metronomeLinks;
90102
this.RechargeSettings = rechargeSettings;
91103
this.StripeBillingUrl = stripeBillingUrl;

src/libs/Ideogram/Generated/Ideogram.Models.SamplingRequestParams.g.cs

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ namespace Ideogram
99
public sealed partial class SamplingRequestParams
1010
{
1111
/// <summary>
12-
/// (Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.<br/>
13-
/// Example: ASPECT_10_16
12+
/// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1.
1413
/// </summary>
15-
/// <example>ASPECT_10_16</example>
1614
[global::System.Text.Json.Serialization.JsonPropertyName("aspect_ratio")]
17-
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.AspectRatioJsonConverter))]
18-
public global::Ideogram.AspectRatio? AspectRatio { get; set; }
15+
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.AspectRatioV3JsonConverter))]
16+
public global::Ideogram.AspectRatioV3? AspectRatio { get; set; }
1917

2018
/// <summary>
2119
/// 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.<br/>
@@ -54,13 +52,14 @@ public sealed partial class SamplingRequestParams
5452
public int? Seed { get; set; }
5553

5654
/// <summary>
57-
/// The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.<br/>
58-
/// Example: REALISTIC
55+
/// The style type to generate with.<br/>
56+
/// Default Value: GENERAL<br/>
57+
/// Example: GENERAL
5958
/// </summary>
60-
/// <example>REALISTIC</example>
59+
/// <example>GENERAL</example>
6160
[global::System.Text.Json.Serialization.JsonPropertyName("style_type")]
62-
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StyleTypeJsonConverter))]
63-
public global::Ideogram.StyleType? StyleType { get; set; }
61+
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.StyleTypeV3JsonConverter))]
62+
public global::Ideogram.StyleTypeV3? StyleType { get; set; }
6463

6564
/// <summary>
6665
/// Only available for model versions V_1, V_1_TURBO, V_2 and V_2_TURBO. Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt.<br/>
@@ -78,13 +77,13 @@ public sealed partial class SamplingRequestParams
7877
public int? NumImages { get; set; }
7978

8079
/// <summary>
81-
/// (For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio.<br/>
82-
/// Example: RESOLUTION_1024_1024
80+
/// The resolutions supported for Ideogram 3.0.<br/>
81+
/// Example: 1280x800
8382
/// </summary>
84-
/// <example>RESOLUTION_1024_1024</example>
83+
/// <example>1280x800</example>
8584
[global::System.Text.Json.Serialization.JsonPropertyName("resolution")]
86-
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.ResolutionJsonConverter))]
87-
public global::Ideogram.Resolution? Resolution { get; set; }
85+
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.ResolutionV3JsonConverter))]
86+
public global::Ideogram.ResolutionV3? Resolution { get; set; }
8887

8988
/// <summary>
9089
/// 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.
@@ -103,8 +102,7 @@ public sealed partial class SamplingRequestParams
103102
/// Initializes a new instance of the <see cref="SamplingRequestParams" /> class.
104103
/// </summary>
105104
/// <param name="aspectRatio">
106-
/// (Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.<br/>
107-
/// Example: ASPECT_10_16
105+
/// The aspect ratio to use for image generation, which determines the image's resolution. Cannot be used in conjunction with resolution. Defaults to 1x1.
108106
/// </param>
109107
/// <param name="model">
110108
/// 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.<br/>
@@ -124,8 +122,9 @@ public sealed partial class SamplingRequestParams
124122
/// Example: 12345
125123
/// </param>
126124
/// <param name="styleType">
127-
/// The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.<br/>
128-
/// Example: REALISTIC
125+
/// The style type to generate with.<br/>
126+
/// Default Value: GENERAL<br/>
127+
/// Example: GENERAL
129128
/// </param>
130129
/// <param name="negativePrompt">
131130
/// Only available for model versions V_1, V_1_TURBO, V_2 and V_2_TURBO. Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt.<br/>
@@ -136,8 +135,8 @@ public sealed partial class SamplingRequestParams
136135
/// Default Value: 1
137136
/// </param>
138137
/// <param name="resolution">
139-
/// (For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio.<br/>
140-
/// Example: RESOLUTION_1024_1024
138+
/// The resolutions supported for Ideogram 3.0.<br/>
139+
/// Example: 1280x800
141140
/// </param>
142141
/// <param name="colorPalette">
143142
/// 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.
@@ -146,15 +145,15 @@ public sealed partial class SamplingRequestParams
146145
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
147146
#endif
148147
public SamplingRequestParams(
149-
global::Ideogram.AspectRatio? aspectRatio,
148+
global::Ideogram.AspectRatioV3? aspectRatio,
150149
global::Ideogram.ModelEnum? model,
151150
global::Ideogram.MagicPromptOption? magicPromptOption,
152151
global::Ideogram.MagicPromptVersionEnum? magicPromptVersion,
153152
int? seed,
154-
global::Ideogram.StyleType? styleType,
153+
global::Ideogram.StyleTypeV3? styleType,
155154
string? negativePrompt,
156155
int? numImages,
157-
global::Ideogram.Resolution? resolution,
156+
global::Ideogram.ResolutionV3? resolution,
158157
global::Ideogram.ColorPaletteWithPresetNameOrMembers? colorPalette)
159158
{
160159
this.AspectRatio = aspectRatio;

src/libs/Ideogram/openapi.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,14 +1779,14 @@ components:
17791779
- a cat
17801780
- a dog
17811781
sampling_request_params:
1782-
aspect_ratio: ASPECT_10_16
1783-
style_type: REALISTIC
1782+
aspect_ratio:
1783+
style_type: GENERAL
17841784
magic_prompt_version: V_0
17851785
seed: 12345
17861786
negative_prompt: 'brush strokes, painting'
17871787
magic_prompt_option: ON
17881788
model: V_2_TURBO
1789-
resolution: RESOLUTION_1024_1024
1789+
resolution: 1280x800
17901790
num_images: 1
17911791
color_palette:
17921792
name: PASTEL
@@ -1809,7 +1809,7 @@ components:
18091809
type: object
18101810
properties:
18111811
aspect_ratio:
1812-
$ref: '#/components/schemas/AspectRatio'
1812+
$ref: '#/components/schemas/AspectRatioV3'
18131813
model:
18141814
$ref: '#/components/schemas/ModelEnum'
18151815
magic_prompt_option:
@@ -1824,7 +1824,7 @@ components:
18241824
description: Random seed. Set for reproducible generation.
18251825
example: 12345
18261826
style_type:
1827-
$ref: '#/components/schemas/StyleType'
1827+
$ref: '#/components/schemas/StyleTypeV3'
18281828
negative_prompt:
18291829
title: negative_prompt
18301830
type: string
@@ -1838,18 +1838,18 @@ components:
18381838
description: The number of images to generate.
18391839
default: 1
18401840
resolution:
1841-
$ref: '#/components/schemas/Resolution'
1841+
$ref: '#/components/schemas/ResolutionV3'
18421842
color_palette:
18431843
$ref: '#/components/schemas/ColorPaletteWithPresetNameOrMembers'
18441844
example:
1845-
aspect_ratio: ASPECT_10_16
1846-
style_type: REALISTIC
1845+
aspect_ratio:
1846+
style_type: GENERAL
18471847
magic_prompt_version: V_0
18481848
seed: 12345
18491849
negative_prompt: 'brush strokes, painting'
18501850
magic_prompt_option: ON
18511851
model: V_2_TURBO
1852-
resolution: RESOLUTION_1024_1024
1852+
resolution: 1280x800
18531853
num_images: 1
18541854
color_palette:
18551855
name: PASTEL
@@ -1887,6 +1887,7 @@ components:
18871887
ManageApiSubscriptionResponse:
18881888
title: ManageApiSubscriptionResponse
18891889
required:
1890+
- current_balance
18901891
- has_accepted_terms
18911892
- has_stripe_setup
18921893
type: object
@@ -1917,12 +1918,17 @@ components:
19171918
title: stripe_billing_url
19181919
type: string
19191920
description: The URL for the user to manage the existing Stripe subscription plan.
1921+
current_balance:
1922+
$ref: '#/components/schemas/Price'
19201923
example:
19211924
recharge_settings:
19221925
is_active: true
19231926
has_stripe_setup: true
19241927
metronome_dashboard_dark_mode_url: metronome_dashboard_dark_mode_url
19251928
stripe_billing_url: stripe_billing_url
1929+
current_balance:
1930+
amount: 1050
1931+
currency_code: USD
19261932
has_accepted_terms: true
19271933
metronome_dashboard_url: metronome_dashboard_url
19281934
metronome_links:

0 commit comments

Comments
 (0)