openai 0.98.0 → 0.100.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 (245) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/bedrock.md +17 -1
  5. data/lib/openai/client.rb +9 -0
  6. data/lib/openai/helpers/agents/session_stream.rb +11 -36
  7. data/lib/openai/helpers/agents/tools.rb +34 -4
  8. data/lib/openai/helpers/beta/agents/creation_stream.rb +26 -0
  9. data/lib/openai/helpers/beta/agents/function_tool.rb +11 -4
  10. data/lib/openai/helpers/beta/agents/tool_dispatcher.rb +74 -0
  11. data/lib/openai/helpers/beta/agents/tool_error.rb +28 -0
  12. data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +140 -5
  13. data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +140 -5
  14. data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +140 -5
  15. data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
  16. data/lib/openai/models/admin/organization/usage_completions_response.rb +140 -5
  17. data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
  18. data/lib/openai/models/admin/organization/usage_costs_response.rb +140 -5
  19. data/lib/openai/models/admin/organization/usage_embeddings_response.rb +140 -5
  20. data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +140 -5
  21. data/lib/openai/models/admin/organization/usage_images_response.rb +140 -5
  22. data/lib/openai/models/admin/organization/usage_moderations_response.rb +140 -5
  23. data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +140 -5
  24. data/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +9 -4
  25. data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +140 -5
  26. data/lib/openai/models/all_models.rb +42 -0
  27. data/lib/openai/models/audio/speech_create_params.rb +6 -0
  28. data/lib/openai/models/audio/voice.rb +75 -0
  29. data/lib/openai/models/audio/voice_create_params.rb +217 -0
  30. data/lib/openai/models/beta/agent_create_params.rb +0 -3
  31. data/lib/openai/models/beta/agent_update_params.rb +0 -3
  32. data/lib/openai/models/beta/agents/environments/template_create_params.rb +6 -6
  33. data/lib/openai/models/beta/agents/environments/template_update_params.rb +3 -6
  34. data/lib/openai/models/beta/agents/session_create_params.rb +0 -3
  35. data/lib/openai/models/beta/agents/session_update_params.rb +0 -3
  36. data/lib/openai/models/beta/agents/sessions/turns/item_list_params.rb +79 -0
  37. data/lib/openai/models/beta/beta_response.rb +220 -0
  38. data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +2 -2
  39. data/lib/openai/models/beta/beta_response_error.rb +12 -1
  40. data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
  41. data/lib/openai/models/beta/beta_responses_server_event.rb +12 -1
  42. data/lib/openai/models/beta/beta_tool.rb +15 -18
  43. data/lib/openai/models/beta/environment_param.rb +6 -6
  44. data/lib/openai/models/beta/response_compact_params.rb +220 -0
  45. data/lib/openai/models/beta/response_create_params.rb +220 -0
  46. data/lib/openai/models/beta/session_turn_error.rb +9 -0
  47. data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
  48. data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
  49. data/lib/openai/models/chat_model.rb +178 -0
  50. data/lib/openai/models/error_object.rb +12 -1
  51. data/lib/openai/models/eval_create_params.rb +1 -1
  52. data/lib/openai/models/eval_create_response.rb +1 -1
  53. data/lib/openai/models/eval_list_response.rb +1 -1
  54. data/lib/openai/models/eval_retrieve_response.rb +1 -1
  55. data/lib/openai/models/eval_update_response.rb +1 -1
  56. data/lib/openai/models/fine_tuning/job_list_params.rb +14 -4
  57. data/lib/openai/models/graders/score_model_grader.rb +2 -2
  58. data/lib/openai/models/image.rb +14 -14
  59. data/lib/openai/models/image_create_variation_params.rb +7 -7
  60. data/lib/openai/models/image_edit_params.rb +88 -96
  61. data/lib/openai/models/image_generate_params.rb +51 -62
  62. data/lib/openai/models/image_model.rb +5 -3
  63. data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -6
  64. data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
  65. data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -6
  66. data/lib/openai/models/realtime/session_update_event.rb +16 -0
  67. data/lib/openai/models/responses/response_compact_params.rb +220 -0
  68. data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +2 -2
  69. data/lib/openai/models/responses/response_error.rb +12 -1
  70. data/lib/openai/models/responses/responses_server_event.rb +12 -1
  71. data/lib/openai/models/responses/tool.rb +15 -18
  72. data/lib/openai/models/responses_model.rb +42 -0
  73. data/lib/openai/models/video_create_error.rb +12 -1
  74. data/lib/openai/models/webhooks/agent_session_action_required_webhook_event.rb +109 -0
  75. data/lib/openai/models/webhooks/agent_session_created_webhook_event.rb +106 -0
  76. data/lib/openai/models/webhooks/agent_session_failed_webhook_event.rb +86 -0
  77. data/lib/openai/models/webhooks/agent_session_idle_webhook_event.rb +86 -0
  78. data/lib/openai/models/webhooks/agent_session_in_progress_webhook_event.rb +86 -0
  79. data/lib/openai/models/webhooks/unwrap_webhook_event.rb +18 -2
  80. data/lib/openai/models/webhooks/webhook_create_params.rb +5 -0
  81. data/lib/openai/models/webhooks/webhook_test_params.rb +5 -0
  82. data/lib/openai/models/webhooks/webhook_update_params.rb +5 -0
  83. data/lib/openai/providers/bedrock.rb +20 -1
  84. data/lib/openai/resources/admin/organization/usage.rb +15 -6
  85. data/lib/openai/resources/audio/speech.rb +2 -0
  86. data/lib/openai/resources/audio/voices.rb +53 -0
  87. data/lib/openai/resources/audio.rb +5 -0
  88. data/lib/openai/resources/beta/agents/environments/templates.rb +3 -4
  89. data/lib/openai/resources/beta/agents/sessions/turns/items.rb +68 -0
  90. data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -0
  91. data/lib/openai/resources/beta/agents/sessions.rb +22 -2
  92. data/lib/openai/resources/fine_tuning/jobs.rb +7 -2
  93. data/lib/openai/resources/images.rb +79 -109
  94. data/lib/openai/resources/webhooks.rb +1 -1
  95. data/lib/openai/version.rb +1 -1
  96. data/lib/openai.rb +10 -0
  97. data/rbi/openai/helpers/agents.rbi +2 -0
  98. data/rbi/openai/helpers/beta/agents/function_tool.rbi +8 -3
  99. data/rbi/openai/helpers/beta/agents/tool_error.rbi +19 -0
  100. data/rbi/openai/helpers/beta/agents.rbi +12 -0
  101. data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +213 -3
  102. data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +213 -3
  103. data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +213 -3
  104. data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
  105. data/rbi/openai/models/admin/organization/usage_completions_response.rbi +213 -3
  106. data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
  107. data/rbi/openai/models/admin/organization/usage_costs_response.rbi +213 -3
  108. data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +213 -3
  109. data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +213 -3
  110. data/rbi/openai/models/admin/organization/usage_images_response.rbi +213 -3
  111. data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +213 -3
  112. data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +213 -3
  113. data/rbi/openai/models/admin/organization/usage_web_search_calls_params.rbi +12 -4
  114. data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +213 -3
  115. data/rbi/openai/models/audio/speech_create_params.rbi +6 -0
  116. data/rbi/openai/models/audio/voice.rbi +111 -0
  117. data/rbi/openai/models/audio/voice_create_params.rbi +321 -0
  118. data/rbi/openai/models/beta/agent_create_params.rbi +0 -3
  119. data/rbi/openai/models/beta/agent_update_params.rbi +0 -3
  120. data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +6 -6
  121. data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +3 -6
  122. data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -3
  123. data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -3
  124. data/rbi/openai/models/beta/agents/sessions/turns/item_list_params.rbi +139 -0
  125. data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +2 -2
  126. data/rbi/openai/models/beta/beta_response_error.rbi +12 -0
  127. data/rbi/openai/models/beta/beta_responses_server_event.rbi +12 -0
  128. data/rbi/openai/models/beta/beta_tool.rbi +15 -18
  129. data/rbi/openai/models/beta/environment_param.rbi +6 -6
  130. data/rbi/openai/models/beta/session_turn_error.rbi +18 -0
  131. data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
  132. data/rbi/openai/models/chat/chat_completion_chunk.rbi +123 -17
  133. data/rbi/openai/models/error_object.rbi +12 -0
  134. data/rbi/openai/models/eval_create_params.rbi +1 -1
  135. data/rbi/openai/models/eval_create_response.rbi +1 -1
  136. data/rbi/openai/models/eval_list_response.rbi +1 -1
  137. data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
  138. data/rbi/openai/models/eval_update_response.rbi +1 -1
  139. data/rbi/openai/models/fine_tuning/job_list_params.rbi +14 -4
  140. data/rbi/openai/models/graders/score_model_grader.rbi +2 -2
  141. data/rbi/openai/models/image.rbi +14 -14
  142. data/rbi/openai/models/image_create_variation_params.rbi +6 -6
  143. data/rbi/openai/models/image_edit_params.rbi +73 -91
  144. data/rbi/openai/models/image_generate_params.rbi +30 -61
  145. data/rbi/openai/models/image_model.rbi +3 -3
  146. data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +9 -6
  147. data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +9 -6
  148. data/rbi/openai/models/realtime/session_update_event.rbi +16 -0
  149. data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +2 -2
  150. data/rbi/openai/models/responses/response_error.rbi +12 -0
  151. data/rbi/openai/models/responses/responses_server_event.rbi +12 -0
  152. data/rbi/openai/models/responses/tool.rbi +15 -18
  153. data/rbi/openai/models/video_create_error.rbi +12 -0
  154. data/rbi/openai/models/webhooks/agent_session_action_required_webhook_event.rbi +222 -0
  155. data/rbi/openai/models/webhooks/agent_session_created_webhook_event.rbi +202 -0
  156. data/rbi/openai/models/webhooks/agent_session_failed_webhook_event.rbi +151 -0
  157. data/rbi/openai/models/webhooks/agent_session_idle_webhook_event.rbi +151 -0
  158. data/rbi/openai/models/webhooks/agent_session_in_progress_webhook_event.rbi +151 -0
  159. data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +7 -1
  160. data/rbi/openai/models/webhooks/webhook_create_params.rbi +20 -0
  161. data/rbi/openai/models/webhooks/webhook_test_params.rbi +20 -0
  162. data/rbi/openai/models/webhooks/webhook_update_params.rbi +20 -0
  163. data/rbi/openai/resources/admin/organization/usage.rbi +15 -6
  164. data/rbi/openai/resources/audio/speech.rbi +2 -0
  165. data/rbi/openai/resources/audio/voices.rbi +49 -0
  166. data/rbi/openai/resources/audio.rbi +4 -0
  167. data/rbi/openai/resources/beta/agents/environments/templates.rbi +3 -4
  168. data/rbi/openai/resources/beta/agents/sessions/turns/items.rbi +62 -0
  169. data/rbi/openai/resources/beta/agents/sessions/turns.rbi +3 -0
  170. data/rbi/openai/resources/beta/agents/sessions.rbi +2 -0
  171. data/rbi/openai/resources/fine_tuning/jobs.rbi +7 -2
  172. data/rbi/openai/resources/images.rbi +77 -109
  173. data/rbi/openai/resources/webhooks.rbi +5 -0
  174. data/sig/openai/helpers/agents.rbs +3 -0
  175. data/sig/openai/helpers/beta/agents/function_tool.rbs +5 -2
  176. data/sig/openai/helpers/beta/agents/tool_error.rbs +17 -0
  177. data/sig/openai/helpers/beta/agents.rbs +5 -0
  178. data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +107 -5
  179. data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +107 -5
  180. data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +107 -5
  181. data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
  182. data/sig/openai/models/admin/organization/usage_completions_response.rbs +107 -5
  183. data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
  184. data/sig/openai/models/admin/organization/usage_costs_response.rbs +107 -5
  185. data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +107 -5
  186. data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +107 -5
  187. data/sig/openai/models/admin/organization/usage_images_response.rbs +107 -5
  188. data/sig/openai/models/admin/organization/usage_moderations_response.rbs +107 -5
  189. data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +107 -5
  190. data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +19 -7
  191. data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +107 -5
  192. data/sig/openai/models/audio/speech_create_params.rbs +4 -0
  193. data/sig/openai/models/audio/voice.rbs +70 -0
  194. data/sig/openai/models/audio/voice_create_params.rbs +203 -0
  195. data/sig/openai/models/beta/agent_create_params.rbs +1 -5
  196. data/sig/openai/models/beta/agent_update_params.rbs +1 -5
  197. data/sig/openai/models/beta/agents/environments/template_create_params.rbs +4 -4
  198. data/sig/openai/models/beta/agents/environments/template_update_params.rbs +2 -4
  199. data/sig/openai/models/beta/agents/session_create_params.rbs +1 -5
  200. data/sig/openai/models/beta/agents/session_update_params.rbs +1 -5
  201. data/sig/openai/models/beta/agents/sessions/turns/item_list_params.rbs +91 -0
  202. data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +2 -2
  203. data/sig/openai/models/beta/beta_response_error.rbs +10 -0
  204. data/sig/openai/models/beta/beta_responses_server_event.rbs +10 -0
  205. data/sig/openai/models/beta/beta_tool.rbs +11 -15
  206. data/sig/openai/models/beta/environment_param.rbs +4 -4
  207. data/sig/openai/models/beta/session_turn_error.rbs +12 -0
  208. data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
  209. data/sig/openai/models/chat/chat_completion_chunk.rbs +96 -12
  210. data/sig/openai/models/error_object.rbs +10 -0
  211. data/sig/openai/models/eval_create_params.rbs +1 -1
  212. data/sig/openai/models/eval_create_response.rbs +1 -1
  213. data/sig/openai/models/eval_list_response.rbs +1 -1
  214. data/sig/openai/models/eval_retrieve_response.rbs +1 -1
  215. data/sig/openai/models/eval_update_response.rbs +1 -1
  216. data/sig/openai/models/fine_tuning/job_list_params.rbs +14 -4
  217. data/sig/openai/models/graders/score_model_grader.rbs +3 -3
  218. data/sig/openai/models/image.rbs +21 -21
  219. data/sig/openai/models/image_create_variation_params.rbs +4 -4
  220. data/sig/openai/models/image_edit_params.rbs +54 -66
  221. data/sig/openai/models/image_generate_params.rbs +23 -45
  222. data/sig/openai/models/image_model.rbs +6 -6
  223. data/sig/openai/models/realtime/realtime_audio_config_output.rbs +9 -6
  224. data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +9 -6
  225. data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +2 -2
  226. data/sig/openai/models/responses/response_error.rbs +10 -0
  227. data/sig/openai/models/responses/responses_server_event.rbs +10 -0
  228. data/sig/openai/models/responses/tool.rbs +11 -15
  229. data/sig/openai/models/video_create_error.rbs +10 -0
  230. data/sig/openai/models/webhooks/agent_session_action_required_webhook_event.rbs +114 -0
  231. data/sig/openai/models/webhooks/agent_session_created_webhook_event.rbs +115 -0
  232. data/sig/openai/models/webhooks/agent_session_failed_webhook_event.rbs +89 -0
  233. data/sig/openai/models/webhooks/agent_session_idle_webhook_event.rbs +89 -0
  234. data/sig/openai/models/webhooks/agent_session_in_progress_webhook_event.rbs +89 -0
  235. data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +6 -1
  236. data/sig/openai/models/webhooks/webhook_create_params.rbs +10 -0
  237. data/sig/openai/models/webhooks/webhook_test_params.rbs +10 -0
  238. data/sig/openai/models/webhooks/webhook_update_params.rbs +10 -0
  239. data/sig/openai/resources/audio/voices.rbs +14 -0
  240. data/sig/openai/resources/audio.rbs +2 -0
  241. data/sig/openai/resources/beta/agents/sessions/turns/items.rbs +24 -0
  242. data/sig/openai/resources/beta/agents/sessions/turns.rbs +2 -0
  243. data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
  244. data/sig/openai/resources/webhooks.rbs +6 -1
  245. metadata +35 -1
@@ -19,8 +19,8 @@ module OpenAI
19
19
  required :image, OpenAI::Internal::Type::FileInput
20
20
 
21
21
  # @!attribute model
22
- # The model to use for image generation. Only `dall-e-2` is supported at this
23
- # time.
22
+ # The legacy model used by the retired image variations endpoint. This endpoint no
23
+ # longer accepts requests.
24
24
  #
25
25
  # @return [String, Symbol, OpenAI::Models::ImageModel, nil]
26
26
  optional :model, union: -> { OpenAI::ImageCreateVariationParams::Model }, nil?: true
@@ -64,8 +64,8 @@ module OpenAI
64
64
  # content type.
65
65
  #
66
66
  # @param model [String, Symbol, OpenAI::Models::ImageModel, nil]
67
- # The model to use for image generation. Only `dall-e-2` is supported at this
68
- # time.
67
+ # The legacy model used by the retired image variations endpoint. This endpoint no
68
+ # longer accepts requests.
69
69
  #
70
70
  # @param n [Integer, nil]
71
71
  # The number of images to generate. Must be between 1 and 10.
@@ -86,14 +86,14 @@ module OpenAI
86
86
  #
87
87
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
88
88
 
89
- # The model to use for image generation. Only `dall-e-2` is supported at this
90
- # time.
89
+ # The legacy model used by the retired image variations endpoint. This endpoint no
90
+ # longer accepts requests.
91
91
  module Model
92
92
  extend OpenAI::Internal::Type::Union
93
93
 
94
94
  variant String
95
95
 
96
- # The model to use for image generation. Only `dall-e-2` is supported at this time.
96
+ # The legacy model used by the retired image variations endpoint. This endpoint no longer accepts requests.
97
97
  variant enum: -> { OpenAI::ImageModel }
98
98
 
99
99
  # @!method self.variants
@@ -19,9 +19,6 @@ module OpenAI
19
19
  # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
20
20
  # images.
21
21
  #
22
- # For `dall-e-2`, you can only provide one image, and it should be a square `png`
23
- # file less than 4MB.
24
- #
25
22
  # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
26
23
  # metadata. Use `OpenAI::FilePart` when you need to override the filename or
27
24
  # content type.
@@ -30,8 +27,8 @@ module OpenAI
30
27
  required :image, union: -> { OpenAI::ImageEditParams::Image }
31
28
 
32
29
  # @!attribute prompt
33
- # A text description of the desired image(s). The maximum length is 1000
34
- # characters for `dall-e-2`, and 32000 characters for the GPT image models.
30
+ # A text description of the desired image(s). The maximum length is 32000
31
+ # characters for the GPT image models.
35
32
  #
36
33
  # @return [String]
37
34
  required :prompt, String
@@ -51,9 +48,10 @@ module OpenAI
51
48
  optional :background, enum: -> { OpenAI::ImageEditParams::Background }, nil?: true
52
49
 
53
50
  # @!attribute input_fidelity
54
- # Controls fidelity to the original input image(s). This parameter is supported
55
- # for GPT image models that support input fidelity. `gpt-image-2` and
56
- # `gpt-image-2-2026-04-21` ignore this parameter.
51
+ # Control how much effort the model will exert to match the style and features,
52
+ # especially facial features, of input images. Supports `high` and `low` on
53
+ # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
54
+ # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
57
55
  #
58
56
  # @return [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil]
59
57
  optional :input_fidelity, enum: -> { OpenAI::ImageEditParams::InputFidelity }, nil?: true
@@ -72,12 +70,11 @@ module OpenAI
72
70
  optional :mask, OpenAI::Internal::Type::FileInput
73
71
 
74
72
  # @!attribute model
75
- # The model to use for image generation. One of `dall-e-2` or a GPT image model
76
- # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
77
- # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
78
- # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
79
- # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to
80
- # `gpt-image-1.5`.
73
+ # The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
74
+ # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
75
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
76
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
77
+ # `chatgpt-image-latest`).
81
78
  #
82
79
  # @return [String, Symbol, OpenAI::Models::ImageModel, nil]
83
80
  optional :model, union: -> { OpenAI::ImageEditParams::Model }, nil?: true
@@ -125,27 +122,26 @@ module OpenAI
125
122
  optional :quality, enum: -> { OpenAI::ImageEditParams::Quality }, nil?: true
126
123
 
127
124
  # @!attribute response_format
128
- # The format in which the generated images are returned. Must be one of `url` or
129
- # `b64_json`. URLs are only valid for 60 minutes after the image has been
130
- # generated. This parameter is only supported for `dall-e-2` (default is `url` for
131
- # `dall-e-2`), as GPT image models always return base64-encoded images.
125
+ # @deprecated
126
+ #
127
+ # Legacy response format parameter for retired image models. Unsupported for GPT
128
+ # image models, which always return base64-encoded images.
132
129
  #
133
130
  # @return [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil]
134
131
  optional :response_format, enum: -> { OpenAI::ImageEditParams::ResponseFormat }, nil?: true
135
132
 
136
133
  # @!attribute size
137
- # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
138
- # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
139
- # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
140
- # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
141
- # Width and height must both be divisible by 16 and the requested aspect ratio
142
- # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
143
- # the maximum supported resolution is `3840x2160`. The requested size must also
144
- # satisfy the model's current pixel and edge limits. The standard sizes
145
- # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
146
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
147
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
148
- # `1024x1024`, `1792x1024`, or `1024x1792`.
134
+ # The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
135
+ # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
136
+ # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
137
+ # `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
138
+ # `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
139
+ # divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
140
+ # Resolutions above `2560x1440` are experimental, and the maximum supported
141
+ # resolution is `3840x2160`. The requested size must also satisfy the model's
142
+ # current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
143
+ # `1024x1536` are supported by the GPT image models; `auto` is supported for
144
+ # models that allow automatic sizing.
149
145
  #
150
146
  # @return [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil]
151
147
  optional :size, union: -> { OpenAI::ImageEditParams::Size }, nil?: true
@@ -169,16 +165,13 @@ module OpenAI
169
165
  # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
170
166
  # images.
171
167
  #
172
- # For `dall-e-2`, you can only provide one image, and it should be a square `png`
173
- # file less than 4MB.
174
- #
175
168
  # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
176
169
  # metadata. Use `OpenAI::FilePart` when you need to override the filename or
177
170
  # content type.
178
171
  #
179
172
  # @param prompt [String]
180
- # A text description of the desired image(s). The maximum length is 1000
181
- # characters for `dall-e-2`, and 32000 characters for the GPT image models.
173
+ # A text description of the desired image(s). The maximum length is 32000
174
+ # characters for the GPT image models.
182
175
  #
183
176
  # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil]
184
177
  # Allows to set transparency for the background of the generated image(s). Must be
@@ -192,9 +185,10 @@ module OpenAI
192
185
  # set the output format to `png` or `webp`.
193
186
  #
194
187
  # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil]
195
- # Controls fidelity to the original input image(s). This parameter is supported
196
- # for GPT image models that support input fidelity. `gpt-image-2` and
197
- # `gpt-image-2-2026-04-21` ignore this parameter.
188
+ # Control how much effort the model will exert to match the style and features,
189
+ # especially facial features, of input images. Supports `high` and `low` on
190
+ # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
191
+ # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
198
192
  #
199
193
  # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart]
200
194
  # An additional image whose fully transparent areas (e.g. where alpha is zero)
@@ -207,12 +201,11 @@ module OpenAI
207
201
  # content type.
208
202
  #
209
203
  # @param model [String, Symbol, OpenAI::Models::ImageModel, nil]
210
- # The model to use for image generation. One of `dall-e-2` or a GPT image model
211
- # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
212
- # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
213
- # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
214
- # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to
215
- # `gpt-image-1.5`.
204
+ # The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
205
+ # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
206
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
207
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
208
+ # `chatgpt-image-latest`).
216
209
  #
217
210
  # @param n [Integer, nil]
218
211
  # The number of images to generate. Must be between 1 and 10.
@@ -242,24 +235,21 @@ module OpenAI
242
235
  # `xhigh` and `max`. Defaults to `auto`.
243
236
  #
244
237
  # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil]
245
- # The format in which the generated images are returned. Must be one of `url` or
246
- # `b64_json`. URLs are only valid for 60 minutes after the image has been
247
- # generated. This parameter is only supported for `dall-e-2` (default is `url` for
248
- # `dall-e-2`), as GPT image models always return base64-encoded images.
238
+ # Legacy response format parameter for retired image models. Unsupported for GPT
239
+ # image models, which always return base64-encoded images.
249
240
  #
250
241
  # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil]
251
- # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
252
- # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
253
- # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
254
- # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
255
- # Width and height must both be divisible by 16 and the requested aspect ratio
256
- # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
257
- # the maximum supported resolution is `3840x2160`. The requested size must also
258
- # satisfy the model's current pixel and edge limits. The standard sizes
259
- # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
260
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
261
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
262
- # `1024x1024`, `1792x1024`, or `1024x1792`.
242
+ # The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
243
+ # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
244
+ # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
245
+ # `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
246
+ # `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
247
+ # divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
248
+ # Resolutions above `2560x1440` are experimental, and the maximum supported
249
+ # resolution is `3840x2160`. The requested size must also satisfy the model's
250
+ # current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
251
+ # `1024x1536` are supported by the GPT image models; `auto` is supported for
252
+ # models that allow automatic sizing.
263
253
  #
264
254
  # @param user [String]
265
255
  # A unique identifier representing your end-user, which can help OpenAI to monitor
@@ -276,9 +266,6 @@ module OpenAI
276
266
  # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should
277
267
  # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
278
268
  # images.
279
- #
280
- # For `dall-e-2`, you can only provide one image, and it should be a square `png`
281
- # file less than 4MB.
282
269
  module Image
283
270
  extend OpenAI::Internal::Type::Union
284
271
 
@@ -313,9 +300,10 @@ module OpenAI
313
300
  # @return [Array<Symbol>]
314
301
  end
315
302
 
316
- # Controls fidelity to the original input image(s). This parameter is supported
317
- # for GPT image models that support input fidelity. `gpt-image-2` and
318
- # `gpt-image-2-2026-04-21` ignore this parameter.
303
+ # Control how much effort the model will exert to match the style and features,
304
+ # especially facial features, of input images. Supports `high` and `low` on
305
+ # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
306
+ # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
319
307
  module InputFidelity
320
308
  extend OpenAI::Internal::Type::Enum
321
309
 
@@ -326,18 +314,17 @@ module OpenAI
326
314
  # @return [Array<Symbol>]
327
315
  end
328
316
 
329
- # The model to use for image generation. One of `dall-e-2` or a GPT image model
330
- # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
331
- # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
332
- # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
333
- # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to
334
- # `gpt-image-1.5`.
317
+ # The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
318
+ # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
319
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
320
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
321
+ # `chatgpt-image-latest`).
335
322
  module Model
336
323
  extend OpenAI::Internal::Type::Union
337
324
 
338
325
  variant String
339
326
 
340
- # The model to use for image generation. One of `dall-e-2` or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to `gpt-image-1.5`.
327
+ # The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`).
341
328
  variant enum: -> { OpenAI::ImageModel }
342
329
 
343
330
  # @!method self.variants
@@ -365,22 +352,24 @@ module OpenAI
365
352
  module Quality
366
353
  extend OpenAI::Internal::Type::Enum
367
354
 
368
- STANDARD = :standard
369
355
  LOW = :low
370
356
  MEDIUM = :medium
371
357
  HIGH = :high
372
358
  XHIGH = :xhigh
373
359
  MAX = :max
374
360
  AUTO = :auto
361
+ # @deprecated This quality was only supported by retired DALL·E models. Use a GPT image
362
+ # quality instead.
363
+ STANDARD = :standard
375
364
 
376
365
  # @!method self.values
377
366
  # @return [Array<Symbol>]
378
367
  end
379
368
 
380
- # The format in which the generated images are returned. Must be one of `url` or
381
- # `b64_json`. URLs are only valid for 60 minutes after the image has been
382
- # generated. This parameter is only supported for `dall-e-2` (default is `url` for
383
- # `dall-e-2`), as GPT image models always return base64-encoded images.
369
+ # @deprecated
370
+ #
371
+ # Legacy response format parameter for retired image models. Unsupported for GPT
372
+ # image models, which always return base64-encoded images.
384
373
  module ResponseFormat
385
374
  extend OpenAI::Internal::Type::Enum
386
375
 
@@ -391,27 +380,22 @@ module OpenAI
391
380
  # @return [Array<Symbol>]
392
381
  end
393
382
 
394
- # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
395
- # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
396
- # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
397
- # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
398
- # Width and height must both be divisible by 16 and the requested aspect ratio
399
- # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
400
- # the maximum supported resolution is `3840x2160`. The requested size must also
401
- # satisfy the model's current pixel and edge limits. The standard sizes
402
- # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
403
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
404
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
405
- # `1024x1024`, `1792x1024`, or `1024x1792`.
383
+ # The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
384
+ # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
385
+ # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
386
+ # `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
387
+ # `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
388
+ # divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
389
+ # Resolutions above `2560x1440` are experimental, and the maximum supported
390
+ # resolution is `3840x2160`. The requested size must also satisfy the model's
391
+ # current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
392
+ # `1024x1536` are supported by the GPT image models; `auto` is supported for
393
+ # models that allow automatic sizing.
406
394
  module Size
407
395
  extend OpenAI::Internal::Type::Union
408
396
 
409
397
  variant String
410
398
 
411
- variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_256X256 }
412
-
413
- variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_512X512 }
414
-
415
399
  variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1024X1024 }
416
400
 
417
401
  variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1536X1024 }
@@ -420,6 +404,10 @@ module OpenAI
420
404
 
421
405
  variant const: -> { OpenAI::Models::ImageEditParams::Size::AUTO }
422
406
 
407
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_256X256 }
408
+
409
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_512X512 }
410
+
423
411
  # @!method self.variants
424
412
  # @return [Array(String, Symbol)]
425
413
 
@@ -429,12 +417,16 @@ module OpenAI
429
417
 
430
418
  # @!group
431
419
 
432
- SIZE_256X256 = :"256x256"
433
- SIZE_512X512 = :"512x512"
434
420
  SIZE_1024X1024 = :"1024x1024"
435
421
  SIZE_1536X1024 = :"1536x1024"
436
422
  SIZE_1024X1536 = :"1024x1536"
437
423
  AUTO = :auto
424
+ # @deprecated This legacy size suggestion is retained for SDK compatibility. Check the
425
+ # selected GPT image model's supported sizes.
426
+ SIZE_256X256 = :"256x256"
427
+ # @deprecated This legacy size suggestion is retained for SDK compatibility. Check the
428
+ # selected GPT image model's supported sizes.
429
+ SIZE_512X512 = :"512x512"
438
430
 
439
431
  # @!endgroup
440
432
  end
@@ -11,8 +11,7 @@ module OpenAI
11
11
 
12
12
  # @!attribute prompt
13
13
  # A text description of the desired image(s). The maximum length is 32000
14
- # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
15
- # characters for `dall-e-3`.
14
+ # characters.
16
15
  #
17
16
  # @return [String]
18
17
  required :prompt, String
@@ -32,12 +31,11 @@ module OpenAI
32
31
  optional :background, enum: -> { OpenAI::ImageGenerateParams::Background }, nil?: true
33
32
 
34
33
  # @!attribute model
35
- # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
36
- # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
37
- # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
34
+ # The GPT image model to use for image generation. Specify a model explicitly.
35
+ # Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
36
+ # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
38
37
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
39
- # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter
40
- # specific to the GPT image models is used.
38
+ # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
41
39
  #
42
40
  # @return [String, Symbol, OpenAI::Models::ImageModel, nil]
43
41
  optional :model, union: -> { OpenAI::ImageGenerateParams::Model }, nil?: true
@@ -51,8 +49,7 @@ module OpenAI
51
49
  optional :moderation, enum: -> { OpenAI::ImageGenerateParams::Moderation }, nil?: true
52
50
 
53
51
  # @!attribute n
54
- # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
55
- # `n=1` is supported.
52
+ # The number of images to generate. Must be between 1 and 10.
56
53
  #
57
54
  # @return [Integer, nil]
58
55
  optional :n, Integer, nil?: true
@@ -91,16 +88,14 @@ module OpenAI
91
88
  # - `high`, `medium` and `low` are supported for the GPT image models.
92
89
  # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
93
90
  # `2026-09-08` snapshots, also support `xhigh` and `max`.
94
- # - `hd` and `standard` are supported for `dall-e-3`.
95
- # - `standard` is the only option for `dall-e-2`.
96
91
  #
97
92
  # @return [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil]
98
93
  optional :quality, enum: -> { OpenAI::ImageGenerateParams::Quality }, nil?: true
99
94
 
100
95
  # @!attribute response_format
101
- # The format in which generated images with `dall-e-2` and `dall-e-3` are
102
- # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
103
- # after the image has been generated. This parameter isn't supported for the GPT
96
+ # @deprecated
97
+ #
98
+ # Legacy response format parameter for retired image models. Unsupported for GPT
104
99
  # image models, which always return base64-encoded images.
105
100
  #
106
101
  # @return [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil]
@@ -116,18 +111,16 @@ module OpenAI
116
111
  # the maximum supported resolution is `3840x2160`. The requested size must also
117
112
  # satisfy the model's current pixel and edge limits. The standard sizes
118
113
  # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
119
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
120
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
121
- # `1024x1024`, `1792x1024`, or `1024x1792`.
114
+ # `auto` is supported for models that allow automatic sizing.
122
115
  #
123
116
  # @return [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil]
124
117
  optional :size, union: -> { OpenAI::ImageGenerateParams::Size }, nil?: true
125
118
 
126
119
  # @!attribute style
127
- # The style of the generated images. This parameter is only supported for
128
- # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
129
- # towards generating hyper-real and dramatic images. Natural causes the model to
130
- # produce more natural, less hyper-real looking images.
120
+ # @deprecated
121
+ #
122
+ # Legacy style parameter for retired image models. Unsupported for GPT image
123
+ # models; describe the desired style in the prompt instead.
131
124
  #
132
125
  # @return [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil]
133
126
  optional :style, enum: -> { OpenAI::ImageGenerateParams::Style }, nil?: true
@@ -143,8 +136,7 @@ module OpenAI
143
136
  # @!method initialize(prompt:, background: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, style: nil, user: nil, request_options: {})
144
137
  # @param prompt [String]
145
138
  # A text description of the desired image(s). The maximum length is 32000
146
- # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
147
- # characters for `dall-e-3`.
139
+ # characters.
148
140
  #
149
141
  # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil]
150
142
  # Allows to set transparency for the background of the generated image(s). Must be
@@ -158,12 +150,11 @@ module OpenAI
158
150
  # set the output format to `png` or `webp`.
159
151
  #
160
152
  # @param model [String, Symbol, OpenAI::Models::ImageModel, nil]
161
- # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
162
- # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
163
- # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
153
+ # The GPT image model to use for image generation. Specify a model explicitly.
154
+ # Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
155
+ # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
164
156
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
165
- # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter
166
- # specific to the GPT image models is used.
157
+ # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
167
158
  #
168
159
  # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil]
169
160
  # Control the content-moderation level for images generated by the GPT image
@@ -171,8 +162,7 @@ module OpenAI
171
162
  # value).
172
163
  #
173
164
  # @param n [Integer, nil]
174
- # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
175
- # `n=1` is supported.
165
+ # The number of images to generate. Must be between 1 and 10.
176
166
  #
177
167
  # @param output_compression [Integer, nil]
178
168
  # The compression level (0-100%) for the generated images. This parameter is only
@@ -199,13 +189,9 @@ module OpenAI
199
189
  # - `high`, `medium` and `low` are supported for the GPT image models.
200
190
  # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
201
191
  # `2026-09-08` snapshots, also support `xhigh` and `max`.
202
- # - `hd` and `standard` are supported for `dall-e-3`.
203
- # - `standard` is the only option for `dall-e-2`.
204
192
  #
205
193
  # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil]
206
- # The format in which generated images with `dall-e-2` and `dall-e-3` are
207
- # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
208
- # after the image has been generated. This parameter isn't supported for the GPT
194
+ # Legacy response format parameter for retired image models. Unsupported for GPT
209
195
  # image models, which always return base64-encoded images.
210
196
  #
211
197
  # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil]
@@ -218,15 +204,11 @@ module OpenAI
218
204
  # the maximum supported resolution is `3840x2160`. The requested size must also
219
205
  # satisfy the model's current pixel and edge limits. The standard sizes
220
206
  # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
221
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
222
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
223
- # `1024x1024`, `1792x1024`, or `1024x1792`.
207
+ # `auto` is supported for models that allow automatic sizing.
224
208
  #
225
209
  # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil]
226
- # The style of the generated images. This parameter is only supported for
227
- # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
228
- # towards generating hyper-real and dramatic images. Natural causes the model to
229
- # produce more natural, less hyper-real looking images.
210
+ # Legacy style parameter for retired image models. Unsupported for GPT image
211
+ # models; describe the desired style in the prompt instead.
230
212
  #
231
213
  # @param user [String]
232
214
  # A unique identifier representing your end-user, which can help OpenAI to monitor
@@ -255,18 +237,17 @@ module OpenAI
255
237
  # @return [Array<Symbol>]
256
238
  end
257
239
 
258
- # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
259
- # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
260
- # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
240
+ # The GPT image model to use for image generation. Specify a model explicitly.
241
+ # Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
242
+ # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
261
243
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
262
- # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter
263
- # specific to the GPT image models is used.
244
+ # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
264
245
  module Model
265
246
  extend OpenAI::Internal::Type::Union
266
247
 
267
248
  variant String
268
249
 
269
- # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used.
250
+ # The GPT image model to use for image generation. Specify a model explicitly. Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
270
251
  variant enum: -> { OpenAI::ImageModel }
271
252
 
272
253
  # @!method self.variants
@@ -306,27 +287,29 @@ module OpenAI
306
287
  # - `high`, `medium` and `low` are supported for the GPT image models.
307
288
  # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
308
289
  # `2026-09-08` snapshots, also support `xhigh` and `max`.
309
- # - `hd` and `standard` are supported for `dall-e-3`.
310
- # - `standard` is the only option for `dall-e-2`.
311
290
  module Quality
312
291
  extend OpenAI::Internal::Type::Enum
313
292
 
314
- STANDARD = :standard
315
- HD = :hd
316
293
  LOW = :low
317
294
  MEDIUM = :medium
318
295
  HIGH = :high
319
296
  XHIGH = :xhigh
320
297
  MAX = :max
321
298
  AUTO = :auto
299
+ # @deprecated This quality was only supported by retired DALL·E models. Use a GPT image
300
+ # quality instead.
301
+ STANDARD = :standard
302
+ # @deprecated This quality was only supported by retired DALL·E models. Use a GPT image
303
+ # quality instead.
304
+ HD = :hd
322
305
 
323
306
  # @!method self.values
324
307
  # @return [Array<Symbol>]
325
308
  end
326
309
 
327
- # The format in which generated images with `dall-e-2` and `dall-e-3` are
328
- # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
329
- # after the image has been generated. This parameter isn't supported for the GPT
310
+ # @deprecated
311
+ #
312
+ # Legacy response format parameter for retired image models. Unsupported for GPT
330
313
  # image models, which always return base64-encoded images.
331
314
  module ResponseFormat
332
315
  extend OpenAI::Internal::Type::Enum
@@ -347,9 +330,7 @@ module OpenAI
347
330
  # the maximum supported resolution is `3840x2160`. The requested size must also
348
331
  # satisfy the model's current pixel and edge limits. The standard sizes
349
332
  # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
350
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
351
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
352
- # `1024x1024`, `1792x1024`, or `1024x1792`.
333
+ # `auto` is supported for models that allow automatic sizing.
353
334
  module Size
354
335
  extend OpenAI::Internal::Type::Union
355
336
 
@@ -384,18 +365,26 @@ module OpenAI
384
365
  SIZE_1024X1024 = :"1024x1024"
385
366
  SIZE_1536X1024 = :"1536x1024"
386
367
  SIZE_1024X1536 = :"1024x1536"
368
+ # @deprecated This legacy size suggestion is retained for SDK compatibility. Check the
369
+ # selected GPT image model's supported sizes.
387
370
  SIZE_256X256 = :"256x256"
371
+ # @deprecated This legacy size suggestion is retained for SDK compatibility. Check the
372
+ # selected GPT image model's supported sizes.
388
373
  SIZE_512X512 = :"512x512"
374
+ # @deprecated This legacy size suggestion is retained for SDK compatibility. Check the
375
+ # selected GPT image model's supported sizes.
389
376
  SIZE_1792X1024 = :"1792x1024"
377
+ # @deprecated This legacy size suggestion is retained for SDK compatibility. Check the
378
+ # selected GPT image model's supported sizes.
390
379
  SIZE_1024X1792 = :"1024x1792"
391
380
 
392
381
  # @!endgroup
393
382
  end
394
383
 
395
- # The style of the generated images. This parameter is only supported for
396
- # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
397
- # towards generating hyper-real and dramatic images. Natural causes the model to
398
- # produce more natural, less hyper-real looking images.
384
+ # @deprecated
385
+ #
386
+ # Legacy style parameter for retired image models. Unsupported for GPT image
387
+ # models; describe the desired style in the prompt instead.
399
388
  module Style
400
389
  extend OpenAI::Internal::Type::Enum
401
390