openai 0.118.0 → 0.120.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +1 -1
- data/lib/openai/helpers/data_residency.rb +4 -1
- data/lib/openai/models/all_models.rb +2 -0
- data/lib/openai/models/beta/beta_compacted_response.rb +34 -1
- data/lib/openai/models/beta/beta_response.rb +37 -1
- data/lib/openai/models/beta/beta_response_input_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_output_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +186 -13
- data/lib/openai/models/beta/beta_responses_client_event.rb +51 -1
- data/lib/openai/models/beta/beta_tool.rb +164 -13
- data/lib/openai/models/beta/response_compact_params.rb +47 -1
- data/lib/openai/models/beta/response_create_params.rb +47 -1
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/conversations/conversation_item.rb +45 -1
- data/lib/openai/models/image_edit_params.rb +72 -16
- data/lib/openai/models/image_generate_params.rb +160 -8
- data/lib/openai/models/image_model.rb +2 -0
- data/lib/openai/models/images_response.rb +55 -4
- data/lib/openai/models/realtime/realtime_audio_config_input.rb +14 -1
- data/lib/openai/models/realtime/realtime_session_create_response.rb +14 -1
- data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +14 -1
- data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +14 -1
- data/lib/openai/models/responses/compacted_response.rb +37 -1
- data/lib/openai/models/responses/response.rb +34 -1
- data/lib/openai/models/responses/response_compact_params.rb +53 -1
- data/lib/openai/models/responses/response_create_params.rb +47 -1
- data/lib/openai/models/responses/response_input_item.rb +45 -1
- data/lib/openai/models/responses/response_item.rb +45 -1
- data/lib/openai/models/responses/response_output_item.rb +45 -1
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +186 -13
- data/lib/openai/models/responses/responses_client_event.rb +48 -1
- data/lib/openai/models/responses/tool.rb +164 -13
- data/lib/openai/models/responses_model.rb +2 -0
- data/lib/openai/resources/admin/organization/projects.rb +6 -6
- data/lib/openai/resources/admin/organization.rb +6 -6
- data/lib/openai/resources/beta/responses.rb +12 -3
- data/lib/openai/resources/images.rb +102 -18
- data/lib/openai/resources/responses.rb +12 -3
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/all_models.rbi +2 -0
- data/rbi/openai/models/beta/beta_compacted_response.rbi +67 -1
- data/rbi/openai/models/beta/beta_response.rbi +63 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_output_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +338 -13
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +109 -0
- data/rbi/openai/models/beta/beta_tool.rbi +245 -13
- data/rbi/openai/models/beta/response_compact_params.rbi +82 -0
- data/rbi/openai/models/beta/response_create_params.rbi +82 -0
- data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +84 -1
- data/rbi/openai/models/image_edit_params.rbi +76 -14
- data/rbi/openai/models/image_generate_params.rbi +218 -6
- data/rbi/openai/models/image_model.rbi +2 -0
- data/rbi/openai/models/images_response.rbi +90 -3
- data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_translation_session.rbi +19 -3
- data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +19 -3
- data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +19 -3
- data/rbi/openai/models/responses/compacted_response.rbi +67 -1
- data/rbi/openai/models/responses/response.rbi +62 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +89 -0
- data/rbi/openai/models/responses/response_create_params.rbi +87 -0
- data/rbi/openai/models/responses/response_input_item.rbi +82 -1
- data/rbi/openai/models/responses/response_item.rbi +82 -1
- data/rbi/openai/models/responses/response_output_item.rbi +82 -1
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +340 -13
- data/rbi/openai/models/responses/responses_client_event.rbi +105 -0
- data/rbi/openai/models/responses/tool.rbi +248 -13
- data/rbi/openai/models/responses_model.rbi +2 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +3 -3
- data/rbi/openai/resources/admin/organization.rbi +3 -3
- data/rbi/openai/resources/beta/responses.rbi +9 -0
- data/rbi/openai/resources/images.rbi +98 -14
- data/rbi/openai/resources/responses.rbi +11 -0
- data/sig/openai/models/all_models.rbs +4 -0
- data/sig/openai/models/beta/beta_compacted_response.rbs +42 -2
- data/sig/openai/models/beta/beta_response.rbs +42 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_output_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +188 -15
- data/sig/openai/models/beta/beta_responses_client_event.rbs +58 -0
- data/sig/openai/models/beta/beta_tool.rbs +188 -15
- data/sig/openai/models/beta/response_compact_params.rbs +58 -0
- data/sig/openai/models/beta/response_create_params.rbs +58 -0
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/conversations/conversation_item.rbs +51 -3
- data/sig/openai/models/image_edit_params.rbs +63 -12
- data/sig/openai/models/image_generate_params.rbs +150 -5
- data/sig/openai/models/image_model.rbs +4 -0
- data/sig/openai/models/images_response.rbs +59 -4
- data/sig/openai/models/realtime/realtime_audio_config_input.rbs +20 -1
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +20 -1
- data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +20 -1
- data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +20 -1
- data/sig/openai/models/realtime/realtime_translation_session.rbs +22 -3
- data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +22 -3
- data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +22 -3
- data/sig/openai/models/responses/compacted_response.rbs +42 -2
- data/sig/openai/models/responses/response.rbs +40 -0
- data/sig/openai/models/responses/response_compact_params.rbs +60 -0
- data/sig/openai/models/responses/response_create_params.rbs +56 -0
- data/sig/openai/models/responses/response_input_item.rbs +51 -3
- data/sig/openai/models/responses/response_item.rbs +51 -3
- data/sig/openai/models/responses/response_output_item.rbs +51 -3
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +188 -15
- data/sig/openai/models/responses/responses_client_event.rbs +56 -0
- data/sig/openai/models/responses/tool.rbs +188 -15
- data/sig/openai/models/responses_model.rbs +4 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -2
- data/sig/openai/resources/admin/organization.rbs +2 -2
- data/sig/openai/resources/beta/responses.rbs +3 -0
- data/sig/openai/resources/images.rbs +14 -0
- data/sig/openai/resources/responses.rbs +4 -0
- metadata +1 -1
|
@@ -755,6 +755,32 @@ module OpenAI
|
|
|
755
755
|
enum: -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Background }
|
|
756
756
|
)
|
|
757
757
|
|
|
758
|
+
# @!attribute complexity
|
|
759
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
760
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
761
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
762
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
763
|
+
# author's reasoning.
|
|
764
|
+
#
|
|
765
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Complexity, nil]
|
|
766
|
+
optional(
|
|
767
|
+
:complexity,
|
|
768
|
+
enum: -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Complexity }
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
# @!attribute frame_count
|
|
772
|
+
# Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
|
|
773
|
+
#
|
|
774
|
+
# @return [Integer, nil]
|
|
775
|
+
optional :frame_count, Integer
|
|
776
|
+
|
|
777
|
+
# @!attribute frame_duration_ms
|
|
778
|
+
# Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
|
|
779
|
+
# `output_format` to be `gif`. Default: 200.
|
|
780
|
+
#
|
|
781
|
+
# @return [Integer, nil]
|
|
782
|
+
optional :frame_duration_ms, Integer
|
|
783
|
+
|
|
758
784
|
# @!attribute input_fidelity
|
|
759
785
|
# Control how much effort the model will exert to match the style and features,
|
|
760
786
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -784,8 +810,8 @@ module OpenAI
|
|
|
784
810
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
785
811
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
786
812
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
787
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
788
|
-
# `gpt-image-2`.
|
|
813
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
814
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
789
815
|
#
|
|
790
816
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
791
817
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -812,8 +838,12 @@ module OpenAI
|
|
|
812
838
|
optional :output_compression, Integer
|
|
813
839
|
|
|
814
840
|
# @!attribute output_format
|
|
815
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
816
|
-
# Default: `png`.
|
|
841
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
842
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
843
|
+
# selected format. GIF output does not support partial image streaming
|
|
844
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
845
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
846
|
+
# output.
|
|
817
847
|
#
|
|
818
848
|
# @return [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::OutputFormat, nil]
|
|
819
849
|
optional(
|
|
@@ -858,7 +888,16 @@ module OpenAI
|
|
|
858
888
|
union: -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Size }
|
|
859
889
|
)
|
|
860
890
|
|
|
861
|
-
# @!
|
|
891
|
+
# @!attribute svg
|
|
892
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
893
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
894
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
895
|
+
# unavailable.
|
|
896
|
+
#
|
|
897
|
+
# @return [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg, nil]
|
|
898
|
+
optional :svg, -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg }
|
|
899
|
+
|
|
900
|
+
# @!method initialize(action: nil, background: nil, complexity: nil, frame_count: nil, frame_duration_ms: nil, input_fidelity: nil, input_image_mask: nil, model: nil, moderation: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, size: nil, svg: nil, type: :image_generation)
|
|
862
901
|
# A tool that generates images using the GPT image models.
|
|
863
902
|
#
|
|
864
903
|
# @param action [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Action]
|
|
@@ -875,6 +914,20 @@ module OpenAI
|
|
|
875
914
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
876
915
|
# set the output format to `png` or `webp`.
|
|
877
916
|
#
|
|
917
|
+
# @param complexity [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Complexity]
|
|
918
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
919
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
920
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
921
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
922
|
+
# author's reasoning.
|
|
923
|
+
#
|
|
924
|
+
# @param frame_count [Integer]
|
|
925
|
+
# Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
|
|
926
|
+
#
|
|
927
|
+
# @param frame_duration_ms [Integer]
|
|
928
|
+
# Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
|
|
929
|
+
# `output_format` to be `gif`. Default: 200.
|
|
930
|
+
#
|
|
878
931
|
# @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputFidelity, nil]
|
|
879
932
|
# Control how much effort the model will exert to match the style and features,
|
|
880
933
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -889,8 +942,8 @@ module OpenAI
|
|
|
889
942
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
890
943
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
891
944
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
892
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
893
|
-
# `gpt-image-2`.
|
|
945
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
946
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
894
947
|
#
|
|
895
948
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
896
949
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -902,8 +955,12 @@ module OpenAI
|
|
|
902
955
|
# Compression level for the output image. Default: 100.
|
|
903
956
|
#
|
|
904
957
|
# @param output_format [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::OutputFormat]
|
|
905
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
906
|
-
# Default: `png`.
|
|
958
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
959
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
960
|
+
# selected format. GIF output does not support partial image streaming
|
|
961
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
962
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
963
|
+
# output.
|
|
907
964
|
#
|
|
908
965
|
# @param partial_images [Integer]
|
|
909
966
|
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
@@ -927,6 +984,12 @@ module OpenAI
|
|
|
927
984
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
928
985
|
# `auto` is supported for models that allow automatic sizing.
|
|
929
986
|
#
|
|
987
|
+
# @param svg [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg]
|
|
988
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
989
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
990
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
991
|
+
# unavailable.
|
|
992
|
+
#
|
|
930
993
|
# @param type [Symbol, :image_generation]
|
|
931
994
|
# The type of the image generation tool. Always `image_generation`.
|
|
932
995
|
|
|
@@ -966,6 +1029,24 @@ module OpenAI
|
|
|
966
1029
|
# @return [Array<Symbol>]
|
|
967
1030
|
end
|
|
968
1031
|
|
|
1032
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
1033
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
1034
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
1035
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
1036
|
+
# author's reasoning.
|
|
1037
|
+
#
|
|
1038
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration#complexity
|
|
1039
|
+
module Complexity
|
|
1040
|
+
extend OpenAI::Internal::Type::Enum
|
|
1041
|
+
|
|
1042
|
+
LOW = :low
|
|
1043
|
+
MEDIUM = :medium
|
|
1044
|
+
HIGH = :high
|
|
1045
|
+
|
|
1046
|
+
# @!method self.values
|
|
1047
|
+
# @return [Array<Symbol>]
|
|
1048
|
+
end
|
|
1049
|
+
|
|
969
1050
|
# Control how much effort the model will exert to match the style and features,
|
|
970
1051
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
971
1052
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -1010,8 +1091,8 @@ module OpenAI
|
|
|
1010
1091
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
1011
1092
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
1012
1093
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
1013
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
1014
|
-
# `gpt-image-2`.
|
|
1094
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
1095
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
1015
1096
|
#
|
|
1016
1097
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
1017
1098
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -1070,6 +1151,18 @@ module OpenAI
|
|
|
1070
1151
|
}
|
|
1071
1152
|
)
|
|
1072
1153
|
|
|
1154
|
+
variant(
|
|
1155
|
+
const: -> {
|
|
1156
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Model::GPT_IMAGE_2_6_SUNBURST
|
|
1157
|
+
}
|
|
1158
|
+
)
|
|
1159
|
+
|
|
1160
|
+
variant(
|
|
1161
|
+
const: -> {
|
|
1162
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Model::GPT_IMAGE_2_6_FLARE
|
|
1163
|
+
}
|
|
1164
|
+
)
|
|
1165
|
+
|
|
1073
1166
|
variant(
|
|
1074
1167
|
const: -> {
|
|
1075
1168
|
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Model::GPT_IMAGE_1_5
|
|
@@ -1106,6 +1199,8 @@ module OpenAI
|
|
|
1106
1199
|
GPT_IMAGE_2_5_SUNBURST_2026_09_08 = :"gpt-image-2.5-sunburst-2026-09-08"
|
|
1107
1200
|
GPT_IMAGE_2_5_FLARE = :"gpt-image-2.5-flare"
|
|
1108
1201
|
GPT_IMAGE_2_5_FLARE_2026_09_08 = :"gpt-image-2.5-flare-2026-09-08"
|
|
1202
|
+
GPT_IMAGE_2_6_SUNBURST = :"gpt-image-2.6-sunburst"
|
|
1203
|
+
GPT_IMAGE_2_6_FLARE = :"gpt-image-2.6-flare"
|
|
1109
1204
|
GPT_IMAGE_1_5 = :"gpt-image-1.5"
|
|
1110
1205
|
CHATGPT_IMAGE_LATEST = :"chatgpt-image-latest"
|
|
1111
1206
|
|
|
@@ -1125,8 +1220,12 @@ module OpenAI
|
|
|
1125
1220
|
# @return [Array<Symbol>]
|
|
1126
1221
|
end
|
|
1127
1222
|
|
|
1128
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
1129
|
-
# Default: `png`.
|
|
1223
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
1224
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
1225
|
+
# selected format. GIF output does not support partial image streaming
|
|
1226
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
1227
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
1228
|
+
# output.
|
|
1130
1229
|
#
|
|
1131
1230
|
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration#output_format
|
|
1132
1231
|
module OutputFormat
|
|
@@ -1135,6 +1234,8 @@ module OpenAI
|
|
|
1135
1234
|
PNG = :png
|
|
1136
1235
|
WEBP = :webp
|
|
1137
1236
|
JPEG = :jpeg
|
|
1237
|
+
GIF = :gif
|
|
1238
|
+
SVG = :svg
|
|
1138
1239
|
|
|
1139
1240
|
# @!method self.values
|
|
1140
1241
|
# @return [Array<Symbol>]
|
|
@@ -1222,6 +1323,78 @@ module OpenAI
|
|
|
1222
1323
|
|
|
1223
1324
|
# @!endgroup
|
|
1224
1325
|
end
|
|
1326
|
+
|
|
1327
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration#svg
|
|
1328
|
+
class Svg < OpenAI::Internal::Type::BaseModel
|
|
1329
|
+
# @!attribute model
|
|
1330
|
+
#
|
|
1331
|
+
# @return [String, nil]
|
|
1332
|
+
optional :model, String
|
|
1333
|
+
|
|
1334
|
+
# @!attribute reasoning
|
|
1335
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1336
|
+
# default in both Images and Responses.
|
|
1337
|
+
#
|
|
1338
|
+
# @return [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning, nil]
|
|
1339
|
+
optional(
|
|
1340
|
+
:reasoning,
|
|
1341
|
+
-> {
|
|
1342
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning
|
|
1343
|
+
},
|
|
1344
|
+
nil?: true
|
|
1345
|
+
)
|
|
1346
|
+
|
|
1347
|
+
# @!method initialize(model: nil, reasoning: nil)
|
|
1348
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
1349
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
1350
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
1351
|
+
# unavailable.
|
|
1352
|
+
#
|
|
1353
|
+
# @param model [String]
|
|
1354
|
+
#
|
|
1355
|
+
# @param reasoning [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning, nil]
|
|
1356
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1357
|
+
# default in both Images and Responses.
|
|
1358
|
+
|
|
1359
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg#reasoning
|
|
1360
|
+
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1361
|
+
# @!attribute effort
|
|
1362
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1363
|
+
#
|
|
1364
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning::Effort, nil]
|
|
1365
|
+
optional(
|
|
1366
|
+
:effort,
|
|
1367
|
+
enum: -> {
|
|
1368
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning::Effort
|
|
1369
|
+
}
|
|
1370
|
+
)
|
|
1371
|
+
|
|
1372
|
+
# @!method initialize(effort: nil)
|
|
1373
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1374
|
+
# default in both Images and Responses.
|
|
1375
|
+
#
|
|
1376
|
+
# @param effort [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning::Effort]
|
|
1377
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1378
|
+
|
|
1379
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1380
|
+
#
|
|
1381
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning#effort
|
|
1382
|
+
module Effort
|
|
1383
|
+
extend OpenAI::Internal::Type::Enum
|
|
1384
|
+
|
|
1385
|
+
NONE = :none
|
|
1386
|
+
MINIMAL = :minimal
|
|
1387
|
+
LOW = :low
|
|
1388
|
+
MEDIUM = :medium
|
|
1389
|
+
HIGH = :high
|
|
1390
|
+
XHIGH = :xhigh
|
|
1391
|
+
MAX = :max
|
|
1392
|
+
|
|
1393
|
+
# @!method self.values
|
|
1394
|
+
# @return [Array<Symbol>]
|
|
1395
|
+
end
|
|
1396
|
+
end
|
|
1397
|
+
end
|
|
1225
1398
|
end
|
|
1226
1399
|
|
|
1227
1400
|
class LocalShell < OpenAI::Internal::Type::BaseModel
|
|
@@ -107,6 +107,12 @@ module OpenAI
|
|
|
107
107
|
# @return [Boolean, nil]
|
|
108
108
|
optional :generate, OpenAI::Internal::Type::Boolean
|
|
109
109
|
|
|
110
|
+
# @!attribute image
|
|
111
|
+
# Request level image options.
|
|
112
|
+
#
|
|
113
|
+
# @return [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image, nil]
|
|
114
|
+
optional :image, -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Image }
|
|
115
|
+
|
|
110
116
|
# @!attribute include
|
|
111
117
|
# Specify additional output data to include in the model response. Currently
|
|
112
118
|
# supported values are:
|
|
@@ -490,7 +496,7 @@ module OpenAI
|
|
|
490
496
|
# @return [String, nil]
|
|
491
497
|
optional :user, String
|
|
492
498
|
|
|
493
|
-
# @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, generate: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
|
|
499
|
+
# @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, generate: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
|
|
494
500
|
# Client event for creating a response over a persistent WebSocket connection.
|
|
495
501
|
# This payload uses the same top-level fields as `POST /v1/responses`, plus
|
|
496
502
|
# WebSocket-only envelope metadata.
|
|
@@ -522,6 +528,9 @@ module OpenAI
|
|
|
522
528
|
# to false to prepare request state without model output; the response ID can be
|
|
523
529
|
# used as previous_response_id on a later turn.
|
|
524
530
|
#
|
|
531
|
+
# @param image [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image]
|
|
532
|
+
# Request level image options.
|
|
533
|
+
#
|
|
525
534
|
# @param include [Array<Symbol, OpenAI::Models::Beta::BetaResponseIncludable>, nil]
|
|
526
535
|
# Specify additional output data to include in the model response. Currently
|
|
527
536
|
# supported values are:
|
|
@@ -874,6 +883,44 @@ module OpenAI
|
|
|
874
883
|
# @return [Array(String, OpenAI::Models::Beta::BetaResponseConversationParam)]
|
|
875
884
|
end
|
|
876
885
|
|
|
886
|
+
# @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#image
|
|
887
|
+
class Image < OpenAI::Internal::Type::BaseModel
|
|
888
|
+
# @!attribute context_compression
|
|
889
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
890
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
891
|
+
# support or `disabled` to turn it off.
|
|
892
|
+
#
|
|
893
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image::ContextCompression, nil]
|
|
894
|
+
optional(
|
|
895
|
+
:context_compression,
|
|
896
|
+
enum: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Image::ContextCompression }
|
|
897
|
+
)
|
|
898
|
+
|
|
899
|
+
# @!method initialize(context_compression: nil)
|
|
900
|
+
# Request level image options.
|
|
901
|
+
#
|
|
902
|
+
# @param context_compression [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image::ContextCompression]
|
|
903
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
904
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
905
|
+
# support or `disabled` to turn it off.
|
|
906
|
+
|
|
907
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
908
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
909
|
+
# support or `disabled` to turn it off.
|
|
910
|
+
#
|
|
911
|
+
# @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image#context_compression
|
|
912
|
+
module ContextCompression
|
|
913
|
+
extend OpenAI::Internal::Type::Enum
|
|
914
|
+
|
|
915
|
+
AUTO = :auto
|
|
916
|
+
ENABLED = :enabled
|
|
917
|
+
DISABLED = :disabled
|
|
918
|
+
|
|
919
|
+
# @!method self.values
|
|
920
|
+
# @return [Array<Symbol>]
|
|
921
|
+
end
|
|
922
|
+
end
|
|
923
|
+
|
|
877
924
|
# Text, image, or file inputs to the model, used to generate a response.
|
|
878
925
|
#
|
|
879
926
|
# Learn more:
|
|
@@ -1306,6 +1353,8 @@ module OpenAI
|
|
|
1306
1353
|
|
|
1307
1354
|
variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_5_6_CYBER }
|
|
1308
1355
|
|
|
1356
|
+
variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_CYBER }
|
|
1357
|
+
|
|
1309
1358
|
variant(
|
|
1310
1359
|
const: -> {
|
|
1311
1360
|
OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_ROSALIND_RESEARCH
|
|
@@ -1693,6 +1742,7 @@ module OpenAI
|
|
|
1693
1742
|
GPT_DAYBREAK_BLUE_LATEST = :"gpt-daybreak-blue-latest"
|
|
1694
1743
|
GPT_DAYBREAK_RED_LATEST = :"gpt-daybreak-red-latest"
|
|
1695
1744
|
GPT_5_6_CYBER = :"gpt-5.6-cyber"
|
|
1745
|
+
GPT_6_CYBER = :"gpt-6-cyber"
|
|
1696
1746
|
GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
|
|
1697
1747
|
|
|
1698
1748
|
# @!endgroup
|
|
@@ -631,6 +631,29 @@ module OpenAI
|
|
|
631
631
|
# @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Background, nil]
|
|
632
632
|
optional :background, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::Background }
|
|
633
633
|
|
|
634
|
+
# @!attribute complexity
|
|
635
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
636
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
637
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
638
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
639
|
+
# author's reasoning.
|
|
640
|
+
#
|
|
641
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Complexity, nil]
|
|
642
|
+
optional :complexity, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::Complexity }
|
|
643
|
+
|
|
644
|
+
# @!attribute frame_count
|
|
645
|
+
# Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
|
|
646
|
+
#
|
|
647
|
+
# @return [Integer, nil]
|
|
648
|
+
optional :frame_count, Integer
|
|
649
|
+
|
|
650
|
+
# @!attribute frame_duration_ms
|
|
651
|
+
# Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
|
|
652
|
+
# `output_format` to be `gif`. Default: 200.
|
|
653
|
+
#
|
|
654
|
+
# @return [Integer, nil]
|
|
655
|
+
optional :frame_duration_ms, Integer
|
|
656
|
+
|
|
634
657
|
# @!attribute input_fidelity
|
|
635
658
|
# Control how much effort the model will exert to match the style and features,
|
|
636
659
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -657,8 +680,8 @@ module OpenAI
|
|
|
657
680
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
658
681
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
659
682
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
660
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
661
|
-
# `gpt-image-2`.
|
|
683
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
684
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
662
685
|
#
|
|
663
686
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
664
687
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -679,8 +702,12 @@ module OpenAI
|
|
|
679
702
|
optional :output_compression, Integer
|
|
680
703
|
|
|
681
704
|
# @!attribute output_format
|
|
682
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
683
|
-
# Default: `png`.
|
|
705
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
706
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
707
|
+
# selected format. GIF output does not support partial image streaming
|
|
708
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
709
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
710
|
+
# output.
|
|
684
711
|
#
|
|
685
712
|
# @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::OutputFormat, nil]
|
|
686
713
|
optional :output_format, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat }
|
|
@@ -716,7 +743,16 @@ module OpenAI
|
|
|
716
743
|
# @return [String, Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Size, nil]
|
|
717
744
|
optional :size, union: -> { OpenAI::Beta::BetaTool::ImageGeneration::Size }
|
|
718
745
|
|
|
719
|
-
# @!
|
|
746
|
+
# @!attribute svg
|
|
747
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
748
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
749
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
750
|
+
# unavailable.
|
|
751
|
+
#
|
|
752
|
+
# @return [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg, nil]
|
|
753
|
+
optional :svg, -> { OpenAI::Beta::BetaTool::ImageGeneration::Svg }
|
|
754
|
+
|
|
755
|
+
# @!method initialize(action: nil, background: nil, complexity: nil, frame_count: nil, frame_duration_ms: nil, input_fidelity: nil, input_image_mask: nil, model: nil, moderation: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, size: nil, svg: nil, type: :image_generation)
|
|
720
756
|
# A tool that generates images using the GPT image models.
|
|
721
757
|
#
|
|
722
758
|
# @param action [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Action]
|
|
@@ -733,6 +769,20 @@ module OpenAI
|
|
|
733
769
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
734
770
|
# set the output format to `png` or `webp`.
|
|
735
771
|
#
|
|
772
|
+
# @param complexity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Complexity]
|
|
773
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
774
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
775
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
776
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
777
|
+
# author's reasoning.
|
|
778
|
+
#
|
|
779
|
+
# @param frame_count [Integer]
|
|
780
|
+
# Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
|
|
781
|
+
#
|
|
782
|
+
# @param frame_duration_ms [Integer]
|
|
783
|
+
# Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
|
|
784
|
+
# `output_format` to be `gif`. Default: 200.
|
|
785
|
+
#
|
|
736
786
|
# @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil]
|
|
737
787
|
# Control how much effort the model will exert to match the style and features,
|
|
738
788
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -747,8 +797,8 @@ module OpenAI
|
|
|
747
797
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
748
798
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
749
799
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
750
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
751
|
-
# `gpt-image-2`.
|
|
800
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
801
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
752
802
|
#
|
|
753
803
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
754
804
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -760,8 +810,12 @@ module OpenAI
|
|
|
760
810
|
# Compression level for the output image. Default: 100.
|
|
761
811
|
#
|
|
762
812
|
# @param output_format [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::OutputFormat]
|
|
763
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
764
|
-
# Default: `png`.
|
|
813
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
814
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
815
|
+
# selected format. GIF output does not support partial image streaming
|
|
816
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
817
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
818
|
+
# output.
|
|
765
819
|
#
|
|
766
820
|
# @param partial_images [Integer]
|
|
767
821
|
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
@@ -785,6 +839,12 @@ module OpenAI
|
|
|
785
839
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
786
840
|
# `auto` is supported for models that allow automatic sizing.
|
|
787
841
|
#
|
|
842
|
+
# @param svg [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg]
|
|
843
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
844
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
845
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
846
|
+
# unavailable.
|
|
847
|
+
#
|
|
788
848
|
# @param type [Symbol, :image_generation]
|
|
789
849
|
# The type of the image generation tool. Always `image_generation`.
|
|
790
850
|
|
|
@@ -824,6 +884,24 @@ module OpenAI
|
|
|
824
884
|
# @return [Array<Symbol>]
|
|
825
885
|
end
|
|
826
886
|
|
|
887
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
888
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
889
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
890
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
891
|
+
# author's reasoning.
|
|
892
|
+
#
|
|
893
|
+
# @see OpenAI::Models::Beta::BetaTool::ImageGeneration#complexity
|
|
894
|
+
module Complexity
|
|
895
|
+
extend OpenAI::Internal::Type::Enum
|
|
896
|
+
|
|
897
|
+
LOW = :low
|
|
898
|
+
MEDIUM = :medium
|
|
899
|
+
HIGH = :high
|
|
900
|
+
|
|
901
|
+
# @!method self.values
|
|
902
|
+
# @return [Array<Symbol>]
|
|
903
|
+
end
|
|
904
|
+
|
|
827
905
|
# Control how much effort the model will exert to match the style and features,
|
|
828
906
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
829
907
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -868,8 +946,8 @@ module OpenAI
|
|
|
868
946
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
869
947
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
870
948
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
871
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
872
|
-
# `gpt-image-2`.
|
|
949
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
950
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
873
951
|
#
|
|
874
952
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
875
953
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -900,6 +978,10 @@ module OpenAI
|
|
|
900
978
|
const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_2_5_FLARE_2026_09_08 }
|
|
901
979
|
)
|
|
902
980
|
|
|
981
|
+
variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_2_6_SUNBURST }
|
|
982
|
+
|
|
983
|
+
variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_2_6_FLARE }
|
|
984
|
+
|
|
903
985
|
variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_1_5 }
|
|
904
986
|
|
|
905
987
|
variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::CHATGPT_IMAGE_LATEST }
|
|
@@ -923,6 +1005,8 @@ module OpenAI
|
|
|
923
1005
|
GPT_IMAGE_2_5_SUNBURST_2026_09_08 = :"gpt-image-2.5-sunburst-2026-09-08"
|
|
924
1006
|
GPT_IMAGE_2_5_FLARE = :"gpt-image-2.5-flare"
|
|
925
1007
|
GPT_IMAGE_2_5_FLARE_2026_09_08 = :"gpt-image-2.5-flare-2026-09-08"
|
|
1008
|
+
GPT_IMAGE_2_6_SUNBURST = :"gpt-image-2.6-sunburst"
|
|
1009
|
+
GPT_IMAGE_2_6_FLARE = :"gpt-image-2.6-flare"
|
|
926
1010
|
GPT_IMAGE_1_5 = :"gpt-image-1.5"
|
|
927
1011
|
CHATGPT_IMAGE_LATEST = :"chatgpt-image-latest"
|
|
928
1012
|
|
|
@@ -942,8 +1026,12 @@ module OpenAI
|
|
|
942
1026
|
# @return [Array<Symbol>]
|
|
943
1027
|
end
|
|
944
1028
|
|
|
945
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
946
|
-
# Default: `png`.
|
|
1029
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
1030
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
1031
|
+
# selected format. GIF output does not support partial image streaming
|
|
1032
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
1033
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
1034
|
+
# output.
|
|
947
1035
|
#
|
|
948
1036
|
# @see OpenAI::Models::Beta::BetaTool::ImageGeneration#output_format
|
|
949
1037
|
module OutputFormat
|
|
@@ -952,6 +1040,8 @@ module OpenAI
|
|
|
952
1040
|
PNG = :png
|
|
953
1041
|
WEBP = :webp
|
|
954
1042
|
JPEG = :jpeg
|
|
1043
|
+
GIF = :gif
|
|
1044
|
+
SVG = :svg
|
|
955
1045
|
|
|
956
1046
|
# @!method self.values
|
|
957
1047
|
# @return [Array<Symbol>]
|
|
@@ -1018,6 +1108,67 @@ module OpenAI
|
|
|
1018
1108
|
|
|
1019
1109
|
# @!endgroup
|
|
1020
1110
|
end
|
|
1111
|
+
|
|
1112
|
+
# @see OpenAI::Models::Beta::BetaTool::ImageGeneration#svg
|
|
1113
|
+
class Svg < OpenAI::Internal::Type::BaseModel
|
|
1114
|
+
# @!attribute model
|
|
1115
|
+
#
|
|
1116
|
+
# @return [String, nil]
|
|
1117
|
+
optional :model, String
|
|
1118
|
+
|
|
1119
|
+
# @!attribute reasoning
|
|
1120
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1121
|
+
# default in both Images and Responses.
|
|
1122
|
+
#
|
|
1123
|
+
# @return [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning, nil]
|
|
1124
|
+
optional :reasoning, -> { OpenAI::Beta::BetaTool::ImageGeneration::Svg::Reasoning }, nil?: true
|
|
1125
|
+
|
|
1126
|
+
# @!method initialize(model: nil, reasoning: nil)
|
|
1127
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
1128
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
1129
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
1130
|
+
# unavailable.
|
|
1131
|
+
#
|
|
1132
|
+
# @param model [String]
|
|
1133
|
+
#
|
|
1134
|
+
# @param reasoning [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning, nil]
|
|
1135
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1136
|
+
# default in both Images and Responses.
|
|
1137
|
+
|
|
1138
|
+
# @see OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg#reasoning
|
|
1139
|
+
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1140
|
+
# @!attribute effort
|
|
1141
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1142
|
+
#
|
|
1143
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning::Effort, nil]
|
|
1144
|
+
optional :effort, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::Svg::Reasoning::Effort }
|
|
1145
|
+
|
|
1146
|
+
# @!method initialize(effort: nil)
|
|
1147
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1148
|
+
# default in both Images and Responses.
|
|
1149
|
+
#
|
|
1150
|
+
# @param effort [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning::Effort]
|
|
1151
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1152
|
+
|
|
1153
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1154
|
+
#
|
|
1155
|
+
# @see OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning#effort
|
|
1156
|
+
module Effort
|
|
1157
|
+
extend OpenAI::Internal::Type::Enum
|
|
1158
|
+
|
|
1159
|
+
NONE = :none
|
|
1160
|
+
MINIMAL = :minimal
|
|
1161
|
+
LOW = :low
|
|
1162
|
+
MEDIUM = :medium
|
|
1163
|
+
HIGH = :high
|
|
1164
|
+
XHIGH = :xhigh
|
|
1165
|
+
MAX = :max
|
|
1166
|
+
|
|
1167
|
+
# @!method self.values
|
|
1168
|
+
# @return [Array<Symbol>]
|
|
1169
|
+
end
|
|
1170
|
+
end
|
|
1171
|
+
end
|
|
1021
1172
|
end
|
|
1022
1173
|
|
|
1023
1174
|
class LocalShell < OpenAI::Internal::Type::BaseModel
|