From 15f2e2e4c8730727023a3d8e667f0721ad7018c5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 4 Oct 2026 11:29:08 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../CreateImageEditRequestOptionSet.g.cs | 31 +- .../Commands/CreateImageRequestOptionSet.g.cs | 37 -- ...inatedFineTuningJobsCommandApiCommand.g.cs | 3 +- ...sCreateImageAsStreamCommandApiCommand.g.cs | 69 ++- .../ImagesCreateImageCommandApiCommand.g.cs | 69 ++- ...ateImageEditAsStreamCommandApiCommand.g.cs | 54 ++- ...magesCreateImageEditCommandApiCommand.g.cs | 54 ++- ...I.OpenAI.ImagesClient.CreateImageEdit.g.cs | 6 +- ....ImagesClient.CreateImageEditAsStream.g.cs | 6 +- ....OpenAI.Models.CreateImageEditRequest.g.cs | 3 - ...dels.CreateImageEditRequestBackground.g.cs | 12 +- ...ls.CreateImageEditRequestOutputFormat.g.cs | 6 +- ....Models.CreateImageEditRequestQuality.g.cs | 4 +- ...yAGI.OpenAI.Models.CreateImageRequest.g.cs | 4 - ...I.Models.CreateImageRequestBackground.g.cs | 12 +- ...I.Models.CreateImageRequestModeration.g.cs | 4 +- ...Models.CreateImageRequestOutputFormat.g.cs | 4 +- ...enAI.Models.CreateImageRequestQuality.g.cs | 9 +- src/libs/tryAGI.OpenAI/openapi.yaml | 431 ++++++++++-------- 19 files changed, 462 insertions(+), 356 deletions(-) diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageEditRequestOptionSet.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageEditRequestOptionSet.g.cs index 255c48e54..8ae00398c 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageEditRequestOptionSet.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageEditRequestOptionSet.g.cs @@ -7,15 +7,12 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal sealed record CreateImageEditRequestOptionSet( Option Prompt, Option Maskname, - Option Background, Option N, Option ResponseFormat, - Option OutputFormat, Option OutputCompression, Option User, Option Stream, - Option PartialImages, - Option Quality) + Option PartialImages) { public static CreateImageEditRequestOptionSet Create(string? prefix = null) { @@ -32,20 +29,6 @@ public static CreateImageEditRequestOptionSet Create(string? prefix = null) { Description = @"An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", }, - Background: new Option($"--{normalizedPrefix}background") - { - Description = @"Set the background of the generated image(s). This parameter is only supported for -the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default -value). When `auto` is used, the model will automatically determine the best -background for the image. - -`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` -snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds -are available for supported GPT Image models. For `gpt-image-2` and -`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, -set the output format to `png` or `webp`. -", - }, N: new Option($"--{normalizedPrefix}n") { Description = @"The number of images to generate. Must be between 1 and 10.", @@ -54,13 +37,6 @@ set the output format to `png` or `webp`. { Description = @"Legacy response format parameter for retired image models. Unsupported for GPT image models, which always return base64-encoded images.", }, - OutputFormat: new Option($"--{normalizedPrefix}output-format") - { - Description = @"The format in which the generated images are returned. This parameter is -only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. -The default value is `png`. -", - }, OutputCompression: new Option($"--{normalizedPrefix}output-compression") { Description = @"The compression level (0-100%) for the generated images. This parameter @@ -79,11 +55,6 @@ set the output format to `png` or `webp`. PartialImages: new Option($"--{normalizedPrefix}partial-images") { Description = @"", - }, - Quality: new Option($"--{normalizedPrefix}quality") - { - Description = @"The quality of the image that will be generated for GPT image models. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Defaults to `auto`. -", } ); } diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageRequestOptionSet.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageRequestOptionSet.g.cs index f1531d34f..ccbc49bea 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageRequestOptionSet.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/CreateImageRequestOptionSet.g.cs @@ -7,14 +7,10 @@ namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands; internal sealed record CreateImageRequestOptionSet( Option Prompt, Option N, - Option Quality, Option ResponseFormat, - Option OutputFormat, Option OutputCompression, Option Stream, Option PartialImages, - Option Moderation, - Option Background, Option Style, Option User) { @@ -33,25 +29,10 @@ public static CreateImageRequestOptionSet Create(string? prefix = null) { Description = @"The number of images to generate. Must be between 1 and 10.", }, - Quality: new Option($"--{normalizedPrefix}quality") - { - Description = @"The quality of the image that will be generated. - -- `auto` (default value) will automatically select the best quality for the given - model. -- `high`, `medium` and `low` are supported for the GPT image models. -- `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` - snapshots, also support `xhigh` and `max`. -", - }, ResponseFormat: new Option($"--{normalizedPrefix}response-format") { Description = @"Legacy response format parameter for retired image models. Unsupported for GPT image models, which always return base64-encoded images.", }, - OutputFormat: new Option($"--{normalizedPrefix}output-format") - { - Description = @"The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.", - }, OutputCompression: new Option($"--{normalizedPrefix}output-compression") { Description = @"The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.", @@ -64,24 +45,6 @@ public static CreateImageRequestOptionSet Create(string? prefix = null) { Description = @"", }, - Moderation: new Option($"--{normalizedPrefix}moderation") - { - Description = @"Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).", - }, - Background: new Option($"--{normalizedPrefix}background") - { - Description = @"Set the background of the generated image(s). This parameter is only supported for -the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default -value). When `auto` is used, the model will automatically determine the best -background for the image. - -`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` -snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds -are available for supported GPT Image models. For `gpt-image-2` and -`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, -set the output format to `png` or `webp`. -", - }, Style: new Option($"--{normalizedPrefix}style") { Description = @"Legacy style parameter for retired image models. Unsupported for GPT image models; describe the desired style in the prompt instead.", diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListPaginatedFineTuningJobsCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListPaginatedFineTuningJobsCommandApiCommand.g.cs index 75785f0d8..8446ed9fc 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListPaginatedFineTuningJobsCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/FineTuningListPaginatedFineTuningJobsCommandApiCommand.g.cs @@ -22,7 +22,8 @@ internal static partial class FineTuningListPaginatedFineTuningJobsCommandApiCom private static Option?> Metadata { get; } = new( name: @"--metadata") { - Description = @"Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Alternatively, set `metadata=null` to indicate no metadata. + Description = @"Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Omitting the parameter or passing an empty object applies no metadata filter. An empty value, such as `metadata[k]=`, filters for that key with an empty string value. +To select jobs with null metadata, send the literal query string `metadata=null`. Nullable caller types do not specify how a client serializes null for a deep-object parameter. Use a raw query parameter if the client omits null. Do not combine the two query forms. ", }; diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs index 3cd23ca0b..2ce97614d 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageAsStreamCommandApiCommand.g.cs @@ -14,11 +14,52 @@ internal static partial class ImagesCreateImageAsStreamCommandApiCommand Required = true, }; + private static Option Quality { get; } = new( + name: @"--quality") + { + Description = @"The quality of the image that will be generated. + +- `auto` (default value) will automatically select the best quality for the given + model. +- `high`, `medium` and `low` are supported for the GPT image models. +- `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + snapshots, also support `xhigh` and `max`. +", + }; + + private static Option OutputFormat { get; } = new( + name: @"--output-format") + { + Description = @"The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.", + }; + private static Option?> Size { get; } = new( name: @"--size") { Description = @"The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing.", }; + + private static Option Moderation { get; } = new( + name: @"--moderation") + { + Description = @"Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).", + }; + + private static Option Background { get; } = new( + name: @"--background") + { + Description = @"Set the background of the generated image(s). This parameter is only supported for +the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default +value). When `auto` is used, the model will automatically determine the best +background for the image. + +`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` +snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds +are available for supported GPT Image models. For `gpt-image-2` and +`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, +set the output format to `png` or `webp`. +", + }; private static readonly CreateImageRequestOptionSet CreateImageRequestOptionSetOptions = CreateImageRequestOptionSet.Create(); private static Option Input { get; } = new(@"--input") { @@ -45,14 +86,14 @@ public static Command Create(string? commandName = null) Creates an image given a prompt using a GPT Image model. [Learn more](https://developers.openai.com/api/docs/guides/images-vision). "); command.Options.Add(Model); - command.Options.Add(Size); command.Options.Add(CreateImageRequestOptionSetOptions.Prompt); + command.Options.Add(Quality); + command.Options.Add(OutputFormat); + command.Options.Add(Size); + command.Options.Add(Moderation); + command.Options.Add(Background); command.Options.Add(CreateImageRequestOptionSetOptions.Prompt); command.Options.Add(CreateImageRequestOptionSetOptions.N); - command.Options.Add(CreateImageRequestOptionSetOptions.Quality); - command.Options.Add(CreateImageRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageRequestOptionSetOptions.OutputCompression); command.Options.Add(CreateImageRequestOptionSetOptions.PartialImages); - command.Options.Add(CreateImageRequestOptionSetOptions.Moderation); - command.Options.Add(CreateImageRequestOptionSetOptions.Background); command.Options.Add(CreateImageRequestOptionSetOptions.User); command.Options.Add(Input); command.Options.Add(RequestJson); @@ -80,29 +121,29 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : (__requestBase is { } __SizeBaseValue ? __SizeBaseValue.Size : default); var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); + var quality = CliRuntime.WasSpecified(parseResult, Quality) ? parseResult.GetValue(Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); + var outputFormat = CliRuntime.WasSpecified(parseResult, OutputFormat) ? parseResult.GetValue(OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); + var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : (__requestBase is { } __SizeBaseValue ? __SizeBaseValue.Size : default); + var moderation = CliRuntime.WasSpecified(parseResult, Moderation) ? parseResult.GetValue(Moderation) : (__requestBase is { } __ModerationBaseValue ? __ModerationBaseValue.Moderation : default); + var background = CliRuntime.WasSpecified(parseResult, Background) ? parseResult.GetValue(Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); var n = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.N) : (__requestBase is { } __NBaseValue ? __NBaseValue.N : default); - var quality = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputCompression) : (__requestBase is { } __OutputCompressionBaseValue ? __OutputCompressionBaseValue.OutputCompression : default); var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.PartialImages) : (__requestBase is { } __PartialImagesBaseValue ? __PartialImagesBaseValue.PartialImages : default); - var moderation = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Moderation) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Moderation) : (__requestBase is { } __ModerationBaseValue ? __ModerationBaseValue.Moderation : default); - var background = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var user = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.User) : (__requestBase is { } __UserBaseValue ? __UserBaseValue.User : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); var response = client.Images.CreateImageAsStreamAsync( model: model, + quality: quality, + outputFormat: outputFormat, size: size, + moderation: moderation, + background: background, prompt: prompt, n: n, - quality: quality, - outputFormat: outputFormat, outputCompression: outputCompression, partialImages: partialImages, - moderation: moderation, - background: background, user: user, cancellationToken: cancellationToken); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs index e90a6467c..5c9ba666e 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageCommandApiCommand.g.cs @@ -14,11 +14,52 @@ internal static partial class ImagesCreateImageCommandApiCommand Required = true, }; + private static Option Quality { get; } = new( + name: @"--quality") + { + Description = @"The quality of the image that will be generated. + +- `auto` (default value) will automatically select the best quality for the given + model. +- `high`, `medium` and `low` are supported for the GPT image models. +- `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + snapshots, also support `xhigh` and `max`. +", + }; + + private static Option OutputFormat { get; } = new( + name: @"--output-format") + { + Description = @"The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.", + }; + private static Option?> Size { get; } = new( name: @"--size") { Description = @"The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing.", }; + + private static Option Moderation { get; } = new( + name: @"--moderation") + { + Description = @"Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).", + }; + + private static Option Background { get; } = new( + name: @"--background") + { + Description = @"Set the background of the generated image(s). This parameter is only supported for +the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default +value). When `auto` is used, the model will automatically determine the best +background for the image. + +`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` +snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds +are available for supported GPT Image models. For `gpt-image-2` and +`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, +set the output format to `png` or `webp`. +", + }; private static readonly CreateImageRequestOptionSet CreateImageRequestOptionSetOptions = CreateImageRequestOptionSet.Create(); private static Option Input { get; } = new(@"--input") { @@ -65,14 +106,14 @@ public static Command Create(string? commandName = null) Creates an image given a prompt using a GPT Image model. [Learn more](https://developers.openai.com/api/docs/guides/images-vision). "); command.Options.Add(Model); - command.Options.Add(Size); command.Options.Add(CreateImageRequestOptionSetOptions.Prompt); + command.Options.Add(Quality); + command.Options.Add(OutputFormat); + command.Options.Add(Size); + command.Options.Add(Moderation); + command.Options.Add(Background); command.Options.Add(CreateImageRequestOptionSetOptions.Prompt); command.Options.Add(CreateImageRequestOptionSetOptions.N); - command.Options.Add(CreateImageRequestOptionSetOptions.Quality); - command.Options.Add(CreateImageRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageRequestOptionSetOptions.OutputCompression); command.Options.Add(CreateImageRequestOptionSetOptions.PartialImages); - command.Options.Add(CreateImageRequestOptionSetOptions.Moderation); - command.Options.Add(CreateImageRequestOptionSetOptions.Background); command.Options.Add(CreateImageRequestOptionSetOptions.User); command.Options.Add(Input); command.Options.Add(RequestJson); @@ -100,29 +141,29 @@ await CliRuntime.RunAsync(async () => global::tryAGI.OpenAI.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); var model = parseResult.GetRequiredValue(Model); - var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : (__requestBase is { } __SizeBaseValue ? __SizeBaseValue.Size : default); var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); + var quality = CliRuntime.WasSpecified(parseResult, Quality) ? parseResult.GetValue(Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); + var outputFormat = CliRuntime.WasSpecified(parseResult, OutputFormat) ? parseResult.GetValue(OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); + var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : (__requestBase is { } __SizeBaseValue ? __SizeBaseValue.Size : default); + var moderation = CliRuntime.WasSpecified(parseResult, Moderation) ? parseResult.GetValue(Moderation) : (__requestBase is { } __ModerationBaseValue ? __ModerationBaseValue.Moderation : default); + var background = CliRuntime.WasSpecified(parseResult, Background) ? parseResult.GetValue(Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var prompt = parseResult.GetRequiredValue(CreateImageRequestOptionSetOptions.Prompt); var n = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.N) : (__requestBase is { } __NBaseValue ? __NBaseValue.N : default); - var quality = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.OutputCompression) : (__requestBase is { } __OutputCompressionBaseValue ? __OutputCompressionBaseValue.OutputCompression : default); var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.PartialImages) : (__requestBase is { } __PartialImagesBaseValue ? __PartialImagesBaseValue.PartialImages : default); - var moderation = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Moderation) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Moderation) : (__requestBase is { } __ModerationBaseValue ? __ModerationBaseValue.Moderation : default); - var background = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var user = CliRuntime.WasSpecified(parseResult, CreateImageRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageRequestOptionSetOptions.User) : (__requestBase is { } __UserBaseValue ? __UserBaseValue.User : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); var response = await client.Images.CreateImageAsync( model: model, + quality: quality, + outputFormat: outputFormat, size: size, + moderation: moderation, + background: background, prompt: prompt, n: n, - quality: quality, - outputFormat: outputFormat, outputCompression: outputCompression, partialImages: partialImages, - moderation: moderation, - background: background, user: user, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs index c4baa14b2..ff21a416f 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditAsStreamCommandApiCommand.g.cs @@ -28,6 +28,22 @@ follows the same input constraints as GPT image models. Description = @"An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", }; + private static Option Background { get; } = new( + name: @"--background") + { + Description = @"Set the background of the generated image(s). This parameter is only supported for +the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default +value). When `auto` is used, the model will automatically determine the best +background for the image. + +`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` +snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds +are available for supported GPT Image models. For `gpt-image-2` and +`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, +set the output format to `png` or `webp`. +", + }; + private static Option> Model { get; } = new( name: @"--model") { @@ -41,11 +57,27 @@ follows the same input constraints as GPT image models. Description = @"The size of the generated images. Defaults to `auto`. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing.", }; + private static Option OutputFormat { get; } = new( + name: @"--output-format") + { + Description = @"The format in which the generated images are returned. This parameter is +only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. +The default value is `png`. +", + }; + private static Option InputFidelity { get; } = new( name: @"--input-fidelity") { Description = @"", }; + + private static Option Quality { get; } = new( + name: @"--quality") + { + Description = @"The quality of the image that will be generated for GPT image models. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Defaults to `auto`. +", + }; private static readonly CreateImageEditRequestOptionSet CreateImageEditRequestOptionSetOptions = CreateImageEditRequestOptionSet.Create(); private static Option Input { get; } = new(@"--input") { @@ -72,17 +104,17 @@ public static Command Create(string? commandName = null) Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models."); command.Options.Add(Image); command.Options.Add(Mask); + command.Options.Add(Background); command.Options.Add(Model); command.Options.Add(Size); - command.Options.Add(InputFidelity); command.Options.Add(CreateImageEditRequestOptionSetOptions.Prompt); + command.Options.Add(OutputFormat); + command.Options.Add(InputFidelity); + command.Options.Add(Quality); command.Options.Add(CreateImageEditRequestOptionSetOptions.Prompt); command.Options.Add(CreateImageEditRequestOptionSetOptions.Maskname); - command.Options.Add(CreateImageEditRequestOptionSetOptions.Background); command.Options.Add(CreateImageEditRequestOptionSetOptions.N); - command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputCompression); command.Options.Add(CreateImageEditRequestOptionSetOptions.User); command.Options.Add(CreateImageEditRequestOptionSetOptions.PartialImages); - command.Options.Add(CreateImageEditRequestOptionSetOptions.Quality); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -110,35 +142,35 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); var mask = CliRuntime.WasSpecified(parseResult, Mask) ? parseResult.GetValue(Mask) : (__requestBase is { } __MaskBaseValue ? __MaskBaseValue.Mask : default); + var background = CliRuntime.WasSpecified(parseResult, Background) ? parseResult.GetValue(Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var model = parseResult.GetRequiredValue(Model); var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : (__requestBase is { } __SizeBaseValue ? __SizeBaseValue.Size : default); - var inputFidelity = CliRuntime.WasSpecified(parseResult, InputFidelity) ? parseResult.GetValue(InputFidelity) : (__requestBase is { } __InputFidelityBaseValue ? __InputFidelityBaseValue.InputFidelity : default); var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); + var outputFormat = CliRuntime.WasSpecified(parseResult, OutputFormat) ? parseResult.GetValue(OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); + var inputFidelity = CliRuntime.WasSpecified(parseResult, InputFidelity) ? parseResult.GetValue(InputFidelity) : (__requestBase is { } __InputFidelityBaseValue ? __InputFidelityBaseValue.InputFidelity : default); + var quality = CliRuntime.WasSpecified(parseResult, Quality) ? parseResult.GetValue(Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); var maskname = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Maskname) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Maskname) : (__requestBase is { } __MasknameBaseValue ? __MasknameBaseValue.Maskname : default); - var background = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var n = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.N) : (__requestBase is { } __NBaseValue ? __NBaseValue.N : default); - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputCompression) : (__requestBase is { } __OutputCompressionBaseValue ? __OutputCompressionBaseValue.OutputCompression : default); var user = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.User) : (__requestBase is { } __UserBaseValue ? __UserBaseValue.User : default); var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.PartialImages) : (__requestBase is { } __PartialImagesBaseValue ? __PartialImagesBaseValue.PartialImages : default); - var quality = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); var response = client.Images.CreateImageEditAsStreamAsync( image: image, mask: mask, + background: background, model: model, size: size, + outputFormat: outputFormat, inputFidelity: inputFidelity, + quality: quality, prompt: prompt, maskname: maskname, - background: background, n: n, - outputFormat: outputFormat, outputCompression: outputCompression, user: user, partialImages: partialImages, - quality: quality, cancellationToken: cancellationToken); await foreach (var item in response.WithCancellation(cancellationToken).ConfigureAwait(false)) diff --git a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs index aeff4c2d3..ee7681235 100644 --- a/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs +++ b/src/libs/tryAGI.OpenAI.CLI/GeneratedApi/Commands/ImagesCreateImageEditCommandApiCommand.g.cs @@ -28,6 +28,22 @@ follows the same input constraints as GPT image models. Description = @"An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", }; + private static Option Background { get; } = new( + name: @"--background") + { + Description = @"Set the background of the generated image(s). This parameter is only supported for +the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default +value). When `auto` is used, the model will automatically determine the best +background for the image. + +`gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` +snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds +are available for supported GPT Image models. For `gpt-image-2` and +`gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, +set the output format to `png` or `webp`. +", + }; + private static Option> Model { get; } = new( name: @"--model") { @@ -41,11 +57,27 @@ follows the same input constraints as GPT image models. Description = @"The size of the generated images. Defaults to `auto`. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing.", }; + private static Option OutputFormat { get; } = new( + name: @"--output-format") + { + Description = @"The format in which the generated images are returned. This parameter is +only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. +The default value is `png`. +", + }; + private static Option InputFidelity { get; } = new( name: @"--input-fidelity") { Description = @"", }; + + private static Option Quality { get; } = new( + name: @"--quality") + { + Description = @"The quality of the image that will be generated for GPT image models. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Defaults to `auto`. +", + }; private static readonly CreateImageEditRequestOptionSet CreateImageEditRequestOptionSetOptions = CreateImageEditRequestOptionSet.Create(); private static Option Input { get; } = new(@"--input") { @@ -92,17 +124,17 @@ public static Command Create(string? commandName = null) Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models."); command.Options.Add(Image); command.Options.Add(Mask); + command.Options.Add(Background); command.Options.Add(Model); command.Options.Add(Size); - command.Options.Add(InputFidelity); command.Options.Add(CreateImageEditRequestOptionSetOptions.Prompt); + command.Options.Add(OutputFormat); + command.Options.Add(InputFidelity); + command.Options.Add(Quality); command.Options.Add(CreateImageEditRequestOptionSetOptions.Prompt); command.Options.Add(CreateImageEditRequestOptionSetOptions.Maskname); - command.Options.Add(CreateImageEditRequestOptionSetOptions.Background); command.Options.Add(CreateImageEditRequestOptionSetOptions.N); - command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputFormat); command.Options.Add(CreateImageEditRequestOptionSetOptions.OutputCompression); command.Options.Add(CreateImageEditRequestOptionSetOptions.User); command.Options.Add(CreateImageEditRequestOptionSetOptions.PartialImages); - command.Options.Add(CreateImageEditRequestOptionSetOptions.Quality); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -130,35 +162,35 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var image = parseResult.GetRequiredValue(Image); var mask = CliRuntime.WasSpecified(parseResult, Mask) ? parseResult.GetValue(Mask) : (__requestBase is { } __MaskBaseValue ? __MaskBaseValue.Mask : default); + var background = CliRuntime.WasSpecified(parseResult, Background) ? parseResult.GetValue(Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var model = parseResult.GetRequiredValue(Model); var size = CliRuntime.WasSpecified(parseResult, Size) ? parseResult.GetValue(Size) : (__requestBase is { } __SizeBaseValue ? __SizeBaseValue.Size : default); - var inputFidelity = CliRuntime.WasSpecified(parseResult, InputFidelity) ? parseResult.GetValue(InputFidelity) : (__requestBase is { } __InputFidelityBaseValue ? __InputFidelityBaseValue.InputFidelity : default); var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); + var outputFormat = CliRuntime.WasSpecified(parseResult, OutputFormat) ? parseResult.GetValue(OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); + var inputFidelity = CliRuntime.WasSpecified(parseResult, InputFidelity) ? parseResult.GetValue(InputFidelity) : (__requestBase is { } __InputFidelityBaseValue ? __InputFidelityBaseValue.InputFidelity : default); + var quality = CliRuntime.WasSpecified(parseResult, Quality) ? parseResult.GetValue(Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); var prompt = parseResult.GetRequiredValue(CreateImageEditRequestOptionSetOptions.Prompt); var maskname = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Maskname) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Maskname) : (__requestBase is { } __MasknameBaseValue ? __MasknameBaseValue.Maskname : default); - var background = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Background) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Background) : (__requestBase is { } __BackgroundBaseValue ? __BackgroundBaseValue.Background : default); var n = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.N) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.N) : (__requestBase is { } __NBaseValue ? __NBaseValue.N : default); - var outputFormat = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputFormat) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputFormat) : (__requestBase is { } __OutputFormatBaseValue ? __OutputFormatBaseValue.OutputFormat : default); var outputCompression = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.OutputCompression) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.OutputCompression) : (__requestBase is { } __OutputCompressionBaseValue ? __OutputCompressionBaseValue.OutputCompression : default); var user = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.User) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.User) : (__requestBase is { } __UserBaseValue ? __UserBaseValue.User : default); var partialImages = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.PartialImages) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.PartialImages) : (__requestBase is { } __PartialImagesBaseValue ? __PartialImagesBaseValue.PartialImages : default); - var quality = CliRuntime.WasSpecified(parseResult, CreateImageEditRequestOptionSetOptions.Quality) ? parseResult.GetValue(CreateImageEditRequestOptionSetOptions.Quality) : (__requestBase is { } __QualityBaseValue ? __QualityBaseValue.Quality : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); var response = await client.Images.CreateImageEditAsync( image: image, mask: mask, + background: background, model: model, size: size, + outputFormat: outputFormat, inputFidelity: inputFidelity, + quality: quality, prompt: prompt, maskname: maskname, - background: background, n: n, - outputFormat: outputFormat, outputCompression: outputCompression, user: user, partialImages: partialImages, - quality: quality, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs index 82cba8da2..20cb8cd2d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs @@ -306,7 +306,7 @@ request.Maskname is null { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent((request.Background).HasValue ? (request.Background).GetValueOrDefault().ToValueString() : string.Empty), + content: new global::System.Net.Http.StringContent(request.Background.ToString() ?? string.Empty), name: "\"background\""); } @@ -342,7 +342,7 @@ request.Maskname is null { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty), + content: new global::System.Net.Http.StringContent(request.OutputFormat.ToString() ?? string.Empty), name: "\"output_format\""); } @@ -390,7 +390,7 @@ request.Maskname is null { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent((request.Quality).HasValue ? (request.Quality).GetValueOrDefault().ToValueString() : string.Empty), + content: new global::System.Net.Http.StringContent(request.Quality.ToString() ?? string.Empty), name: "\"quality\""); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs index e3d16ba7c..7d44f308c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs @@ -278,7 +278,7 @@ request.Maskname is null { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent((request.Background).HasValue ? (request.Background).GetValueOrDefault().ToValueString() : string.Empty), + content: new global::System.Net.Http.StringContent(request.Background.ToString() ?? string.Empty), name: "\"background\""); } @@ -314,7 +314,7 @@ request.Maskname is null { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent((request.OutputFormat).HasValue ? (request.OutputFormat).GetValueOrDefault().ToValueString() : string.Empty), + content: new global::System.Net.Http.StringContent(request.OutputFormat.ToString() ?? string.Empty), name: "\"output_format\""); } @@ -362,7 +362,7 @@ request.Maskname is null { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent((request.Quality).HasValue ? (request.Quality).GetValueOrDefault().ToValueString() : string.Empty), + content: new global::System.Net.Http.StringContent(request.Quality.ToString() ?? string.Empty), name: "\"quality\""); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs index c44902010..a0c3bde13 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs @@ -60,7 +60,6 @@ public sealed partial class CreateImageEditRequest /// /// transparent [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestBackgroundJsonConverter))] public global::tryAGI.OpenAI.CreateImageEditRequestBackground? Background { get; set; } /// @@ -109,7 +108,6 @@ public sealed partial class CreateImageEditRequest /// /// png [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestOutputFormatJsonConverter))] public global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? OutputFormat { get; set; } /// @@ -160,7 +158,6 @@ public sealed partial class CreateImageEditRequest /// /// high [global::System.Text.Json.Serialization.JsonPropertyName("quality")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestQualityJsonConverter))] public global::tryAGI.OpenAI.CreateImageEditRequestQuality? Quality { get; set; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs index 7a0574135..6bfe3e0ff 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs @@ -4,17 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Set the background of the generated image(s). This parameter is only supported for
- /// the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default
- /// value). When `auto` is used, the model will automatically determine the best
- /// background for the image.
- /// `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
- /// snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds
- /// are available for supported GPT Image models. For `gpt-image-2` and
- /// `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
- /// set the output format to `png` or `webp`.
- /// Default Value: auto
- /// Example: transparent + /// ///
public enum CreateImageEditRequestBackground { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs index e6ede4b6a..d10ee4736 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs @@ -4,11 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The format in which the generated images are returned. This parameter is
- /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
- /// The default value is `png`.
- /// Default Value: png
- /// Example: png + /// ///
public enum CreateImageEditRequestOutputFormat { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs index 5aa733839..497ce75e5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs @@ -4,9 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The quality of the image that will be generated for GPT image models. The GPT image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support `xhigh` and `max`. Defaults to `auto`.
- /// Default Value: auto
- /// Example: high + /// ///
public enum CreateImageEditRequestQuality { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs index 51b047459..f0ae87db1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs @@ -50,7 +50,6 @@ public sealed partial class CreateImageRequest ///
/// medium [global::System.Text.Json.Serialization.JsonPropertyName("quality")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestQualityJsonConverter))] public global::tryAGI.OpenAI.CreateImageRequestQuality? Quality { get; set; } /// @@ -68,7 +67,6 @@ public sealed partial class CreateImageRequest /// /// png [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestOutputFormatJsonConverter))] public global::tryAGI.OpenAI.CreateImageRequestOutputFormat? OutputFormat { get; set; } /// @@ -114,7 +112,6 @@ public sealed partial class CreateImageRequest /// /// low [global::System.Text.Json.Serialization.JsonPropertyName("moderation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModerationJsonConverter))] public global::tryAGI.OpenAI.CreateImageRequestModeration? Moderation { get; set; } /// @@ -132,7 +129,6 @@ public sealed partial class CreateImageRequest /// /// transparent [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestBackgroundJsonConverter))] public global::tryAGI.OpenAI.CreateImageRequestBackground? Background { get; set; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs index ac6a09126..fe22f1974 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs @@ -4,17 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Set the background of the generated image(s). This parameter is only supported for
- /// the GPT image models. Must be one of `transparent`, `opaque`, or `auto` (default
- /// value). When `auto` is used, the model will automatically determine the best
- /// background for the image.
- /// `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
- /// snapshots, support `opaque` and `transparent` backgrounds. Transparent backgrounds
- /// are available for supported GPT Image models. For `gpt-image-2` and
- /// `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
- /// set the output format to `png` or `webp`.
- /// Default Value: auto
- /// Example: transparent + /// ///
public enum CreateImageRequestBackground { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs index 5131391a5..b77bf8709 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs @@ -4,9 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
- /// Default Value: auto
- /// Example: low + /// ///
public enum CreateImageRequestModeration { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs index d9a8ce57c..142b6c78a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs @@ -4,9 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
- /// Default Value: png
- /// Example: png + /// ///
public enum CreateImageRequestOutputFormat { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs index 48ff9dabd..c798ee9c3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs @@ -4,14 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The quality of the image that will be generated.
- /// - `auto` (default value) will automatically select the best quality for the given
- /// model.
- /// - `high`, `medium` and `low` are supported for the GPT image models.
- /// - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
- /// snapshots, also support `xhigh` and `max`.
- /// Default Value: auto
- /// Example: medium + /// ///
public enum CreateImageRequestQuality { diff --git a/src/libs/tryAGI.OpenAI/openapi.yaml b/src/libs/tryAGI.OpenAI/openapi.yaml index 768ccaf92..667529a08 100644 --- a/src/libs/tryAGI.OpenAI/openapi.yaml +++ b/src/libs/tryAGI.OpenAI/openapi.yaml @@ -8687,15 +8687,24 @@ paths: name: metadata required: false schema: - type: object - nullable: true + type: + - object + - "null" additionalProperties: type: string style: deepObject explode: true description: > Optional metadata filter. To filter, use the syntax `metadata[k]=v`. - Alternatively, set `metadata=null` to indicate no metadata. + Omitting the parameter or passing an empty object applies no + metadata filter. An empty value, such as `metadata[k]=`, filters for + that key with an empty string value. + + To select jobs with null metadata, send the literal query string + `metadata=null`. Nullable caller types do not specify how a client + serializes null for a deep-object parameter. Use a raw query + parameter if the client omits null. Do not combine the two query + forms. responses: "200": description: OK @@ -43641,14 +43650,16 @@ components: max_completion_tokens: description: | An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). - type: integer - nullable: true + type: + - integer + - "null" frequency_penalty: - type: number + type: + - number + - "null" default: 0 minimum: -2 maximum: 2 - nullable: true description: > Number between -2.0 and 2.0. Positive values penalize new tokens based on @@ -43658,11 +43669,12 @@ components: likelihood to repeat the same line verbatim. presence_penalty: - type: number + type: + - number + - "null" default: 0 minimum: -2 maximum: 2 - nullable: true description: > Number between -2.0 and 2.0. Positive values penalize new tokens based on @@ -43679,8 +43691,9 @@ components: Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). properties: user_location: - type: object - nullable: true + type: + - object + - "null" required: - type - approximate @@ -43736,8 +43749,9 @@ components: discriminator: propertyName: type audio: - type: object - nullable: true + type: + - object + - "null" description: > Parameters for audio output. Required when audio output is requested with @@ -43782,9 +43796,10 @@ components: `opus`, or `pcm16`. store: - type: boolean + type: + - boolean + - "null" default: false - nullable: true description: | Whether or not to store the output of this chat completion request for use in our [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) or @@ -43805,16 +43820,18 @@ components: See the [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. - type: boolean - nullable: true + type: + - boolean + - "null" default: false stop: $ref: "#/components/schemas/StopConfiguration" logit_bias: - type: object + type: + - object + - "null" x-oaiTypeLabel: map default: null - nullable: true additionalProperties: type: integer description: > @@ -43848,9 +43865,10 @@ components: the `content` of `message`. - type: boolean + type: + - boolean + - "null" default: false - nullable: true max_tokens: description: | The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the @@ -43859,16 +43877,18 @@ components: This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o-series models](https://developers.openai.com/api/docs/guides/reasoning). - type: integer - nullable: true + type: + - integer + - "null" deprecated: true n: - type: integer + type: + - integer + - "null" minimum: 1 maximum: 128 default: 1 example: 1 - nullable: true description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to @@ -43883,11 +43903,12 @@ components: - $ref: "#/components/schemas/PredictionContent" - type: "null" seed: - type: integer + type: + - integer + - "null" format: int64 minimum: -9223372036854775808 maximum: 9223372036854775807 - nullable: true deprecated: true description: > This feature is in Beta. @@ -44361,11 +44382,12 @@ components: type: integer example: "[[1212, 318, 257, 1332, 13]]" best_of: - type: integer + type: + - integer + - "null" default: 1 minimum: 0 maximum: 20 - nullable: true description: > Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot @@ -44381,17 +44403,19 @@ components: quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. echo: - type: boolean + type: + - boolean + - "null" default: false - nullable: true description: | Echo back the prompt in addition to the completion frequency_penalty: - type: number + type: + - number + - "null" default: 0 minimum: -2 maximum: 2 - nullable: true description: > Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the @@ -44401,10 +44425,11 @@ components: [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: - type: object + type: + - object + - "null" x-oaiTypeLabel: map default: null - nullable: true additionalProperties: type: integer description: > @@ -44426,11 +44451,12 @@ components: As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. logprobs: - type: integer + type: + - integer + - "null" minimum: 0 maximum: 5 default: null - nullable: true description: > Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, @@ -44441,22 +44467,24 @@ components: The maximum value for `logprobs` is 5. max_tokens: - type: integer + type: + - integer + - "null" minimum: 0 default: 16 example: 16 - nullable: true description: | The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. n: - type: integer + type: + - integer + - "null" minimum: 1 maximum: 128 default: 1 example: 1 - nullable: true description: > How many completions to generate for each prompt. @@ -44465,11 +44493,12 @@ components: quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. presence_penalty: - type: number + type: + - number + - "null" default: 0 minimum: -2 maximum: 2 - nullable: true description: > Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the @@ -44479,9 +44508,10 @@ components: [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: - type: integer + type: + - integer + - "null" format: int64 - nullable: true description: > If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` @@ -44496,8 +44526,9 @@ components: stream: description: | Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). - type: boolean - nullable: true + type: + - boolean + - "null" default: false stream_options: $ref: "#/components/schemas/ChatCompletionStreamOptions" @@ -44507,16 +44538,18 @@ components: This parameter is only supported for `gpt-3.5-turbo-instruct`. default: null - nullable: true - type: string + type: + - string + - "null" example: test. temperature: - type: number + type: + - number + - "null" minimum: 0 maximum: 2 default: 1 example: 1 - nullable: true description: > What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like @@ -44525,12 +44558,13 @@ components: We generally recommend altering this or `top_p` but not both. top_p: - type: number + type: + - number + - "null" minimum: 0 maximum: 1 default: 1 example: 1 - nullable: true description: > An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with @@ -45557,11 +45591,12 @@ components: For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. - type: string + type: + - string + - "null" minLength: 1 maxLength: 64 default: null - nullable: true validation_file: description: | The ID of an uploaded file that contains validation data. @@ -45574,13 +45609,15 @@ components: Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. - type: string - nullable: true + type: + - string + - "null" example: file-abc123 integrations: - type: array + type: + - array + - "null" description: A list of integrations to enable for your fine-tuning job. - nullable: true items: type: object required: @@ -45620,8 +45657,9 @@ components: description: > A display name to set for the run. If not set, we will use the Job ID as the name. - nullable: true - type: string + type: + - string + - "null" entity: description: > The entity to use for the run. This allows you to set the @@ -45629,8 +45667,9 @@ components: like associated with the run. If not set, the default entity for the registered WandB API key is used. - nullable: true - type: string + type: + - string + - "null" tags: description: > A list of tags to be attached to the newly created run. @@ -45649,8 +45688,9 @@ components: may differ in rare cases. If a seed is not specified, one will be generated for you. - type: integer - nullable: true + type: + - integer + - "null" minimum: 0 maximum: 2147483647 example: 42 @@ -45736,14 +45776,15 @@ components: type: string format: binary background: - type: string - enum: - - transparent - - opaque - - auto + anyOf: + - type: string + enum: + - transparent + - opaque + - auto + - type: "null" default: auto example: transparent - nullable: true description: > Set the background of the generated image(s). This parameter is only supported for @@ -45797,12 +45838,13 @@ components: `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). n: - type: integer + type: + - integer + - "null" minimum: 1 maximum: 10 default: 1 example: 1 - nullable: true description: The number of images to generate. Must be between 1 and 10. size: anyOf: @@ -45822,9 +45864,9 @@ components: 512x512: message: This legacy size suggestion is retained for SDK compatibility. Check the selected GPT image model's supported sizes. + - type: "null" default: auto example: 1024x1024 - nullable: true description: The size of the generated images. Defaults to `auto`. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and @@ -45848,14 +45890,15 @@ components: Unsupported for GPT image models, which always return base64-encoded images. output_format: - type: string - enum: - - png - - jpeg - - webp + anyOf: + - type: string + enum: + - png + - jpeg + - webp + - type: "null" default: png example: png - nullable: true description: > The format in which the generated images are returned. This parameter is @@ -45865,10 +45908,11 @@ components: The default value is `png`. output_compression: - type: integer + type: + - integer + - "null" default: 100 example: 100 - nullable: true description: > The compression level (0-100%) for the generated images. This parameter @@ -45887,32 +45931,34 @@ components: - $ref: "#/components/schemas/InputFidelity" - type: "null" stream: - type: boolean + type: + - boolean + - "null" default: false example: false - nullable: true description: | Edit the image in streaming mode. Defaults to `false`. See the [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. partial_images: $ref: "#/components/schemas/PartialImages" quality: - type: string - enum: - - low - - medium - - high - - xhigh - - max - - auto - - standard - x-openai-enum-deprecations: - standard: - message: This quality was only supported by retired DALL·E models. Use a GPT - image quality instead. + anyOf: + - type: string + enum: + - low + - medium + - high + - xhigh + - max + - auto + - standard + x-openai-enum-deprecations: + standard: + message: This quality was only supported by retired DALL·E models. Use a GPT + image quality instead. + - type: "null" default: auto example: high - nullable: true description: > The quality of the image that will be generated for GPT image models. The GPT image models support `low`, `medium`, and `high`. @@ -45962,34 +46008,36 @@ components: `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`. n: - type: integer + type: + - integer + - "null" minimum: 1 maximum: 10 default: 1 example: 1 - nullable: true description: The number of images to generate. Must be between 1 and 10. quality: - type: string - enum: - - low - - medium - - high - - xhigh - - max - - auto - - standard - - hd - x-openai-enum-deprecations: - standard: - message: This quality was only supported by retired DALL·E models. Use a GPT - image quality instead. - hd: - message: This quality was only supported by retired DALL·E models. Use a GPT - image quality instead. + anyOf: + - type: string + enum: + - low + - medium + - high + - xhigh + - max + - auto + - standard + - hd + x-openai-enum-deprecations: + standard: + message: This quality was only supported by retired DALL·E models. Use a GPT + image quality instead. + hd: + message: This quality was only supported by retired DALL·E models. Use a GPT + image quality instead. + - type: "null" default: auto example: medium - nullable: true description: > The quality of the image that will be generated. @@ -46013,30 +46061,33 @@ components: Unsupported for GPT image models, which always return base64-encoded images. output_format: - type: string - enum: - - png - - jpeg - - webp + anyOf: + - type: string + enum: + - png + - jpeg + - webp + - type: "null" default: png example: png - nullable: true description: The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. output_compression: - type: integer + type: + - integer + - "null" default: 100 example: 100 - nullable: true description: The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100. stream: - type: boolean + type: + - boolean + - "null" default: false example: false - nullable: true description: | Generate the image in streaming mode. Defaults to `false`. See the [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. @@ -46069,9 +46120,9 @@ components: 1024x1792: message: This legacy size suggestion is retained for SDK compatibility. Check the selected GPT image model's supported sizes. + - type: "null" default: auto example: 1024x1024 - nullable: true description: The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and @@ -46085,25 +46136,27 @@ components: `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. moderation: - type: string - enum: - - low - - auto + anyOf: + - type: string + enum: + - low + - auto + - type: "null" default: auto example: low - nullable: true description: Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value). background: - type: string - enum: - - transparent - - opaque - - auto + anyOf: + - type: string + enum: + - transparent + - opaque + - auto + - type: "null" default: auto example: transparent - nullable: true description: > Set the background of the generated image(s). This parameter is only supported for @@ -46366,7 +46419,6 @@ components: available models [here](https://developers.openai.com/api/docs/guides/moderation). - nullable: false default: omni-moderation-latest example: omni-moderation-2024-09-26 anyOf: @@ -46931,8 +46983,8 @@ components: anyOf: - type: string - $ref: "#/components/schemas/AssistantSupportedModels" + - type: "null" x-oaiTypeLabel: string - nullable: true reasoning_effort: $ref: "#/components/schemas/ReasoningEffort" instructions: @@ -46940,25 +46992,29 @@ components: [instructions](https://developers.openai.com/api/docs/assistants/migration) of the assistant. This is useful for modifying the behavior on a per-run basis. - type: string - nullable: true + type: + - string + - "null" additional_instructions: description: Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. - type: string - nullable: true + type: + - string + - "null" additional_messages: description: Adds additional messages to the thread before creating the run. - type: array + type: + - array + - "null" items: $ref: "#/components/schemas/CreateMessageRequest" - nullable: true tools: description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - nullable: true - type: array + type: + - array + - "null" maxItems: 20 items: oneOf: @@ -46968,23 +47024,25 @@ components: metadata: $ref: "#/components/schemas/Metadata" temperature: - type: number + type: + - number + - "null" minimum: 0 maximum: 2 default: 1 example: 1 - nullable: true description: > What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: - type: number + type: + - number + - "null" minimum: 0 maximum: 1 default: 1 example: 1 - nullable: true description: > An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with @@ -46994,15 +47052,17 @@ components: We generally recommend altering this or temperature but not both. stream: - type: boolean - nullable: true + type: + - boolean + - "null" description: > If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. max_prompt_tokens: - type: integer - nullable: true + type: + - integer + - "null" description: > The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number @@ -47011,8 +47071,9 @@ components: with status `incomplete`. See `incomplete_details` for more info. minimum: 256 max_completion_tokens: - type: integer - nullable: true + type: + - integer + - "null" description: > The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the @@ -47213,18 +47274,20 @@ components: - gpt-3.5-turbo-1106 - gpt-3.5-turbo-0125 - gpt-3.5-turbo-16k-0613 + - type: "null" x-oaiTypeLabel: string - nullable: true instructions: description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. - type: string - nullable: true + type: + - string + - "null" tools: description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - nullable: true - type: array + type: + - array + - "null" maxItems: 20 items: oneOf: @@ -47232,7 +47295,9 @@ components: - $ref: "#/components/schemas/AssistantToolsFileSearch" - $ref: "#/components/schemas/AssistantToolsFunction" tool_resources: - type: object + type: + - object + - "null" description: > A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the @@ -47260,27 +47325,28 @@ components: maxItems: 1 items: type: string - nullable: true metadata: $ref: "#/components/schemas/Metadata" temperature: - type: number + type: + - number + - "null" minimum: 0 maximum: 2 default: 1 example: 1 - nullable: true description: > What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: - type: number + type: + - number + - "null" minimum: 0 maximum: 1 default: 1 example: 1 - nullable: true description: > An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with @@ -47290,15 +47356,17 @@ components: We generally recommend altering this or temperature but not both. stream: - type: boolean - nullable: true + type: + - boolean + - "null" description: > If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. max_prompt_tokens: - type: integer - nullable: true + type: + - integer + - "null" description: > The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number @@ -47307,8 +47375,9 @@ components: with status `incomplete`. See `incomplete_details` for more info. minimum: 256 max_completion_tokens: - type: integer - nullable: true + type: + - integer + - "null" description: > The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the @@ -75714,19 +75783,18 @@ components: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. default: null - nullable: true oneOf: - type: string default: <|endoftext|> example: |+ - nullable: true - type: array minItems: 1 maxItems: 4 items: type: string example: '["\n"]' + - type: "null" SubmitToolOutputsRunRequest: type: object additionalProperties: false @@ -76638,8 +76706,9 @@ components: properties: name: description: The name of the vector store. - type: string - nullable: true + type: + - string + - "null" expires_after: allOf: - $ref: "#/components/schemas/VectorStoreExpirationAfter"