openai 0.61.0 → 0.62.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 (157) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +10 -1
  5. data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +10 -1
  6. data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +10 -1
  7. data/lib/openai/models/admin/organization/usage_completions_response.rb +10 -1
  8. data/lib/openai/models/admin/organization/usage_costs_response.rb +10 -1
  9. data/lib/openai/models/admin/organization/usage_embeddings_response.rb +10 -1
  10. data/lib/openai/models/admin/organization/usage_images_response.rb +10 -1
  11. data/lib/openai/models/admin/organization/usage_moderations_response.rb +10 -1
  12. data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +10 -1
  13. data/lib/openai/models/chat/chat_completion_token_logprob.rb +1 -2
  14. data/lib/openai/models/chat/completion_create_params.rb +4 -3
  15. data/lib/openai/models/image_edit_params.rb +85 -31
  16. data/lib/openai/models/image_generate_params.rb +78 -26
  17. data/lib/openai/models/image_model.rb +5 -2
  18. data/lib/openai/models/realtime/audio_transcription.rb +37 -5
  19. data/lib/openai/models/realtime/client_secret_create_response.rb +1 -2
  20. data/lib/openai/models/realtime/realtime_audio_config_input.rb +3 -0
  21. data/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +3 -0
  22. data/lib/openai/models/realtime/realtime_reasoning.rb +24 -0
  23. data/lib/openai/models/realtime/realtime_reasoning_effort.rb +22 -0
  24. data/lib/openai/models/realtime/realtime_response_create_params.rb +18 -1
  25. data/lib/openai/models/realtime/realtime_session.rb +6 -0
  26. data/lib/openai/models/realtime/realtime_session_create_request.rb +21 -1
  27. data/lib/openai/models/realtime/realtime_session_create_response.rb +41 -17
  28. data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +3 -0
  29. data/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb +3 -0
  30. data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +9 -5
  31. data/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb +2 -1
  32. data/lib/openai/models/realtime/realtime_translation_client_event.rb +45 -0
  33. data/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb +85 -0
  34. data/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb +42 -0
  35. data/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb +51 -0
  36. data/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb +55 -0
  37. data/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb +89 -0
  38. data/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb +54 -0
  39. data/lib/openai/models/realtime/realtime_translation_server_event.rb +53 -0
  40. data/lib/openai/models/realtime/realtime_translation_session.rb +158 -0
  41. data/lib/openai/models/realtime/realtime_translation_session_close_event.rb +30 -0
  42. data/lib/openai/models/realtime/realtime_translation_session_closed_event.rb +28 -0
  43. data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +138 -0
  44. data/lib/openai/models/realtime/realtime_translation_session_created_event.rb +38 -0
  45. data/lib/openai/models/realtime/realtime_translation_session_update_event.rb +43 -0
  46. data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +129 -0
  47. data/lib/openai/models/realtime/realtime_translation_session_updated_event.rb +37 -0
  48. data/lib/openai/models/realtime/transcription_session_updated_event.rb +1 -2
  49. data/lib/openai/models/responses/response.rb +4 -3
  50. data/lib/openai/models/responses/response_create_params.rb +4 -3
  51. data/lib/openai/models/responses/response_includable.rb +2 -0
  52. data/lib/openai/models/responses/response_text_delta_event.rb +2 -2
  53. data/lib/openai/models/responses/response_text_done_event.rb +2 -2
  54. data/lib/openai/models/responses/responses_client_event.rb +4 -3
  55. data/lib/openai/models/responses/tool.rb +81 -16
  56. data/lib/openai/resources/chat/completions.rb +2 -2
  57. data/lib/openai/resources/images.rb +6 -6
  58. data/lib/openai/resources/realtime/calls.rb +5 -1
  59. data/lib/openai/resources/responses.rb +2 -2
  60. data/lib/openai/version.rb +1 -1
  61. data/lib/openai.rb +18 -1
  62. data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +11 -1
  63. data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +11 -1
  64. data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +11 -1
  65. data/rbi/openai/models/admin/organization/usage_completions_response.rbi +11 -1
  66. data/rbi/openai/models/admin/organization/usage_costs_response.rbi +11 -1
  67. data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +11 -1
  68. data/rbi/openai/models/admin/organization/usage_images_response.rbi +11 -1
  69. data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +11 -1
  70. data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +11 -1
  71. data/rbi/openai/models/chat/chat_completion_token_logprob.rbi +2 -4
  72. data/rbi/openai/models/chat/completion_create_params.rbi +6 -4
  73. data/rbi/openai/models/image_edit_params.rbi +102 -45
  74. data/rbi/openai/models/image_generate_params.rbi +93 -39
  75. data/rbi/openai/models/image_model.rbi +8 -3
  76. data/rbi/openai/models/realtime/audio_transcription.rbi +85 -6
  77. data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +6 -0
  78. data/rbi/openai/models/realtime/realtime_audio_input_turn_detection.rbi +3 -0
  79. data/rbi/openai/models/realtime/realtime_reasoning.rbi +54 -0
  80. data/rbi/openai/models/realtime/realtime_reasoning_effort.rbi +44 -0
  81. data/rbi/openai/models/realtime/realtime_response_create_params.rbi +26 -0
  82. data/rbi/openai/models/realtime/realtime_session.rbi +9 -0
  83. data/rbi/openai/models/realtime/realtime_session_create_request.rbi +31 -0
  84. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +53 -32
  85. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +6 -0
  86. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbi +3 -0
  87. data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +13 -7
  88. data/rbi/openai/models/realtime/realtime_transcription_session_turn_detection.rbi +2 -1
  89. data/rbi/openai/models/realtime/realtime_translation_client_event.rbi +29 -0
  90. data/rbi/openai/models/realtime/realtime_translation_client_secret_create_request.rbi +193 -0
  91. data/rbi/openai/models/realtime/realtime_translation_client_secret_create_response.rbi +69 -0
  92. data/rbi/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbi +69 -0
  93. data/rbi/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbi +77 -0
  94. data/rbi/openai/models/realtime/realtime_translation_output_audio_delta_event.rbi +148 -0
  95. data/rbi/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbi +76 -0
  96. data/rbi/openai/models/realtime/realtime_translation_server_event.rbi +33 -0
  97. data/rbi/openai/models/realtime/realtime_translation_session.rbi +339 -0
  98. data/rbi/openai/models/realtime/realtime_translation_session_close_event.rbi +44 -0
  99. data/rbi/openai/models/realtime/realtime_translation_session_closed_event.rbi +39 -0
  100. data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +322 -0
  101. data/rbi/openai/models/realtime/realtime_translation_session_created_event.rbi +68 -0
  102. data/rbi/openai/models/realtime/realtime_translation_session_update_event.rbi +78 -0
  103. data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +313 -0
  104. data/rbi/openai/models/realtime/realtime_translation_session_updated_event.rbi +67 -0
  105. data/rbi/openai/models/realtime/transcription_session_updated_event.rbi +0 -2
  106. data/rbi/openai/models/responses/response.rbi +6 -4
  107. data/rbi/openai/models/responses/response_create_params.rbi +6 -4
  108. data/rbi/openai/models/responses/response_includable.rbi +2 -0
  109. data/rbi/openai/models/responses/response_text_delta_event.rbi +2 -2
  110. data/rbi/openai/models/responses/response_text_done_event.rbi +2 -2
  111. data/rbi/openai/models/responses/responses_client_event.rbi +6 -4
  112. data/rbi/openai/models/responses/tool.rbi +122 -27
  113. data/rbi/openai/resources/chat/completions.rbi +6 -4
  114. data/rbi/openai/resources/images.rbi +110 -44
  115. data/rbi/openai/resources/realtime/calls.rbi +7 -0
  116. data/rbi/openai/resources/responses.rbi +6 -4
  117. data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +7 -2
  118. data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +7 -2
  119. data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +7 -2
  120. data/sig/openai/models/admin/organization/usage_completions_response.rbs +7 -2
  121. data/sig/openai/models/admin/organization/usage_costs_response.rbs +7 -2
  122. data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +7 -2
  123. data/sig/openai/models/admin/organization/usage_images_response.rbs +7 -2
  124. data/sig/openai/models/admin/organization/usage_moderations_response.rbs +7 -2
  125. data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +7 -2
  126. data/sig/openai/models/image_edit_params.rbs +5 -4
  127. data/sig/openai/models/image_generate_params.rbs +5 -4
  128. data/sig/openai/models/image_model.rbs +11 -5
  129. data/sig/openai/models/realtime/audio_transcription.rbs +25 -0
  130. data/sig/openai/models/realtime/realtime_reasoning.rbs +24 -0
  131. data/sig/openai/models/realtime/realtime_reasoning_effort.rbs +20 -0
  132. data/sig/openai/models/realtime/realtime_response_create_params.rbs +16 -0
  133. data/sig/openai/models/realtime/realtime_session_create_request.rbs +18 -0
  134. data/sig/openai/models/realtime/realtime_session_create_response.rbs +27 -4
  135. data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +4 -8
  136. data/sig/openai/models/realtime/realtime_translation_client_event.rbs +16 -0
  137. data/sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs +69 -0
  138. data/sig/openai/models/realtime/realtime_translation_client_secret_create_response.rbs +32 -0
  139. data/sig/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbs +34 -0
  140. data/sig/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbs +37 -0
  141. data/sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs +70 -0
  142. data/sig/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbs +37 -0
  143. data/sig/openai/models/realtime/realtime_translation_server_event.rbs +20 -0
  144. data/sig/openai/models/realtime/realtime_translation_session.rbs +131 -0
  145. data/sig/openai/models/realtime/realtime_translation_session_close_event.rbs +20 -0
  146. data/sig/openai/models/realtime/realtime_translation_session_closed_event.rbs +18 -0
  147. data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +120 -0
  148. data/sig/openai/models/realtime/realtime_translation_session_created_event.rbs +32 -0
  149. data/sig/openai/models/realtime/realtime_translation_session_update_event.rbs +34 -0
  150. data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +115 -0
  151. data/sig/openai/models/realtime/realtime_translation_session_updated_event.rbs +32 -0
  152. data/sig/openai/models/responses/tool.rbs +15 -5
  153. data/sig/openai/resources/realtime/calls.rbs +2 -0
  154. metadata +56 -5
  155. data/lib/openai/models/realtime/realtime_session_client_secret.rb +0 -36
  156. data/rbi/openai/models/realtime/realtime_session_client_secret.rbi +0 -49
  157. data/sig/openai/models/realtime/realtime_session_client_secret.rbs +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05f5bfabea5cbd601fcd33a8ed3e6f8bbf52dde251998c77e16163c10dfb6a65
4
- data.tar.gz: 0c83764f6e4316cc7bc6fa3d0bfc19f855f144f4964df5c98e3dee4a8a7839d9
3
+ metadata.gz: 8b8ba7d86e2a095f264f3249f65a5b7023ed92f5d72b254537d2131343d008d1
4
+ data.tar.gz: b2473fbb12916be311368b3ce12ec183118c94fecba86145f0765ddb261d34be
5
5
  SHA512:
6
- metadata.gz: 01cd6adcb14ef5e12dda7fc68c127bd57dd2a9920b2909dd75f4297943eb701a6dd94f0eda0e7a94541a209deab6e9f0c0f8f584b86f672c7cb6852a918e3374
7
- data.tar.gz: e3644e138d68134533429bbd705268c3d03514664a7cb9b188d55fa978827fb95ffa7a92d3f361413fce836229cb4f45fa636cb105470f07220a5d3df964c578
6
+ metadata.gz: 4c6c2cdd0fb69bcf6df1bedab9f82904812aedcca80e43dc378eb36c213b1975b439040c26432ab29ddac79c938c361000f7de2508255632eea04dc220593bfa
7
+ data.tar.gz: 99dba44fb87261cefba089bfea34b90d09848e85e4be6e682f277c1a8f9a6cbfb9d7a51b9f99b918e0fe5ebc80f3321180af4ebde21268d920ed9e09cf103321
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.62.0 (2026-05-07)
4
+
5
+ Full Changelog: [v0.61.0...v0.62.0](https://github.com/openai/openai-ruby/compare/v0.61.0...v0.62.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add quantity field to organization usage costs results ([2085700](https://github.com/openai/openai-ruby/commit/2085700725c2325e880a715ce3b13b4efce7b5d4))
10
+ * **api:** add web_search_call.results includable option ([b486412](https://github.com/openai/openai-ruby/commit/b4864127789424527497aa6097d93ea06e9aa4f7))
11
+ * **api:** launch realtime translate + update image 2 ([0e642fb](https://github.com/openai/openai-ruby/commit/0e642fbf02845ff94b8eda0fca7e8348adc3ac37))
12
+ * **api:** manual updates ([4baf155](https://github.com/openai/openai-ruby/commit/4baf155ef74ffdf533dfba330e15f7accf1e5351))
13
+ * **api:** manual updates ([20c8209](https://github.com/openai/openai-ruby/commit/20c82091b6c24668e90ed895dfc7e88b0aafd977))
14
+ * **api:** realtime 2 ([1718781](https://github.com/openai/openai-ruby/commit/17187817c580b642d61ea754aa63782a16af94bc))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **api:** fix imagegen `size` enum regression ([51548cd](https://github.com/openai/openai-ruby/commit/51548cd04ab8f3a16e980bd2318ddb42ee75ce6c))
20
+
3
21
  ## 0.61.0 (2026-05-01)
4
22
 
5
23
  Full Changelog: [v0.60.0...v0.61.0](https://github.com/openai/openai-ruby/compare/v0.60.0...v0.61.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.61.0"
18
+ gem "openai", "~> 0.62.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationCostsResult#amount
@@ -684,7 +684,14 @@ module OpenAI
684
684
  # @return [String, nil]
685
685
  optional :project_id, String, nil?: true
686
686
 
687
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, object: :"organization.costs.result")
687
+ # @!attribute quantity
688
+ # When `group_by=line_item`, this field provides the quantity of the grouped costs
689
+ # result.
690
+ #
691
+ # @return [Float, nil]
692
+ optional :quantity, Float, nil?: true
693
+
694
+ # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
688
695
  # Some parameter documentations has been truncated, see
689
696
  # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult}
690
697
  # for more details.
@@ -699,6 +706,8 @@ module OpenAI
699
706
  #
700
707
  # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
701
708
  #
709
+ # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
710
+ #
702
711
  # @param object [Symbol, :"organization.costs.result"]
703
712
 
704
713
  # @see OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult#amount
@@ -29,8 +29,7 @@ module OpenAI
29
29
 
30
30
  # @!attribute top_logprobs
31
31
  # List of the most likely tokens and their log probability, at this token
32
- # position. In rare cases, there may be fewer than the number of requested
33
- # `top_logprobs` returned.
32
+ # position. The number of entries may be fewer than the requested `top_logprobs`.
34
33
  #
35
34
  # @return [Array<OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob>]
36
35
  required :top_logprobs,
@@ -340,8 +340,9 @@ module OpenAI
340
340
  }
341
341
 
342
342
  # @!attribute top_logprobs
343
- # An integer between 0 and 20 specifying the number of most likely tokens to
344
- # return at each token position, each with an associated log probability.
343
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
344
+ # to return at each token position, each with an associated log probability. In
345
+ # some cases, the number of returned tokens may be fewer than requested.
345
346
  # `logprobs` must be set to `true` if this parameter is used.
346
347
  #
347
348
  # @return [Integer, nil]
@@ -447,7 +448,7 @@ module OpenAI
447
448
  #
448
449
  # @param tools [Array<OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::Chat::ChatCompletionFunctionTool, OpenAI::Models::Chat::ChatCompletionCustomTool>] A list of tools the model may call. You can provide either
449
450
  #
450
- # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the number of most likely tokens to
451
+ # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely
451
452
  #
452
453
  # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling,
453
454
  #
@@ -12,10 +12,10 @@ module OpenAI
12
12
  # @!attribute image
13
13
  # The image(s) to edit. Must be a supported image file or an array of images.
14
14
  #
15
- # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
16
- # `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
17
- # 50MB. You can provide up to 16 images. `chatgpt-image-latest` follows the same
18
- # input constraints as GPT image models.
15
+ # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
16
+ # `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
17
+ # should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
18
+ # 16 images.
19
19
  #
20
20
  # For `dall-e-2`, you can only provide one image, and it should be a square `png`
21
21
  # file less than 4MB.
@@ -32,9 +32,14 @@ module OpenAI
32
32
 
33
33
  # @!attribute background
34
34
  # Allows to set transparency for the background of the generated image(s). This
35
- # parameter is only supported for the GPT image models. Must be one of
36
- # `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
37
- # model will automatically determine the best background for the image.
35
+ # parameter is only supported for GPT image models that support transparent
36
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
37
+ # When `auto` is used, the model will automatically determine the best background
38
+ # for the image.
39
+ #
40
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
41
+ # backgrounds. Requests with `background` set to `transparent` will return an
42
+ # error for these models; use `opaque` or `auto` instead.
38
43
  #
39
44
  # If `transparent`, the output format needs to support transparency, so it should
40
45
  # be set to either `png` (default value) or `webp`.
@@ -61,7 +66,10 @@ module OpenAI
61
66
  optional :mask, OpenAI::Internal::Type::FileInput
62
67
 
63
68
  # @!attribute model
64
- # The model to use for image generation. Defaults to `gpt-image-1.5`.
69
+ # The model to use for image generation. One of `dall-e-2` or a GPT image model
70
+ # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
71
+ # `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
72
+ # `gpt-image-1.5`.
65
73
  #
66
74
  # @return [String, Symbol, OpenAI::Models::ImageModel, nil]
67
75
  optional :model, union: -> { OpenAI::ImageEditParams::Model }, nil?: true
@@ -116,12 +124,20 @@ module OpenAI
116
124
  optional :response_format, enum: -> { OpenAI::ImageEditParams::ResponseFormat }, nil?: true
117
125
 
118
126
  # @!attribute size
119
- # The size of the generated images. Must be one of `1024x1024`, `1536x1024`
120
- # (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
121
- # models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
122
- #
123
- # @return [Symbol, OpenAI::Models::ImageEditParams::Size, nil]
124
- optional :size, enum: -> { OpenAI::ImageEditParams::Size }, nil?: true
127
+ # The size of the generated images. For `gpt-image-2` and
128
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
129
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
130
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
131
+ # `2560x1440` are experimental, and the maximum supported resolution is
132
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
133
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
134
+ # supported by the GPT image models; `auto` is supported for models that allow
135
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
136
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
137
+ # `1024x1792`.
138
+ #
139
+ # @return [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil]
140
+ optional :size, union: -> { OpenAI::ImageEditParams::Size }, nil?: true
125
141
 
126
142
  # @!attribute user
127
143
  # A unique identifier representing your end-user, which can help OpenAI to monitor
@@ -145,7 +161,7 @@ module OpenAI
145
161
  #
146
162
  # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] An additional image whose fully transparent areas (e.g. where alpha is zero) ind
147
163
  #
148
- # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. Defaults to `gpt-image-1.5`.
164
+ # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2` or a GPT image model (`
149
165
  #
150
166
  # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10.
151
167
  #
@@ -159,7 +175,7 @@ module OpenAI
159
175
  #
160
176
  # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] The format in which the generated images are returned. Must be one of `url` or `
161
177
  #
162
- # @param size [Symbol, OpenAI::Models::ImageEditParams::Size, nil] The size of the generated images. Must be one of `1024x1024`, `1536x1024` (lands
178
+ # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`
163
179
  #
164
180
  # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor
165
181
  #
@@ -167,10 +183,10 @@ module OpenAI
167
183
 
168
184
  # The image(s) to edit. Must be a supported image file or an array of images.
169
185
  #
170
- # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
171
- # `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
172
- # 50MB. You can provide up to 16 images. `chatgpt-image-latest` follows the same
173
- # input constraints as GPT image models.
186
+ # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
187
+ # `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
188
+ # should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
189
+ # 16 images.
174
190
  #
175
191
  # For `dall-e-2`, you can only provide one image, and it should be a square `png`
176
192
  # file less than 4MB.
@@ -189,9 +205,14 @@ module OpenAI
189
205
  end
190
206
 
191
207
  # Allows to set transparency for the background of the generated image(s). This
192
- # parameter is only supported for the GPT image models. Must be one of
193
- # `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
194
- # model will automatically determine the best background for the image.
208
+ # parameter is only supported for GPT image models that support transparent
209
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
210
+ # When `auto` is used, the model will automatically determine the best background
211
+ # for the image.
212
+ #
213
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
214
+ # backgrounds. Requests with `background` set to `transparent` will return an
215
+ # error for these models; use `opaque` or `auto` instead.
195
216
  #
196
217
  # If `transparent`, the output format needs to support transparency, so it should
197
218
  # be set to either `png` (default value) or `webp`.
@@ -220,13 +241,16 @@ module OpenAI
220
241
  # @return [Array<Symbol>]
221
242
  end
222
243
 
223
- # The model to use for image generation. Defaults to `gpt-image-1.5`.
244
+ # The model to use for image generation. One of `dall-e-2` or a GPT image model
245
+ # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
246
+ # `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
247
+ # `gpt-image-1.5`.
224
248
  module Model
225
249
  extend OpenAI::Internal::Type::Union
226
250
 
227
251
  variant String
228
252
 
229
- # The model to use for image generation. Defaults to `gpt-image-1.5`.
253
+ # 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`, or `chatgpt-image-latest`). Defaults to `gpt-image-1.5`.
230
254
  variant enum: -> { OpenAI::ImageModel }
231
255
 
232
256
  # @!method self.variants
@@ -276,11 +300,42 @@ module OpenAI
276
300
  # @return [Array<Symbol>]
277
301
  end
278
302
 
279
- # The size of the generated images. Must be one of `1024x1024`, `1536x1024`
280
- # (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
281
- # models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
303
+ # The size of the generated images. For `gpt-image-2` and
304
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
305
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
306
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
307
+ # `2560x1440` are experimental, and the maximum supported resolution is
308
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
309
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
310
+ # supported by the GPT image models; `auto` is supported for models that allow
311
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
312
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
313
+ # `1024x1792`.
282
314
  module Size
283
- extend OpenAI::Internal::Type::Enum
315
+ extend OpenAI::Internal::Type::Union
316
+
317
+ variant String
318
+
319
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_256X256 }
320
+
321
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_512X512 }
322
+
323
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1024X1024 }
324
+
325
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1536X1024 }
326
+
327
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1024X1536 }
328
+
329
+ variant const: -> { OpenAI::Models::ImageEditParams::Size::AUTO }
330
+
331
+ # @!method self.variants
332
+ # @return [Array(String, Symbol)]
333
+
334
+ define_sorbet_constant!(:Variants) do
335
+ T.type_alias { T.any(String, OpenAI::ImageEditParams::Size::TaggedSymbol) }
336
+ end
337
+
338
+ # @!group
284
339
 
285
340
  SIZE_256X256 = :"256x256"
286
341
  SIZE_512X512 = :"512x512"
@@ -289,8 +344,7 @@ module OpenAI
289
344
  SIZE_1024X1536 = :"1024x1536"
290
345
  AUTO = :auto
291
346
 
292
- # @!method self.values
293
- # @return [Array<Symbol>]
347
+ # @!endgroup
294
348
  end
295
349
  end
296
350
  end