Skip to content

Commit 2da937b

Browse files
HavenDVgithub-actions[bot]
andauthored
feat: Updated OpenAPI spec (#221)
Co-authored-by: github-actions[bot] <bot@openai.com>
1 parent a76c706 commit 2da937b

10 files changed

+332
-558
lines changed

src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.OpenaiImagesGenerations.g.cs

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ partial void PrepareOpenaiImagesGenerationsArguments(
1010
ref string? xDeepinfraSource,
1111
ref string? userAgent,
1212
ref string? xiApiKey,
13-
global::DeepInfra.BodyOpenaiImagesGenerationsV1ImagesGenerationsPost request);
13+
global::DeepInfra.OpenAIImagesGenerationsIn request);
1414
partial void PrepareOpenaiImagesGenerationsRequest(
1515
global::System.Net.Http.HttpClient httpClient,
1616
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
1717
string? xDeepinfraSource,
1818
string? userAgent,
1919
string? xiApiKey,
20-
global::DeepInfra.BodyOpenaiImagesGenerationsV1ImagesGenerationsPost request);
20+
global::DeepInfra.OpenAIImagesGenerationsIn request);
2121
partial void ProcessOpenaiImagesGenerationsResponse(
2222
global::System.Net.Http.HttpClient httpClient,
2323
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -38,7 +38,7 @@ partial void ProcessOpenaiImagesGenerationsResponseContent(
3838
/// <param name="cancellationToken">The token to cancel the operation with</param>
3939
/// <exception cref="global::DeepInfra.ApiException"></exception>
4040
public async global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerationsAsync(
41-
global::DeepInfra.BodyOpenaiImagesGenerationsV1ImagesGenerationsPost request,
41+
global::DeepInfra.OpenAIImagesGenerationsIn request,
4242
string? xDeepinfraSource = default,
4343
string? userAgent = default,
4444
string? xiApiKey = default,
@@ -100,7 +100,7 @@ partial void ProcessOpenaiImagesGenerationsResponseContent(
100100
var __httpRequestContent = new global::System.Net.Http.StringContent(
101101
content: __httpRequestContentBody,
102102
encoding: global::System.Text.Encoding.UTF8,
103-
mediaType: "application/x-www-form-urlencoded");
103+
mediaType: "application/json");
104104
__httpRequest.Content = __httpRequestContent;
105105

106106
PrepareRequest(
@@ -242,25 +242,58 @@ partial void ProcessOpenaiImagesGenerationsResponseContent(
242242
/// <param name="xDeepinfraSource"></param>
243243
/// <param name="userAgent"></param>
244244
/// <param name="xiApiKey"></param>
245-
/// <param name="inp"></param>
246-
/// <param name="prompt"></param>
247-
/// <param name="model"></param>
245+
/// <param name="model">
246+
/// The model to use for image generation.<br/>
247+
/// Example: black-forest-labs/FLUX-1-schnell
248+
/// </param>
249+
/// <param name="n">
250+
/// The number of images to generate.<br/>
251+
/// Default Value: 1
252+
/// </param>
253+
/// <param name="responseFormat"></param>
254+
/// <param name="size">
255+
/// The size of the generated images. Available sizes depend on the model.<br/>
256+
/// Default Value: 1024x1024
257+
/// </param>
258+
/// <param name="user">
259+
/// A unique identifier representing your end-user, which can help to monitor and detect abuse.
260+
/// </param>
261+
/// <param name="prompt">
262+
/// A text description of desired image(s).<br/>
263+
/// Example: A photo of an astronaut riding a horse on Mars.
264+
/// </param>
265+
/// <param name="quality">
266+
/// The quality of the image that will be generated.
267+
/// </param>
268+
/// <param name="style">
269+
/// The style of the generated images.
270+
/// </param>
248271
/// <param name="cancellationToken">The token to cancel the operation with</param>
249272
/// <exception cref="global::System.InvalidOperationException"></exception>
250273
public async global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerationsAsync(
251-
string prompt,
252274
string model,
275+
string prompt,
253276
string? xDeepinfraSource = default,
254277
string? userAgent = default,
255278
string? xiApiKey = default,
256-
global::DeepInfra.OpenAIImagesGenerationsIn? inp = default,
279+
int? n = default,
280+
global::DeepInfra.OpenAIImagesResponseFormat? responseFormat = default,
281+
string? size = default,
282+
string? user = default,
283+
string? quality = default,
284+
string? style = default,
257285
global::System.Threading.CancellationToken cancellationToken = default)
258286
{
259-
var __request = new global::DeepInfra.BodyOpenaiImagesGenerationsV1ImagesGenerationsPost
287+
var __request = new global::DeepInfra.OpenAIImagesGenerationsIn
260288
{
261-
Inp = inp,
262-
Prompt = prompt,
263289
Model = model,
290+
N = n,
291+
ResponseFormat = responseFormat,
292+
Size = size,
293+
User = user,
294+
Prompt = prompt,
295+
Quality = quality,
296+
Style = style,
264297
};
265298

266299
return await OpenaiImagesGenerationsAsync(

src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.OpenaiImagesGenerations2.g.cs

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ partial void PrepareOpenaiImagesGenerations2Arguments(
1010
ref string? xDeepinfraSource,
1111
ref string? userAgent,
1212
ref string? xiApiKey,
13-
global::DeepInfra.BodyOpenaiImagesGenerationsV1OpenaiImagesGenerationsPost request);
13+
global::DeepInfra.OpenAIImagesGenerationsIn request);
1414
partial void PrepareOpenaiImagesGenerations2Request(
1515
global::System.Net.Http.HttpClient httpClient,
1616
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
1717
string? xDeepinfraSource,
1818
string? userAgent,
1919
string? xiApiKey,
20-
global::DeepInfra.BodyOpenaiImagesGenerationsV1OpenaiImagesGenerationsPost request);
20+
global::DeepInfra.OpenAIImagesGenerationsIn request);
2121
partial void ProcessOpenaiImagesGenerations2Response(
2222
global::System.Net.Http.HttpClient httpClient,
2323
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -38,7 +38,7 @@ partial void ProcessOpenaiImagesGenerations2ResponseContent(
3838
/// <param name="cancellationToken">The token to cancel the operation with</param>
3939
/// <exception cref="global::DeepInfra.ApiException"></exception>
4040
public async global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerations2Async(
41-
global::DeepInfra.BodyOpenaiImagesGenerationsV1OpenaiImagesGenerationsPost request,
41+
global::DeepInfra.OpenAIImagesGenerationsIn request,
4242
string? xDeepinfraSource = default,
4343
string? userAgent = default,
4444
string? xiApiKey = default,
@@ -100,7 +100,7 @@ partial void ProcessOpenaiImagesGenerations2ResponseContent(
100100
var __httpRequestContent = new global::System.Net.Http.StringContent(
101101
content: __httpRequestContentBody,
102102
encoding: global::System.Text.Encoding.UTF8,
103-
mediaType: "application/x-www-form-urlencoded");
103+
mediaType: "application/json");
104104
__httpRequest.Content = __httpRequestContent;
105105

106106
PrepareRequest(
@@ -242,25 +242,58 @@ partial void ProcessOpenaiImagesGenerations2ResponseContent(
242242
/// <param name="xDeepinfraSource"></param>
243243
/// <param name="userAgent"></param>
244244
/// <param name="xiApiKey"></param>
245-
/// <param name="inp"></param>
246-
/// <param name="prompt"></param>
247-
/// <param name="model"></param>
245+
/// <param name="model">
246+
/// The model to use for image generation.<br/>
247+
/// Example: black-forest-labs/FLUX-1-schnell
248+
/// </param>
249+
/// <param name="n">
250+
/// The number of images to generate.<br/>
251+
/// Default Value: 1
252+
/// </param>
253+
/// <param name="responseFormat"></param>
254+
/// <param name="size">
255+
/// The size of the generated images. Available sizes depend on the model.<br/>
256+
/// Default Value: 1024x1024
257+
/// </param>
258+
/// <param name="user">
259+
/// A unique identifier representing your end-user, which can help to monitor and detect abuse.
260+
/// </param>
261+
/// <param name="prompt">
262+
/// A text description of desired image(s).<br/>
263+
/// Example: A photo of an astronaut riding a horse on Mars.
264+
/// </param>
265+
/// <param name="quality">
266+
/// The quality of the image that will be generated.
267+
/// </param>
268+
/// <param name="style">
269+
/// The style of the generated images.
270+
/// </param>
248271
/// <param name="cancellationToken">The token to cancel the operation with</param>
249272
/// <exception cref="global::System.InvalidOperationException"></exception>
250273
public async global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerations2Async(
251-
string prompt,
252274
string model,
275+
string prompt,
253276
string? xDeepinfraSource = default,
254277
string? userAgent = default,
255278
string? xiApiKey = default,
256-
global::DeepInfra.OpenAIImagesGenerationsIn? inp = default,
279+
int? n = default,
280+
global::DeepInfra.OpenAIImagesResponseFormat? responseFormat = default,
281+
string? size = default,
282+
string? user = default,
283+
string? quality = default,
284+
string? style = default,
257285
global::System.Threading.CancellationToken cancellationToken = default)
258286
{
259-
var __request = new global::DeepInfra.BodyOpenaiImagesGenerationsV1OpenaiImagesGenerationsPost
287+
var __request = new global::DeepInfra.OpenAIImagesGenerationsIn
260288
{
261-
Inp = inp,
262-
Prompt = prompt,
263289
Model = model,
290+
N = n,
291+
ResponseFormat = responseFormat,
292+
Size = size,
293+
User = user,
294+
Prompt = prompt,
295+
Quality = quality,
296+
Style = style,
264297
};
265298

266299
return await OpenaiImagesGenerations2Async(

src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.OpenaiImagesGenerations.g.cs

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public partial interface IDeepInfraClient
1515
/// <param name="cancellationToken">The token to cancel the operation with</param>
1616
/// <exception cref="global::DeepInfra.ApiException"></exception>
1717
global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerationsAsync(
18-
global::DeepInfra.BodyOpenaiImagesGenerationsV1ImagesGenerationsPost request,
18+
global::DeepInfra.OpenAIImagesGenerationsIn request,
1919
string? xDeepinfraSource = default,
2020
string? userAgent = default,
2121
string? xiApiKey = default,
@@ -28,18 +28,46 @@ public partial interface IDeepInfraClient
2828
/// <param name="xDeepinfraSource"></param>
2929
/// <param name="userAgent"></param>
3030
/// <param name="xiApiKey"></param>
31-
/// <param name="inp"></param>
32-
/// <param name="prompt"></param>
33-
/// <param name="model"></param>
31+
/// <param name="model">
32+
/// The model to use for image generation.<br/>
33+
/// Example: black-forest-labs/FLUX-1-schnell
34+
/// </param>
35+
/// <param name="n">
36+
/// The number of images to generate.<br/>
37+
/// Default Value: 1
38+
/// </param>
39+
/// <param name="responseFormat"></param>
40+
/// <param name="size">
41+
/// The size of the generated images. Available sizes depend on the model.<br/>
42+
/// Default Value: 1024x1024
43+
/// </param>
44+
/// <param name="user">
45+
/// A unique identifier representing your end-user, which can help to monitor and detect abuse.
46+
/// </param>
47+
/// <param name="prompt">
48+
/// A text description of desired image(s).<br/>
49+
/// Example: A photo of an astronaut riding a horse on Mars.
50+
/// </param>
51+
/// <param name="quality">
52+
/// The quality of the image that will be generated.
53+
/// </param>
54+
/// <param name="style">
55+
/// The style of the generated images.
56+
/// </param>
3457
/// <param name="cancellationToken">The token to cancel the operation with</param>
3558
/// <exception cref="global::System.InvalidOperationException"></exception>
3659
global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerationsAsync(
37-
string prompt,
3860
string model,
61+
string prompt,
3962
string? xDeepinfraSource = default,
4063
string? userAgent = default,
4164
string? xiApiKey = default,
42-
global::DeepInfra.OpenAIImagesGenerationsIn? inp = default,
65+
int? n = default,
66+
global::DeepInfra.OpenAIImagesResponseFormat? responseFormat = default,
67+
string? size = default,
68+
string? user = default,
69+
string? quality = default,
70+
string? style = default,
4371
global::System.Threading.CancellationToken cancellationToken = default);
4472
}
4573
}

src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.OpenaiImagesGenerations2.g.cs

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public partial interface IDeepInfraClient
1515
/// <param name="cancellationToken">The token to cancel the operation with</param>
1616
/// <exception cref="global::DeepInfra.ApiException"></exception>
1717
global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerations2Async(
18-
global::DeepInfra.BodyOpenaiImagesGenerationsV1OpenaiImagesGenerationsPost request,
18+
global::DeepInfra.OpenAIImagesGenerationsIn request,
1919
string? xDeepinfraSource = default,
2020
string? userAgent = default,
2121
string? xiApiKey = default,
@@ -28,18 +28,46 @@ public partial interface IDeepInfraClient
2828
/// <param name="xDeepinfraSource"></param>
2929
/// <param name="userAgent"></param>
3030
/// <param name="xiApiKey"></param>
31-
/// <param name="inp"></param>
32-
/// <param name="prompt"></param>
33-
/// <param name="model"></param>
31+
/// <param name="model">
32+
/// The model to use for image generation.<br/>
33+
/// Example: black-forest-labs/FLUX-1-schnell
34+
/// </param>
35+
/// <param name="n">
36+
/// The number of images to generate.<br/>
37+
/// Default Value: 1
38+
/// </param>
39+
/// <param name="responseFormat"></param>
40+
/// <param name="size">
41+
/// The size of the generated images. Available sizes depend on the model.<br/>
42+
/// Default Value: 1024x1024
43+
/// </param>
44+
/// <param name="user">
45+
/// A unique identifier representing your end-user, which can help to monitor and detect abuse.
46+
/// </param>
47+
/// <param name="prompt">
48+
/// A text description of desired image(s).<br/>
49+
/// Example: A photo of an astronaut riding a horse on Mars.
50+
/// </param>
51+
/// <param name="quality">
52+
/// The quality of the image that will be generated.
53+
/// </param>
54+
/// <param name="style">
55+
/// The style of the generated images.
56+
/// </param>
3457
/// <param name="cancellationToken">The token to cancel the operation with</param>
3558
/// <exception cref="global::System.InvalidOperationException"></exception>
3659
global::System.Threading.Tasks.Task<global::DeepInfra.OpenAIImagesOut> OpenaiImagesGenerations2Async(
37-
string prompt,
3860
string model,
61+
string prompt,
3962
string? xDeepinfraSource = default,
4063
string? userAgent = default,
4164
string? xiApiKey = default,
42-
global::DeepInfra.OpenAIImagesGenerationsIn? inp = default,
65+
int? n = default,
66+
global::DeepInfra.OpenAIImagesResponseFormat? responseFormat = default,
67+
string? size = default,
68+
string? user = default,
69+
string? quality = default,
70+
string? style = default,
4371
global::System.Threading.CancellationToken cancellationToken = default);
4472
}
4573
}

0 commit comments

Comments
 (0)