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
@@ -200,6 +200,21 @@ module OpenAI
200
200
  # @return [String, nil]
201
201
  optional :api_key_id, String, nil?: true
202
202
 
203
+ # @!attribute api_source
204
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
205
+ # activity and `unlabeled` includes all records without published source
206
+ # attribution, including historical and unknown origins. Unlabeled does not imply
207
+ # direct API usage. Without source grouping, this field is null.
208
+ #
209
+ # @return [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource, nil]
210
+ optional(
211
+ :api_source,
212
+ enum: -> {
213
+ OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
214
+ },
215
+ nil?: true
216
+ )
217
+
203
218
  # @!attribute batch
204
219
  # When `group_by=batch`, this field tells whether the grouped usage result is
205
220
  # batch or not.
@@ -213,8 +228,16 @@ module OpenAI
213
228
  # @return [Integer, nil]
214
229
  optional :input_audio_tokens, Integer
215
230
 
231
+ # @!attribute input_cache_write_12h_tokens
232
+ # The aggregated number of input tokens written to the cache with a 12-hour
233
+ # retention period.
234
+ #
235
+ # @return [Integer, nil]
236
+ optional :input_cache_write_12h_tokens, Integer
237
+
216
238
  # @!attribute input_cache_write_tokens
217
- # The aggregated number of input tokens written to the cache.
239
+ # The aggregated number of input tokens written to the cache with a 30-minute
240
+ # retention period.
218
241
  #
219
242
  # @return [Integer, nil]
220
243
  optional :input_cache_write_tokens, Integer
@@ -310,7 +333,7 @@ module OpenAI
310
333
  # @return [String, nil]
311
334
  optional :user_id, String, nil?: true
312
335
 
313
- # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
336
+ # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
314
337
  # The aggregated completions usage details of the specific time bucket.
315
338
  #
316
339
  # @param input_tokens [Integer]
@@ -330,6 +353,12 @@ module OpenAI
330
353
  # When `group_by=api_key_id`, this field provides the API key ID of the grouped
331
354
  # usage result.
332
355
  #
356
+ # @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource, nil]
357
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
358
+ # activity and `unlabeled` includes all records without published source
359
+ # attribution, including historical and unknown origins. Unlabeled does not imply
360
+ # direct API usage. Without source grouping, this field is null.
361
+ #
333
362
  # @param batch [Boolean, nil]
334
363
  # When `group_by=batch`, this field tells whether the grouped usage result is
335
364
  # batch or not.
@@ -337,8 +366,13 @@ module OpenAI
337
366
  # @param input_audio_tokens [Integer]
338
367
  # The aggregated number of uncached audio input tokens used.
339
368
  #
369
+ # @param input_cache_write_12h_tokens [Integer]
370
+ # The aggregated number of input tokens written to the cache with a 12-hour
371
+ # retention period.
372
+ #
340
373
  # @param input_cache_write_tokens [Integer]
341
- # The aggregated number of input tokens written to the cache.
374
+ # The aggregated number of input tokens written to the cache with a 30-minute
375
+ # retention period.
342
376
  #
343
377
  # @param input_cached_audio_tokens [Integer]
344
378
  # The aggregated number of cached audio input tokens used.
@@ -390,6 +424,22 @@ module OpenAI
390
424
  # result.
391
425
  #
392
426
  # @param object [Symbol, :"organization.usage.completions.result"]
427
+
428
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
429
+ # activity and `unlabeled` includes all records without published source
430
+ # attribution, including historical and unknown origins. Unlabeled does not imply
431
+ # direct API usage. Without source grouping, this field is null.
432
+ #
433
+ # @see OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult#api_source
434
+ module APISource
435
+ extend OpenAI::Internal::Type::Enum
436
+
437
+ AGENTS_API = :agents_api
438
+ UNLABELED = :unlabeled
439
+
440
+ # @!method self.values
441
+ # @return [Array<Symbol>]
442
+ end
393
443
  end
394
444
 
395
445
  class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel
@@ -939,6 +989,21 @@ module OpenAI
939
989
  # @return [String, nil]
940
990
  optional :api_key_id, String, nil?: true
941
991
 
992
+ # @!attribute api_source
993
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
994
+ # activity and `unlabeled` includes all records without published source
995
+ # attribution, including historical and unknown origins. Unlabeled does not imply
996
+ # direct API usage. Without source grouping, this field is null.
997
+ #
998
+ # @return [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource, nil]
999
+ optional(
1000
+ :api_source,
1001
+ enum: -> {
1002
+ OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
1003
+ },
1004
+ nil?: true
1005
+ )
1006
+
942
1007
  # @!attribute context_level
943
1008
  # When `group_by=context_level`, this field provides the search context size of
944
1009
  # the grouped usage result.
@@ -967,7 +1032,7 @@ module OpenAI
967
1032
  # @return [String, nil]
968
1033
  optional :user_id, String, nil?: true
969
1034
 
970
- # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result")
1035
+ # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, api_source: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result")
971
1036
  # The aggregated web search calls usage details of the specific time bucket.
972
1037
  #
973
1038
  # @param num_model_requests [Integer]
@@ -980,6 +1045,12 @@ module OpenAI
980
1045
  # When `group_by=api_key_id`, this field provides the API key ID of the grouped
981
1046
  # usage result.
982
1047
  #
1048
+ # @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource, nil]
1049
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
1050
+ # activity and `unlabeled` includes all records without published source
1051
+ # attribution, including historical and unknown origins. Unlabeled does not imply
1052
+ # direct API usage. Without source grouping, this field is null.
1053
+ #
983
1054
  # @param context_level [String, nil]
984
1055
  # When `group_by=context_level`, this field provides the search context size of
985
1056
  # the grouped usage result.
@@ -997,6 +1068,22 @@ module OpenAI
997
1068
  # result.
998
1069
  #
999
1070
  # @param object [Symbol, :"organization.usage.web_searches.result"]
1071
+
1072
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
1073
+ # activity and `unlabeled` includes all records without published source
1074
+ # attribution, including historical and unknown origins. Unlabeled does not imply
1075
+ # direct API usage. Without source grouping, this field is null.
1076
+ #
1077
+ # @see OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult#api_source
1078
+ module APISource
1079
+ extend OpenAI::Internal::Type::Enum
1080
+
1081
+ AGENTS_API = :agents_api
1082
+ UNLABELED = :unlabeled
1083
+
1084
+ # @!method self.values
1085
+ # @return [Array<Symbol>]
1086
+ end
1000
1087
  end
1001
1088
 
1002
1089
  class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
@@ -1023,6 +1110,21 @@ module OpenAI
1023
1110
  # @return [String, nil]
1024
1111
  optional :api_key_id, String, nil?: true
1025
1112
 
1113
+ # @!attribute api_source
1114
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
1115
+ # activity and `unlabeled` includes all records without published source
1116
+ # attribution, including historical and unknown origins. Unlabeled does not imply
1117
+ # direct API usage. Without source grouping, this field is null.
1118
+ #
1119
+ # @return [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::APISource, nil]
1120
+ optional(
1121
+ :api_source,
1122
+ enum: -> {
1123
+ OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::APISource
1124
+ },
1125
+ nil?: true
1126
+ )
1127
+
1026
1128
  # @!attribute line_item
1027
1129
  # When `group_by=line_item`, this field provides the line item of the grouped
1028
1130
  # costs result.
@@ -1057,7 +1159,14 @@ module OpenAI
1057
1159
  nil?: true
1058
1160
  )
1059
1161
 
1060
- # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result")
1162
+ # @!attribute user_id
1163
+ # When `group_by=user_id`, this field provides the user ID of the grouped costs
1164
+ # result.
1165
+ #
1166
+ # @return [String, nil]
1167
+ optional :user_id, String, nil?: true
1168
+
1169
+ # @!method initialize(amount: nil, api_key_id: nil, api_source: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, user_id: nil, object: :"organization.costs.result")
1061
1170
  # The aggregated costs details of the specific time bucket.
1062
1171
  #
1063
1172
  # @param amount [OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount]
@@ -1067,6 +1176,12 @@ module OpenAI
1067
1176
  # When `group_by=api_key_id`, this field provides the API Key ID of the grouped
1068
1177
  # costs result.
1069
1178
  #
1179
+ # @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::APISource, nil]
1180
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
1181
+ # activity and `unlabeled` includes all records without published source
1182
+ # attribution, including historical and unknown origins. Unlabeled does not imply
1183
+ # direct API usage. Without source grouping, this field is null.
1184
+ #
1070
1185
  # @param line_item [String, nil]
1071
1186
  # When `group_by=line_item`, this field provides the line item of the grouped
1072
1187
  # costs result.
@@ -1083,6 +1198,10 @@ module OpenAI
1083
1198
  # The unit of the `quantity` value. If no single supported unit applies to the
1084
1199
  # result, this field is `null`.
1085
1200
  #
1201
+ # @param user_id [String, nil]
1202
+ # When `group_by=user_id`, this field provides the user ID of the grouped costs
1203
+ # result.
1204
+ #
1086
1205
  # @param object [Symbol, :"organization.costs.result"]
1087
1206
 
1088
1207
  # @see OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult#amount
@@ -1108,6 +1227,22 @@ module OpenAI
1108
1227
  # @param value [Float]
1109
1228
  # The numeric value of the cost.
1110
1229
  end
1230
+
1231
+ # When grouped by `api_source`, `agents_api` identifies attributed Agents API
1232
+ # activity and `unlabeled` includes all records without published source
1233
+ # attribution, including historical and unknown origins. Unlabeled does not imply
1234
+ # direct API usage. Without source grouping, this field is null.
1235
+ #
1236
+ # @see OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult#api_source
1237
+ module APISource
1238
+ extend OpenAI::Internal::Type::Enum
1239
+
1240
+ AGENTS_API = :agents_api
1241
+ UNLABELED = :unlabeled
1242
+
1243
+ # @!method self.values
1244
+ # @return [Array<Symbol>]
1245
+ end
1111
1246
  end
1112
1247
 
1113
1248
  # @!method self.variants
@@ -14,21 +14,63 @@ module OpenAI
14
14
  module ResponsesOnlyModel
15
15
  extend OpenAI::Internal::Type::Enum
16
16
 
17
+ # @deprecated Announced shutdown date: 2026-10-23. See
18
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
19
+ # replacements.
17
20
  O1_PRO = :"o1-pro"
21
+ # @deprecated Announced shutdown date: 2026-10-23. See
22
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
23
+ # replacements.
18
24
  O1_PRO_2025_03_19 = :"o1-pro-2025-03-19"
25
+ # @deprecated Announced shutdown date: 2026-12-11. See
26
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
27
+ # replacements.
19
28
  O3_PRO = :"o3-pro"
29
+ # @deprecated Announced shutdown date: 2026-12-11. See
30
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
31
+ # replacements.
20
32
  O3_PRO_2025_06_10 = :"o3-pro-2025-06-10"
33
+ # @deprecated Announced shutdown date: 2026-07-23. See
34
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
35
+ # replacements.
21
36
  O3_DEEP_RESEARCH = :"o3-deep-research"
37
+ # @deprecated Announced shutdown date: 2026-07-23. See
38
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
39
+ # replacements.
22
40
  O3_DEEP_RESEARCH_2025_06_26 = :"o3-deep-research-2025-06-26"
41
+ # @deprecated Announced shutdown date: 2026-07-23. See
42
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
43
+ # replacements.
23
44
  O4_MINI_DEEP_RESEARCH = :"o4-mini-deep-research"
45
+ # @deprecated Announced shutdown date: 2026-07-23. See
46
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
47
+ # replacements.
24
48
  O4_MINI_DEEP_RESEARCH_2025_06_26 = :"o4-mini-deep-research-2025-06-26"
49
+ # @deprecated Announced shutdown date: 2026-07-23. See
50
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
51
+ # replacements.
25
52
  COMPUTER_USE_PREVIEW = :"computer-use-preview"
53
+ # @deprecated Announced shutdown date: 2026-07-23. See
54
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
55
+ # replacements.
26
56
  COMPUTER_USE_PREVIEW_2025_03_11 = :"computer-use-preview-2025-03-11"
27
57
  GPT_5_5_PRO = :"gpt-5.5-pro"
28
58
  GPT_5_5_PRO_2026_04_23 = :"gpt-5.5-pro-2026-04-23"
59
+ # @deprecated Announced shutdown date: 2026-07-23. See
60
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
61
+ # replacements.
29
62
  GPT_5_CODEX = :"gpt-5-codex"
63
+ # @deprecated Announced shutdown date: 2026-12-11. See
64
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
65
+ # replacements.
30
66
  GPT_5_PRO = :"gpt-5-pro"
67
+ # @deprecated Announced shutdown date: 2026-12-11. See
68
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
69
+ # replacements.
31
70
  GPT_5_PRO_2025_10_06 = :"gpt-5-pro-2025-10-06"
71
+ # @deprecated Announced shutdown date: 2026-07-23. See
72
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
73
+ # replacements.
32
74
  GPT_5_1_CODEX_MAX = :"gpt-5.1-codex-max"
33
75
  GPT_DAYBREAK_BLUE_LATEST = :"gpt-daybreak-blue-latest"
34
76
  GPT_DAYBREAK_RED_LATEST = :"gpt-daybreak-red-latest"
@@ -29,6 +29,8 @@ module OpenAI
29
29
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
30
30
  # voices are available in the
31
31
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
32
+ # Custom voices must be created from audio samples. Voices created from text
33
+ # prompts are supported only in Live.
32
34
  #
33
35
  # @return [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice]
34
36
  required :voice, union: -> { OpenAI::Audio::SpeechCreateParams::Voice }
@@ -77,6 +79,8 @@ module OpenAI
77
79
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
78
80
  # voices are available in the
79
81
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
82
+ # Custom voices must be created from audio samples. Voices created from text
83
+ # prompts are supported only in Live.
80
84
  #
81
85
  # @param instructions [String]
82
86
  # Control the voice of your generated audio with additional instructions. Does not
@@ -117,6 +121,8 @@ module OpenAI
117
121
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
118
122
  # voices are available in the
119
123
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
124
+ # Custom voices must be created from audio samples. Voices created from text
125
+ # prompts are supported only in Live.
120
126
  module Voice
121
127
  extend OpenAI::Internal::Type::Union
122
128
 
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::Voices#create
7
+ class Voice < OpenAI::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The voice identifier, which can be referenced in API endpoints.
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute created_at
15
+ # The Unix timestamp (in seconds) for when the voice was created.
16
+ #
17
+ # @return [Integer]
18
+ required :created_at, Integer
19
+
20
+ # @!attribute name
21
+ # The name of the voice.
22
+ #
23
+ # @return [String]
24
+ required :name, String
25
+
26
+ # @!attribute object
27
+ # The object type, which is always `audio.voice`.
28
+ #
29
+ # @return [Symbol, :"audio.voice"]
30
+ required :object, const: :"audio.voice"
31
+
32
+ # @!attribute type
33
+ # How the voice was created. Voices created from text prompts are supported only
34
+ # in Live.
35
+ #
36
+ # @return [Symbol, OpenAI::Models::Audio::Voice::Type]
37
+ required :type, enum: -> { OpenAI::Audio::Voice::Type }
38
+
39
+ # @!method initialize(id:, created_at:, name:, type:, object: :"audio.voice")
40
+ # A custom voice that can be used for audio output. Voices created from text
41
+ # prompts are supported only in Live.
42
+ #
43
+ # @param id [String]
44
+ # The voice identifier, which can be referenced in API endpoints.
45
+ #
46
+ # @param created_at [Integer]
47
+ # The Unix timestamp (in seconds) for when the voice was created.
48
+ #
49
+ # @param name [String]
50
+ # The name of the voice.
51
+ #
52
+ # @param type [Symbol, OpenAI::Models::Audio::Voice::Type]
53
+ # How the voice was created. Voices created from text prompts are supported only
54
+ # in Live.
55
+ #
56
+ # @param object [Symbol, :"audio.voice"]
57
+ # The object type, which is always `audio.voice`.
58
+
59
+ # How the voice was created. Voices created from text prompts are supported only
60
+ # in Live.
61
+ #
62
+ # @see OpenAI::Models::Audio::Voice#type
63
+ module Type
64
+ extend OpenAI::Internal::Type::Enum
65
+
66
+ AUDIO_SAMPLE = :audio_sample
67
+ PROMPT = :prompt
68
+
69
+ # @!method self.values
70
+ # @return [Array<Symbol>]
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,217 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::Voices#create
7
+ class VoiceCreateParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute body
12
+ # Creates a voice from a consent recording and an audio sample. Requires
13
+ # multipart/form-data.
14
+ #
15
+ # @return [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt]
16
+ required :body, union: -> { OpenAI::Audio::VoiceCreateParams::Body }
17
+
18
+ # @!method initialize(body:, request_options: {})
19
+ # @param body [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt]
20
+ # Creates a voice from a consent recording and an audio sample. Requires
21
+ # multipart/form-data.
22
+ #
23
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
24
+
25
+ # Creates a voice from a consent recording and an audio sample. Requires
26
+ # multipart/form-data.
27
+ module Body
28
+ extend OpenAI::Internal::Type::Union
29
+
30
+ discriminator :type
31
+
32
+ # @api private
33
+ def self.resolve_variant(value, state: nil)
34
+ if value.is_a?(Hash) && !value.key?(:type) && !value.key?("type")
35
+ OpenAI::Audio::VoiceCreateParams::Body::AudioSample
36
+ else
37
+ super
38
+ end
39
+ end
40
+
41
+ private_class_method :resolve_variant
42
+
43
+ # Creates a voice from a consent recording and an audio sample. Requires multipart/form-data.
44
+ variant :audio_sample, -> { OpenAI::Audio::VoiceCreateParams::Body::AudioSample }
45
+
46
+ # Creates a synthetic voice from a text description. Supports application/json or multipart/form-data.
47
+ variant :prompt, -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt }
48
+
49
+ class AudioSample < OpenAI::Internal::Type::BaseModel
50
+ # @!attribute audio_sample
51
+ # The sample audio recording file. Maximum size is 10 MiB.
52
+ #
53
+ # Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
54
+ # `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
55
+ #
56
+ # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
57
+ # metadata. Use `OpenAI::FilePart` when you need to override the filename or
58
+ # content type.
59
+ #
60
+ # @return [Pathname, StringIO, IO, String, OpenAI::FilePart]
61
+ required :audio_sample, OpenAI::Internal::Type::FileInput
62
+
63
+ # @!attribute consent
64
+ # The consent recording ID (for example, `cons_1234`).
65
+ #
66
+ # @return [String]
67
+ required :consent, String
68
+
69
+ # @!attribute name
70
+ # The name of the new voice.
71
+ #
72
+ # @return [String]
73
+ required :name, String
74
+
75
+ # @!attribute type
76
+ # The voice creation method. Defaults to `audio_sample` when omitted.
77
+ #
78
+ # @return [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::Type, nil]
79
+ optional :type, enum: -> { OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type }
80
+
81
+ # @!method initialize(audio_sample:, consent:, name:, type: nil)
82
+ # Creates a voice from a consent recording and an audio sample. Requires
83
+ # multipart/form-data.
84
+ #
85
+ # @param audio_sample [Pathname, StringIO, IO, String, OpenAI::FilePart]
86
+ # The sample audio recording file. Maximum size is 10 MiB.
87
+ #
88
+ # Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
89
+ # `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
90
+ #
91
+ # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
92
+ # metadata. Use `OpenAI::FilePart` when you need to override the filename or
93
+ # content type.
94
+ #
95
+ # @param consent [String]
96
+ # The consent recording ID (for example, `cons_1234`).
97
+ #
98
+ # @param name [String]
99
+ # The name of the new voice.
100
+ #
101
+ # @param type [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::Type]
102
+ # The voice creation method. Defaults to `audio_sample` when omitted.
103
+
104
+ # The voice creation method. Defaults to `audio_sample` when omitted.
105
+ #
106
+ # @see OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample#type
107
+ module Type
108
+ extend OpenAI::Internal::Type::Enum
109
+
110
+ AUDIO_SAMPLE = :audio_sample
111
+
112
+ # @!method self.values
113
+ # @return [Array<Symbol>]
114
+ end
115
+ end
116
+
117
+ class Prompt < OpenAI::Internal::Type::BaseModel
118
+ # @!attribute name
119
+ # The name of the new voice.
120
+ #
121
+ # @return [String]
122
+ required :name, String
123
+
124
+ # @!attribute prompt
125
+ # A description of the desired voice. Must not contain only whitespace.
126
+ #
127
+ # @return [String]
128
+ required :prompt, String
129
+
130
+ # @!attribute type
131
+ # Set to `prompt` to create a voice from a text description.
132
+ #
133
+ # @return [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Type]
134
+ required :type, enum: -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type }
135
+
136
+ # @!attribute model
137
+ # The voice creation model to use. Defaults to `auto`.
138
+ #
139
+ # @return [String, Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model, nil]
140
+ optional :model, union: -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model }
141
+
142
+ # @!attribute script_hint
143
+ # Optional text for the voice to speak during creation. If omitted, a script is
144
+ # generated from the prompt. Must not be blank after trimming whitespace; scripts
145
+ # that are too short are rejected.
146
+ #
147
+ # @return [String, nil]
148
+ optional :script_hint, String
149
+
150
+ # @!method initialize(name:, prompt:, type:, model: nil, script_hint: nil)
151
+ # Creates a synthetic voice from a text description. Supports application/json or
152
+ # multipart/form-data.
153
+ #
154
+ # @param name [String]
155
+ # The name of the new voice.
156
+ #
157
+ # @param prompt [String]
158
+ # A description of the desired voice. Must not contain only whitespace.
159
+ #
160
+ # @param type [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Type]
161
+ # Set to `prompt` to create a voice from a text description.
162
+ #
163
+ # @param model [String, Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model]
164
+ # The voice creation model to use. Defaults to `auto`.
165
+ #
166
+ # @param script_hint [String]
167
+ # Optional text for the voice to speak during creation. If omitted, a script is
168
+ # generated from the prompt. Must not be blank after trimming whitespace; scripts
169
+ # that are too short are rejected.
170
+
171
+ # Set to `prompt` to create a voice from a text description.
172
+ #
173
+ # @see OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt#type
174
+ module Type
175
+ extend OpenAI::Internal::Type::Enum
176
+
177
+ PROMPT = :prompt
178
+
179
+ # @!method self.values
180
+ # @return [Array<Symbol>]
181
+ end
182
+
183
+ # The voice creation model to use. Defaults to `auto`.
184
+ #
185
+ # @see OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt#model
186
+ module Model
187
+ extend OpenAI::Internal::Type::Union
188
+
189
+ variant String
190
+
191
+ variant const: -> { OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model::AUTO }
192
+
193
+ variant const: -> { OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model::MODEL_2026_10_01 }
194
+
195
+ # @!method self.variants
196
+ # @return [Array(String, Symbol)]
197
+
198
+ define_sorbet_constant!(:Variants) do
199
+ T.type_alias { T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol) }
200
+ end
201
+
202
+ # @!group
203
+
204
+ AUTO = :auto
205
+ MODEL_2026_10_01 = :"2026-10-01"
206
+
207
+ # @!endgroup
208
+ end
209
+ end
210
+
211
+ # @!method self.variants
212
+ # @return [Array(OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt)]
213
+ end
214
+ end
215
+ end
216
+ end
217
+ end
@@ -123,9 +123,6 @@ module OpenAI
123
123
  # Uses the fast service tier.
124
124
  FAST = :fast
125
125
 
126
- # Uses the ultrafast service tier.
127
- ULTRAFAST = :ultrafast
128
-
129
126
  # @!method self.values
130
127
  # @return [Array<Symbol>]
131
128
  end
@@ -130,9 +130,6 @@ module OpenAI
130
130
  # Uses the fast service tier.
131
131
  FAST = :fast
132
132
 
133
- # Uses the ultrafast service tier.
134
- ULTRAFAST = :ultrafast
135
-
136
133
  # @!method self.values
137
134
  # @return [Array<Symbol>]
138
135
  end