openai 0.61.0 → 0.63.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 (164) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +2 -5
  4. data/lib/openai/auth/workload_identity.rb +2 -2
  5. data/lib/openai/auth/workload_identity_auth.rb +4 -3
  6. data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +10 -1
  7. data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +10 -1
  8. data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +10 -1
  9. data/lib/openai/models/admin/organization/usage_completions_response.rb +10 -1
  10. data/lib/openai/models/admin/organization/usage_costs_response.rb +10 -1
  11. data/lib/openai/models/admin/organization/usage_embeddings_response.rb +10 -1
  12. data/lib/openai/models/admin/organization/usage_images_response.rb +10 -1
  13. data/lib/openai/models/admin/organization/usage_moderations_response.rb +10 -1
  14. data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +10 -1
  15. data/lib/openai/models/chat/chat_completion_token_logprob.rb +1 -2
  16. data/lib/openai/models/chat/completion_create_params.rb +4 -3
  17. data/lib/openai/models/image_edit_params.rb +85 -31
  18. data/lib/openai/models/image_generate_params.rb +78 -26
  19. data/lib/openai/models/image_model.rb +5 -2
  20. data/lib/openai/models/realtime/audio_transcription.rb +37 -5
  21. data/lib/openai/models/realtime/client_secret_create_response.rb +1 -2
  22. data/lib/openai/models/realtime/realtime_audio_config_input.rb +3 -0
  23. data/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +3 -0
  24. data/lib/openai/models/realtime/realtime_reasoning.rb +24 -0
  25. data/lib/openai/models/realtime/realtime_reasoning_effort.rb +22 -0
  26. data/lib/openai/models/realtime/realtime_response_create_params.rb +18 -1
  27. data/lib/openai/models/realtime/realtime_session.rb +6 -0
  28. data/lib/openai/models/realtime/realtime_session_create_request.rb +21 -1
  29. data/lib/openai/models/realtime/realtime_session_create_response.rb +41 -17
  30. data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +3 -0
  31. data/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb +3 -0
  32. data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +9 -5
  33. data/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb +2 -1
  34. data/lib/openai/models/realtime/realtime_translation_client_event.rb +45 -0
  35. data/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb +85 -0
  36. data/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb +42 -0
  37. data/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb +51 -0
  38. data/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb +55 -0
  39. data/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb +89 -0
  40. data/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb +54 -0
  41. data/lib/openai/models/realtime/realtime_translation_server_event.rb +53 -0
  42. data/lib/openai/models/realtime/realtime_translation_session.rb +158 -0
  43. data/lib/openai/models/realtime/realtime_translation_session_close_event.rb +30 -0
  44. data/lib/openai/models/realtime/realtime_translation_session_closed_event.rb +28 -0
  45. data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +138 -0
  46. data/lib/openai/models/realtime/realtime_translation_session_created_event.rb +38 -0
  47. data/lib/openai/models/realtime/realtime_translation_session_update_event.rb +43 -0
  48. data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +129 -0
  49. data/lib/openai/models/realtime/realtime_translation_session_updated_event.rb +37 -0
  50. data/lib/openai/models/realtime/transcription_session_updated_event.rb +1 -2
  51. data/lib/openai/models/responses/response.rb +4 -3
  52. data/lib/openai/models/responses/response_compact_params.rb +22 -1
  53. data/lib/openai/models/responses/response_create_params.rb +4 -3
  54. data/lib/openai/models/responses/response_includable.rb +2 -0
  55. data/lib/openai/models/responses/response_text_delta_event.rb +2 -2
  56. data/lib/openai/models/responses/response_text_done_event.rb +2 -2
  57. data/lib/openai/models/responses/responses_client_event.rb +4 -3
  58. data/lib/openai/models/responses/tool.rb +81 -16
  59. data/lib/openai/resources/chat/completions.rb +2 -2
  60. data/lib/openai/resources/images.rb +6 -6
  61. data/lib/openai/resources/realtime/calls.rb +5 -1
  62. data/lib/openai/resources/responses.rb +5 -3
  63. data/lib/openai/version.rb +1 -1
  64. data/lib/openai.rb +18 -1
  65. data/rbi/openai/auth.rbi +3 -3
  66. data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +11 -1
  67. data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +11 -1
  68. data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +11 -1
  69. data/rbi/openai/models/admin/organization/usage_completions_response.rbi +11 -1
  70. data/rbi/openai/models/admin/organization/usage_costs_response.rbi +11 -1
  71. data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +11 -1
  72. data/rbi/openai/models/admin/organization/usage_images_response.rbi +11 -1
  73. data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +11 -1
  74. data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +11 -1
  75. data/rbi/openai/models/chat/chat_completion_token_logprob.rbi +2 -4
  76. data/rbi/openai/models/chat/completion_create_params.rbi +6 -4
  77. data/rbi/openai/models/image_edit_params.rbi +102 -45
  78. data/rbi/openai/models/image_generate_params.rbi +93 -39
  79. data/rbi/openai/models/image_model.rbi +8 -3
  80. data/rbi/openai/models/realtime/audio_transcription.rbi +85 -6
  81. data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +6 -0
  82. data/rbi/openai/models/realtime/realtime_audio_input_turn_detection.rbi +3 -0
  83. data/rbi/openai/models/realtime/realtime_reasoning.rbi +54 -0
  84. data/rbi/openai/models/realtime/realtime_reasoning_effort.rbi +44 -0
  85. data/rbi/openai/models/realtime/realtime_response_create_params.rbi +26 -0
  86. data/rbi/openai/models/realtime/realtime_session.rbi +9 -0
  87. data/rbi/openai/models/realtime/realtime_session_create_request.rbi +31 -0
  88. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +53 -32
  89. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +6 -0
  90. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbi +3 -0
  91. data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +13 -7
  92. data/rbi/openai/models/realtime/realtime_transcription_session_turn_detection.rbi +2 -1
  93. data/rbi/openai/models/realtime/realtime_translation_client_event.rbi +29 -0
  94. data/rbi/openai/models/realtime/realtime_translation_client_secret_create_request.rbi +193 -0
  95. data/rbi/openai/models/realtime/realtime_translation_client_secret_create_response.rbi +69 -0
  96. data/rbi/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbi +69 -0
  97. data/rbi/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbi +77 -0
  98. data/rbi/openai/models/realtime/realtime_translation_output_audio_delta_event.rbi +148 -0
  99. data/rbi/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbi +76 -0
  100. data/rbi/openai/models/realtime/realtime_translation_server_event.rbi +33 -0
  101. data/rbi/openai/models/realtime/realtime_translation_session.rbi +339 -0
  102. data/rbi/openai/models/realtime/realtime_translation_session_close_event.rbi +44 -0
  103. data/rbi/openai/models/realtime/realtime_translation_session_closed_event.rbi +39 -0
  104. data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +322 -0
  105. data/rbi/openai/models/realtime/realtime_translation_session_created_event.rbi +68 -0
  106. data/rbi/openai/models/realtime/realtime_translation_session_update_event.rbi +78 -0
  107. data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +313 -0
  108. data/rbi/openai/models/realtime/realtime_translation_session_updated_event.rbi +67 -0
  109. data/rbi/openai/models/realtime/transcription_session_updated_event.rbi +0 -2
  110. data/rbi/openai/models/responses/response.rbi +6 -4
  111. data/rbi/openai/models/responses/response_compact_params.rbi +65 -0
  112. data/rbi/openai/models/responses/response_create_params.rbi +6 -4
  113. data/rbi/openai/models/responses/response_includable.rbi +2 -0
  114. data/rbi/openai/models/responses/response_text_delta_event.rbi +2 -2
  115. data/rbi/openai/models/responses/response_text_done_event.rbi +2 -2
  116. data/rbi/openai/models/responses/responses_client_event.rbi +6 -4
  117. data/rbi/openai/models/responses/tool.rbi +122 -27
  118. data/rbi/openai/resources/chat/completions.rbi +6 -4
  119. data/rbi/openai/resources/images.rbi +110 -44
  120. data/rbi/openai/resources/realtime/calls.rbi +7 -0
  121. data/rbi/openai/resources/responses.rbi +12 -4
  122. data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +7 -2
  123. data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +7 -2
  124. data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +7 -2
  125. data/sig/openai/models/admin/organization/usage_completions_response.rbs +7 -2
  126. data/sig/openai/models/admin/organization/usage_costs_response.rbs +7 -2
  127. data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +7 -2
  128. data/sig/openai/models/admin/organization/usage_images_response.rbs +7 -2
  129. data/sig/openai/models/admin/organization/usage_moderations_response.rbs +7 -2
  130. data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +7 -2
  131. data/sig/openai/models/image_edit_params.rbs +5 -4
  132. data/sig/openai/models/image_generate_params.rbs +5 -4
  133. data/sig/openai/models/image_model.rbs +11 -5
  134. data/sig/openai/models/realtime/audio_transcription.rbs +25 -0
  135. data/sig/openai/models/realtime/realtime_reasoning.rbs +24 -0
  136. data/sig/openai/models/realtime/realtime_reasoning_effort.rbs +20 -0
  137. data/sig/openai/models/realtime/realtime_response_create_params.rbs +16 -0
  138. data/sig/openai/models/realtime/realtime_session_create_request.rbs +18 -0
  139. data/sig/openai/models/realtime/realtime_session_create_response.rbs +27 -4
  140. data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +4 -8
  141. data/sig/openai/models/realtime/realtime_translation_client_event.rbs +16 -0
  142. data/sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs +69 -0
  143. data/sig/openai/models/realtime/realtime_translation_client_secret_create_response.rbs +32 -0
  144. data/sig/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbs +34 -0
  145. data/sig/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbs +37 -0
  146. data/sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs +70 -0
  147. data/sig/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbs +37 -0
  148. data/sig/openai/models/realtime/realtime_translation_server_event.rbs +20 -0
  149. data/sig/openai/models/realtime/realtime_translation_session.rbs +131 -0
  150. data/sig/openai/models/realtime/realtime_translation_session_close_event.rbs +20 -0
  151. data/sig/openai/models/realtime/realtime_translation_session_closed_event.rbs +18 -0
  152. data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +120 -0
  153. data/sig/openai/models/realtime/realtime_translation_session_created_event.rbs +32 -0
  154. data/sig/openai/models/realtime/realtime_translation_session_update_event.rbs +34 -0
  155. data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +115 -0
  156. data/sig/openai/models/realtime/realtime_translation_session_updated_event.rbs +32 -0
  157. data/sig/openai/models/responses/response_compact_params.rbs +19 -1
  158. data/sig/openai/models/responses/tool.rbs +15 -5
  159. data/sig/openai/resources/realtime/calls.rbs +2 -0
  160. data/sig/openai/resources/responses.rbs +1 -0
  161. metadata +56 -5
  162. data/lib/openai/models/realtime/realtime_session_client_secret.rb +0 -36
  163. data/rbi/openai/models/realtime/realtime_session_client_secret.rbi +0 -49
  164. data/sig/openai/models/realtime/realtime_session_client_secret.rbs +0 -20
@@ -926,8 +926,18 @@ module OpenAI
926
926
  end
927
927
  attr_writer :action
928
928
 
929
- # Background type for the generated image. One of `transparent`, `opaque`, or
930
- # `auto`. Default: `auto`.
929
+ # Allows to set transparency for the background of the generated image(s). This
930
+ # parameter is only supported for GPT image models that support transparent
931
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
932
+ # When `auto` is used, the model will automatically determine the best background
933
+ # for the image.
934
+ #
935
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
936
+ # backgrounds. Requests with `background` set to `transparent` will return an
937
+ # error for these models; use `opaque` or `auto` instead.
938
+ #
939
+ # If `transparent`, the output format needs to support transparency, so it should
940
+ # be set to either `png` (default value) or `webp`.
931
941
  sig do
932
942
  returns(
933
943
  T.nilable(
@@ -1072,12 +1082,24 @@ module OpenAI
1072
1082
  end
1073
1083
  attr_writer :quality
1074
1084
 
1075
- # The size of the generated image. One of `1024x1024`, `1024x1536`, `1536x1024`,
1076
- # or `auto`. Default: `auto`.
1085
+ # The size of the generated images. For `gpt-image-2` and
1086
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
1087
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
1088
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
1089
+ # `2560x1440` are experimental, and the maximum supported resolution is
1090
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
1091
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
1092
+ # supported by the GPT image models; `auto` is supported for models that allow
1093
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
1094
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
1095
+ # `1024x1792`.
1077
1096
  sig do
1078
1097
  returns(
1079
1098
  T.nilable(
1080
- OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol
1099
+ T.any(
1100
+ String,
1101
+ OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol
1102
+ )
1081
1103
  )
1082
1104
  )
1083
1105
  end
@@ -1085,7 +1107,11 @@ module OpenAI
1085
1107
 
1086
1108
  sig do
1087
1109
  params(
1088
- size: OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol
1110
+ size:
1111
+ T.any(
1112
+ String,
1113
+ OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol
1114
+ )
1089
1115
  ).void
1090
1116
  end
1091
1117
  attr_writer :size
@@ -1116,15 +1142,29 @@ module OpenAI
1116
1142
  partial_images: Integer,
1117
1143
  quality:
1118
1144
  OpenAI::Responses::Tool::ImageGeneration::Quality::OrSymbol,
1119
- size: OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol,
1145
+ size:
1146
+ T.any(
1147
+ String,
1148
+ OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol
1149
+ ),
1120
1150
  type: Symbol
1121
1151
  ).returns(T.attached_class)
1122
1152
  end
1123
1153
  def self.new(
1124
1154
  # Whether to generate a new image or edit an existing image. Default: `auto`.
1125
1155
  action: nil,
1126
- # Background type for the generated image. One of `transparent`, `opaque`, or
1127
- # `auto`. Default: `auto`.
1156
+ # Allows to set transparency for the background of the generated image(s). This
1157
+ # parameter is only supported for GPT image models that support transparent
1158
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
1159
+ # When `auto` is used, the model will automatically determine the best background
1160
+ # for the image.
1161
+ #
1162
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
1163
+ # backgrounds. Requests with `background` set to `transparent` will return an
1164
+ # error for these models; use `opaque` or `auto` instead.
1165
+ #
1166
+ # If `transparent`, the output format needs to support transparency, so it should
1167
+ # be set to either `png` (default value) or `webp`.
1128
1168
  background: nil,
1129
1169
  # Control how much effort the model will exert to match the style and features,
1130
1170
  # especially facial features, of input images. This parameter is only supported
@@ -1149,8 +1189,17 @@ module OpenAI
1149
1189
  # The quality of the generated image. One of `low`, `medium`, `high`, or `auto`.
1150
1190
  # Default: `auto`.
1151
1191
  quality: nil,
1152
- # The size of the generated image. One of `1024x1024`, `1024x1536`, `1536x1024`,
1153
- # or `auto`. Default: `auto`.
1192
+ # The size of the generated images. For `gpt-image-2` and
1193
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
1194
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
1195
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
1196
+ # `2560x1440` are experimental, and the maximum supported resolution is
1197
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
1198
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
1199
+ # supported by the GPT image models; `auto` is supported for models that allow
1200
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
1201
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
1202
+ # `1024x1792`.
1154
1203
  size: nil,
1155
1204
  # The type of the image generation tool. Always `image_generation`.
1156
1205
  type: :image_generation
@@ -1184,7 +1233,11 @@ module OpenAI
1184
1233
  partial_images: Integer,
1185
1234
  quality:
1186
1235
  OpenAI::Responses::Tool::ImageGeneration::Quality::OrSymbol,
1187
- size: OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol
1236
+ size:
1237
+ T.any(
1238
+ String,
1239
+ OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol
1240
+ )
1188
1241
  }
1189
1242
  )
1190
1243
  end
@@ -1228,8 +1281,18 @@ module OpenAI
1228
1281
  end
1229
1282
  end
1230
1283
 
1231
- # Background type for the generated image. One of `transparent`, `opaque`, or
1232
- # `auto`. Default: `auto`.
1284
+ # Allows to set transparency for the background of the generated image(s). This
1285
+ # parameter is only supported for GPT image models that support transparent
1286
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
1287
+ # When `auto` is used, the model will automatically determine the best background
1288
+ # for the image.
1289
+ #
1290
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
1291
+ # backgrounds. Requests with `background` set to `transparent` will return an
1292
+ # error for these models; use `opaque` or `auto` instead.
1293
+ #
1294
+ # If `transparent`, the output format needs to support transparency, so it should
1295
+ # be set to either `png` (default value) or `webp`.
1233
1296
  module Background
1234
1297
  extend OpenAI::Internal::Type::Enum
1235
1298
 
@@ -1388,11 +1451,26 @@ module OpenAI
1388
1451
  :"gpt-image-1-mini",
1389
1452
  OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1390
1453
  )
1454
+ GPT_IMAGE_2 =
1455
+ T.let(
1456
+ :"gpt-image-2",
1457
+ OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1458
+ )
1459
+ GPT_IMAGE_2_2026_04_21 =
1460
+ T.let(
1461
+ :"gpt-image-2-2026-04-21",
1462
+ OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1463
+ )
1391
1464
  GPT_IMAGE_1_5 =
1392
1465
  T.let(
1393
1466
  :"gpt-image-1.5",
1394
1467
  OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1395
1468
  )
1469
+ CHATGPT_IMAGE_LATEST =
1470
+ T.let(
1471
+ :"chatgpt-image-latest",
1472
+ OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1473
+ )
1396
1474
  end
1397
1475
 
1398
1476
  # Moderation level for the generated image. Default: `auto`.
@@ -1514,10 +1592,37 @@ module OpenAI
1514
1592
  end
1515
1593
  end
1516
1594
 
1517
- # The size of the generated image. One of `1024x1024`, `1024x1536`, `1536x1024`,
1518
- # or `auto`. Default: `auto`.
1595
+ # The size of the generated images. For `gpt-image-2` and
1596
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
1597
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
1598
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
1599
+ # `2560x1440` are experimental, and the maximum supported resolution is
1600
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
1601
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
1602
+ # supported by the GPT image models; `auto` is supported for models that allow
1603
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
1604
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
1605
+ # `1024x1792`.
1519
1606
  module Size
1520
- extend OpenAI::Internal::Type::Enum
1607
+ extend OpenAI::Internal::Type::Union
1608
+
1609
+ Variants =
1610
+ T.type_alias do
1611
+ T.any(
1612
+ String,
1613
+ OpenAI::Responses::Tool::ImageGeneration::Size::TaggedSymbol
1614
+ )
1615
+ end
1616
+
1617
+ sig do
1618
+ override.returns(
1619
+ T::Array[
1620
+ OpenAI::Responses::Tool::ImageGeneration::Size::Variants
1621
+ ]
1622
+ )
1623
+ end
1624
+ def self.variants
1625
+ end
1521
1626
 
1522
1627
  TaggedSymbol =
1523
1628
  T.type_alias do
@@ -1545,16 +1650,6 @@ module OpenAI
1545
1650
  :auto,
1546
1651
  OpenAI::Responses::Tool::ImageGeneration::Size::TaggedSymbol
1547
1652
  )
1548
-
1549
- sig do
1550
- override.returns(
1551
- T::Array[
1552
- OpenAI::Responses::Tool::ImageGeneration::Size::TaggedSymbol
1553
- ]
1554
- )
1555
- end
1556
- def self.values
1557
- end
1558
1653
  end
1559
1654
  end
1560
1655
 
@@ -320,8 +320,9 @@ module OpenAI
320
320
  # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)
321
321
  # or [function tools](https://platform.openai.com/docs/guides/function-calling).
322
322
  tools: nil,
323
- # An integer between 0 and 20 specifying the number of most likely tokens to
324
- # return at each token position, each with an associated log probability.
323
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
324
+ # to return at each token position, each with an associated log probability. In
325
+ # some cases, the number of returned tokens may be fewer than requested.
325
326
  # `logprobs` must be set to `true` if this parameter is used.
326
327
  top_logprobs: nil,
327
328
  # An alternative to sampling with temperature, called nucleus sampling, where the
@@ -658,8 +659,9 @@ module OpenAI
658
659
  # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)
659
660
  # or [function tools](https://platform.openai.com/docs/guides/function-calling).
660
661
  tools: nil,
661
- # An integer between 0 and 20 specifying the number of most likely tokens to
662
- # return at each token position, each with an associated log probability.
662
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
663
+ # to return at each token position, each with an associated log probability. In
664
+ # some cases, the number of returned tokens may be fewer than requested.
663
665
  # `logprobs` must be set to `true` if this parameter is used.
664
666
  top_logprobs: nil,
665
667
  # An alternative to sampling with temperature, called nucleus sampling, where the
@@ -65,7 +65,8 @@ module OpenAI
65
65
  quality: T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol),
66
66
  response_format:
67
67
  T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol),
68
- size: T.nilable(OpenAI::ImageEditParams::Size::OrSymbol),
68
+ size:
69
+ T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol)),
69
70
  user: String,
70
71
  stream: T.noreturn,
71
72
  request_options: OpenAI::RequestOptions::OrHash
@@ -74,10 +75,10 @@ module OpenAI
74
75
  def edit(
75
76
  # The image(s) to edit. Must be a supported image file or an array of images.
76
77
  #
77
- # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
78
- # `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
79
- # 50MB. You can provide up to 16 images. `chatgpt-image-latest` follows the same
80
- # input constraints as GPT image models.
78
+ # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
79
+ # `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
80
+ # should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
81
+ # 16 images.
81
82
  #
82
83
  # For `dall-e-2`, you can only provide one image, and it should be a square `png`
83
84
  # file less than 4MB.
@@ -86,9 +87,14 @@ module OpenAI
86
87
  # characters for `dall-e-2`, and 32000 characters for the GPT image models.
87
88
  prompt:,
88
89
  # Allows to set transparency for the background of the generated image(s). This
89
- # parameter is only supported for the GPT image models. Must be one of
90
- # `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
91
- # model will automatically determine the best background for the image.
90
+ # parameter is only supported for GPT image models that support transparent
91
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
92
+ # When `auto` is used, the model will automatically determine the best background
93
+ # for the image.
94
+ #
95
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
96
+ # backgrounds. Requests with `background` set to `transparent` will return an
97
+ # error for these models; use `opaque` or `auto` instead.
92
98
  #
93
99
  # If `transparent`, the output format needs to support transparency, so it should
94
100
  # be set to either `png` (default value) or `webp`.
@@ -103,7 +109,10 @@ module OpenAI
103
109
  # the mask will be applied on the first image. Must be a valid PNG file, less than
104
110
  # 4MB, and have the same dimensions as `image`.
105
111
  mask: nil,
106
- # The model to use for image generation. Defaults to `gpt-image-1.5`.
112
+ # The model to use for image generation. One of `dall-e-2` or a GPT image model
113
+ # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
114
+ # `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
115
+ # `gpt-image-1.5`.
107
116
  model: nil,
108
117
  # The number of images to generate. Must be between 1 and 10.
109
118
  n: nil,
@@ -130,9 +139,17 @@ module OpenAI
130
139
  # generated. This parameter is only supported for `dall-e-2` (default is `url` for
131
140
  # `dall-e-2`), as GPT image models always return base64-encoded images.
132
141
  response_format: nil,
133
- # The size of the generated images. Must be one of `1024x1024`, `1536x1024`
134
- # (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
135
- # models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
142
+ # The size of the generated images. For `gpt-image-2` and
143
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
144
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
145
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
146
+ # `2560x1440` are experimental, and the maximum supported resolution is
147
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
148
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
149
+ # supported by the GPT image models; `auto` is supported for models that allow
150
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
151
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
152
+ # `1024x1792`.
136
153
  size: nil,
137
154
  # A unique identifier representing your end-user, which can help OpenAI to monitor
138
155
  # and detect abuse.
@@ -167,7 +184,8 @@ module OpenAI
167
184
  quality: T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol),
168
185
  response_format:
169
186
  T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol),
170
- size: T.nilable(OpenAI::ImageEditParams::Size::OrSymbol),
187
+ size:
188
+ T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol)),
171
189
  user: String,
172
190
  stream: T.noreturn,
173
191
  request_options: OpenAI::RequestOptions::OrHash
@@ -178,10 +196,10 @@ module OpenAI
178
196
  def edit_stream_raw(
179
197
  # The image(s) to edit. Must be a supported image file or an array of images.
180
198
  #
181
- # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
182
- # `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
183
- # 50MB. You can provide up to 16 images. `chatgpt-image-latest` follows the same
184
- # input constraints as GPT image models.
199
+ # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
200
+ # `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
201
+ # should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
202
+ # 16 images.
185
203
  #
186
204
  # For `dall-e-2`, you can only provide one image, and it should be a square `png`
187
205
  # file less than 4MB.
@@ -190,9 +208,14 @@ module OpenAI
190
208
  # characters for `dall-e-2`, and 32000 characters for the GPT image models.
191
209
  prompt:,
192
210
  # Allows to set transparency for the background of the generated image(s). This
193
- # parameter is only supported for the GPT image models. Must be one of
194
- # `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
195
- # model will automatically determine the best background for the image.
211
+ # parameter is only supported for GPT image models that support transparent
212
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
213
+ # When `auto` is used, the model will automatically determine the best background
214
+ # for the image.
215
+ #
216
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
217
+ # backgrounds. Requests with `background` set to `transparent` will return an
218
+ # error for these models; use `opaque` or `auto` instead.
196
219
  #
197
220
  # If `transparent`, the output format needs to support transparency, so it should
198
221
  # be set to either `png` (default value) or `webp`.
@@ -207,7 +230,10 @@ module OpenAI
207
230
  # the mask will be applied on the first image. Must be a valid PNG file, less than
208
231
  # 4MB, and have the same dimensions as `image`.
209
232
  mask: nil,
210
- # The model to use for image generation. Defaults to `gpt-image-1.5`.
233
+ # The model to use for image generation. One of `dall-e-2` or a GPT image model
234
+ # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
235
+ # `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
236
+ # `gpt-image-1.5`.
211
237
  model: nil,
212
238
  # The number of images to generate. Must be between 1 and 10.
213
239
  n: nil,
@@ -234,9 +260,17 @@ module OpenAI
234
260
  # generated. This parameter is only supported for `dall-e-2` (default is `url` for
235
261
  # `dall-e-2`), as GPT image models always return base64-encoded images.
236
262
  response_format: nil,
237
- # The size of the generated images. Must be one of `1024x1024`, `1536x1024`
238
- # (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
239
- # models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
263
+ # The size of the generated images. For `gpt-image-2` and
264
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
265
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
266
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
267
+ # `2560x1440` are experimental, and the maximum supported resolution is
268
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
269
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
270
+ # supported by the GPT image models; `auto` is supported for models that allow
271
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
272
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
273
+ # `1024x1792`.
240
274
  size: nil,
241
275
  # A unique identifier representing your end-user, which can help OpenAI to monitor
242
276
  # and detect abuse.
@@ -269,7 +303,10 @@ module OpenAI
269
303
  quality: T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol),
270
304
  response_format:
271
305
  T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol),
272
- size: T.nilable(OpenAI::ImageGenerateParams::Size::OrSymbol),
306
+ size:
307
+ T.nilable(
308
+ T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)
309
+ ),
273
310
  style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
274
311
  user: String,
275
312
  stream: T.noreturn,
@@ -282,16 +319,22 @@ module OpenAI
282
319
  # characters for `dall-e-3`.
283
320
  prompt:,
284
321
  # Allows to set transparency for the background of the generated image(s). This
285
- # parameter is only supported for the GPT image models. Must be one of
286
- # `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
287
- # model will automatically determine the best background for the image.
322
+ # parameter is only supported for GPT image models that support transparent
323
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
324
+ # When `auto` is used, the model will automatically determine the best background
325
+ # for the image.
326
+ #
327
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
328
+ # backgrounds. Requests with `background` set to `transparent` will return an
329
+ # error for these models; use `opaque` or `auto` instead.
288
330
  #
289
331
  # If `transparent`, the output format needs to support transparency, so it should
290
332
  # be set to either `png` (default value) or `webp`.
291
333
  background: nil,
292
334
  # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
293
- # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
294
- # `dall-e-2` unless a parameter specific to the GPT image models is used.
335
+ # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
336
+ # or `gpt-image-2-2026-04-21`). Defaults to `dall-e-2` unless a parameter specific
337
+ # to the GPT image models is used.
295
338
  model: nil,
296
339
  # Control the content-moderation level for images generated by the GPT image
297
340
  # models. Must be either `low` for less restrictive filtering or `auto` (default
@@ -327,10 +370,17 @@ module OpenAI
327
370
  # after the image has been generated. This parameter isn't supported for the GPT
328
371
  # image models, which always return base64-encoded images.
329
372
  response_format: nil,
330
- # The size of the generated images. Must be one of `1024x1024`, `1536x1024`
331
- # (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
332
- # models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
333
- # `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
373
+ # The size of the generated images. For `gpt-image-2` and
374
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
375
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
376
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
377
+ # `2560x1440` are experimental, and the maximum supported resolution is
378
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
379
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
380
+ # supported by the GPT image models; `auto` is supported for models that allow
381
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
382
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
383
+ # `1024x1792`.
334
384
  size: nil,
335
385
  # The style of the generated images. This parameter is only supported for
336
386
  # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
@@ -368,7 +418,10 @@ module OpenAI
368
418
  quality: T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol),
369
419
  response_format:
370
420
  T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol),
371
- size: T.nilable(OpenAI::ImageGenerateParams::Size::OrSymbol),
421
+ size:
422
+ T.nilable(
423
+ T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)
424
+ ),
372
425
  style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
373
426
  user: String,
374
427
  stream: T.noreturn,
@@ -383,16 +436,22 @@ module OpenAI
383
436
  # characters for `dall-e-3`.
384
437
  prompt:,
385
438
  # Allows to set transparency for the background of the generated image(s). This
386
- # parameter is only supported for the GPT image models. Must be one of
387
- # `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
388
- # model will automatically determine the best background for the image.
439
+ # parameter is only supported for GPT image models that support transparent
440
+ # backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
441
+ # When `auto` is used, the model will automatically determine the best background
442
+ # for the image.
443
+ #
444
+ # `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
445
+ # backgrounds. Requests with `background` set to `transparent` will return an
446
+ # error for these models; use `opaque` or `auto` instead.
389
447
  #
390
448
  # If `transparent`, the output format needs to support transparency, so it should
391
449
  # be set to either `png` (default value) or `webp`.
392
450
  background: nil,
393
451
  # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
394
- # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
395
- # `dall-e-2` unless a parameter specific to the GPT image models is used.
452
+ # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
453
+ # or `gpt-image-2-2026-04-21`). Defaults to `dall-e-2` unless a parameter specific
454
+ # to the GPT image models is used.
396
455
  model: nil,
397
456
  # Control the content-moderation level for images generated by the GPT image
398
457
  # models. Must be either `low` for less restrictive filtering or `auto` (default
@@ -428,10 +487,17 @@ module OpenAI
428
487
  # after the image has been generated. This parameter isn't supported for the GPT
429
488
  # image models, which always return base64-encoded images.
430
489
  response_format: nil,
431
- # The size of the generated images. Must be one of `1024x1024`, `1536x1024`
432
- # (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
433
- # models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
434
- # `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
490
+ # The size of the generated images. For `gpt-image-2` and
491
+ # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
492
+ # strings, for example `1536x864`. Width and height must both be divisible by 16
493
+ # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
494
+ # `2560x1440` are experimental, and the maximum supported resolution is
495
+ # `3840x2160`. The requested size must also satisfy the model's current pixel and
496
+ # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
497
+ # supported by the GPT image models; `auto` is supported for models that allow
498
+ # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
499
+ # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
500
+ # `1024x1792`.
435
501
  size: nil,
436
502
  # The style of the generated images. This parameter is only supported for
437
503
  # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
@@ -25,7 +25,9 @@ module OpenAI
25
25
  T::Array[
26
26
  OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::OrSymbol
27
27
  ],
28
+ parallel_tool_calls: T::Boolean,
28
29
  prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash),
30
+ reasoning: OpenAI::Realtime::RealtimeReasoning::OrHash,
29
31
  tool_choice:
30
32
  T.any(
31
33
  OpenAI::Responses::ToolChoiceOptions::OrSymbol,
@@ -90,9 +92,14 @@ module OpenAI
90
92
  # can be used to make the model respond with text only. It is not possible to
91
93
  # request both `text` and `audio` at the same time.
92
94
  output_modalities: nil,
95
+ # Whether the model may call multiple tools in parallel. Only supported by
96
+ # reasoning Realtime models such as `gpt-realtime-2`.
97
+ parallel_tool_calls: nil,
93
98
  # Reference to a prompt template and its variables.
94
99
  # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
95
100
  prompt: nil,
101
+ # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.
102
+ reasoning: nil,
96
103
  # How the model chooses tools. Provide one of the string modes or force a specific
97
104
  # function/MCP tool.
98
105
  tool_choice: nil,
@@ -275,8 +275,9 @@ module OpenAI
275
275
  # [function calling](https://platform.openai.com/docs/guides/function-calling).
276
276
  # You can also use custom tools to call your own code.
277
277
  tools: nil,
278
- # An integer between 0 and 20 specifying the number of most likely tokens to
279
- # return at each token position, each with an associated log probability.
278
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
279
+ # to return at each token position, each with an associated log probability. In
280
+ # some cases, the number of returned tokens may be fewer than requested.
280
281
  top_logprobs: nil,
281
282
  # An alternative to sampling with temperature, called nucleus sampling, where the
282
283
  # model considers the results of the tokens with top_p probability mass. So 0.1
@@ -577,8 +578,9 @@ module OpenAI
577
578
  # [function calling](https://platform.openai.com/docs/guides/function-calling).
578
579
  # You can also use custom tools to call your own code.
579
580
  tools: nil,
580
- # An integer between 0 and 20 specifying the number of most likely tokens to
581
- # return at each token position, each with an associated log probability.
581
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
582
+ # to return at each token position, each with an associated log probability. In
583
+ # some cases, the number of returned tokens may be fewer than requested.
582
584
  top_logprobs: nil,
583
585
  # An alternative to sampling with temperature, called nucleus sampling, where the
584
586
  # model considers the results of the tokens with top_p probability mass. So 0.1
@@ -992,6 +994,10 @@ module OpenAI
992
994
  T.nilable(
993
995
  OpenAI::Responses::ResponseCompactParams::PromptCacheRetention::OrSymbol
994
996
  ),
997
+ service_tier:
998
+ T.nilable(
999
+ OpenAI::Responses::ResponseCompactParams::ServiceTier::OrSymbol
1000
+ ),
995
1001
  request_options: OpenAI::RequestOptions::OrHash
996
1002
  ).returns(OpenAI::Responses::CompactedResponse)
997
1003
  end
@@ -1018,6 +1024,8 @@ module OpenAI
1018
1024
  prompt_cache_key: nil,
1019
1025
  # How long to retain a prompt cache entry created by this request.
1020
1026
  prompt_cache_retention: nil,
1027
+ # The service tier to use for this request.
1028
+ service_tier: nil,
1021
1029
  request_options: {}
1022
1030
  )
1023
1031
  end
@@ -466,7 +466,8 @@ module OpenAI
466
466
  amount: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount,
467
467
  api_key_id: String?,
468
468
  line_item: String?,
469
- project_id: String?
469
+ project_id: String?,
470
+ quantity: Float?
470
471
  }
471
472
 
472
473
  class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
@@ -484,11 +485,14 @@ module OpenAI
484
485
 
485
486
  attr_accessor project_id: String?
486
487
 
488
+ attr_accessor quantity: Float?
489
+
487
490
  def initialize: (
488
491
  ?amount: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount,
489
492
  ?api_key_id: String?,
490
493
  ?line_item: String?,
491
494
  ?project_id: String?,
495
+ ?quantity: Float?,
492
496
  ?object: :"organization.costs.result"
493
497
  ) -> void
494
498
 
@@ -497,7 +501,8 @@ module OpenAI
497
501
  amount: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount,
498
502
  api_key_id: String?,
499
503
  line_item: String?,
500
- project_id: String?
504
+ project_id: String?,
505
+ quantity: Float?
501
506
  }
502
507
 
503
508
  type amount = { currency: String, value: Float }