openai 0.118.0 → 0.119.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 +10 -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 +1 -0
- data/lib/openai/models/beta/beta_compacted_response.rb +34 -1
- data/lib/openai/models/beta/beta_response.rb +34 -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 +48 -1
- data/lib/openai/models/beta/beta_tool.rb +164 -13
- data/lib/openai/models/beta/response_compact_params.rb +44 -1
- data/lib/openai/models/beta/response_create_params.rb +44 -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 +50 -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 +1 -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 +1 -0
- data/rbi/openai/models/beta/beta_compacted_response.rbi +67 -1
- data/rbi/openai/models/beta/beta_response.rbi +62 -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 +105 -0
- data/rbi/openai/models/beta/beta_tool.rbi +245 -13
- data/rbi/openai/models/beta/response_compact_params.rbi +81 -0
- data/rbi/openai/models/beta/response_create_params.rbi +81 -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 +88 -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 +1 -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 +2 -0
- data/sig/openai/models/beta/beta_compacted_response.rbs +42 -2
- data/sig/openai/models/beta/beta_response.rbs +40 -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 +56 -0
- data/sig/openai/models/beta/beta_tool.rbs +188 -15
- data/sig/openai/models/beta/response_compact_params.rbs +56 -0
- data/sig/openai/models/beta/response_create_params.rbs +56 -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 +58 -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 +2 -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
|
@@ -111,6 +111,14 @@ module OpenAI
|
|
|
111
111
|
sig { returns(T.nilable(OpenAI::Conversations::ConversationItem::ImageGenerationCall::Size::Variants)) }
|
|
112
112
|
attr_accessor :size
|
|
113
113
|
|
|
114
|
+
sig { returns(T.nilable(OpenAI::Conversations::ConversationItem::ImageGenerationCall::SvgUsage)) }
|
|
115
|
+
attr_reader :svg_usage
|
|
116
|
+
|
|
117
|
+
sig {
|
|
118
|
+
params(svg_usage: OpenAI::Conversations::ConversationItem::ImageGenerationCall::SvgUsage::OrHash).void
|
|
119
|
+
}
|
|
120
|
+
attr_writer :svg_usage
|
|
121
|
+
|
|
114
122
|
# An image generation request made by the model.
|
|
115
123
|
sig do
|
|
116
124
|
params(
|
|
@@ -139,6 +147,8 @@ module OpenAI
|
|
|
139
147
|
T.any(String, OpenAI::Conversations::ConversationItem::ImageGenerationCall::Size::OrSymbol)
|
|
140
148
|
),
|
|
141
149
|
|
|
150
|
+
svg_usage: OpenAI::Conversations::ConversationItem::ImageGenerationCall::SvgUsage::OrHash,
|
|
151
|
+
|
|
142
152
|
type: Symbol
|
|
143
153
|
)
|
|
144
154
|
.returns(T.attached_class)
|
|
@@ -176,6 +186,8 @@ module OpenAI
|
|
|
176
186
|
# The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
177
187
|
size: nil,
|
|
178
188
|
|
|
189
|
+
svg_usage: nil,
|
|
190
|
+
|
|
179
191
|
# The type of the image generation call. Always `image_generation_call`.
|
|
180
192
|
|
|
181
193
|
type: :image_generation_call
|
|
@@ -199,7 +211,8 @@ module OpenAI
|
|
|
199
211
|
),
|
|
200
212
|
quality: T.nilable(OpenAI::Conversations::ConversationItem::ImageGenerationCall::Quality::TaggedSymbol),
|
|
201
213
|
revised_prompt: T.nilable(String),
|
|
202
|
-
size: T.nilable(OpenAI::Conversations::ConversationItem::ImageGenerationCall::Size::Variants)
|
|
214
|
+
size: T.nilable(OpenAI::Conversations::ConversationItem::ImageGenerationCall::Size::Variants),
|
|
215
|
+
svg_usage: OpenAI::Conversations::ConversationItem::ImageGenerationCall::SvgUsage
|
|
203
216
|
}
|
|
204
217
|
)
|
|
205
218
|
end
|
|
@@ -487,6 +500,8 @@ module OpenAI
|
|
|
487
500
|
:jpeg,
|
|
488
501
|
OpenAI::Conversations::ConversationItem::ImageGenerationCall::OutputFormat::TaggedSymbol
|
|
489
502
|
)
|
|
503
|
+
GIF = T.let(:gif, OpenAI::Conversations::ConversationItem::ImageGenerationCall::OutputFormat::TaggedSymbol)
|
|
504
|
+
SVG = T.let(:svg, OpenAI::Conversations::ConversationItem::ImageGenerationCall::OutputFormat::TaggedSymbol)
|
|
490
505
|
|
|
491
506
|
sig {
|
|
492
507
|
override.returns(
|
|
@@ -557,6 +572,74 @@ module OpenAI
|
|
|
557
572
|
)
|
|
558
573
|
|
|
559
574
|
end
|
|
575
|
+
|
|
576
|
+
class SvgUsage < OpenAI::Internal::Type::BaseModel
|
|
577
|
+
OrHash = T.type_alias do
|
|
578
|
+
T.any(
|
|
579
|
+
OpenAI::Conversations::ConversationItem::ImageGenerationCall::SvgUsage,
|
|
580
|
+
OpenAI::Internal::AnyHash
|
|
581
|
+
)
|
|
582
|
+
end
|
|
583
|
+
|
|
584
|
+
sig { returns(Integer) }
|
|
585
|
+
attr_accessor :input_tokens
|
|
586
|
+
|
|
587
|
+
sig { returns(String) }
|
|
588
|
+
attr_accessor :model
|
|
589
|
+
|
|
590
|
+
sig { returns(Integer) }
|
|
591
|
+
attr_accessor :output_tokens
|
|
592
|
+
|
|
593
|
+
sig { returns(Integer) }
|
|
594
|
+
attr_accessor :reasoning_tokens
|
|
595
|
+
|
|
596
|
+
sig { returns(Integer) }
|
|
597
|
+
attr_accessor :total_tokens
|
|
598
|
+
|
|
599
|
+
sig do
|
|
600
|
+
params(
|
|
601
|
+
|
|
602
|
+
input_tokens: Integer,
|
|
603
|
+
|
|
604
|
+
model: String,
|
|
605
|
+
|
|
606
|
+
output_tokens: Integer,
|
|
607
|
+
|
|
608
|
+
reasoning_tokens: Integer,
|
|
609
|
+
|
|
610
|
+
total_tokens: Integer
|
|
611
|
+
)
|
|
612
|
+
.returns(T.attached_class)
|
|
613
|
+
end
|
|
614
|
+
def self.new(
|
|
615
|
+
|
|
616
|
+
input_tokens:,
|
|
617
|
+
|
|
618
|
+
model:,
|
|
619
|
+
|
|
620
|
+
output_tokens:,
|
|
621
|
+
|
|
622
|
+
reasoning_tokens:,
|
|
623
|
+
|
|
624
|
+
total_tokens:
|
|
625
|
+
)
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
sig do
|
|
629
|
+
override.returns(
|
|
630
|
+
{
|
|
631
|
+
input_tokens: Integer,
|
|
632
|
+
model: String,
|
|
633
|
+
output_tokens: Integer,
|
|
634
|
+
reasoning_tokens: Integer,
|
|
635
|
+
total_tokens: Integer
|
|
636
|
+
}
|
|
637
|
+
)
|
|
638
|
+
end
|
|
639
|
+
def to_hash
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
end
|
|
560
643
|
end
|
|
561
644
|
|
|
562
645
|
class AdditionalTools < OpenAI::Internal::Type::BaseModel
|
|
@@ -47,6 +47,26 @@ module OpenAI
|
|
|
47
47
|
sig { returns(T.nilable(OpenAI::ImageEditParams::Background::OrSymbol)) }
|
|
48
48
|
attr_accessor :background
|
|
49
49
|
|
|
50
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
51
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
52
|
+
# reference image, independently of the SVG author's reasoning.
|
|
53
|
+
sig { returns(T.nilable(OpenAI::ImageEditParams::Complexity::OrSymbol)) }
|
|
54
|
+
attr_accessor :complexity
|
|
55
|
+
|
|
56
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
57
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
58
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
59
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
60
|
+
# to the GIF preview for the selected model.
|
|
61
|
+
sig { returns(T.nilable(Integer)) }
|
|
62
|
+
attr_accessor :frame_count
|
|
63
|
+
|
|
64
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
65
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
66
|
+
# per frame. Only supported with output_format=gif.
|
|
67
|
+
sig { returns(T.nilable(Integer)) }
|
|
68
|
+
attr_accessor :frame_duration_ms
|
|
69
|
+
|
|
50
70
|
# Control how much effort the model will exert to match the style and features,
|
|
51
71
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
52
72
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -56,7 +76,7 @@ module OpenAI
|
|
|
56
76
|
|
|
57
77
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
58
78
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
59
|
-
# GPT Image 2.5
|
|
79
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
60
80
|
#
|
|
61
81
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
62
82
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -84,8 +104,8 @@ module OpenAI
|
|
|
84
104
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
85
105
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
86
106
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
87
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
88
|
-
# `chatgpt-image-latest`).
|
|
107
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
108
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
89
109
|
#
|
|
90
110
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
91
111
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -103,8 +123,7 @@ module OpenAI
|
|
|
103
123
|
attr_accessor :output_compression
|
|
104
124
|
|
|
105
125
|
# The format in which the generated images are returned. This parameter is only
|
|
106
|
-
# supported for the GPT image models.
|
|
107
|
-
# default value is `png`.
|
|
126
|
+
# supported for the GPT image models. The default value is `png`.
|
|
108
127
|
sig { returns(T.nilable(OpenAI::ImageEditParams::OutputFormat::OrSymbol)) }
|
|
109
128
|
attr_accessor :output_format
|
|
110
129
|
|
|
@@ -171,6 +190,12 @@ module OpenAI
|
|
|
171
190
|
|
|
172
191
|
background: T.nilable(OpenAI::ImageEditParams::Background::OrSymbol),
|
|
173
192
|
|
|
193
|
+
complexity: T.nilable(OpenAI::ImageEditParams::Complexity::OrSymbol),
|
|
194
|
+
|
|
195
|
+
frame_count: T.nilable(Integer),
|
|
196
|
+
|
|
197
|
+
frame_duration_ms: T.nilable(Integer),
|
|
198
|
+
|
|
174
199
|
input_fidelity: T.nilable(OpenAI::ImageEditParams::InputFidelity::OrSymbol),
|
|
175
200
|
|
|
176
201
|
markup: OpenAI::Internal::FileInput,
|
|
@@ -232,6 +257,23 @@ module OpenAI
|
|
|
232
257
|
# set the output format to `png` or `webp`.
|
|
233
258
|
background: nil,
|
|
234
259
|
|
|
260
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
261
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
262
|
+
# reference image, independently of the SVG author's reasoning.
|
|
263
|
+
complexity: nil,
|
|
264
|
+
|
|
265
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
266
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
267
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
268
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
269
|
+
# to the GIF preview for the selected model.
|
|
270
|
+
frame_count: nil,
|
|
271
|
+
|
|
272
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
273
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
274
|
+
# per frame. Only supported with output_format=gif.
|
|
275
|
+
frame_duration_ms: nil,
|
|
276
|
+
|
|
235
277
|
# Control how much effort the model will exert to match the style and features,
|
|
236
278
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
237
279
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -240,7 +282,7 @@ module OpenAI
|
|
|
240
282
|
|
|
241
283
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
242
284
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
243
|
-
# GPT Image 2.5
|
|
285
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
244
286
|
#
|
|
245
287
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
246
288
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -260,8 +302,8 @@ module OpenAI
|
|
|
260
302
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
261
303
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
262
304
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
263
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
264
|
-
# `chatgpt-image-latest`).
|
|
305
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
306
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
265
307
|
#
|
|
266
308
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
267
309
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -276,8 +318,7 @@ module OpenAI
|
|
|
276
318
|
output_compression: nil,
|
|
277
319
|
|
|
278
320
|
# The format in which the generated images are returned. This parameter is only
|
|
279
|
-
# supported for the GPT image models.
|
|
280
|
-
# default value is `png`.
|
|
321
|
+
# supported for the GPT image models. The default value is `png`.
|
|
281
322
|
output_format: nil,
|
|
282
323
|
|
|
283
324
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -335,6 +376,9 @@ module OpenAI
|
|
|
335
376
|
image: OpenAI::ImageEditParams::Image::Variants,
|
|
336
377
|
prompt: String,
|
|
337
378
|
background: T.nilable(OpenAI::ImageEditParams::Background::OrSymbol),
|
|
379
|
+
complexity: T.nilable(OpenAI::ImageEditParams::Complexity::OrSymbol),
|
|
380
|
+
frame_count: T.nilable(Integer),
|
|
381
|
+
frame_duration_ms: T.nilable(Integer),
|
|
338
382
|
input_fidelity: T.nilable(OpenAI::ImageEditParams::InputFidelity::OrSymbol),
|
|
339
383
|
markup: OpenAI::Internal::FileInput,
|
|
340
384
|
mask: OpenAI::Internal::FileInput,
|
|
@@ -403,6 +447,24 @@ module OpenAI
|
|
|
403
447
|
end
|
|
404
448
|
end
|
|
405
449
|
|
|
450
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
451
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
452
|
+
# reference image, independently of the SVG author's reasoning.
|
|
453
|
+
module Complexity
|
|
454
|
+
extend OpenAI::Internal::Type::Enum
|
|
455
|
+
|
|
456
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::ImageEditParams::Complexity) }
|
|
457
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
458
|
+
|
|
459
|
+
LOW = T.let(:low, OpenAI::ImageEditParams::Complexity::TaggedSymbol)
|
|
460
|
+
MEDIUM = T.let(:medium, OpenAI::ImageEditParams::Complexity::TaggedSymbol)
|
|
461
|
+
HIGH = T.let(:high, OpenAI::ImageEditParams::Complexity::TaggedSymbol)
|
|
462
|
+
|
|
463
|
+
sig { override.returns(T::Array[OpenAI::ImageEditParams::Complexity::TaggedSymbol]) }
|
|
464
|
+
def self.values
|
|
465
|
+
end
|
|
466
|
+
end
|
|
467
|
+
|
|
406
468
|
# Control how much effort the model will exert to match the style and features,
|
|
407
469
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
408
470
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -424,8 +486,8 @@ module OpenAI
|
|
|
424
486
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
425
487
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
426
488
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
427
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
428
|
-
# `chatgpt-image-latest`).
|
|
489
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
490
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
429
491
|
#
|
|
430
492
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
431
493
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -441,8 +503,7 @@ module OpenAI
|
|
|
441
503
|
end
|
|
442
504
|
|
|
443
505
|
# The format in which the generated images are returned. This parameter is only
|
|
444
|
-
# supported for the GPT image models.
|
|
445
|
-
# default value is `png`.
|
|
506
|
+
# supported for the GPT image models. The default value is `png`.
|
|
446
507
|
module OutputFormat
|
|
447
508
|
extend OpenAI::Internal::Type::Enum
|
|
448
509
|
|
|
@@ -452,6 +513,7 @@ module OpenAI
|
|
|
452
513
|
PNG = T.let(:png, OpenAI::ImageEditParams::OutputFormat::TaggedSymbol)
|
|
453
514
|
JPEG = T.let(:jpeg, OpenAI::ImageEditParams::OutputFormat::TaggedSymbol)
|
|
454
515
|
WEBP = T.let(:webp, OpenAI::ImageEditParams::OutputFormat::TaggedSymbol)
|
|
516
|
+
GIF = T.let(:gif, OpenAI::ImageEditParams::OutputFormat::TaggedSymbol)
|
|
455
517
|
|
|
456
518
|
sig { override.returns(T::Array[OpenAI::ImageEditParams::OutputFormat::TaggedSymbol]) }
|
|
457
519
|
def self.values
|
|
@@ -32,11 +32,32 @@ module OpenAI
|
|
|
32
32
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Background::OrSymbol)) }
|
|
33
33
|
attr_accessor :background
|
|
34
34
|
|
|
35
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
36
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
37
|
+
# reference image, independently of the SVG author's reasoning.
|
|
38
|
+
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Complexity::OrSymbol)) }
|
|
39
|
+
attr_accessor :complexity
|
|
40
|
+
|
|
41
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
42
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
43
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
44
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
45
|
+
# to the GIF preview for the selected model.
|
|
46
|
+
sig { returns(T.nilable(Integer)) }
|
|
47
|
+
attr_accessor :frame_count
|
|
48
|
+
|
|
49
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
50
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
51
|
+
# per frame. Only supported with output_format=gif.
|
|
52
|
+
sig { returns(T.nilable(Integer)) }
|
|
53
|
+
attr_accessor :frame_duration_ms
|
|
54
|
+
|
|
35
55
|
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
36
56
|
# Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
37
57
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
38
58
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
39
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
59
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
60
|
+
# `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
|
|
40
61
|
#
|
|
41
62
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
42
63
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -60,7 +81,7 @@ module OpenAI
|
|
|
60
81
|
attr_accessor :output_compression
|
|
61
82
|
|
|
62
83
|
# The format in which the generated images are returned. This parameter is only
|
|
63
|
-
# supported for the GPT image models.
|
|
84
|
+
# supported for the GPT image models.
|
|
64
85
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::OutputFormat::OrSymbol)) }
|
|
65
86
|
attr_accessor :output_format
|
|
66
87
|
|
|
@@ -115,6 +136,18 @@ module OpenAI
|
|
|
115
136
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol)) }
|
|
116
137
|
attr_accessor :style
|
|
117
138
|
|
|
139
|
+
# Selects the model and reasoning effort used to author SVG output. Requires
|
|
140
|
+
# output_format=svg and access to SVG model selection. When model selection is
|
|
141
|
+
# enabled, supply svg.model. When model selection is disabled, omit this object.
|
|
142
|
+
# The top-level model selects the image model that creates the reference image.
|
|
143
|
+
# SVG generation requires n=1 and does not support streaming, partial images,
|
|
144
|
+
# prompt_rewriter, or output_compression. SVG edits are not supported.
|
|
145
|
+
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Svg)) }
|
|
146
|
+
attr_reader :svg
|
|
147
|
+
|
|
148
|
+
sig { params(svg: T.nilable(OpenAI::ImageGenerateParams::Svg::OrHash)).void }
|
|
149
|
+
attr_writer :svg
|
|
150
|
+
|
|
118
151
|
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
119
152
|
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
120
153
|
# empty.
|
|
@@ -132,6 +165,12 @@ module OpenAI
|
|
|
132
165
|
|
|
133
166
|
background: T.nilable(OpenAI::ImageGenerateParams::Background::OrSymbol),
|
|
134
167
|
|
|
168
|
+
complexity: T.nilable(OpenAI::ImageGenerateParams::Complexity::OrSymbol),
|
|
169
|
+
|
|
170
|
+
frame_count: T.nilable(Integer),
|
|
171
|
+
|
|
172
|
+
frame_duration_ms: T.nilable(Integer),
|
|
173
|
+
|
|
135
174
|
model: T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol)),
|
|
136
175
|
|
|
137
176
|
moderation: T.nilable(OpenAI::ImageGenerateParams::Moderation::OrSymbol),
|
|
@@ -154,6 +193,8 @@ module OpenAI
|
|
|
154
193
|
|
|
155
194
|
style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
|
|
156
195
|
|
|
196
|
+
svg: T.nilable(OpenAI::ImageGenerateParams::Svg::OrHash),
|
|
197
|
+
|
|
157
198
|
user: String,
|
|
158
199
|
|
|
159
200
|
request_options: OpenAI::RequestOptions::OrHash
|
|
@@ -177,11 +218,29 @@ module OpenAI
|
|
|
177
218
|
# set the output format to `png` or `webp`.
|
|
178
219
|
background: nil,
|
|
179
220
|
|
|
221
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
222
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
223
|
+
# reference image, independently of the SVG author's reasoning.
|
|
224
|
+
complexity: nil,
|
|
225
|
+
|
|
226
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
227
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
228
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
229
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
230
|
+
# to the GIF preview for the selected model.
|
|
231
|
+
frame_count: nil,
|
|
232
|
+
|
|
233
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
234
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
235
|
+
# per frame. Only supported with output_format=gif.
|
|
236
|
+
frame_duration_ms: nil,
|
|
237
|
+
|
|
180
238
|
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
181
239
|
# Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
182
240
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
183
241
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
184
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
242
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
243
|
+
# `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
|
|
185
244
|
#
|
|
186
245
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
187
246
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -201,7 +260,7 @@ module OpenAI
|
|
|
201
260
|
output_compression: nil,
|
|
202
261
|
|
|
203
262
|
# The format in which the generated images are returned. This parameter is only
|
|
204
|
-
# supported for the GPT image models.
|
|
263
|
+
# supported for the GPT image models.
|
|
205
264
|
output_format: nil,
|
|
206
265
|
|
|
207
266
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -249,6 +308,14 @@ module OpenAI
|
|
|
249
308
|
# models; describe the desired style in the prompt instead.
|
|
250
309
|
style: nil,
|
|
251
310
|
|
|
311
|
+
# Selects the model and reasoning effort used to author SVG output. Requires
|
|
312
|
+
# output_format=svg and access to SVG model selection. When model selection is
|
|
313
|
+
# enabled, supply svg.model. When model selection is disabled, omit this object.
|
|
314
|
+
# The top-level model selects the image model that creates the reference image.
|
|
315
|
+
# SVG generation requires n=1 and does not support streaming, partial images,
|
|
316
|
+
# prompt_rewriter, or output_compression. SVG edits are not supported.
|
|
317
|
+
svg: nil,
|
|
318
|
+
|
|
252
319
|
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
253
320
|
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
254
321
|
# empty.
|
|
@@ -264,6 +331,9 @@ module OpenAI
|
|
|
264
331
|
{
|
|
265
332
|
prompt: String,
|
|
266
333
|
background: T.nilable(OpenAI::ImageGenerateParams::Background::OrSymbol),
|
|
334
|
+
complexity: T.nilable(OpenAI::ImageGenerateParams::Complexity::OrSymbol),
|
|
335
|
+
frame_count: T.nilable(Integer),
|
|
336
|
+
frame_duration_ms: T.nilable(Integer),
|
|
267
337
|
model: T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol)),
|
|
268
338
|
moderation: T.nilable(OpenAI::ImageGenerateParams::Moderation::OrSymbol),
|
|
269
339
|
n: T.nilable(Integer),
|
|
@@ -275,6 +345,7 @@ module OpenAI
|
|
|
275
345
|
safety_identifier: T.nilable(String),
|
|
276
346
|
size: T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)),
|
|
277
347
|
style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
|
|
348
|
+
svg: T.nilable(OpenAI::ImageGenerateParams::Svg),
|
|
278
349
|
user: String,
|
|
279
350
|
request_options: OpenAI::RequestOptions
|
|
280
351
|
}
|
|
@@ -307,11 +378,30 @@ module OpenAI
|
|
|
307
378
|
end
|
|
308
379
|
end
|
|
309
380
|
|
|
381
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
382
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
383
|
+
# reference image, independently of the SVG author's reasoning.
|
|
384
|
+
module Complexity
|
|
385
|
+
extend OpenAI::Internal::Type::Enum
|
|
386
|
+
|
|
387
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::ImageGenerateParams::Complexity) }
|
|
388
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
389
|
+
|
|
390
|
+
LOW = T.let(:low, OpenAI::ImageGenerateParams::Complexity::TaggedSymbol)
|
|
391
|
+
MEDIUM = T.let(:medium, OpenAI::ImageGenerateParams::Complexity::TaggedSymbol)
|
|
392
|
+
HIGH = T.let(:high, OpenAI::ImageGenerateParams::Complexity::TaggedSymbol)
|
|
393
|
+
|
|
394
|
+
sig { override.returns(T::Array[OpenAI::ImageGenerateParams::Complexity::TaggedSymbol]) }
|
|
395
|
+
def self.values
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
|
|
310
399
|
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
311
400
|
# Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
312
401
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
313
402
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
314
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
403
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
404
|
+
# `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
|
|
315
405
|
#
|
|
316
406
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
317
407
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -344,7 +434,7 @@ module OpenAI
|
|
|
344
434
|
end
|
|
345
435
|
|
|
346
436
|
# The format in which the generated images are returned. This parameter is only
|
|
347
|
-
# supported for the GPT image models.
|
|
437
|
+
# supported for the GPT image models.
|
|
348
438
|
module OutputFormat
|
|
349
439
|
extend OpenAI::Internal::Type::Enum
|
|
350
440
|
|
|
@@ -354,6 +444,8 @@ module OpenAI
|
|
|
354
444
|
PNG = T.let(:png, OpenAI::ImageGenerateParams::OutputFormat::TaggedSymbol)
|
|
355
445
|
JPEG = T.let(:jpeg, OpenAI::ImageGenerateParams::OutputFormat::TaggedSymbol)
|
|
356
446
|
WEBP = T.let(:webp, OpenAI::ImageGenerateParams::OutputFormat::TaggedSymbol)
|
|
447
|
+
GIF = T.let(:gif, OpenAI::ImageGenerateParams::OutputFormat::TaggedSymbol)
|
|
448
|
+
SVG = T.let(:svg, OpenAI::ImageGenerateParams::OutputFormat::TaggedSymbol)
|
|
357
449
|
|
|
358
450
|
sig { override.returns(T::Array[OpenAI::ImageGenerateParams::OutputFormat::TaggedSymbol]) }
|
|
359
451
|
def self.values
|
|
@@ -455,6 +547,126 @@ module OpenAI
|
|
|
455
547
|
end
|
|
456
548
|
end
|
|
457
549
|
|
|
550
|
+
class Svg < OpenAI::Internal::Type::BaseModel
|
|
551
|
+
OrHash = T.type_alias do
|
|
552
|
+
T.any(
|
|
553
|
+
OpenAI::ImageGenerateParams::Svg,
|
|
554
|
+
OpenAI::Internal::AnyHash
|
|
555
|
+
)
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
# Model used to author the SVG. Required when SVG model selection is enabled.
|
|
559
|
+
sig { returns(String) }
|
|
560
|
+
attr_accessor :model
|
|
561
|
+
|
|
562
|
+
# Reasoning settings for the SVG author, independent of image complexity. Omitted
|
|
563
|
+
# or null effort uses the author model's default. Supported efforts depend on the
|
|
564
|
+
# selected author model.
|
|
565
|
+
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Svg::Reasoning)) }
|
|
566
|
+
attr_reader :reasoning
|
|
567
|
+
|
|
568
|
+
sig { params(reasoning: T.nilable(OpenAI::ImageGenerateParams::Svg::Reasoning::OrHash)).void }
|
|
569
|
+
attr_writer :reasoning
|
|
570
|
+
|
|
571
|
+
# Selects the model and reasoning effort used to author SVG output. Requires
|
|
572
|
+
# output_format=svg and access to SVG model selection. When model selection is
|
|
573
|
+
# enabled, supply svg.model. When model selection is disabled, omit this object.
|
|
574
|
+
# The top-level model selects the image model that creates the reference image.
|
|
575
|
+
# SVG generation requires n=1 and does not support streaming, partial images,
|
|
576
|
+
# prompt_rewriter, or output_compression. SVG edits are not supported.
|
|
577
|
+
sig do
|
|
578
|
+
params(
|
|
579
|
+
|
|
580
|
+
model: String,
|
|
581
|
+
|
|
582
|
+
reasoning: T.nilable(OpenAI::ImageGenerateParams::Svg::Reasoning::OrHash)
|
|
583
|
+
)
|
|
584
|
+
.returns(T.attached_class)
|
|
585
|
+
end
|
|
586
|
+
def self.new(
|
|
587
|
+
|
|
588
|
+
# Model used to author the SVG. Required when SVG model selection is enabled.
|
|
589
|
+
model:,
|
|
590
|
+
|
|
591
|
+
# Reasoning settings for the SVG author, independent of image complexity. Omitted
|
|
592
|
+
# or null effort uses the author model's default. Supported efforts depend on the
|
|
593
|
+
# selected author model.
|
|
594
|
+
|
|
595
|
+
reasoning: nil
|
|
596
|
+
)
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
sig do
|
|
600
|
+
override.returns(
|
|
601
|
+
{model: String, reasoning: T.nilable(OpenAI::ImageGenerateParams::Svg::Reasoning)}
|
|
602
|
+
)
|
|
603
|
+
end
|
|
604
|
+
def to_hash
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
608
|
+
OrHash = T.type_alias do
|
|
609
|
+
T.any(
|
|
610
|
+
OpenAI::ImageGenerateParams::Svg::Reasoning,
|
|
611
|
+
OpenAI::Internal::AnyHash
|
|
612
|
+
)
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Controls how much effort the SVG author spends on reasoning. Uses the author
|
|
616
|
+
# model's default when omitted or null.
|
|
617
|
+
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::OrSymbol)) }
|
|
618
|
+
attr_accessor :effort
|
|
619
|
+
|
|
620
|
+
# Reasoning settings for the SVG author, independent of image complexity. Omitted
|
|
621
|
+
# or null effort uses the author model's default. Supported efforts depend on the
|
|
622
|
+
# selected author model.
|
|
623
|
+
sig do
|
|
624
|
+
params(
|
|
625
|
+
|
|
626
|
+
effort: T.nilable(OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::OrSymbol)
|
|
627
|
+
)
|
|
628
|
+
.returns(T.attached_class)
|
|
629
|
+
end
|
|
630
|
+
def self.new(
|
|
631
|
+
|
|
632
|
+
# Controls how much effort the SVG author spends on reasoning. Uses the author
|
|
633
|
+
# model's default when omitted or null.
|
|
634
|
+
|
|
635
|
+
effort: nil
|
|
636
|
+
)
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
sig do
|
|
640
|
+
override.returns(
|
|
641
|
+
{effort: T.nilable(OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::OrSymbol)}
|
|
642
|
+
)
|
|
643
|
+
end
|
|
644
|
+
def to_hash
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
# Controls how much effort the SVG author spends on reasoning. Uses the author
|
|
648
|
+
# model's default when omitted or null.
|
|
649
|
+
module Effort
|
|
650
|
+
extend OpenAI::Internal::Type::Enum
|
|
651
|
+
|
|
652
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort) }
|
|
653
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
654
|
+
|
|
655
|
+
NONE = T.let(:none, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol)
|
|
656
|
+
MINIMAL = T.let(:minimal, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol)
|
|
657
|
+
LOW = T.let(:low, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol)
|
|
658
|
+
MEDIUM = T.let(:medium, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol)
|
|
659
|
+
HIGH = T.let(:high, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol)
|
|
660
|
+
XHIGH = T.let(:xhigh, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol)
|
|
661
|
+
MAX = T.let(:max, OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol)
|
|
662
|
+
|
|
663
|
+
sig { override.returns(T::Array[OpenAI::ImageGenerateParams::Svg::Reasoning::Effort::TaggedSymbol]) }
|
|
664
|
+
def self.values
|
|
665
|
+
end
|
|
666
|
+
end
|
|
667
|
+
end
|
|
668
|
+
end
|
|
669
|
+
|
|
458
670
|
end
|
|
459
671
|
|
|
460
672
|
end
|
|
@@ -16,6 +16,8 @@ module OpenAI
|
|
|
16
16
|
GPT_IMAGE_2_5_SUNBURST_2026_09_08 = T.let(:"gpt-image-2.5-sunburst-2026-09-08", OpenAI::ImageModel::TaggedSymbol)
|
|
17
17
|
GPT_IMAGE_2_5_FLARE = T.let(:"gpt-image-2.5-flare", OpenAI::ImageModel::TaggedSymbol)
|
|
18
18
|
GPT_IMAGE_2_5_FLARE_2026_09_08 = T.let(:"gpt-image-2.5-flare-2026-09-08", OpenAI::ImageModel::TaggedSymbol)
|
|
19
|
+
GPT_IMAGE_2_6_SUNBURST = T.let(:"gpt-image-2.6-sunburst", OpenAI::ImageModel::TaggedSymbol)
|
|
20
|
+
GPT_IMAGE_2_6_FLARE = T.let(:"gpt-image-2.6-flare", OpenAI::ImageModel::TaggedSymbol)
|
|
19
21
|
GPT_IMAGE_1 = T.let(:"gpt-image-1", OpenAI::ImageModel::TaggedSymbol)
|
|
20
22
|
GPT_IMAGE_1_MINI = T.let(:"gpt-image-1-mini", OpenAI::ImageModel::TaggedSymbol)
|
|
21
23
|
CHATGPT_IMAGE_LATEST = T.let(:"chatgpt-image-latest", OpenAI::ImageModel::TaggedSymbol)
|