openai 0.98.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 +7 -0
- data/README.md +1 -1
- 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/beta_response.rb +220 -0
- 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/response_compact_params.rb +220 -0
- data/lib/openai/models/beta/response_create_params.rb +220 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
- 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/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/responses/response_compact_params.rb +220 -0
- 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/images.rb +71 -103
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +8 -0
- 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/beta_tool.rbi +3 -9
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
- 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/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/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/images.rbi +69 -103
- data/rbi/openai/resources/webhooks.rbi +5 -0
- 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/beta_tool.rbs +3 -9
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
- 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/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/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/webhooks.rbs +6 -1
- metadata +25 -1
|
@@ -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
|
|
|
@@ -16,8 +16,7 @@ module OpenAI
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
# A text description of the desired image(s). The maximum length is 32000
|
|
19
|
-
# characters
|
|
20
|
-
# characters for `dall-e-3`.
|
|
19
|
+
# characters.
|
|
21
20
|
sig { returns(String) }
|
|
22
21
|
attr_accessor :prompt
|
|
23
22
|
|
|
@@ -33,12 +32,11 @@ module OpenAI
|
|
|
33
32
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Background::OrSymbol)) }
|
|
34
33
|
attr_accessor :background
|
|
35
34
|
|
|
36
|
-
# The model to use for image generation.
|
|
37
|
-
#
|
|
38
|
-
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
35
|
+
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
36
|
+
# Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
37
|
+
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
39
38
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
40
|
-
# `gpt-image-2.5-flare-2026-09-08
|
|
41
|
-
# specific to the GPT image models is used.
|
|
39
|
+
# `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
|
|
42
40
|
sig { returns(T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol))) }
|
|
43
41
|
attr_accessor :model
|
|
44
42
|
|
|
@@ -48,8 +46,7 @@ module OpenAI
|
|
|
48
46
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Moderation::OrSymbol)) }
|
|
49
47
|
attr_accessor :moderation
|
|
50
48
|
|
|
51
|
-
# The number of images to generate. Must be between 1 and 10.
|
|
52
|
-
# `n=1` is supported.
|
|
49
|
+
# The number of images to generate. Must be between 1 and 10.
|
|
53
50
|
sig { returns(T.nilable(Integer)) }
|
|
54
51
|
attr_accessor :n
|
|
55
52
|
|
|
@@ -80,14 +77,10 @@ module OpenAI
|
|
|
80
77
|
# - `high`, `medium` and `low` are supported for the GPT image models.
|
|
81
78
|
# - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
|
|
82
79
|
# `2026-09-08` snapshots, also support `xhigh` and `max`.
|
|
83
|
-
# - `hd` and `standard` are supported for `dall-e-3`.
|
|
84
|
-
# - `standard` is the only option for `dall-e-2`.
|
|
85
80
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol)) }
|
|
86
81
|
attr_accessor :quality
|
|
87
82
|
|
|
88
|
-
#
|
|
89
|
-
# returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
|
|
90
|
-
# after the image has been generated. This parameter isn't supported for the GPT
|
|
83
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
91
84
|
# image models, which always return base64-encoded images.
|
|
92
85
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol)) }
|
|
93
86
|
attr_accessor :response_format
|
|
@@ -101,16 +94,12 @@ module OpenAI
|
|
|
101
94
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
102
95
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
103
96
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
104
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
105
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
106
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
97
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
107
98
|
sig { returns(T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol))) }
|
|
108
99
|
attr_accessor :size
|
|
109
100
|
|
|
110
|
-
#
|
|
111
|
-
#
|
|
112
|
-
# towards generating hyper-real and dramatic images. Natural causes the model to
|
|
113
|
-
# produce more natural, less hyper-real looking images.
|
|
101
|
+
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
102
|
+
# models; describe the desired style in the prompt instead.
|
|
114
103
|
sig { returns(T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol)) }
|
|
115
104
|
attr_accessor :style
|
|
116
105
|
|
|
@@ -159,8 +148,7 @@ module OpenAI
|
|
|
159
148
|
def self.new(
|
|
160
149
|
|
|
161
150
|
# A text description of the desired image(s). The maximum length is 32000
|
|
162
|
-
# characters
|
|
163
|
-
# characters for `dall-e-3`.
|
|
151
|
+
# characters.
|
|
164
152
|
prompt:,
|
|
165
153
|
|
|
166
154
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
@@ -174,12 +162,11 @@ module OpenAI
|
|
|
174
162
|
# set the output format to `png` or `webp`.
|
|
175
163
|
background: nil,
|
|
176
164
|
|
|
177
|
-
# The model to use for image generation.
|
|
178
|
-
#
|
|
179
|
-
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
165
|
+
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
166
|
+
# Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
167
|
+
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
180
168
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
181
|
-
# `gpt-image-2.5-flare-2026-09-08
|
|
182
|
-
# specific to the GPT image models is used.
|
|
169
|
+
# `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
|
|
183
170
|
model: nil,
|
|
184
171
|
|
|
185
172
|
# Control the content-moderation level for images generated by the GPT image
|
|
@@ -187,8 +174,7 @@ module OpenAI
|
|
|
187
174
|
# value).
|
|
188
175
|
moderation: nil,
|
|
189
176
|
|
|
190
|
-
# The number of images to generate. Must be between 1 and 10.
|
|
191
|
-
# `n=1` is supported.
|
|
177
|
+
# The number of images to generate. Must be between 1 and 10.
|
|
192
178
|
n: nil,
|
|
193
179
|
|
|
194
180
|
# The compression level (0-100%) for the generated images. This parameter is only
|
|
@@ -215,13 +201,9 @@ module OpenAI
|
|
|
215
201
|
# - `high`, `medium` and `low` are supported for the GPT image models.
|
|
216
202
|
# - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
|
|
217
203
|
# `2026-09-08` snapshots, also support `xhigh` and `max`.
|
|
218
|
-
# - `hd` and `standard` are supported for `dall-e-3`.
|
|
219
|
-
# - `standard` is the only option for `dall-e-2`.
|
|
220
204
|
quality: nil,
|
|
221
205
|
|
|
222
|
-
#
|
|
223
|
-
# returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
|
|
224
|
-
# after the image has been generated. This parameter isn't supported for the GPT
|
|
206
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
225
207
|
# image models, which always return base64-encoded images.
|
|
226
208
|
response_format: nil,
|
|
227
209
|
|
|
@@ -234,15 +216,11 @@ module OpenAI
|
|
|
234
216
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
235
217
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
236
218
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
237
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
238
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
239
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
219
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
240
220
|
size: nil,
|
|
241
221
|
|
|
242
|
-
#
|
|
243
|
-
#
|
|
244
|
-
# towards generating hyper-real and dramatic images. Natural causes the model to
|
|
245
|
-
# produce more natural, less hyper-real looking images.
|
|
222
|
+
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
223
|
+
# models; describe the desired style in the prompt instead.
|
|
246
224
|
style: nil,
|
|
247
225
|
|
|
248
226
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
@@ -301,12 +279,11 @@ module OpenAI
|
|
|
301
279
|
end
|
|
302
280
|
end
|
|
303
281
|
|
|
304
|
-
# The model to use for image generation.
|
|
305
|
-
#
|
|
306
|
-
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
282
|
+
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
283
|
+
# Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
284
|
+
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
307
285
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
308
|
-
# `gpt-image-2.5-flare-2026-09-08
|
|
309
|
-
# specific to the GPT image models is used.
|
|
286
|
+
# `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
|
|
310
287
|
module Model
|
|
311
288
|
extend OpenAI::Internal::Type::Union
|
|
312
289
|
|
|
@@ -359,31 +336,27 @@ module OpenAI
|
|
|
359
336
|
# - `high`, `medium` and `low` are supported for the GPT image models.
|
|
360
337
|
# - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
|
|
361
338
|
# `2026-09-08` snapshots, also support `xhigh` and `max`.
|
|
362
|
-
# - `hd` and `standard` are supported for `dall-e-3`.
|
|
363
|
-
# - `standard` is the only option for `dall-e-2`.
|
|
364
339
|
module Quality
|
|
365
340
|
extend OpenAI::Internal::Type::Enum
|
|
366
341
|
|
|
367
342
|
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::ImageGenerateParams::Quality) }
|
|
368
343
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
369
344
|
|
|
370
|
-
STANDARD = T.let(:standard, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
371
|
-
HD = T.let(:hd, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
372
345
|
LOW = T.let(:low, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
373
346
|
MEDIUM = T.let(:medium, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
374
347
|
HIGH = T.let(:high, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
375
348
|
XHIGH = T.let(:xhigh, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
376
349
|
MAX = T.let(:max, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
377
350
|
AUTO = T.let(:auto, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
351
|
+
STANDARD = T.let(:standard, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
352
|
+
HD = T.let(:hd, OpenAI::ImageGenerateParams::Quality::TaggedSymbol)
|
|
378
353
|
|
|
379
354
|
sig { override.returns(T::Array[OpenAI::ImageGenerateParams::Quality::TaggedSymbol]) }
|
|
380
355
|
def self.values
|
|
381
356
|
end
|
|
382
357
|
end
|
|
383
358
|
|
|
384
|
-
#
|
|
385
|
-
# returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
|
|
386
|
-
# after the image has been generated. This parameter isn't supported for the GPT
|
|
359
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
387
360
|
# image models, which always return base64-encoded images.
|
|
388
361
|
module ResponseFormat
|
|
389
362
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -408,9 +381,7 @@ module OpenAI
|
|
|
408
381
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
409
382
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
410
383
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
411
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
412
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
413
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
384
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
414
385
|
module Size
|
|
415
386
|
extend OpenAI::Internal::Type::Union
|
|
416
387
|
|
|
@@ -437,10 +408,8 @@ module OpenAI
|
|
|
437
408
|
|
|
438
409
|
end
|
|
439
410
|
|
|
440
|
-
#
|
|
441
|
-
#
|
|
442
|
-
# towards generating hyper-real and dramatic images. Natural causes the model to
|
|
443
|
-
# produce more natural, less hyper-real looking images.
|
|
411
|
+
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
412
|
+
# models; describe the desired style in the prompt instead.
|
|
444
413
|
module Style
|
|
445
414
|
extend OpenAI::Internal::Type::Enum
|
|
446
415
|
|
|
@@ -9,15 +9,15 @@ module OpenAI
|
|
|
9
9
|
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::ImageModel) }
|
|
10
10
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
GPT_IMAGE_1_MINI = T.let(:"gpt-image-1-mini", OpenAI::ImageModel::TaggedSymbol)
|
|
12
|
+
GPT_IMAGE_1_5 = T.let(:"gpt-image-1.5", OpenAI::ImageModel::TaggedSymbol)
|
|
14
13
|
GPT_IMAGE_2 = T.let(:"gpt-image-2", OpenAI::ImageModel::TaggedSymbol)
|
|
15
14
|
GPT_IMAGE_2_2026_04_21 = T.let(:"gpt-image-2-2026-04-21", OpenAI::ImageModel::TaggedSymbol)
|
|
16
15
|
GPT_IMAGE_2_5_SUNBURST = T.let(:"gpt-image-2.5-sunburst", OpenAI::ImageModel::TaggedSymbol)
|
|
17
16
|
GPT_IMAGE_2_5_SUNBURST_2026_09_08 = T.let(:"gpt-image-2.5-sunburst-2026-09-08", OpenAI::ImageModel::TaggedSymbol)
|
|
18
17
|
GPT_IMAGE_2_5_FLARE = T.let(:"gpt-image-2.5-flare", OpenAI::ImageModel::TaggedSymbol)
|
|
19
18
|
GPT_IMAGE_2_5_FLARE_2026_09_08 = T.let(:"gpt-image-2.5-flare-2026-09-08", OpenAI::ImageModel::TaggedSymbol)
|
|
20
|
-
|
|
19
|
+
GPT_IMAGE_1 = T.let(:"gpt-image-1", OpenAI::ImageModel::TaggedSymbol)
|
|
20
|
+
GPT_IMAGE_1_MINI = T.let(:"gpt-image-1-mini", OpenAI::ImageModel::TaggedSymbol)
|
|
21
21
|
CHATGPT_IMAGE_LATEST = T.let(:"chatgpt-image-latest", OpenAI::ImageModel::TaggedSymbol)
|
|
22
22
|
DALL_E_2 = T.let(:"dall-e-2", OpenAI::ImageModel::TaggedSymbol)
|
|
23
23
|
DALL_E_3 = T.let(:"dall-e-3", OpenAI::ImageModel::TaggedSymbol)
|
|
@@ -57,8 +57,9 @@ module OpenAI
|
|
|
57
57
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
58
58
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
59
59
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
60
|
-
# model has responded with audio at least once.
|
|
61
|
-
#
|
|
60
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
61
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
62
|
+
# recommend `marin` and `cedar` for best quality.
|
|
62
63
|
sig {
|
|
63
64
|
returns(
|
|
64
65
|
T.nilable(
|
|
@@ -121,8 +122,9 @@ module OpenAI
|
|
|
121
122
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
122
123
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
123
124
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
124
|
-
# model has responded with audio at least once.
|
|
125
|
-
#
|
|
125
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
126
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
127
|
+
# recommend `marin` and `cedar` for best quality.
|
|
126
128
|
|
|
127
129
|
voice: nil
|
|
128
130
|
)
|
|
@@ -152,8 +154,9 @@ module OpenAI
|
|
|
152
154
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
153
155
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
154
156
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
155
|
-
# model has responded with audio at least once.
|
|
156
|
-
#
|
|
157
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
158
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
159
|
+
# recommend `marin` and `cedar` for best quality.
|
|
157
160
|
module Voice
|
|
158
161
|
extend OpenAI::Internal::Type::Union
|
|
159
162
|
|
|
@@ -80,8 +80,9 @@ module OpenAI
|
|
|
80
80
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
81
81
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
82
82
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
83
|
-
# model has responded with audio at least once.
|
|
84
|
-
#
|
|
83
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
84
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
85
|
+
# recommend `marin` and `cedar` for best quality.
|
|
85
86
|
sig {
|
|
86
87
|
returns(
|
|
87
88
|
T.nilable(
|
|
@@ -133,8 +134,9 @@ module OpenAI
|
|
|
133
134
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
134
135
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
135
136
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
136
|
-
# model has responded with audio at least once.
|
|
137
|
-
#
|
|
137
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
138
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
139
|
+
# recommend `marin` and `cedar` for best quality.
|
|
138
140
|
|
|
139
141
|
voice: nil
|
|
140
142
|
)
|
|
@@ -163,8 +165,9 @@ module OpenAI
|
|
|
163
165
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
164
166
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
165
167
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
166
|
-
# model has responded with audio at least once.
|
|
167
|
-
#
|
|
168
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
169
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
170
|
+
# recommend `marin` and `cedar` for best quality.
|
|
168
171
|
module Voice
|
|
169
172
|
extend OpenAI::Internal::Type::Union
|
|
170
173
|
|
|
@@ -1051,9 +1051,7 @@ module OpenAI
|
|
|
1051
1051
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1052
1052
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1053
1053
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
1054
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
1055
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
1056
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
1054
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1057
1055
|
sig { returns(T.nilable(T.any(String, OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol))) }
|
|
1058
1056
|
attr_reader :size
|
|
1059
1057
|
|
|
@@ -1151,9 +1149,7 @@ module OpenAI
|
|
|
1151
1149
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1152
1150
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1153
1151
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
1154
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
1155
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
1156
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
1152
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1157
1153
|
size: nil,
|
|
1158
1154
|
|
|
1159
1155
|
# The type of the image generation tool. Always `image_generation`.
|
|
@@ -1408,9 +1404,7 @@ module OpenAI
|
|
|
1408
1404
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1409
1405
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1410
1406
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
1411
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
1412
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
1413
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
1407
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1414
1408
|
module Size
|
|
1415
1409
|
extend OpenAI::Internal::Type::Union
|
|
1416
1410
|
|