openai 0.117.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.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/openai/client.rb +1 -1
  5. data/lib/openai/helpers/data_residency.rb +4 -1
  6. data/lib/openai/models/admin/organization/projects/project_optional_service_tier.rb +24 -0
  7. data/lib/openai/models/admin/organization/projects/project_service_tier_settings.rb +88 -0
  8. data/lib/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rb +29 -0
  9. data/lib/openai/models/admin/organization/projects/service_tier_setting_update_params.rb +92 -0
  10. data/lib/openai/models/all_models.rb +1 -0
  11. data/lib/openai/models/beta/beta_compacted_response.rb +34 -1
  12. data/lib/openai/models/beta/beta_response.rb +35 -1
  13. data/lib/openai/models/beta/beta_response_input_item.rb +45 -1
  14. data/lib/openai/models/beta/beta_response_item.rb +45 -1
  15. data/lib/openai/models/beta/beta_response_output_item.rb +45 -1
  16. data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +186 -13
  17. data/lib/openai/models/beta/beta_response_usage.rb +33 -1
  18. data/lib/openai/models/beta/beta_responses_client_event.rb +58 -10
  19. data/lib/openai/models/beta/beta_tool.rb +164 -13
  20. data/lib/openai/models/beta/response_compact_params.rb +47 -4
  21. data/lib/openai/models/beta/response_create_params.rb +54 -10
  22. data/lib/openai/models/beta/session_turn_error.rb +3 -0
  23. data/lib/openai/models/chat/completion_create_params.rb +3 -3
  24. data/lib/openai/models/conversations/conversation_item.rb +45 -1
  25. data/lib/openai/models/image_edit_params.rb +72 -16
  26. data/lib/openai/models/image_generate_params.rb +160 -8
  27. data/lib/openai/models/image_model.rb +2 -0
  28. data/lib/openai/models/images_response.rb +55 -4
  29. data/lib/openai/models/realtime/realtime_audio_config_input.rb +14 -1
  30. data/lib/openai/models/realtime/realtime_session_create_response.rb +14 -1
  31. data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +14 -1
  32. data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +14 -1
  33. data/lib/openai/models/realtime/realtime_translation_session.rb +14 -1
  34. data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +14 -1
  35. data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +14 -1
  36. data/lib/openai/models/responses/compacted_response.rb +37 -1
  37. data/lib/openai/models/responses/response.rb +35 -1
  38. data/lib/openai/models/responses/response_compact_params.rb +53 -4
  39. data/lib/openai/models/responses/response_create_params.rb +57 -10
  40. data/lib/openai/models/responses/response_input_item.rb +45 -1
  41. data/lib/openai/models/responses/response_item.rb +45 -1
  42. data/lib/openai/models/responses/response_output_item.rb +45 -1
  43. data/lib/openai/models/responses/response_tool_search_output_item_param.rb +186 -13
  44. data/lib/openai/models/responses/response_usage.rb +33 -1
  45. data/lib/openai/models/responses/responses_client_event.rb +58 -10
  46. data/lib/openai/models/responses/tool.rb +164 -13
  47. data/lib/openai/models/responses_model.rb +1 -0
  48. data/lib/openai/resources/admin/organization/projects/service_tier_settings.rb +77 -0
  49. data/lib/openai/resources/admin/organization/projects.rb +6 -0
  50. data/lib/openai/resources/admin/organization.rb +6 -6
  51. data/lib/openai/resources/beta/responses.rb +18 -9
  52. data/lib/openai/resources/chat/completions.rb +2 -2
  53. data/lib/openai/resources/images.rb +102 -18
  54. data/lib/openai/resources/responses.rb +15 -6
  55. data/lib/openai/version.rb +1 -1
  56. data/lib/openai.rb +5 -0
  57. data/rbi/openai/models/admin/organization/projects/project_optional_service_tier.rbi +45 -0
  58. data/rbi/openai/models/admin/organization/projects/project_service_tier_settings.rbi +143 -0
  59. data/rbi/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbi +63 -0
  60. data/rbi/openai/models/admin/organization/projects/service_tier_setting_update_params.rbi +183 -0
  61. data/rbi/openai/models/all_models.rbi +1 -0
  62. data/rbi/openai/models/beta/beta_compacted_response.rbi +67 -1
  63. data/rbi/openai/models/beta/beta_response.rbi +63 -0
  64. data/rbi/openai/models/beta/beta_response_input_item.rbi +82 -1
  65. data/rbi/openai/models/beta/beta_response_item.rbi +82 -1
  66. data/rbi/openai/models/beta/beta_response_output_item.rbi +82 -1
  67. data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +338 -13
  68. data/rbi/openai/models/beta/beta_response_usage.rbi +66 -3
  69. data/rbi/openai/models/beta/beta_responses_client_event.rbi +118 -9
  70. data/rbi/openai/models/beta/beta_tool.rbi +245 -13
  71. data/rbi/openai/models/beta/response_compact_params.rbi +84 -3
  72. data/rbi/openai/models/beta/response_create_params.rbi +91 -9
  73. data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
  74. data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
  75. data/rbi/openai/models/conversations/conversation_item.rbi +84 -1
  76. data/rbi/openai/models/image_edit_params.rbi +76 -14
  77. data/rbi/openai/models/image_generate_params.rbi +218 -6
  78. data/rbi/openai/models/image_model.rbi +2 -0
  79. data/rbi/openai/models/images_response.rbi +90 -3
  80. data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +17 -1
  81. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +17 -1
  82. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +17 -1
  83. data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +17 -1
  84. data/rbi/openai/models/realtime/realtime_translation_session.rbi +19 -3
  85. data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +19 -3
  86. data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +19 -3
  87. data/rbi/openai/models/responses/compacted_response.rbi +67 -1
  88. data/rbi/openai/models/responses/response.rbi +63 -0
  89. data/rbi/openai/models/responses/response_compact_params.rbi +91 -3
  90. data/rbi/openai/models/responses/response_create_params.rbi +97 -9
  91. data/rbi/openai/models/responses/response_input_item.rbi +82 -1
  92. data/rbi/openai/models/responses/response_item.rbi +82 -1
  93. data/rbi/openai/models/responses/response_output_item.rbi +82 -1
  94. data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +340 -13
  95. data/rbi/openai/models/responses/response_usage.rbi +66 -3
  96. data/rbi/openai/models/responses/responses_client_event.rbi +118 -9
  97. data/rbi/openai/models/responses/tool.rbi +248 -13
  98. data/rbi/openai/models/responses_model.rbi +1 -0
  99. data/rbi/openai/resources/admin/organization/projects/service_tier_settings.rbi +67 -0
  100. data/rbi/openai/resources/admin/organization/projects.rbi +3 -0
  101. data/rbi/openai/resources/admin/organization.rbi +3 -3
  102. data/rbi/openai/resources/beta/responses.rbi +15 -6
  103. data/rbi/openai/resources/chat/completions.rbi +2 -2
  104. data/rbi/openai/resources/images.rbi +98 -14
  105. data/rbi/openai/resources/responses.rbi +14 -3
  106. data/sig/openai/models/admin/organization/projects/project_optional_service_tier.rbs +23 -0
  107. data/sig/openai/models/admin/organization/projects/project_service_tier_settings.rbs +72 -0
  108. data/sig/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbs +32 -0
  109. data/sig/openai/models/admin/organization/projects/service_tier_setting_update_params.rbs +91 -0
  110. data/sig/openai/models/all_models.rbs +2 -0
  111. data/sig/openai/models/beta/beta_compacted_response.rbs +42 -2
  112. data/sig/openai/models/beta/beta_response.rbs +42 -1
  113. data/sig/openai/models/beta/beta_response_input_item.rbs +51 -3
  114. data/sig/openai/models/beta/beta_response_item.rbs +51 -3
  115. data/sig/openai/models/beta/beta_response_output_item.rbs +51 -3
  116. data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +188 -15
  117. data/sig/openai/models/beta/beta_response_usage.rbs +40 -3
  118. data/sig/openai/models/beta/beta_responses_client_event.rbs +67 -10
  119. data/sig/openai/models/beta/beta_tool.rbs +188 -15
  120. data/sig/openai/models/beta/response_compact_params.rbs +58 -2
  121. data/sig/openai/models/beta/response_create_params.rbs +67 -10
  122. data/sig/openai/models/beta/session_turn_error.rbs +4 -0
  123. data/sig/openai/models/chat/completion_create_params.rbs +3 -3
  124. data/sig/openai/models/conversations/conversation_item.rbs +51 -3
  125. data/sig/openai/models/image_edit_params.rbs +63 -12
  126. data/sig/openai/models/image_generate_params.rbs +150 -5
  127. data/sig/openai/models/image_model.rbs +4 -0
  128. data/sig/openai/models/images_response.rbs +59 -4
  129. data/sig/openai/models/realtime/realtime_audio_config_input.rbs +20 -1
  130. data/sig/openai/models/realtime/realtime_session_create_response.rbs +20 -1
  131. data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +20 -1
  132. data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +20 -1
  133. data/sig/openai/models/realtime/realtime_translation_session.rbs +22 -3
  134. data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +22 -3
  135. data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +22 -3
  136. data/sig/openai/models/responses/compacted_response.rbs +42 -2
  137. data/sig/openai/models/responses/response.rbs +42 -1
  138. data/sig/openai/models/responses/response_compact_params.rbs +60 -2
  139. data/sig/openai/models/responses/response_create_params.rbs +67 -10
  140. data/sig/openai/models/responses/response_input_item.rbs +51 -3
  141. data/sig/openai/models/responses/response_item.rbs +51 -3
  142. data/sig/openai/models/responses/response_output_item.rbs +51 -3
  143. data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +188 -15
  144. data/sig/openai/models/responses/response_usage.rbs +40 -3
  145. data/sig/openai/models/responses/responses_client_event.rbs +67 -10
  146. data/sig/openai/models/responses/tool.rbs +188 -15
  147. data/sig/openai/models/responses_model.rbs +2 -0
  148. data/sig/openai/resources/admin/organization/projects/service_tier_settings.rbs +25 -0
  149. data/sig/openai/resources/admin/organization/projects.rbs +2 -0
  150. data/sig/openai/resources/admin/organization.rbs +2 -2
  151. data/sig/openai/resources/beta/responses.rbs +3 -0
  152. data/sig/openai/resources/images.rbs +14 -0
  153. data/sig/openai/resources/responses.rbs +4 -0
  154. metadata +16 -1
@@ -35,6 +35,9 @@ module OpenAI
35
35
  sig { returns(OpenAI::Resources::Admin::Organization::ExternalKeys) }
36
36
  attr_reader :external_keys
37
37
 
38
+ sig { returns(OpenAI::Resources::Admin::Organization::WorkloadIdentityProviders) }
39
+ attr_reader :workload_identity_providers
40
+
38
41
  sig { returns(OpenAI::Resources::Admin::Organization::ExternalStorage) }
39
42
  attr_reader :external_storage
40
43
 
@@ -50,9 +53,6 @@ module OpenAI
50
53
  sig { returns(OpenAI::Resources::Admin::Organization::Projects) }
51
54
  attr_reader :projects
52
55
 
53
- sig { returns(OpenAI::Resources::Admin::Organization::WorkloadIdentityProviders) }
54
- attr_reader :workload_identity_providers
55
-
56
56
  # @api private
57
57
  sig { params(client: OpenAI::Client).returns(T.attached_class) }
58
58
  def self.new(client:)
@@ -59,6 +59,7 @@ module OpenAI
59
59
  background: T.nilable(T::Boolean),
60
60
  context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
61
61
  conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
62
+ image: OpenAI::Beta::ResponseCreateParams::Image::OrHash,
62
63
  include: T.nilable(T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]),
63
64
  input: OpenAI::Beta::ResponseCreateParams::Input::Variants,
64
65
  instructions: T.nilable(String),
@@ -135,6 +136,8 @@ module OpenAI
135
136
  # items and output items from this response are automatically added to this
136
137
  # conversation after this response completes.
137
138
  conversation: nil,
139
+ # Body param: Request level image options.
140
+ image: nil,
138
141
  # Body param: Specify additional output data to include in the model response.
139
142
  # Currently supported values are:
140
143
  #
@@ -218,8 +221,8 @@ module OpenAI
218
221
  # `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For
219
222
  # cache matching, OpenAI considers up to the latest 80 breakpoints in the
220
223
  # conversation, without a content-block lookback limit. Set `mode` to `explicit`
221
- # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
222
- # currently the only supported value. See the
224
+ # to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported
225
+ # lifetimes depend on the API. See the
223
226
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
224
227
  # for current details.
225
228
  prompt_cache_options: nil,
@@ -377,6 +380,7 @@ module OpenAI
377
380
  background: T.nilable(T::Boolean),
378
381
  context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
379
382
  conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
383
+ image: OpenAI::Beta::ResponseCreateParams::Image::OrHash,
380
384
  include: T.nilable(T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]),
381
385
  input: OpenAI::Beta::ResponseCreateParams::Input::Variants,
382
386
  instructions: T.nilable(String),
@@ -457,6 +461,8 @@ module OpenAI
457
461
  # items and output items from this response are automatically added to this
458
462
  # conversation after this response completes.
459
463
  conversation: nil,
464
+ # Body param: Request level image options.
465
+ image: nil,
460
466
  # Body param: Specify additional output data to include in the model response.
461
467
  # Currently supported values are:
462
468
  #
@@ -540,8 +546,8 @@ module OpenAI
540
546
  # `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For
541
547
  # cache matching, OpenAI considers up to the latest 80 breakpoints in the
542
548
  # conversation, without a content-block lookback limit. Set `mode` to `explicit`
543
- # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
544
- # currently the only supported value. See the
549
+ # to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported
550
+ # lifetimes depend on the API. See the
545
551
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
546
552
  # for current details.
547
553
  prompt_cache_options: nil,
@@ -812,6 +818,7 @@ module OpenAI
812
818
  sig {
813
819
  params(
814
820
  model: T.nilable(T.any(OpenAI::Beta::ResponseCompactParams::Model::OrSymbol, String)),
821
+ image: OpenAI::Beta::ResponseCompactParams::Image::OrHash,
815
822
  input: T.nilable(OpenAI::Beta::ResponseCompactParams::Input::Variants),
816
823
  instructions: T.nilable(String),
817
824
  previous_response_id: T.nilable(String),
@@ -831,6 +838,8 @@ module OpenAI
831
838
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
832
839
  # compare available models.
833
840
  model:,
841
+ # Body param: Request level image options.
842
+ image: nil,
834
843
  # Body param: Text, image, or file inputs to the model, used to generate a
835
844
  # response
836
845
  input: nil,
@@ -852,8 +861,8 @@ module OpenAI
852
861
  # `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For
853
862
  # cache matching, OpenAI considers up to the latest 80 breakpoints in the
854
863
  # conversation, without a content-block lookback limit. Set `mode` to `explicit`
855
- # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
856
- # currently the only supported value. See the
864
+ # to disable the implicit breakpoint. The `ttl` defaults to `30m`. Supported
865
+ # lifetimes depend on the API. See the
857
866
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
858
867
  # for current details.
859
868
  prompt_cache_options: nil,
@@ -222,7 +222,7 @@ module OpenAI
222
222
  # request can write up to four breakpoints. For cache matching, OpenAI considers
223
223
  # up to the latest 80 breakpoints in the conversation, without a content-block
224
224
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
225
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
225
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
226
226
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
227
227
  # for current details.
228
228
  prompt_cache_options: nil,
@@ -567,7 +567,7 @@ module OpenAI
567
567
  # request can write up to four breakpoints. For cache matching, OpenAI considers
568
568
  # up to the latest 80 breakpoints in the conversation, without a content-block
569
569
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
570
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
570
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
571
571
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
572
572
  # for current details.
573
573
  prompt_cache_options: nil,
@@ -58,6 +58,9 @@ module OpenAI
58
58
  image: OpenAI::ImageEditParams::Image::Variants,
59
59
  prompt: String,
60
60
  background: T.nilable(OpenAI::ImageEditParams::Background::OrSymbol),
61
+ complexity: T.nilable(OpenAI::ImageEditParams::Complexity::OrSymbol),
62
+ frame_count: T.nilable(Integer),
63
+ frame_duration_ms: T.nilable(Integer),
61
64
  input_fidelity: T.nilable(OpenAI::ImageEditParams::InputFidelity::OrSymbol),
62
65
  markup: OpenAI::Internal::FileInput,
63
66
  mask: OpenAI::Internal::FileInput,
@@ -103,6 +106,20 @@ module OpenAI
103
106
  # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
104
107
  # set the output format to `png` or `webp`.
105
108
  background: nil,
109
+ # Computation spent planning the image, independently of rendering quality. Uses
110
+ # the image model's configured default when omitted. For SVG output, controls the
111
+ # reference image, independently of the SVG author's reasoning.
112
+ complexity: nil,
113
+ # Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
114
+ # 9 when omitted. Only supported with output_format=gif. The requested size must
115
+ # satisfy the selected model's GIF size limits. GIF output does not support
116
+ # streaming, partial images, masks, or custom output compression. Requires access
117
+ # to the GIF preview for the selected model.
118
+ frame_count: nil,
119
+ # Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
120
+ # GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
121
+ # per frame. Only supported with output_format=gif.
122
+ frame_duration_ms: nil,
106
123
  # Control how much effort the model will exert to match the style and features,
107
124
  # especially facial features, of input images. Supports `high` and `low` on
108
125
  # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
@@ -110,7 +127,7 @@ module OpenAI
110
127
  input_fidelity: nil,
111
128
  # A transparent PNG overlaid on the first image to guide the edit. Must match that
112
129
  # image's dimensions after orientation and contain transparent pixels. Supports
113
- # GPT Image 2.5 and 2.6. Cannot be combined with mask.
130
+ # GPT Image 2.5. Cannot be combined with mask.
114
131
  #
115
132
  # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
116
133
  # metadata. Use `OpenAI::FilePart` when you need to override the filename or
@@ -128,8 +145,8 @@ module OpenAI
128
145
  # The GPT image model to use for image editing (`gpt-image-1-mini`,
129
146
  # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
130
147
  # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
131
- # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
132
- # `chatgpt-image-latest`).
148
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
149
+ # `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
133
150
  #
134
151
  # `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
135
152
  # `gpt-image-2.5-flare` instead.
@@ -141,8 +158,7 @@ module OpenAI
141
158
  # defaults to 100.
142
159
  output_compression: nil,
143
160
  # The format in which the generated images are returned. This parameter is only
144
- # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
145
- # default value is `png`.
161
+ # supported for the GPT image models. The default value is `png`.
146
162
  output_format: nil,
147
163
  # The number of partial images to generate. This parameter is used for streaming
148
164
  # responses that return partial images. Value must be between 0 and 3. When set to
@@ -199,6 +215,9 @@ module OpenAI
199
215
  image: OpenAI::ImageEditParams::Image::Variants,
200
216
  prompt: String,
201
217
  background: T.nilable(OpenAI::ImageEditParams::Background::OrSymbol),
218
+ complexity: T.nilable(OpenAI::ImageEditParams::Complexity::OrSymbol),
219
+ frame_count: T.nilable(Integer),
220
+ frame_duration_ms: T.nilable(Integer),
202
221
  input_fidelity: T.nilable(OpenAI::ImageEditParams::InputFidelity::OrSymbol),
203
222
  markup: OpenAI::Internal::FileInput,
204
223
  mask: OpenAI::Internal::FileInput,
@@ -244,6 +263,20 @@ module OpenAI
244
263
  # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
245
264
  # set the output format to `png` or `webp`.
246
265
  background: nil,
266
+ # Computation spent planning the image, independently of rendering quality. Uses
267
+ # the image model's configured default when omitted. For SVG output, controls the
268
+ # reference image, independently of the SVG author's reasoning.
269
+ complexity: nil,
270
+ # Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
271
+ # 9 when omitted. Only supported with output_format=gif. The requested size must
272
+ # satisfy the selected model's GIF size limits. GIF output does not support
273
+ # streaming, partial images, masks, or custom output compression. Requires access
274
+ # to the GIF preview for the selected model.
275
+ frame_count: nil,
276
+ # Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
277
+ # GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
278
+ # per frame. Only supported with output_format=gif.
279
+ frame_duration_ms: nil,
247
280
  # Control how much effort the model will exert to match the style and features,
248
281
  # especially facial features, of input images. Supports `high` and `low` on
249
282
  # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
@@ -251,7 +284,7 @@ module OpenAI
251
284
  input_fidelity: nil,
252
285
  # A transparent PNG overlaid on the first image to guide the edit. Must match that
253
286
  # image's dimensions after orientation and contain transparent pixels. Supports
254
- # GPT Image 2.5 and 2.6. Cannot be combined with mask.
287
+ # GPT Image 2.5. Cannot be combined with mask.
255
288
  #
256
289
  # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
257
290
  # metadata. Use `OpenAI::FilePart` when you need to override the filename or
@@ -269,8 +302,8 @@ module OpenAI
269
302
  # The GPT image model to use for image editing (`gpt-image-1-mini`,
270
303
  # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
271
304
  # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
272
- # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
273
- # `chatgpt-image-latest`).
305
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
306
+ # `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
274
307
  #
275
308
  # `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
276
309
  # `gpt-image-2.5-flare` instead.
@@ -282,8 +315,7 @@ module OpenAI
282
315
  # defaults to 100.
283
316
  output_compression: nil,
284
317
  # The format in which the generated images are returned. This parameter is only
285
- # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
286
- # default value is `png`.
318
+ # supported for the GPT image models. The default value is `png`.
287
319
  output_format: nil,
288
320
  # The number of partial images to generate. This parameter is used for streaming
289
321
  # responses that return partial images. Value must be between 0 and 3. When set to
@@ -339,6 +371,9 @@ module OpenAI
339
371
  params(
340
372
  prompt: String,
341
373
  background: T.nilable(OpenAI::ImageGenerateParams::Background::OrSymbol),
374
+ complexity: T.nilable(OpenAI::ImageGenerateParams::Complexity::OrSymbol),
375
+ frame_count: T.nilable(Integer),
376
+ frame_duration_ms: T.nilable(Integer),
342
377
  model: T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol)),
343
378
  moderation: T.nilable(OpenAI::ImageGenerateParams::Moderation::OrSymbol),
344
379
  n: T.nilable(Integer),
@@ -350,6 +385,7 @@ module OpenAI
350
385
  safety_identifier: T.nilable(String),
351
386
  size: T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)),
352
387
  style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
388
+ svg: T.nilable(OpenAI::ImageGenerateParams::Svg::OrHash),
353
389
  user: String,
354
390
  stream: T.noreturn,
355
391
  request_options: OpenAI::RequestOptions::OrHash
@@ -370,11 +406,26 @@ module OpenAI
370
406
  # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
371
407
  # set the output format to `png` or `webp`.
372
408
  background: nil,
409
+ # Computation spent planning the image, independently of rendering quality. Uses
410
+ # the image model's configured default when omitted. For SVG output, controls the
411
+ # reference image, independently of the SVG author's reasoning.
412
+ complexity: nil,
413
+ # Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
414
+ # 9 when omitted. Only supported with output_format=gif. The requested size must
415
+ # satisfy the selected model's GIF size limits. GIF output does not support
416
+ # streaming, partial images, masks, or custom output compression. Requires access
417
+ # to the GIF preview for the selected model.
418
+ frame_count: nil,
419
+ # Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
420
+ # GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
421
+ # per frame. Only supported with output_format=gif.
422
+ frame_duration_ms: nil,
373
423
  # The GPT image model to use for image generation. Specify a model explicitly.
374
424
  # Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
375
425
  # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
376
426
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
377
- # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
427
+ # `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
428
+ # `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
378
429
  #
379
430
  # `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
380
431
  # `gpt-image-2.5-flare` instead.
@@ -390,7 +441,7 @@ module OpenAI
390
441
  # defaults to 100.
391
442
  output_compression: nil,
392
443
  # The format in which the generated images are returned. This parameter is only
393
- # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
444
+ # supported for the GPT image models.
394
445
  output_format: nil,
395
446
  # The number of partial images to generate. This parameter is used for streaming
396
447
  # responses that return partial images. Value must be between 0 and 3. When set to
@@ -431,6 +482,13 @@ module OpenAI
431
482
  # Legacy style parameter for retired image models. Unsupported for GPT image
432
483
  # models; describe the desired style in the prompt instead.
433
484
  style: nil,
485
+ # Selects the model and reasoning effort used to author SVG output. Requires
486
+ # output_format=svg and access to SVG model selection. When model selection is
487
+ # enabled, supply svg.model. When model selection is disabled, omit this object.
488
+ # The top-level model selects the image model that creates the reference image.
489
+ # SVG generation requires n=1 and does not support streaming, partial images,
490
+ # prompt_rewriter, or output_compression. SVG edits are not supported.
491
+ svg: nil,
434
492
  # Deprecated: use `safety_identifier` instead. This parameter remains accepted for
435
493
  # backward compatibility and is used when `safety_identifier` is omitted, null, or
436
494
  # empty.
@@ -451,6 +509,9 @@ module OpenAI
451
509
  params(
452
510
  prompt: String,
453
511
  background: T.nilable(OpenAI::ImageGenerateParams::Background::OrSymbol),
512
+ complexity: T.nilable(OpenAI::ImageGenerateParams::Complexity::OrSymbol),
513
+ frame_count: T.nilable(Integer),
514
+ frame_duration_ms: T.nilable(Integer),
454
515
  model: T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol)),
455
516
  moderation: T.nilable(OpenAI::ImageGenerateParams::Moderation::OrSymbol),
456
517
  n: T.nilable(Integer),
@@ -462,6 +523,7 @@ module OpenAI
462
523
  safety_identifier: T.nilable(String),
463
524
  size: T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)),
464
525
  style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
526
+ svg: T.nilable(OpenAI::ImageGenerateParams::Svg::OrHash),
465
527
  user: String,
466
528
  stream: T.noreturn,
467
529
  request_options: OpenAI::RequestOptions::OrHash
@@ -482,11 +544,26 @@ module OpenAI
482
544
  # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
483
545
  # set the output format to `png` or `webp`.
484
546
  background: nil,
547
+ # Computation spent planning the image, independently of rendering quality. Uses
548
+ # the image model's configured default when omitted. For SVG output, controls the
549
+ # reference image, independently of the SVG author's reasoning.
550
+ complexity: nil,
551
+ # Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
552
+ # 9 when omitted. Only supported with output_format=gif. The requested size must
553
+ # satisfy the selected model's GIF size limits. GIF output does not support
554
+ # streaming, partial images, masks, or custom output compression. Requires access
555
+ # to the GIF preview for the selected model.
556
+ frame_count: nil,
557
+ # Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
558
+ # GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
559
+ # per frame. Only supported with output_format=gif.
560
+ frame_duration_ms: nil,
485
561
  # The GPT image model to use for image generation. Specify a model explicitly.
486
562
  # Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
487
563
  # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
488
564
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
489
- # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
565
+ # `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
566
+ # `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
490
567
  #
491
568
  # `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
492
569
  # `gpt-image-2.5-flare` instead.
@@ -502,7 +579,7 @@ module OpenAI
502
579
  # defaults to 100.
503
580
  output_compression: nil,
504
581
  # The format in which the generated images are returned. This parameter is only
505
- # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
582
+ # supported for the GPT image models.
506
583
  output_format: nil,
507
584
  # The number of partial images to generate. This parameter is used for streaming
508
585
  # responses that return partial images. Value must be between 0 and 3. When set to
@@ -543,6 +620,13 @@ module OpenAI
543
620
  # Legacy style parameter for retired image models. Unsupported for GPT image
544
621
  # models; describe the desired style in the prompt instead.
545
622
  style: nil,
623
+ # Selects the model and reasoning effort used to author SVG output. Requires
624
+ # output_format=svg and access to SVG model selection. When model selection is
625
+ # enabled, supply svg.model. When model selection is disabled, omit this object.
626
+ # The top-level model selects the image model that creates the reference image.
627
+ # SVG generation requires n=1 and does not support streaming, partial images,
628
+ # prompt_rewriter, or output_compression. SVG edits are not supported.
629
+ svg: nil,
546
630
  # Deprecated: use `safety_identifier` instead. This parameter remains accepted for
547
631
  # backward compatibility and is used when `safety_identifier` is omitted, null, or
548
632
  # empty.
@@ -57,6 +57,7 @@ module OpenAI
57
57
  background: T.nilable(T::Boolean),
58
58
  context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
59
59
  conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
60
+ image: OpenAI::Responses::ResponseCreateParams::Image::OrHash,
60
61
  include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
61
62
  input: OpenAI::Responses::ResponseCreateParams::Input::Variants,
62
63
  instructions: T.nilable(String),
@@ -131,6 +132,8 @@ module OpenAI
131
132
  # items from this response are automatically added to this conversation after this
132
133
  # response completes.
133
134
  conversation: nil,
135
+ # Request level image options.
136
+ image: nil,
134
137
  # Specify additional output data to include in the model response. Currently
135
138
  # supported values are:
136
139
  #
@@ -210,7 +213,7 @@ module OpenAI
210
213
  # request can write up to four breakpoints. For cache matching, OpenAI considers
211
214
  # up to the latest 80 breakpoints in the conversation, without a content-block
212
215
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
213
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
216
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
214
217
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
215
218
  # for current details.
216
219
  prompt_cache_options: nil,
@@ -362,6 +365,7 @@ module OpenAI
362
365
  background: T.nilable(T::Boolean),
363
366
  context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
364
367
  conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
368
+ image: OpenAI::Responses::ResponseCreateParams::Image::OrHash,
365
369
  include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
366
370
  input: OpenAI::Responses::ResponseCreateParams::Input::Variants,
367
371
  instructions: T.nilable(String),
@@ -442,6 +446,8 @@ module OpenAI
442
446
  # items from this response are automatically added to this conversation after this
443
447
  # response completes.
444
448
  conversation: nil,
449
+ # Request level image options.
450
+ image: nil,
445
451
  # Specify additional output data to include in the model response. Currently
446
452
  # supported values are:
447
453
  #
@@ -521,7 +527,7 @@ module OpenAI
521
527
  # request can write up to four breakpoints. For cache matching, OpenAI considers
522
528
  # up to the latest 80 breakpoints in the conversation, without a content-block
523
529
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
524
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
530
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
525
531
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
526
532
  # for current details.
527
533
  prompt_cache_options: nil,
@@ -777,6 +783,7 @@ module OpenAI
777
783
  sig {
778
784
  params(
779
785
  model: T.nilable(T.any(OpenAI::Responses::ResponseCompactParams::Model::OrSymbol, String)),
786
+ image: OpenAI::Responses::ResponseCompactParams::Image::OrHash,
780
787
  input: T.nilable(OpenAI::Responses::ResponseCompactParams::Input::Variants),
781
788
  instructions: T.nilable(String),
782
789
  previous_response_id: T.nilable(String),
@@ -795,6 +802,8 @@ module OpenAI
795
802
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
796
803
  # compare available models.
797
804
  model:,
805
+ # Request level image options.
806
+ image: nil,
798
807
  # Text, image, or file inputs to the model, used to generate a response
799
808
  input: nil,
800
809
  # A system (or developer) message inserted into the model's context. When used
@@ -815,7 +824,7 @@ module OpenAI
815
824
  # request can write up to four breakpoints. For cache matching, OpenAI considers
816
825
  # up to the latest 80 breakpoints in the conversation, without a content-block
817
826
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
818
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
827
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
819
828
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
820
829
  # for current details.
821
830
  prompt_cache_options: nil,
@@ -865,6 +874,7 @@ module OpenAI
865
874
  ),
866
875
  conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
867
876
  generate: T::Boolean,
877
+ image: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Image::OrHash,
868
878
  include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
869
879
  input: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants,
870
880
  instructions: T.nilable(String),
@@ -935,6 +945,7 @@ module OpenAI
935
945
  context_management: nil,
936
946
  conversation: nil,
937
947
  generate: nil,
948
+ image: nil,
938
949
  include: nil,
939
950
  input: nil,
940
951
  instructions: nil,
@@ -0,0 +1,23 @@
1
+ module OpenAI
2
+ module Models
3
+ module Admin
4
+ module Organization
5
+ module ProjectOptionalServiceTier = Projects::ProjectOptionalServiceTier
6
+
7
+ module Projects
8
+ type project_optional_service_tier = :flex | :fast | :ultrafast
9
+
10
+ module ProjectOptionalServiceTier
11
+ extend OpenAI::Internal::Type::Enum
12
+
13
+ FLEX: :flex
14
+ FAST: :fast
15
+ ULTRAFAST: :ultrafast
16
+
17
+ def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::Projects::project_optional_service_tier]
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,72 @@
1
+ module OpenAI
2
+ module Models
3
+ module Admin
4
+ module Organization
5
+ class ProjectServiceTierSettings = Projects::ProjectServiceTierSettings
6
+
7
+ module Projects
8
+ type project_service_tier_settings =
9
+ {
10
+ default: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::default,
11
+ enabled_tiers: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::enabled_tiers,
12
+ ?object: :"project.service_tier_settings"
13
+ }
14
+
15
+ class ProjectServiceTierSettings < OpenAI::Internal::Type::BaseModel
16
+ # Default tier for requests that omit service_tier or use auto.
17
+ attr_accessor default: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::default
18
+
19
+ # Additional service tiers enabled for this project. "all" includes future tiers.
20
+ # An empty array allows only Standard. Organization policy and eligibility still
21
+ # apply.
22
+ attr_accessor enabled_tiers: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::enabled_tiers
23
+
24
+ attr_accessor object: :"project.service_tier_settings"
25
+
26
+ # @param default
27
+ # Default tier for requests that omit service_tier or use auto.
28
+ # @param enabled_tiers
29
+ # Additional service tiers enabled for this project. "all" includes future tiers.
30
+ # An empty array allows only Standard. Organization policy and eligibility still
31
+ # apply.
32
+ def initialize: (
33
+ default: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::default,
34
+ enabled_tiers: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::enabled_tiers,
35
+ ?object: :"project.service_tier_settings"
36
+ ) -> void
37
+
38
+ def to_hash: -> {
39
+ default: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::default,
40
+ enabled_tiers: OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::enabled_tiers,
41
+ ?object: :"project.service_tier_settings"
42
+ }
43
+
44
+ type default = :standard | :fast | :scale
45
+
46
+ module Default
47
+ extend OpenAI::Internal::Type::Enum
48
+
49
+ STANDARD: :standard
50
+ FAST: :fast
51
+ SCALE: :scale
52
+
53
+ def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::default]
54
+ end
55
+
56
+ type enabled_tiers =
57
+ :all
58
+ | ::Array[OpenAI::Models::Admin::Organization::Projects::project_optional_service_tier]
59
+
60
+ module EnabledTiers
61
+ extend OpenAI::Internal::Type::Union
62
+
63
+ def self?.variants: -> ::Array[OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::enabled_tiers]
64
+
65
+ ProjectOptionalServiceTierArray: OpenAI::Internal::Type::Converter
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,32 @@
1
+ module OpenAI
2
+ module Models
3
+ module Admin
4
+ module Organization
5
+ module Projects
6
+ type service_tier_setting_retrieve_params =
7
+ { project_id: String, ?request_options: OpenAI::request_opts }
8
+
9
+ class ServiceTierSettingRetrieveParams < OpenAI::Internal::Type::BaseModel
10
+ extend OpenAI::Internal::Type::RequestParameters::Converter
11
+ include OpenAI::Internal::Type::RequestParameters
12
+
13
+ # The ID of the project
14
+ attr_accessor project_id: String
15
+
16
+ # @param project_id
17
+ # The ID of the project
18
+ def initialize: (
19
+ project_id: String,
20
+ ?request_options: OpenAI::request_opts
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ project_id: String,
25
+ ?request_options: OpenAI::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end