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
|
@@ -5,6 +5,9 @@ module OpenAI
|
|
|
5
5
|
image: OpenAI::Models::ImageEditParams::image,
|
|
6
6
|
prompt: String,
|
|
7
7
|
?background: OpenAI::Models::ImageEditParams::background?,
|
|
8
|
+
?complexity: OpenAI::Models::ImageEditParams::complexity?,
|
|
9
|
+
?frame_count: Integer?,
|
|
10
|
+
?frame_duration_ms: Integer?,
|
|
8
11
|
?input_fidelity: OpenAI::Models::ImageEditParams::input_fidelity?,
|
|
9
12
|
?markup: OpenAI::Internal::file_input,
|
|
10
13
|
?mask: OpenAI::Internal::file_input,
|
|
@@ -54,6 +57,23 @@ module OpenAI
|
|
|
54
57
|
# set the output format to `png` or `webp`.
|
|
55
58
|
attr_accessor background: OpenAI::Models::ImageEditParams::background?
|
|
56
59
|
|
|
60
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
61
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
62
|
+
# reference image, independently of the SVG author's reasoning.
|
|
63
|
+
attr_accessor complexity: OpenAI::Models::ImageEditParams::complexity?
|
|
64
|
+
|
|
65
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
66
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
67
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
68
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
69
|
+
# to the GIF preview for the selected model.
|
|
70
|
+
attr_accessor frame_count: Integer?
|
|
71
|
+
|
|
72
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
73
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
74
|
+
# per frame. Only supported with output_format=gif.
|
|
75
|
+
attr_accessor frame_duration_ms: Integer?
|
|
76
|
+
|
|
57
77
|
# Control how much effort the model will exert to match the style and features,
|
|
58
78
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
59
79
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -62,7 +82,7 @@ module OpenAI
|
|
|
62
82
|
|
|
63
83
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
64
84
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
65
|
-
# GPT Image 2.5
|
|
85
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
66
86
|
#
|
|
67
87
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
68
88
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -71,7 +91,7 @@ module OpenAI
|
|
|
71
91
|
|
|
72
92
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
73
93
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
74
|
-
# GPT Image 2.5
|
|
94
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
75
95
|
#
|
|
76
96
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
77
97
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -103,8 +123,8 @@ module OpenAI
|
|
|
103
123
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
104
124
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
105
125
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
106
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
107
|
-
# `chatgpt-image-latest`).
|
|
126
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
127
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
108
128
|
#
|
|
109
129
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
110
130
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -119,8 +139,7 @@ module OpenAI
|
|
|
119
139
|
attr_accessor output_compression: Integer?
|
|
120
140
|
|
|
121
141
|
# The format in which the generated images are returned. This parameter is only
|
|
122
|
-
# supported for the GPT image models.
|
|
123
|
-
# default value is `png`.
|
|
142
|
+
# supported for the GPT image models. The default value is `png`.
|
|
124
143
|
attr_accessor output_format: OpenAI::Models::ImageEditParams::output_format?
|
|
125
144
|
|
|
126
145
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -200,6 +219,20 @@ module OpenAI
|
|
|
200
219
|
# backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
201
220
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
202
221
|
# set the output format to `png` or `webp`.
|
|
222
|
+
# @param complexity
|
|
223
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
224
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
225
|
+
# reference image, independently of the SVG author's reasoning.
|
|
226
|
+
# @param frame_count
|
|
227
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
228
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
229
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
230
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
231
|
+
# to the GIF preview for the selected model.
|
|
232
|
+
# @param frame_duration_ms
|
|
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.
|
|
203
236
|
# @param input_fidelity
|
|
204
237
|
# Control how much effort the model will exert to match the style and features,
|
|
205
238
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -208,7 +241,7 @@ module OpenAI
|
|
|
208
241
|
# @param markup
|
|
209
242
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
210
243
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
211
|
-
# GPT Image 2.5
|
|
244
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
212
245
|
#
|
|
213
246
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
214
247
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -226,8 +259,8 @@ module OpenAI
|
|
|
226
259
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
227
260
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
228
261
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
229
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
230
|
-
# `chatgpt-image-latest`).
|
|
262
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
263
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
231
264
|
#
|
|
232
265
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
233
266
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -239,8 +272,7 @@ module OpenAI
|
|
|
239
272
|
# defaults to 100.
|
|
240
273
|
# @param output_format
|
|
241
274
|
# The format in which the generated images are returned. This parameter is only
|
|
242
|
-
# supported for the GPT image models.
|
|
243
|
-
# default value is `png`.
|
|
275
|
+
# supported for the GPT image models. The default value is `png`.
|
|
244
276
|
# @param partial_images
|
|
245
277
|
# The number of partial images to generate. This parameter is used for streaming
|
|
246
278
|
# responses that return partial images. Value must be between 0 and 3. When set to
|
|
@@ -284,6 +316,9 @@ module OpenAI
|
|
|
284
316
|
image: OpenAI::Models::ImageEditParams::image,
|
|
285
317
|
prompt: String,
|
|
286
318
|
?background: OpenAI::Models::ImageEditParams::background?,
|
|
319
|
+
?complexity: OpenAI::Models::ImageEditParams::complexity?,
|
|
320
|
+
?frame_count: Integer?,
|
|
321
|
+
?frame_duration_ms: Integer?,
|
|
287
322
|
?input_fidelity: OpenAI::Models::ImageEditParams::input_fidelity?,
|
|
288
323
|
?markup: OpenAI::Internal::file_input,
|
|
289
324
|
?mask: OpenAI::Internal::file_input,
|
|
@@ -304,6 +339,9 @@ module OpenAI
|
|
|
304
339
|
image: OpenAI::Models::ImageEditParams::image,
|
|
305
340
|
prompt: String,
|
|
306
341
|
?background: OpenAI::Models::ImageEditParams::background?,
|
|
342
|
+
?complexity: OpenAI::Models::ImageEditParams::complexity?,
|
|
343
|
+
?frame_count: Integer?,
|
|
344
|
+
?frame_duration_ms: Integer?,
|
|
307
345
|
?input_fidelity: OpenAI::Models::ImageEditParams::input_fidelity?,
|
|
308
346
|
?markup: OpenAI::Internal::file_input,
|
|
309
347
|
?mask: OpenAI::Internal::file_input,
|
|
@@ -343,6 +381,18 @@ module OpenAI
|
|
|
343
381
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::background]
|
|
344
382
|
end
|
|
345
383
|
|
|
384
|
+
type complexity = :low | :medium | :high
|
|
385
|
+
|
|
386
|
+
module Complexity
|
|
387
|
+
extend OpenAI::Internal::Type::Enum
|
|
388
|
+
|
|
389
|
+
LOW: :low
|
|
390
|
+
MEDIUM: :medium
|
|
391
|
+
HIGH: :high
|
|
392
|
+
|
|
393
|
+
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::complexity]
|
|
394
|
+
end
|
|
395
|
+
|
|
346
396
|
type input_fidelity = :high | :low
|
|
347
397
|
|
|
348
398
|
module InputFidelity
|
|
@@ -362,7 +412,7 @@ module OpenAI
|
|
|
362
412
|
def self?.variants: -> ::Array[OpenAI::Models::ImageEditParams::model]
|
|
363
413
|
end
|
|
364
414
|
|
|
365
|
-
type output_format = :png | :jpeg | :webp
|
|
415
|
+
type output_format = :png | :jpeg | :webp | :gif
|
|
366
416
|
|
|
367
417
|
module OutputFormat
|
|
368
418
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -370,6 +420,7 @@ module OpenAI
|
|
|
370
420
|
PNG: :png
|
|
371
421
|
JPEG: :jpeg
|
|
372
422
|
WEBP: :webp
|
|
423
|
+
GIF: :gif
|
|
373
424
|
|
|
374
425
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::output_format]
|
|
375
426
|
end
|
|
@@ -4,6 +4,9 @@ module OpenAI
|
|
|
4
4
|
{
|
|
5
5
|
prompt: String,
|
|
6
6
|
?background: OpenAI::Models::ImageGenerateParams::background?,
|
|
7
|
+
?complexity: OpenAI::Models::ImageGenerateParams::complexity?,
|
|
8
|
+
?frame_count: Integer?,
|
|
9
|
+
?frame_duration_ms: Integer?,
|
|
7
10
|
?model: OpenAI::Models::ImageGenerateParams::model?,
|
|
8
11
|
?moderation: OpenAI::Models::ImageGenerateParams::moderation?,
|
|
9
12
|
?n: Integer?,
|
|
@@ -15,6 +18,7 @@ module OpenAI
|
|
|
15
18
|
?safety_identifier: String?,
|
|
16
19
|
?size: OpenAI::Models::ImageGenerateParams::size?,
|
|
17
20
|
?style: OpenAI::Models::ImageGenerateParams::style?,
|
|
21
|
+
?svg: OpenAI::ImageGenerateParams::Svg?,
|
|
18
22
|
?user: String,
|
|
19
23
|
?request_options: OpenAI::request_opts
|
|
20
24
|
}
|
|
@@ -38,11 +42,29 @@ module OpenAI
|
|
|
38
42
|
# set the output format to `png` or `webp`.
|
|
39
43
|
attr_accessor background: OpenAI::Models::ImageGenerateParams::background?
|
|
40
44
|
|
|
45
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
46
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
47
|
+
# reference image, independently of the SVG author's reasoning.
|
|
48
|
+
attr_accessor complexity: OpenAI::Models::ImageGenerateParams::complexity?
|
|
49
|
+
|
|
50
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
51
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
52
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
53
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
54
|
+
# to the GIF preview for the selected model.
|
|
55
|
+
attr_accessor frame_count: Integer?
|
|
56
|
+
|
|
57
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
58
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
59
|
+
# per frame. Only supported with output_format=gif.
|
|
60
|
+
attr_accessor frame_duration_ms: Integer?
|
|
61
|
+
|
|
41
62
|
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
42
63
|
# Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
43
64
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
44
65
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
45
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
66
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
67
|
+
# `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
|
|
46
68
|
#
|
|
47
69
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
48
70
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -62,7 +84,7 @@ module OpenAI
|
|
|
62
84
|
attr_accessor output_compression: Integer?
|
|
63
85
|
|
|
64
86
|
# The format in which the generated images are returned. This parameter is only
|
|
65
|
-
# supported for the GPT image models.
|
|
87
|
+
# supported for the GPT image models.
|
|
66
88
|
attr_accessor output_format: OpenAI::Models::ImageGenerateParams::output_format?
|
|
67
89
|
|
|
68
90
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -110,6 +132,14 @@ module OpenAI
|
|
|
110
132
|
# models; describe the desired style in the prompt instead.
|
|
111
133
|
attr_accessor style: OpenAI::Models::ImageGenerateParams::style?
|
|
112
134
|
|
|
135
|
+
# Selects the model and reasoning effort used to author SVG output. Requires
|
|
136
|
+
# output_format=svg and access to SVG model selection. When model selection is
|
|
137
|
+
# enabled, supply svg.model. When model selection is disabled, omit this object.
|
|
138
|
+
# The top-level model selects the image model that creates the reference image.
|
|
139
|
+
# SVG generation requires n=1 and does not support streaming, partial images,
|
|
140
|
+
# prompt_rewriter, or output_compression. SVG edits are not supported.
|
|
141
|
+
attr_accessor svg: OpenAI::ImageGenerateParams::Svg?
|
|
142
|
+
|
|
113
143
|
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
114
144
|
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
115
145
|
# empty.
|
|
@@ -135,12 +165,27 @@ module OpenAI
|
|
|
135
165
|
# backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
136
166
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
137
167
|
# set the output format to `png` or `webp`.
|
|
168
|
+
# @param complexity
|
|
169
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
170
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
171
|
+
# reference image, independently of the SVG author's reasoning.
|
|
172
|
+
# @param frame_count
|
|
173
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
174
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
175
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
176
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
177
|
+
# to the GIF preview for the selected model.
|
|
178
|
+
# @param frame_duration_ms
|
|
179
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
180
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
181
|
+
# per frame. Only supported with output_format=gif.
|
|
138
182
|
# @param model
|
|
139
183
|
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
140
184
|
# Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
141
185
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
142
186
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
143
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
187
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
188
|
+
# `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
|
|
144
189
|
#
|
|
145
190
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
146
191
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -156,7 +201,7 @@ module OpenAI
|
|
|
156
201
|
# defaults to 100.
|
|
157
202
|
# @param output_format
|
|
158
203
|
# The format in which the generated images are returned. This parameter is only
|
|
159
|
-
# supported for the GPT image models.
|
|
204
|
+
# supported for the GPT image models.
|
|
160
205
|
# @param partial_images
|
|
161
206
|
# The number of partial images to generate. This parameter is used for streaming
|
|
162
207
|
# responses that return partial images. Value must be between 0 and 3. When set to
|
|
@@ -196,6 +241,13 @@ module OpenAI
|
|
|
196
241
|
# @param style
|
|
197
242
|
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
198
243
|
# models; describe the desired style in the prompt instead.
|
|
244
|
+
# @param svg
|
|
245
|
+
# Selects the model and reasoning effort used to author SVG output. Requires
|
|
246
|
+
# output_format=svg and access to SVG model selection. When model selection is
|
|
247
|
+
# enabled, supply svg.model. When model selection is disabled, omit this object.
|
|
248
|
+
# The top-level model selects the image model that creates the reference image.
|
|
249
|
+
# SVG generation requires n=1 and does not support streaming, partial images,
|
|
250
|
+
# prompt_rewriter, or output_compression. SVG edits are not supported.
|
|
199
251
|
# @param user
|
|
200
252
|
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
201
253
|
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
@@ -204,6 +256,9 @@ module OpenAI
|
|
|
204
256
|
def initialize: (
|
|
205
257
|
prompt: String,
|
|
206
258
|
?background: OpenAI::Models::ImageGenerateParams::background?,
|
|
259
|
+
?complexity: OpenAI::Models::ImageGenerateParams::complexity?,
|
|
260
|
+
?frame_count: Integer?,
|
|
261
|
+
?frame_duration_ms: Integer?,
|
|
207
262
|
?model: OpenAI::Models::ImageGenerateParams::model?,
|
|
208
263
|
?moderation: OpenAI::Models::ImageGenerateParams::moderation?,
|
|
209
264
|
?n: Integer?,
|
|
@@ -215,6 +270,7 @@ module OpenAI
|
|
|
215
270
|
?safety_identifier: String?,
|
|
216
271
|
?size: OpenAI::Models::ImageGenerateParams::size?,
|
|
217
272
|
?style: OpenAI::Models::ImageGenerateParams::style?,
|
|
273
|
+
?svg: OpenAI::ImageGenerateParams::Svg?,
|
|
218
274
|
?user: String,
|
|
219
275
|
?request_options: OpenAI::request_opts
|
|
220
276
|
) -> void
|
|
@@ -222,6 +278,9 @@ module OpenAI
|
|
|
222
278
|
def to_hash: -> {
|
|
223
279
|
prompt: String,
|
|
224
280
|
?background: OpenAI::Models::ImageGenerateParams::background?,
|
|
281
|
+
?complexity: OpenAI::Models::ImageGenerateParams::complexity?,
|
|
282
|
+
?frame_count: Integer?,
|
|
283
|
+
?frame_duration_ms: Integer?,
|
|
225
284
|
?model: OpenAI::Models::ImageGenerateParams::model?,
|
|
226
285
|
?moderation: OpenAI::Models::ImageGenerateParams::moderation?,
|
|
227
286
|
?n: Integer?,
|
|
@@ -233,6 +292,7 @@ module OpenAI
|
|
|
233
292
|
?safety_identifier: String?,
|
|
234
293
|
?size: OpenAI::Models::ImageGenerateParams::size?,
|
|
235
294
|
?style: OpenAI::Models::ImageGenerateParams::style?,
|
|
295
|
+
?svg: OpenAI::ImageGenerateParams::Svg?,
|
|
236
296
|
?user: String,
|
|
237
297
|
?request_options: OpenAI::RequestOptions
|
|
238
298
|
}
|
|
@@ -249,6 +309,18 @@ module OpenAI
|
|
|
249
309
|
def self?.values: -> ::Array[OpenAI::Models::ImageGenerateParams::background]
|
|
250
310
|
end
|
|
251
311
|
|
|
312
|
+
type complexity = :low | :medium | :high
|
|
313
|
+
|
|
314
|
+
module Complexity
|
|
315
|
+
extend OpenAI::Internal::Type::Enum
|
|
316
|
+
|
|
317
|
+
LOW: :low
|
|
318
|
+
MEDIUM: :medium
|
|
319
|
+
HIGH: :high
|
|
320
|
+
|
|
321
|
+
def self?.values: -> ::Array[OpenAI::Models::ImageGenerateParams::complexity]
|
|
322
|
+
end
|
|
323
|
+
|
|
252
324
|
type model = String | OpenAI::Models::image_model
|
|
253
325
|
|
|
254
326
|
module Model
|
|
@@ -268,7 +340,7 @@ module OpenAI
|
|
|
268
340
|
def self?.values: -> ::Array[OpenAI::Models::ImageGenerateParams::moderation]
|
|
269
341
|
end
|
|
270
342
|
|
|
271
|
-
type output_format = :png | :jpeg | :webp
|
|
343
|
+
type output_format = :png | :jpeg | :webp | :gif | :svg
|
|
272
344
|
|
|
273
345
|
module OutputFormat
|
|
274
346
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -276,6 +348,8 @@ module OpenAI
|
|
|
276
348
|
PNG: :png
|
|
277
349
|
JPEG: :jpeg
|
|
278
350
|
WEBP: :webp
|
|
351
|
+
GIF: :gif
|
|
352
|
+
SVG: :svg
|
|
279
353
|
|
|
280
354
|
def self?.values: -> ::Array[OpenAI::Models::ImageGenerateParams::output_format]
|
|
281
355
|
end
|
|
@@ -345,6 +419,77 @@ module OpenAI
|
|
|
345
419
|
|
|
346
420
|
def self?.values: -> ::Array[OpenAI::Models::ImageGenerateParams::style]
|
|
347
421
|
end
|
|
422
|
+
|
|
423
|
+
type svg =
|
|
424
|
+
{
|
|
425
|
+
model: String,
|
|
426
|
+
?reasoning: OpenAI::ImageGenerateParams::Svg::Reasoning?
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
class Svg < OpenAI::Internal::Type::BaseModel
|
|
430
|
+
# Model used to author the SVG. Required when SVG model selection is enabled.
|
|
431
|
+
attr_accessor model: String
|
|
432
|
+
|
|
433
|
+
# Reasoning settings for the SVG author, independent of image complexity. Omitted
|
|
434
|
+
# or null effort uses the author model's default. Supported efforts depend on the
|
|
435
|
+
# selected author model.
|
|
436
|
+
attr_accessor reasoning: OpenAI::ImageGenerateParams::Svg::Reasoning?
|
|
437
|
+
|
|
438
|
+
# @param model
|
|
439
|
+
# Model used to author the SVG. Required when SVG model selection is enabled.
|
|
440
|
+
# @param reasoning
|
|
441
|
+
# Reasoning settings for the SVG author, independent of image complexity. Omitted
|
|
442
|
+
# or null effort uses the author model's default. Supported efforts depend on the
|
|
443
|
+
# selected author model.
|
|
444
|
+
def initialize: (
|
|
445
|
+
model: String,
|
|
446
|
+
?reasoning: OpenAI::ImageGenerateParams::Svg::Reasoning?
|
|
447
|
+
) -> void
|
|
448
|
+
|
|
449
|
+
def to_hash: -> {
|
|
450
|
+
model: String,
|
|
451
|
+
?reasoning: OpenAI::ImageGenerateParams::Svg::Reasoning?
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
type reasoning =
|
|
455
|
+
{
|
|
456
|
+
?effort: OpenAI::Models::ImageGenerateParams::Svg::Reasoning::effort?
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
460
|
+
# Controls how much effort the SVG author spends on reasoning. Uses the author
|
|
461
|
+
# model's default when omitted or null.
|
|
462
|
+
attr_accessor effort: OpenAI::Models::ImageGenerateParams::Svg::Reasoning::effort?
|
|
463
|
+
|
|
464
|
+
# @param effort
|
|
465
|
+
# Controls how much effort the SVG author spends on reasoning. Uses the author
|
|
466
|
+
# model's default when omitted or null.
|
|
467
|
+
def initialize: (
|
|
468
|
+
?effort: OpenAI::Models::ImageGenerateParams::Svg::Reasoning::effort?
|
|
469
|
+
) -> void
|
|
470
|
+
|
|
471
|
+
def to_hash: -> {
|
|
472
|
+
?effort: OpenAI::Models::ImageGenerateParams::Svg::Reasoning::effort?
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
type effort =
|
|
476
|
+
:none | :minimal | :low | :medium | :high | :xhigh | :max
|
|
477
|
+
|
|
478
|
+
module Effort
|
|
479
|
+
extend OpenAI::Internal::Type::Enum
|
|
480
|
+
|
|
481
|
+
NONE: :none
|
|
482
|
+
MINIMAL: :minimal
|
|
483
|
+
LOW: :low
|
|
484
|
+
MEDIUM: :medium
|
|
485
|
+
HIGH: :high
|
|
486
|
+
XHIGH: :xhigh
|
|
487
|
+
MAX: :max
|
|
488
|
+
|
|
489
|
+
def self?.values: -> ::Array[OpenAI::Models::ImageGenerateParams::Svg::Reasoning::effort]
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
end
|
|
348
493
|
end
|
|
349
494
|
end
|
|
350
495
|
end
|
|
@@ -8,6 +8,8 @@ module OpenAI
|
|
|
8
8
|
| :"gpt-image-2.5-sunburst-2026-09-08"
|
|
9
9
|
| :"gpt-image-2.5-flare"
|
|
10
10
|
| :"gpt-image-2.5-flare-2026-09-08"
|
|
11
|
+
| :"gpt-image-2.6-sunburst"
|
|
12
|
+
| :"gpt-image-2.6-flare"
|
|
11
13
|
| :"gpt-image-1"
|
|
12
14
|
| :"gpt-image-1-mini"
|
|
13
15
|
| :"chatgpt-image-latest"
|
|
@@ -24,6 +26,8 @@ module OpenAI
|
|
|
24
26
|
GPT_IMAGE_2_5_SUNBURST_2026_09_08: :"gpt-image-2.5-sunburst-2026-09-08"
|
|
25
27
|
GPT_IMAGE_2_5_FLARE: :"gpt-image-2.5-flare"
|
|
26
28
|
GPT_IMAGE_2_5_FLARE_2026_09_08: :"gpt-image-2.5-flare-2026-09-08"
|
|
29
|
+
GPT_IMAGE_2_6_SUNBURST: :"gpt-image-2.6-sunburst"
|
|
30
|
+
GPT_IMAGE_2_6_FLARE: :"gpt-image-2.6-flare"
|
|
27
31
|
GPT_IMAGE_1: :"gpt-image-1"
|
|
28
32
|
GPT_IMAGE_1_MINI: :"gpt-image-1-mini"
|
|
29
33
|
CHATGPT_IMAGE_LATEST: :"chatgpt-image-latest"
|
|
@@ -9,6 +9,7 @@ module OpenAI
|
|
|
9
9
|
?quality: OpenAI::Models::ImagesResponse::quality,
|
|
10
10
|
?safety_identifier: String?,
|
|
11
11
|
?size: OpenAI::Models::ImagesResponse::size,
|
|
12
|
+
?svg_usage: OpenAI::ImagesResponse::SvgUsage,
|
|
12
13
|
?usage: OpenAI::ImagesResponse::Usage
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -32,10 +33,10 @@ module OpenAI
|
|
|
32
33
|
# The list of generated images.
|
|
33
34
|
def data=: (::Array[OpenAI::Image]) -> ::Array[OpenAI::Image]
|
|
34
35
|
|
|
35
|
-
# The output format of the image
|
|
36
|
+
# The output format of the generated image.
|
|
36
37
|
attr_reader output_format: OpenAI::Models::ImagesResponse::output_format?
|
|
37
38
|
|
|
38
|
-
# The output format of the image
|
|
39
|
+
# The output format of the generated image.
|
|
39
40
|
def output_format=: (
|
|
40
41
|
OpenAI::Models::ImagesResponse::output_format
|
|
41
42
|
) -> OpenAI::Models::ImagesResponse::output_format
|
|
@@ -63,6 +64,16 @@ module OpenAI
|
|
|
63
64
|
OpenAI::Models::ImagesResponse::size
|
|
64
65
|
) -> OpenAI::Models::ImagesResponse::size
|
|
65
66
|
|
|
67
|
+
# Token usage for the model that authored the SVG, separate from image rendering
|
|
68
|
+
# usage.
|
|
69
|
+
attr_reader svg_usage: OpenAI::ImagesResponse::SvgUsage?
|
|
70
|
+
|
|
71
|
+
# Token usage for the model that authored the SVG, separate from image rendering
|
|
72
|
+
# usage.
|
|
73
|
+
def svg_usage=: (
|
|
74
|
+
OpenAI::ImagesResponse::SvgUsage
|
|
75
|
+
) -> OpenAI::ImagesResponse::SvgUsage
|
|
76
|
+
|
|
66
77
|
# For `gpt-image-1` only, the token usage information for the image generation.
|
|
67
78
|
attr_reader usage: OpenAI::ImagesResponse::Usage?
|
|
68
79
|
|
|
@@ -79,7 +90,7 @@ module OpenAI
|
|
|
79
90
|
# @param data
|
|
80
91
|
# The list of generated images.
|
|
81
92
|
# @param output_format
|
|
82
|
-
# The output format of the image
|
|
93
|
+
# The output format of the generated image.
|
|
83
94
|
# @param quality
|
|
84
95
|
# The quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or
|
|
85
96
|
# `max`.
|
|
@@ -89,6 +100,9 @@ module OpenAI
|
|
|
89
100
|
# `user` value when `safety_identifier` is omitted, null, or empty.
|
|
90
101
|
# @param size
|
|
91
102
|
# The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
103
|
+
# @param svg_usage
|
|
104
|
+
# Token usage for the model that authored the SVG, separate from image rendering
|
|
105
|
+
# usage.
|
|
92
106
|
# @param usage
|
|
93
107
|
# For `gpt-image-1` only, the token usage information for the image generation.
|
|
94
108
|
def initialize: (
|
|
@@ -99,6 +113,7 @@ module OpenAI
|
|
|
99
113
|
?quality: OpenAI::Models::ImagesResponse::quality,
|
|
100
114
|
?safety_identifier: String?,
|
|
101
115
|
?size: OpenAI::Models::ImagesResponse::size,
|
|
116
|
+
?svg_usage: OpenAI::ImagesResponse::SvgUsage,
|
|
102
117
|
?usage: OpenAI::ImagesResponse::Usage
|
|
103
118
|
) -> void
|
|
104
119
|
|
|
@@ -110,6 +125,7 @@ module OpenAI
|
|
|
110
125
|
?quality: OpenAI::Models::ImagesResponse::quality,
|
|
111
126
|
?safety_identifier: String?,
|
|
112
127
|
?size: OpenAI::Models::ImagesResponse::size,
|
|
128
|
+
?svg_usage: OpenAI::ImagesResponse::SvgUsage,
|
|
113
129
|
?usage: OpenAI::ImagesResponse::Usage
|
|
114
130
|
}
|
|
115
131
|
|
|
@@ -124,7 +140,7 @@ module OpenAI
|
|
|
124
140
|
def self?.values: -> ::Array[OpenAI::Models::ImagesResponse::background]
|
|
125
141
|
end
|
|
126
142
|
|
|
127
|
-
type output_format = :png | :webp | :jpeg
|
|
143
|
+
type output_format = :png | :webp | :jpeg | :gif | :svg
|
|
128
144
|
|
|
129
145
|
module OutputFormat
|
|
130
146
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -132,6 +148,8 @@ module OpenAI
|
|
|
132
148
|
PNG: :png
|
|
133
149
|
WEBP: :webp
|
|
134
150
|
JPEG: :jpeg
|
|
151
|
+
GIF: :gif
|
|
152
|
+
SVG: :svg
|
|
135
153
|
|
|
136
154
|
def self?.values: -> ::Array[OpenAI::Models::ImagesResponse::output_format]
|
|
137
155
|
end
|
|
@@ -166,6 +184,43 @@ module OpenAI
|
|
|
166
184
|
| :"1536x1024")]
|
|
167
185
|
end
|
|
168
186
|
|
|
187
|
+
type svg_usage =
|
|
188
|
+
{
|
|
189
|
+
input_tokens: Integer,
|
|
190
|
+
model: String,
|
|
191
|
+
output_tokens: Integer,
|
|
192
|
+
reasoning_tokens: Integer,
|
|
193
|
+
total_tokens: Integer
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
class SvgUsage < OpenAI::Internal::Type::BaseModel
|
|
197
|
+
attr_accessor input_tokens: Integer
|
|
198
|
+
|
|
199
|
+
attr_accessor model: String
|
|
200
|
+
|
|
201
|
+
attr_accessor output_tokens: Integer
|
|
202
|
+
|
|
203
|
+
attr_accessor reasoning_tokens: Integer
|
|
204
|
+
|
|
205
|
+
attr_accessor total_tokens: Integer
|
|
206
|
+
|
|
207
|
+
def initialize: (
|
|
208
|
+
input_tokens: Integer,
|
|
209
|
+
model: String,
|
|
210
|
+
output_tokens: Integer,
|
|
211
|
+
reasoning_tokens: Integer,
|
|
212
|
+
total_tokens: Integer
|
|
213
|
+
) -> void
|
|
214
|
+
|
|
215
|
+
def to_hash: -> {
|
|
216
|
+
input_tokens: Integer,
|
|
217
|
+
model: String,
|
|
218
|
+
output_tokens: Integer,
|
|
219
|
+
reasoning_tokens: Integer,
|
|
220
|
+
total_tokens: Integer
|
|
221
|
+
}
|
|
222
|
+
end
|
|
223
|
+
|
|
169
224
|
type usage =
|
|
170
225
|
{
|
|
171
226
|
input_tokens: Integer,
|
|
@@ -123,9 +123,22 @@ module OpenAI
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
type noise_reduction =
|
|
126
|
-
{
|
|
126
|
+
{
|
|
127
|
+
?strength: Float,
|
|
128
|
+
?type: OpenAI::Models::Realtime::noise_reduction_type
|
|
129
|
+
}
|
|
127
130
|
|
|
128
131
|
class NoiseReduction < OpenAI::Internal::Type::BaseModel
|
|
132
|
+
# Input noise suppression strength. Higher values apply more suppression. Defaults
|
|
133
|
+
# to 1 when noise reduction is first enabled. Omitting strength from a session
|
|
134
|
+
# update preserves the current strength.
|
|
135
|
+
attr_reader strength: Float?
|
|
136
|
+
|
|
137
|
+
# Input noise suppression strength. Higher values apply more suppression. Defaults
|
|
138
|
+
# to 1 when noise reduction is first enabled. Omitting strength from a session
|
|
139
|
+
# update preserves the current strength.
|
|
140
|
+
def strength=: (Float) -> Float
|
|
141
|
+
|
|
129
142
|
# Type of noise reduction. `near_field` is for close-talking microphones such as
|
|
130
143
|
# headphones, `far_field` is for far-field microphones such as laptop or
|
|
131
144
|
# conference room microphones.
|
|
@@ -138,15 +151,21 @@ module OpenAI
|
|
|
138
151
|
OpenAI::Models::Realtime::noise_reduction_type
|
|
139
152
|
) -> OpenAI::Models::Realtime::noise_reduction_type
|
|
140
153
|
|
|
154
|
+
# @param strength
|
|
155
|
+
# Input noise suppression strength. Higher values apply more suppression. Defaults
|
|
156
|
+
# to 1 when noise reduction is first enabled. Omitting strength from a session
|
|
157
|
+
# update preserves the current strength.
|
|
141
158
|
# @param type
|
|
142
159
|
# Type of noise reduction. `near_field` is for close-talking microphones such as
|
|
143
160
|
# headphones, `far_field` is for far-field microphones such as laptop or
|
|
144
161
|
# conference room microphones.
|
|
145
162
|
def initialize: (
|
|
163
|
+
?strength: Float,
|
|
146
164
|
?type: OpenAI::Models::Realtime::noise_reduction_type
|
|
147
165
|
) -> void
|
|
148
166
|
|
|
149
167
|
def to_hash: -> {
|
|
168
|
+
?strength: Float,
|
|
150
169
|
?type: OpenAI::Models::Realtime::noise_reduction_type
|
|
151
170
|
}
|
|
152
171
|
end
|