openai 0.97.0 → 0.99.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 +31 -0
- data/README.md +76 -1
- data/lib/openai/helpers/agents/session_stream.rb +60 -3
- data/lib/openai/helpers/beta/agents/artifacts.rb +72 -0
- data/lib/openai/helpers/beta/agents/creation_stream.rb +69 -0
- data/lib/openai/helpers/beta/agents/files.rb +236 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +65 -0
- data/lib/openai/helpers/beta/agents/model_adapter.rb +27 -0
- data/lib/openai/helpers/beta/agents/result.rb +170 -0
- data/lib/openai/helpers/beta/agents/typed_output.rb +191 -0
- data/lib/openai/helpers/live/websocket.rb +7 -1
- data/lib/openai/helpers/realtime/conversation_item_variant_resolver.rb +1 -1
- data/lib/openai/helpers/responses_websocket/connection.rb +7 -1
- data/lib/openai/helpers/responses_websocket/session.rb +5 -1
- data/lib/openai/helpers/responses_websocket/transports/async_websocket.rb +12 -2
- data/lib/openai/internal/transport/base_client.rb +18 -0
- data/lib/openai/internal/type/array_of.rb +1 -1
- data/lib/openai/internal/type/base_model.rb +6 -3
- data/lib/openai/internal/type/converter.rb +50 -3
- data/lib/openai/internal/type/hash_of.rb +1 -1
- data/lib/openai/internal/type/union.rb +6 -6
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_completions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_costs_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_images_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +16 -3
- data/lib/openai/models/all_models.rb +42 -0
- data/lib/openai/models/audio/speech_create_params.rb +6 -0
- data/lib/openai/models/audio/voice.rb +75 -0
- data/lib/openai/models/audio/voice_create_params.rb +217 -0
- data/lib/openai/models/beta/agent_create_params.rb +0 -3
- data/lib/openai/models/beta/agent_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/session_create_params.rb +0 -3
- data/lib/openai/models/beta/agents/session_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/sessions/session_trace.rb +64 -0
- data/lib/openai/models/beta/agents/sessions/trace_list_params.rb +68 -0
- data/lib/openai/models/beta/agents/vaults/credential.rb +8 -4
- data/lib/openai/models/beta/beta_response.rb +220 -0
- data/lib/openai/models/beta/beta_response_output_text.rb +2 -2
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +2 -2
- data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
- data/lib/openai/models/beta/beta_tool.rb +3 -9
- data/lib/openai/models/beta/environment.rb +33 -1
- data/lib/openai/models/beta/environment_param.rb +24 -1
- data/lib/openai/models/beta/response_compact_params.rb +220 -0
- data/lib/openai/models/beta/response_create_params.rb +220 -0
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +1 -0
- data/lib/openai/models/chat_model.rb +178 -0
- data/lib/openai/models/image.rb +14 -14
- data/lib/openai/models/image_create_variation_params.rb +7 -7
- data/lib/openai/models/image_edit_params.rb +76 -87
- data/lib/openai/models/image_generate_params.rb +51 -62
- data/lib/openai/models/image_model.rb +5 -3
- data/lib/openai/models/live/fork_server_event.rb +14 -3
- data/lib/openai/models/live/server_event.rb +14 -3
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -6
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -6
- data/lib/openai/models/realtime/translations/client_secret_create_params.rb +28 -0
- data/lib/openai/models/responses/response_compact_params.rb +220 -0
- data/lib/openai/models/responses/response_output_text.rb +2 -2
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +2 -2
- data/lib/openai/models/responses/tool.rb +3 -9
- data/lib/openai/models/responses_model.rb +42 -0
- data/lib/openai/models/webhooks/agent_session_action_required_webhook_event.rb +109 -0
- data/lib/openai/models/webhooks/agent_session_created_webhook_event.rb +106 -0
- data/lib/openai/models/webhooks/agent_session_failed_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_idle_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_in_progress_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +18 -2
- data/lib/openai/models/webhooks/webhook_create_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +5 -0
- data/lib/openai/resources/audio/speech.rb +2 -0
- data/lib/openai/resources/audio/voices.rb +53 -0
- data/lib/openai/resources/audio.rb +5 -0
- data/lib/openai/resources/beta/agents/environments/files.rb +31 -0
- data/lib/openai/resources/beta/agents/sessions/artifacts.rb +8 -0
- data/lib/openai/resources/beta/agents/sessions/events.rb +6 -5
- data/lib/openai/resources/beta/agents/sessions/traces.rb +58 -0
- data/lib/openai/resources/beta/agents/sessions.rb +18 -5
- data/lib/openai/resources/evals/runs.rb +1 -1
- data/lib/openai/resources/images.rb +71 -103
- data/lib/openai/resources/realtime/translations/client_secrets.rb +58 -0
- data/lib/openai/resources/realtime/translations.rb +20 -0
- data/lib/openai/resources/realtime.rb +4 -0
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +17 -1
- data/rbi/openai/helpers/agents.rbi +20 -1
- data/rbi/openai/helpers/beta/agents/artifacts.rbi +29 -0
- data/rbi/openai/helpers/beta/agents/files.rbi +65 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +40 -0
- data/rbi/openai/helpers/beta/agents/model_adapter.rbi +22 -0
- data/rbi/openai/helpers/beta/agents.rbi +146 -0
- data/rbi/openai/internal/transport/base_client.rbi +12 -0
- data/rbi/openai/internal/type/base_model.rbi +2 -2
- data/rbi/openai/internal/type/converter.rbi +21 -3
- data/rbi/openai/internal/type/union.rbi +6 -2
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +19 -2
- data/rbi/openai/models/audio/speech_create_params.rbi +6 -0
- data/rbi/openai/models/audio/voice.rbi +111 -0
- data/rbi/openai/models/audio/voice_create_params.rbi +321 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agent_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/sessions/session_trace.rbi +97 -0
- data/rbi/openai/models/beta/agents/sessions/trace_list_params.rbi +121 -0
- data/rbi/openai/models/beta/agents/vaults/credential.rbi +5 -5
- data/rbi/openai/models/beta/beta_response_output_text.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +2 -2
- data/rbi/openai/models/beta/beta_tool.rbi +3 -9
- data/rbi/openai/models/beta/environment.rbi +29 -0
- data/rbi/openai/models/beta/environment_param.rbi +31 -0
- data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +1 -0
- data/rbi/openai/models/image.rbi +14 -14
- data/rbi/openai/models/image_create_variation_params.rbi +6 -6
- data/rbi/openai/models/image_edit_params.rbi +61 -82
- data/rbi/openai/models/image_generate_params.rbi +30 -61
- data/rbi/openai/models/image_model.rbi +3 -3
- data/rbi/openai/models/live/fork_server_event.rbi +14 -2
- data/rbi/openai/models/live/server_event.rbi +14 -2
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +9 -6
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +9 -6
- data/rbi/openai/models/realtime/translations/client_secret_create_params.rbi +68 -0
- data/rbi/openai/models/responses/response_output_text.rbi +2 -2
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +2 -2
- data/rbi/openai/models/responses/tool.rbi +3 -9
- data/rbi/openai/models/webhooks/agent_session_action_required_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/agent_session_created_webhook_event.rbi +202 -0
- data/rbi/openai/models/webhooks/agent_session_failed_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_idle_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_in_progress_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +7 -1
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +20 -0
- data/rbi/openai/resources/audio/speech.rbi +2 -0
- data/rbi/openai/resources/audio/voices.rbi +49 -0
- data/rbi/openai/resources/audio.rbi +4 -0
- data/rbi/openai/resources/beta/agents/environments/files.rbi +31 -0
- data/rbi/openai/resources/beta/agents/sessions/artifacts.rbi +8 -0
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +6 -5
- data/rbi/openai/resources/beta/agents/sessions/traces.rbi +54 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +6 -1
- data/rbi/openai/resources/images.rbi +69 -103
- data/rbi/openai/resources/realtime/translations/client_secrets.rbi +54 -0
- data/rbi/openai/resources/realtime/translations.rbi +22 -0
- data/rbi/openai/resources/realtime.rbi +3 -0
- data/rbi/openai/resources/webhooks.rbi +5 -0
- data/sig/openai/helpers/agents.rbs +7 -0
- data/sig/openai/helpers/beta/agents/artifacts.rbs +20 -0
- data/sig/openai/helpers/beta/agents/files.rbs +41 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +24 -0
- data/sig/openai/helpers/beta/agents/model_adapter.rbs +16 -0
- data/sig/openai/helpers/beta/agents.rbs +71 -0
- data/sig/openai/helpers/structured_output.rbs +12 -0
- data/sig/openai/internal/transport/base_client.rbs +8 -0
- data/sig/openai/internal/type/base_model.rbs +3 -1
- data/sig/openai/internal/type/converter.rbs +16 -2
- data/sig/openai/internal/type/union.rbs +2 -1
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_images_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +20 -3
- data/sig/openai/models/audio/speech_create_params.rbs +4 -0
- data/sig/openai/models/audio/voice.rbs +70 -0
- data/sig/openai/models/audio/voice_create_params.rbs +203 -0
- data/sig/openai/models/beta/agent_create_params.rbs +1 -5
- data/sig/openai/models/beta/agent_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/session_create_params.rbs +1 -5
- data/sig/openai/models/beta/agents/session_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/sessions/session_trace.rbs +65 -0
- data/sig/openai/models/beta/agents/sessions/trace_list_params.rbs +81 -0
- data/sig/openai/models/beta/agents/vaults/credential.rbs +5 -5
- data/sig/openai/models/beta/beta_response_output_text.rbs +2 -2
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +2 -2
- data/sig/openai/models/beta/beta_tool.rbs +3 -9
- data/sig/openai/models/beta/environment.rbs +22 -0
- data/sig/openai/models/beta/environment_param.rbs +25 -0
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +2 -1
- data/sig/openai/models/image.rbs +21 -21
- data/sig/openai/models/image_create_variation_params.rbs +4 -4
- data/sig/openai/models/image_edit_params.rbs +46 -60
- data/sig/openai/models/image_generate_params.rbs +23 -45
- data/sig/openai/models/image_model.rbs +6 -6
- data/sig/openai/models/live/fork_server_event.rbs +17 -2
- data/sig/openai/models/live/server_event.rbs +17 -2
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +9 -6
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +9 -6
- data/sig/openai/models/realtime/translations/client_secret_create_params.rbs +39 -0
- data/sig/openai/models/responses/response_output_text.rbs +2 -2
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +2 -2
- data/sig/openai/models/responses/tool.rbs +3 -9
- data/sig/openai/models/webhooks/agent_session_action_required_webhook_event.rbs +114 -0
- data/sig/openai/models/webhooks/agent_session_created_webhook_event.rbs +115 -0
- data/sig/openai/models/webhooks/agent_session_failed_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_idle_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_in_progress_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +6 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +10 -0
- data/sig/openai/resources/audio/voices.rbs +14 -0
- data/sig/openai/resources/audio.rbs +2 -0
- data/sig/openai/resources/beta/agents/environments/files.rbs +17 -0
- data/sig/openai/resources/beta/agents/sessions/artifacts.rbs +4 -0
- data/sig/openai/resources/beta/agents/sessions/traces.rbs +21 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -1
- data/sig/openai/resources/realtime/translations/client_secrets.rbs +17 -0
- data/sig/openai/resources/realtime/translations.rbs +11 -0
- data/sig/openai/resources/realtime.rbs +2 -0
- data/sig/openai/resources/webhooks.rbs +6 -1
- metadata +61 -1
|
@@ -102,6 +102,11 @@ module OpenAI
|
|
|
102
102
|
sig { returns(Symbol) }
|
|
103
103
|
attr_accessor :type
|
|
104
104
|
|
|
105
|
+
# The effective CPU and memory tier, or null when unknown or outside the public
|
|
106
|
+
# tiers.
|
|
107
|
+
sig { returns(T.nilable(OpenAI::Beta::Environment::OpenAIHosted::ContainerSize::TaggedSymbol)) }
|
|
108
|
+
attr_accessor :container_size
|
|
109
|
+
|
|
105
110
|
# The effective desktop configuration.
|
|
106
111
|
sig { returns(T.nilable(OpenAI::Beta::Environment::OpenAIHosted::Desktop)) }
|
|
107
112
|
attr_reader :desktop
|
|
@@ -134,6 +139,8 @@ module OpenAI
|
|
|
134
139
|
T.any(OpenAI::Beta::HostedSkillReference::OrHash, OpenAI::Beta::HostedSkill::Inline::OrHash)
|
|
135
140
|
],
|
|
136
141
|
|
|
142
|
+
container_size: T.nilable(OpenAI::Beta::Environment::OpenAIHosted::ContainerSize::OrSymbol),
|
|
143
|
+
|
|
137
144
|
desktop: OpenAI::Beta::Environment::OpenAIHosted::Desktop::OrHash,
|
|
138
145
|
|
|
139
146
|
type: Symbol
|
|
@@ -163,6 +170,10 @@ module OpenAI
|
|
|
163
170
|
# Skills installed in the environment, excluding their archive contents.
|
|
164
171
|
skills:,
|
|
165
172
|
|
|
173
|
+
# The effective CPU and memory tier, or null when unknown or outside the public
|
|
174
|
+
# tiers.
|
|
175
|
+
container_size: nil,
|
|
176
|
+
|
|
166
177
|
# The effective desktop configuration.
|
|
167
178
|
desktop: nil,
|
|
168
179
|
|
|
@@ -183,6 +194,7 @@ module OpenAI
|
|
|
183
194
|
plugins: T::Array[OpenAI::Beta::HostedPlugin],
|
|
184
195
|
skills: T::Array[OpenAI::Beta::HostedSkill::Variants],
|
|
185
196
|
type: Symbol,
|
|
197
|
+
container_size: T.nilable(OpenAI::Beta::Environment::OpenAIHosted::ContainerSize::TaggedSymbol),
|
|
186
198
|
desktop: OpenAI::Beta::Environment::OpenAIHosted::Desktop
|
|
187
199
|
}
|
|
188
200
|
)
|
|
@@ -318,6 +330,23 @@ module OpenAI
|
|
|
318
330
|
|
|
319
331
|
end
|
|
320
332
|
|
|
333
|
+
# The effective CPU and memory tier, or null when unknown or outside the public
|
|
334
|
+
# tiers.
|
|
335
|
+
module ContainerSize
|
|
336
|
+
extend OpenAI::Internal::Type::Enum
|
|
337
|
+
|
|
338
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::Environment::OpenAIHosted::ContainerSize) }
|
|
339
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
340
|
+
|
|
341
|
+
SMALL = T.let(:small, OpenAI::Beta::Environment::OpenAIHosted::ContainerSize::TaggedSymbol)
|
|
342
|
+
MEDIUM = T.let(:medium, OpenAI::Beta::Environment::OpenAIHosted::ContainerSize::TaggedSymbol)
|
|
343
|
+
LARGE = T.let(:large, OpenAI::Beta::Environment::OpenAIHosted::ContainerSize::TaggedSymbol)
|
|
344
|
+
|
|
345
|
+
sig { override.returns(T::Array[OpenAI::Beta::Environment::OpenAIHosted::ContainerSize::TaggedSymbol]) }
|
|
346
|
+
def self.values
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
|
|
321
350
|
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
322
351
|
OrHash = T.type_alias do
|
|
323
352
|
T.any(
|
|
@@ -72,6 +72,13 @@ module OpenAI
|
|
|
72
72
|
sig { returns(T.nilable(T::Array[String])) }
|
|
73
73
|
attr_accessor :capability_directories
|
|
74
74
|
|
|
75
|
+
# The hosted container size. Omission selects the medium tier.
|
|
76
|
+
sig { returns(T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::OrSymbol)) }
|
|
77
|
+
attr_reader :container_size
|
|
78
|
+
|
|
79
|
+
sig { params(container_size: OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::OrSymbol).void }
|
|
80
|
+
attr_writer :container_size
|
|
81
|
+
|
|
75
82
|
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
76
83
|
# defaults to disabled.
|
|
77
84
|
sig { returns(T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop)) }
|
|
@@ -148,6 +155,8 @@ module OpenAI
|
|
|
148
155
|
|
|
149
156
|
capability_directories: T.nilable(T::Array[String]),
|
|
150
157
|
|
|
158
|
+
container_size: OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::OrSymbol,
|
|
159
|
+
|
|
151
160
|
desktop: T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop::OrHash),
|
|
152
161
|
|
|
153
162
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
@@ -190,6 +199,9 @@ module OpenAI
|
|
|
190
199
|
# list.
|
|
191
200
|
capability_directories: nil,
|
|
192
201
|
|
|
202
|
+
# The hosted container size. Omission selects the medium tier.
|
|
203
|
+
container_size: nil,
|
|
204
|
+
|
|
193
205
|
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
194
206
|
# defaults to disabled.
|
|
195
207
|
desktop: nil,
|
|
@@ -232,6 +244,7 @@ module OpenAI
|
|
|
232
244
|
{
|
|
233
245
|
type: Symbol,
|
|
234
246
|
capability_directories: T.nilable(T::Array[String]),
|
|
247
|
+
container_size: OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::OrSymbol,
|
|
235
248
|
desktop: T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop),
|
|
236
249
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
237
250
|
environment_template_id: String,
|
|
@@ -258,6 +271,24 @@ module OpenAI
|
|
|
258
271
|
def to_hash
|
|
259
272
|
end
|
|
260
273
|
|
|
274
|
+
# The hosted container size. Omission selects the medium tier.
|
|
275
|
+
module ContainerSize
|
|
276
|
+
extend OpenAI::Internal::Type::Enum
|
|
277
|
+
|
|
278
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize) }
|
|
279
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
280
|
+
|
|
281
|
+
SMALL = T.let(:small, OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::TaggedSymbol)
|
|
282
|
+
MEDIUM = T.let(:medium, OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::TaggedSymbol)
|
|
283
|
+
LARGE = T.let(:large, OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::TaggedSymbol)
|
|
284
|
+
|
|
285
|
+
sig {
|
|
286
|
+
override.returns(T::Array[OpenAI::Beta::EnvironmentParam::OpenAIHosted::ContainerSize::TaggedSymbol])
|
|
287
|
+
}
|
|
288
|
+
def self.values
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
|
|
261
292
|
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
262
293
|
OrHash = T.type_alias do
|
|
263
294
|
T.any(
|
|
@@ -76,6 +76,9 @@ module OpenAI
|
|
|
76
76
|
# The request exceeds the available rate limit.
|
|
77
77
|
RATE_LIMIT_EXCEEDED = T.let(:rate_limit_exceeded, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
|
|
78
78
|
|
|
79
|
+
# Flex processing is temporarily unavailable.
|
|
80
|
+
FLEX_UNAVAILABLE = T.let(:flex_unavailable, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
|
|
81
|
+
|
|
79
82
|
# The model service is temporarily overloaded.
|
|
80
83
|
SERVER_OVERLOADED = T.let(:server_overloaded, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
|
|
81
84
|
|
|
@@ -24,7 +24,8 @@ module OpenAI
|
|
|
24
24
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
25
25
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
26
26
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
27
|
-
# for example `{ "id": "voice_1234" }`.
|
|
27
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
28
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
28
29
|
sig {
|
|
29
30
|
returns(
|
|
30
31
|
T.any(
|
|
@@ -61,7 +62,8 @@ module OpenAI
|
|
|
61
62
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
62
63
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
63
64
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
64
|
-
# for example `{ "id": "voice_1234" }`.
|
|
65
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
66
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
65
67
|
|
|
66
68
|
voice:
|
|
67
69
|
)
|
|
@@ -105,7 +107,8 @@ module OpenAI
|
|
|
105
107
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
106
108
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
107
109
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
108
|
-
# for example `{ "id": "voice_1234" }`.
|
|
110
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
111
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
109
112
|
module Voice
|
|
110
113
|
extend OpenAI::Internal::Type::Union
|
|
111
114
|
|
|
@@ -140,6 +140,7 @@ module OpenAI
|
|
|
140
140
|
AUTO = T.let(:auto, OpenAI::Chat::ChatCompletionContentPartImage::ImageURL::Detail::TaggedSymbol)
|
|
141
141
|
LOW = T.let(:low, OpenAI::Chat::ChatCompletionContentPartImage::ImageURL::Detail::TaggedSymbol)
|
|
142
142
|
HIGH = T.let(:high, OpenAI::Chat::ChatCompletionContentPartImage::ImageURL::Detail::TaggedSymbol)
|
|
143
|
+
ORIGINAL = T.let(:original, OpenAI::Chat::ChatCompletionContentPartImage::ImageURL::Detail::TaggedSymbol)
|
|
143
144
|
|
|
144
145
|
sig {
|
|
145
146
|
override.returns(T::Array[OpenAI::Chat::ChatCompletionContentPartImage::ImageURL::Detail::TaggedSymbol])
|
data/rbi/openai/models/image.rbi
CHANGED
|
@@ -12,25 +12,25 @@ module OpenAI
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
16
|
-
# image models,
|
|
17
|
-
#
|
|
15
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
16
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
17
|
+
# support that parameter.
|
|
18
18
|
sig { returns(T.nilable(String)) }
|
|
19
19
|
attr_reader :b64_json
|
|
20
20
|
|
|
21
21
|
sig { params(b64_json: String).void }
|
|
22
22
|
attr_writer :b64_json
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
25
|
+
# revision. Not returned by GPT image models.
|
|
25
26
|
sig { returns(T.nilable(String)) }
|
|
26
27
|
attr_reader :revised_prompt
|
|
27
28
|
|
|
28
29
|
sig { params(revised_prompt: String).void }
|
|
29
30
|
attr_writer :revised_prompt
|
|
30
31
|
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
# models.
|
|
32
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
33
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
34
34
|
sig { returns(T.nilable(String)) }
|
|
35
35
|
attr_reader :url
|
|
36
36
|
|
|
@@ -51,17 +51,17 @@ module OpenAI
|
|
|
51
51
|
end
|
|
52
52
|
def self.new(
|
|
53
53
|
|
|
54
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
55
|
-
# image models,
|
|
56
|
-
#
|
|
54
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
55
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
56
|
+
# support that parameter.
|
|
57
57
|
b64_json: nil,
|
|
58
58
|
|
|
59
|
-
#
|
|
59
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
60
|
+
# revision. Not returned by GPT image models.
|
|
60
61
|
revised_prompt: nil,
|
|
61
62
|
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
# models.
|
|
63
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
64
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
65
65
|
|
|
66
66
|
url: nil
|
|
67
67
|
)
|
|
@@ -24,8 +24,8 @@ module OpenAI
|
|
|
24
24
|
sig { returns(OpenAI::Internal::FileInput) }
|
|
25
25
|
attr_accessor :image
|
|
26
26
|
|
|
27
|
-
# The model
|
|
28
|
-
#
|
|
27
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
28
|
+
# longer accepts requests.
|
|
29
29
|
sig { returns(T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol))) }
|
|
30
30
|
attr_accessor :model
|
|
31
31
|
|
|
@@ -82,8 +82,8 @@ module OpenAI
|
|
|
82
82
|
# content type.
|
|
83
83
|
image:,
|
|
84
84
|
|
|
85
|
-
# The model
|
|
86
|
-
#
|
|
85
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
86
|
+
# longer accepts requests.
|
|
87
87
|
model: nil,
|
|
88
88
|
|
|
89
89
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -123,8 +123,8 @@ module OpenAI
|
|
|
123
123
|
def to_hash
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
-
# The model
|
|
127
|
-
#
|
|
126
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
127
|
+
# longer accepts requests.
|
|
128
128
|
module Model
|
|
129
129
|
extend OpenAI::Internal::Type::Union
|
|
130
130
|
|
|
@@ -24,17 +24,14 @@ module OpenAI
|
|
|
24
24
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
25
25
|
# images.
|
|
26
26
|
#
|
|
27
|
-
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
28
|
-
# file less than 4MB.
|
|
29
|
-
#
|
|
30
27
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
31
28
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
32
29
|
# content type.
|
|
33
30
|
sig { returns(OpenAI::ImageEditParams::Image::Variants) }
|
|
34
31
|
attr_accessor :image
|
|
35
32
|
|
|
36
|
-
# A text description of the desired image(s). The maximum length is
|
|
37
|
-
# characters for
|
|
33
|
+
# A text description of the desired image(s). The maximum length is 32000
|
|
34
|
+
# characters for the GPT image models.
|
|
38
35
|
sig { returns(String) }
|
|
39
36
|
attr_accessor :prompt
|
|
40
37
|
|
|
@@ -70,12 +67,11 @@ module OpenAI
|
|
|
70
67
|
sig { params(mask: OpenAI::Internal::FileInput).void }
|
|
71
68
|
attr_writer :mask
|
|
72
69
|
|
|
73
|
-
# The model to use for image
|
|
74
|
-
#
|
|
75
|
-
# `gpt-image-2-
|
|
76
|
-
# `gpt-image-2.5-
|
|
77
|
-
# `
|
|
78
|
-
# `gpt-image-1.5`.
|
|
70
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
71
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
72
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
73
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
74
|
+
# `chatgpt-image-latest`).
|
|
79
75
|
sig { returns(T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol))) }
|
|
80
76
|
attr_accessor :model
|
|
81
77
|
|
|
@@ -111,25 +107,22 @@ module OpenAI
|
|
|
111
107
|
sig { returns(T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol)) }
|
|
112
108
|
attr_accessor :quality
|
|
113
109
|
|
|
114
|
-
#
|
|
115
|
-
#
|
|
116
|
-
# generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
117
|
-
# `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
110
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
111
|
+
# image models, which always return base64-encoded images.
|
|
118
112
|
sig { returns(T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol)) }
|
|
119
113
|
attr_accessor :response_format
|
|
120
114
|
|
|
121
|
-
# The size of the generated images.
|
|
122
|
-
# `gpt-image-2
|
|
123
|
-
# `gpt-image-2.5-
|
|
124
|
-
# resolutions are supported as
|
|
125
|
-
# Width and height must both be
|
|
126
|
-
# must be between 1:3 and 3:1.
|
|
127
|
-
#
|
|
128
|
-
#
|
|
129
|
-
#
|
|
130
|
-
# `
|
|
131
|
-
#
|
|
132
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
115
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
116
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
117
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
118
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
119
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
120
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
121
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
122
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
123
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
124
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
125
|
+
# models that allow automatic sizing.
|
|
133
126
|
sig { returns(T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol))) }
|
|
134
127
|
attr_accessor :size
|
|
135
128
|
|
|
@@ -188,16 +181,13 @@ module OpenAI
|
|
|
188
181
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
189
182
|
# images.
|
|
190
183
|
#
|
|
191
|
-
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
192
|
-
# file less than 4MB.
|
|
193
|
-
#
|
|
194
184
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
195
185
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
196
186
|
# content type.
|
|
197
187
|
image:,
|
|
198
188
|
|
|
199
|
-
# A text description of the desired image(s). The maximum length is
|
|
200
|
-
# characters for
|
|
189
|
+
# A text description of the desired image(s). The maximum length is 32000
|
|
190
|
+
# characters for the GPT image models.
|
|
201
191
|
prompt:,
|
|
202
192
|
|
|
203
193
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
@@ -226,12 +216,11 @@ module OpenAI
|
|
|
226
216
|
# content type.
|
|
227
217
|
mask: nil,
|
|
228
218
|
|
|
229
|
-
# The model to use for image
|
|
230
|
-
#
|
|
231
|
-
# `gpt-image-2-
|
|
232
|
-
# `gpt-image-2.5-
|
|
233
|
-
# `
|
|
234
|
-
# `gpt-image-1.5`.
|
|
219
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
220
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
221
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
222
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
223
|
+
# `chatgpt-image-latest`).
|
|
235
224
|
model: nil,
|
|
236
225
|
|
|
237
226
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -261,24 +250,21 @@ module OpenAI
|
|
|
261
250
|
# `xhigh` and `max`. Defaults to `auto`.
|
|
262
251
|
quality: nil,
|
|
263
252
|
|
|
264
|
-
#
|
|
265
|
-
#
|
|
266
|
-
# generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
267
|
-
# `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
253
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
254
|
+
# image models, which always return base64-encoded images.
|
|
268
255
|
response_format: nil,
|
|
269
256
|
|
|
270
|
-
# The size of the generated images.
|
|
271
|
-
# `gpt-image-2
|
|
272
|
-
# `gpt-image-2.5-
|
|
273
|
-
# resolutions are supported as
|
|
274
|
-
# Width and height must both be
|
|
275
|
-
# must be between 1:3 and 3:1.
|
|
276
|
-
#
|
|
277
|
-
#
|
|
278
|
-
#
|
|
279
|
-
# `
|
|
280
|
-
#
|
|
281
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
257
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
258
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
259
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
260
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
261
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
262
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
263
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
264
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
265
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
266
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
267
|
+
# models that allow automatic sizing.
|
|
282
268
|
size: nil,
|
|
283
269
|
|
|
284
270
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
@@ -322,9 +308,6 @@ module OpenAI
|
|
|
322
308
|
# `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should
|
|
323
309
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
324
310
|
# images.
|
|
325
|
-
#
|
|
326
|
-
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
327
|
-
# file less than 4MB.
|
|
328
311
|
module Image
|
|
329
312
|
extend OpenAI::Internal::Type::Union
|
|
330
313
|
|
|
@@ -382,12 +365,11 @@ module OpenAI
|
|
|
382
365
|
end
|
|
383
366
|
end
|
|
384
367
|
|
|
385
|
-
# The model to use for image
|
|
386
|
-
#
|
|
387
|
-
# `gpt-image-2-
|
|
388
|
-
# `gpt-image-2.5-
|
|
389
|
-
# `
|
|
390
|
-
# `gpt-image-1.5`.
|
|
368
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
369
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
370
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
371
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
372
|
+
# `chatgpt-image-latest`).
|
|
391
373
|
module Model
|
|
392
374
|
extend OpenAI::Internal::Type::Union
|
|
393
375
|
|
|
@@ -427,23 +409,21 @@ module OpenAI
|
|
|
427
409
|
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::ImageEditParams::Quality) }
|
|
428
410
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
429
411
|
|
|
430
|
-
STANDARD = T.let(:standard, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
431
412
|
LOW = T.let(:low, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
432
413
|
MEDIUM = T.let(:medium, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
433
414
|
HIGH = T.let(:high, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
434
415
|
XHIGH = T.let(:xhigh, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
435
416
|
MAX = T.let(:max, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
436
417
|
AUTO = T.let(:auto, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
418
|
+
STANDARD = T.let(:standard, OpenAI::ImageEditParams::Quality::TaggedSymbol)
|
|
437
419
|
|
|
438
420
|
sig { override.returns(T::Array[OpenAI::ImageEditParams::Quality::TaggedSymbol]) }
|
|
439
421
|
def self.values
|
|
440
422
|
end
|
|
441
423
|
end
|
|
442
424
|
|
|
443
|
-
#
|
|
444
|
-
#
|
|
445
|
-
# generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
446
|
-
# `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
425
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
426
|
+
# image models, which always return base64-encoded images.
|
|
447
427
|
module ResponseFormat
|
|
448
428
|
extend OpenAI::Internal::Type::Enum
|
|
449
429
|
|
|
@@ -458,18 +438,17 @@ module OpenAI
|
|
|
458
438
|
end
|
|
459
439
|
end
|
|
460
440
|
|
|
461
|
-
# The size of the generated images.
|
|
462
|
-
# `gpt-image-2
|
|
463
|
-
# `gpt-image-2.5-
|
|
464
|
-
# resolutions are supported as
|
|
465
|
-
# Width and height must both be
|
|
466
|
-
# must be between 1:3 and 3:1.
|
|
467
|
-
#
|
|
468
|
-
#
|
|
469
|
-
#
|
|
470
|
-
# `
|
|
471
|
-
#
|
|
472
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
441
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
442
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
443
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
444
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
445
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
446
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
447
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
448
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
449
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
450
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
451
|
+
# models that allow automatic sizing.
|
|
473
452
|
module Size
|
|
474
453
|
extend OpenAI::Internal::Type::Union
|
|
475
454
|
|
|
@@ -485,12 +464,12 @@ module OpenAI
|
|
|
485
464
|
|
|
486
465
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
487
466
|
|
|
488
|
-
SIZE_256X256 = T.let(:"256x256", OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
489
|
-
SIZE_512X512 = T.let(:"512x512", OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
490
467
|
SIZE_1024X1024 = T.let(:"1024x1024", OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
491
468
|
SIZE_1536X1024 = T.let(:"1536x1024", OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
492
469
|
SIZE_1024X1536 = T.let(:"1024x1536", OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
493
470
|
AUTO = T.let(:auto, OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
471
|
+
SIZE_256X256 = T.let(:"256x256", OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
472
|
+
SIZE_512X512 = T.let(:"512x512", OpenAI::ImageEditParams::Size::TaggedSymbol)
|
|
494
473
|
|
|
495
474
|
end
|
|
496
475
|
|