openai 0.72.0 → 0.74.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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/audio/transcription.rb +10 -1
  5. data/lib/openai/models/audio/transcription_create_params.rb +24 -5
  6. data/lib/openai/models/audio/transcription_language.rb +20 -0
  7. data/lib/openai/models/audio/transcription_text_done_event.rb +10 -1
  8. data/lib/openai/models/audio_model.rb +1 -0
  9. data/lib/openai/models/beta/beta_response.rb +15 -6
  10. data/lib/openai/models/beta/beta_responses_client_event.rb +15 -6
  11. data/lib/openai/models/beta/response_create_params.rb +15 -6
  12. data/lib/openai/models/chat/chat_completion.rb +15 -6
  13. data/lib/openai/models/chat/chat_completion_chunk.rb +15 -6
  14. data/lib/openai/models/chat/completion_create_params.rb +15 -6
  15. data/lib/openai/models/realtime/audio_transcription.rb +35 -8
  16. data/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb +10 -1
  17. data/lib/openai/models/responses/response.rb +15 -6
  18. data/lib/openai/models/responses/response_create_params.rb +15 -6
  19. data/lib/openai/models/responses/responses_client_event.rb +15 -6
  20. data/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb +121 -0
  21. data/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +6 -3
  22. data/lib/openai/models/webhooks/unwrap_webhook_event.rb +9 -2
  23. data/lib/openai/resources/audio/transcriptions.rb +12 -4
  24. data/lib/openai/resources/webhooks.rb +1 -1
  25. data/lib/openai/version.rb +1 -1
  26. data/lib/openai.rb +2 -0
  27. data/rbi/openai/models/audio/transcription.rbi +19 -0
  28. data/rbi/openai/models/audio/transcription_create_params.rbi +31 -3
  29. data/rbi/openai/models/audio/transcription_language.rbi +33 -0
  30. data/rbi/openai/models/audio/transcription_text_done_event.rbi +19 -0
  31. data/rbi/openai/models/audio_model.rbi +2 -0
  32. data/rbi/openai/models/beta/beta_response.rbi +23 -9
  33. data/rbi/openai/models/beta/beta_responses_client_event.rbi +26 -9
  34. data/rbi/openai/models/beta/response_create_params.rbi +26 -9
  35. data/rbi/openai/models/chat/chat_completion.rbi +26 -9
  36. data/rbi/openai/models/chat/chat_completion_chunk.rbi +26 -9
  37. data/rbi/openai/models/chat/completion_create_params.rbi +26 -9
  38. data/rbi/openai/models/realtime/audio_transcription.rbi +50 -9
  39. data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +19 -0
  40. data/rbi/openai/models/responses/response.rbi +23 -9
  41. data/rbi/openai/models/responses/response_create_params.rbi +26 -9
  42. data/rbi/openai/models/responses/responses_client_event.rbi +26 -9
  43. data/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi +222 -0
  44. data/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +7 -3
  45. data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +1 -0
  46. data/rbi/openai/resources/audio/transcriptions.rbi +20 -2
  47. data/rbi/openai/resources/beta/responses.rbi +14 -6
  48. data/rbi/openai/resources/chat/completions.rbi +14 -6
  49. data/rbi/openai/resources/responses.rbi +14 -6
  50. data/rbi/openai/resources/webhooks.rbi +1 -0
  51. data/sig/openai/models/audio/transcription.rbs +9 -0
  52. data/sig/openai/models/audio/transcription_create_params.rbs +14 -0
  53. data/sig/openai/models/audio/transcription_language.rbs +15 -0
  54. data/sig/openai/models/audio/transcription_text_done_event.rbs +9 -0
  55. data/sig/openai/models/audio_model.rbs +2 -0
  56. data/sig/openai/models/beta/beta_response.rbs +3 -1
  57. data/sig/openai/models/beta/beta_responses_client_event.rbs +3 -1
  58. data/sig/openai/models/beta/response_create_params.rbs +3 -1
  59. data/sig/openai/models/chat/chat_completion.rbs +3 -1
  60. data/sig/openai/models/chat/chat_completion_chunk.rbs +3 -1
  61. data/sig/openai/models/chat/completion_create_params.rbs +3 -1
  62. data/sig/openai/models/realtime/audio_transcription.rbs +18 -0
  63. data/sig/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbs +9 -0
  64. data/sig/openai/models/responses/response.rbs +3 -1
  65. data/sig/openai/models/responses/response_create_params.rbs +3 -1
  66. data/sig/openai/models/responses/responses_client_event.rbs +3 -1
  67. data/sig/openai/models/webhooks/live_call_incoming_webhook_event.rbs +90 -0
  68. data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
  69. data/sig/openai/resources/audio/transcriptions.rbs +4 -0
  70. data/sig/openai/resources/webhooks.rbs +1 -0
  71. metadata +8 -2
@@ -278,9 +278,13 @@ module OpenAI
278
278
  # will use 'default'.
279
279
  # - If set to 'default', then the request will be processed with the standard
280
280
  # pricing and performance for the selected model.
281
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
282
- # '[priority](https://openai.com/api-priority-processing/)', then the request
283
- # will be processed with the corresponding service tier.
281
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
282
+ # then the request will be processed with the Flex Processing service tier.
283
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
284
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
285
+ # Responses or Chat Completions. The response will show `service_tier=priority`
286
+ # regardless of if you specify `service_tier=fast` or `priority` in your
287
+ # request.
284
288
  # - When not set, the default behavior is 'auto'.
285
289
  #
286
290
  # When the `service_tier` parameter is set, the response body will include the
@@ -731,9 +735,13 @@ module OpenAI
731
735
  # will use 'default'.
732
736
  # - If set to 'default', then the request will be processed with the standard
733
737
  # pricing and performance for the selected model.
734
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
735
- # '[priority](https://openai.com/api-priority-processing/)', then the request
736
- # will be processed with the corresponding service tier.
738
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
739
+ # then the request will be processed with the Flex Processing service tier.
740
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
741
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
742
+ # Responses or Chat Completions. The response will show `service_tier=priority`
743
+ # regardless of if you specify `service_tier=fast` or `priority` in your
744
+ # request.
737
745
  # - When not set, the default behavior is 'auto'.
738
746
  #
739
747
  # When the `service_tier` parameter is set, the response body will include the
@@ -1528,9 +1536,13 @@ module OpenAI
1528
1536
  # will use 'default'.
1529
1537
  # - If set to 'default', then the request will be processed with the standard
1530
1538
  # pricing and performance for the selected model.
1531
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
1532
- # '[priority](https://openai.com/api-priority-processing/)', then the request
1533
- # will be processed with the corresponding service tier.
1539
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
1540
+ # then the request will be processed with the Flex Processing service tier.
1541
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
1542
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
1543
+ # Responses or Chat Completions. The response will show `service_tier=priority`
1544
+ # regardless of if you specify `service_tier=fast` or `priority` in your
1545
+ # request.
1534
1546
  # - When not set, the default behavior is 'auto'.
1535
1547
  #
1536
1548
  # When the `service_tier` parameter is set, the response body will include the
@@ -1574,6 +1586,11 @@ module OpenAI
1574
1586
  :priority,
1575
1587
  OpenAI::Responses::ResponseCreateParams::ServiceTier::TaggedSymbol
1576
1588
  )
1589
+ FAST =
1590
+ T.let(
1591
+ :fast,
1592
+ OpenAI::Responses::ResponseCreateParams::ServiceTier::TaggedSymbol
1593
+ )
1577
1594
 
1578
1595
  sig do
1579
1596
  override.returns(
@@ -279,9 +279,13 @@ module OpenAI
279
279
  # will use 'default'.
280
280
  # - If set to 'default', then the request will be processed with the standard
281
281
  # pricing and performance for the selected model.
282
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
283
- # '[priority](https://openai.com/api-priority-processing/)', then the request
284
- # will be processed with the corresponding service tier.
282
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
283
+ # then the request will be processed with the Flex Processing service tier.
284
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
285
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
286
+ # Responses or Chat Completions. The response will show `service_tier=priority`
287
+ # regardless of if you specify `service_tier=fast` or `priority` in your
288
+ # request.
285
289
  # - When not set, the default behavior is 'auto'.
286
290
  #
287
291
  # When the `service_tier` parameter is set, the response body will include the
@@ -734,9 +738,13 @@ module OpenAI
734
738
  # will use 'default'.
735
739
  # - If set to 'default', then the request will be processed with the standard
736
740
  # pricing and performance for the selected model.
737
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
738
- # '[priority](https://openai.com/api-priority-processing/)', then the request
739
- # will be processed with the corresponding service tier.
741
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
742
+ # then the request will be processed with the Flex Processing service tier.
743
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
744
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
745
+ # Responses or Chat Completions. The response will show `service_tier=priority`
746
+ # regardless of if you specify `service_tier=fast` or `priority` in your
747
+ # request.
740
748
  # - When not set, the default behavior is 'auto'.
741
749
  #
742
750
  # When the `service_tier` parameter is set, the response body will include the
@@ -1540,9 +1548,13 @@ module OpenAI
1540
1548
  # will use 'default'.
1541
1549
  # - If set to 'default', then the request will be processed with the standard
1542
1550
  # pricing and performance for the selected model.
1543
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
1544
- # '[priority](https://openai.com/api-priority-processing/)', then the request
1545
- # will be processed with the corresponding service tier.
1551
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
1552
+ # then the request will be processed with the Flex Processing service tier.
1553
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
1554
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
1555
+ # Responses or Chat Completions. The response will show `service_tier=priority`
1556
+ # regardless of if you specify `service_tier=fast` or `priority` in your
1557
+ # request.
1546
1558
  # - When not set, the default behavior is 'auto'.
1547
1559
  #
1548
1560
  # When the `service_tier` parameter is set, the response body will include the
@@ -1586,6 +1598,11 @@ module OpenAI
1586
1598
  :priority,
1587
1599
  OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol
1588
1600
  )
1601
+ FAST =
1602
+ T.let(
1603
+ :fast,
1604
+ OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol
1605
+ )
1589
1606
 
1590
1607
  sig do
1591
1608
  override.returns(
@@ -0,0 +1,222 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Webhooks
6
+ class LiveCallIncomingWebhookEvent < OpenAI::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent,
11
+ OpenAI::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The unique ID of the event.
16
+ sig { returns(String) }
17
+ attr_accessor :id
18
+
19
+ # The Unix timestamp (in seconds) of when the event was created.
20
+ sig { returns(Integer) }
21
+ attr_accessor :created_at
22
+
23
+ # Event data payload.
24
+ sig { returns(OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data) }
25
+ attr_reader :data
26
+
27
+ sig do
28
+ params(
29
+ data: OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::OrHash
30
+ ).void
31
+ end
32
+ attr_writer :data
33
+
34
+ # The type of the event. Always `live.call.incoming`.
35
+ sig { returns(Symbol) }
36
+ attr_accessor :type
37
+
38
+ # The object of the event. Always `event`.
39
+ sig do
40
+ returns(
41
+ T.nilable(
42
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
43
+ )
44
+ )
45
+ end
46
+ attr_reader :object
47
+
48
+ sig do
49
+ params(
50
+ object:
51
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::OrSymbol
52
+ ).void
53
+ end
54
+ attr_writer :object
55
+
56
+ # Sent when an incoming API SIP session is available for Live acceptance. The same
57
+ # pending session can also emit `realtime.call.incoming`; the first successful
58
+ # Realtime or Live accept endpoint selects the runtime surface.
59
+ sig do
60
+ params(
61
+ id: String,
62
+ created_at: Integer,
63
+ data: OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::OrHash,
64
+ object:
65
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::OrSymbol,
66
+ type: Symbol
67
+ ).returns(T.attached_class)
68
+ end
69
+ def self.new(
70
+ # The unique ID of the event.
71
+ id:,
72
+ # The Unix timestamp (in seconds) of when the event was created.
73
+ created_at:,
74
+ # Event data payload.
75
+ data:,
76
+ # The object of the event. Always `event`.
77
+ object: nil,
78
+ # The type of the event. Always `live.call.incoming`.
79
+ type: :"live.call.incoming"
80
+ )
81
+ end
82
+
83
+ sig do
84
+ override.returns(
85
+ {
86
+ id: String,
87
+ created_at: Integer,
88
+ data: OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data,
89
+ type: Symbol,
90
+ object:
91
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
92
+ }
93
+ )
94
+ end
95
+ def to_hash
96
+ end
97
+
98
+ class Data < OpenAI::Internal::Type::BaseModel
99
+ OrHash =
100
+ T.type_alias do
101
+ T.any(
102
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data,
103
+ OpenAI::Internal::AnyHash
104
+ )
105
+ end
106
+
107
+ # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
108
+ # as `call_id` in `realtime.call.incoming`.
109
+ sig { returns(String) }
110
+ attr_accessor :session_id
111
+
112
+ # Headers from the SIP Invite.
113
+ sig do
114
+ returns(
115
+ T::Array[
116
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader
117
+ ]
118
+ )
119
+ end
120
+ attr_accessor :sip_headers
121
+
122
+ # Event data payload.
123
+ sig do
124
+ params(
125
+ session_id: String,
126
+ sip_headers:
127
+ T::Array[
128
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader::OrHash
129
+ ]
130
+ ).returns(T.attached_class)
131
+ end
132
+ def self.new(
133
+ # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
134
+ # as `call_id` in `realtime.call.incoming`.
135
+ session_id:,
136
+ # Headers from the SIP Invite.
137
+ sip_headers:
138
+ )
139
+ end
140
+
141
+ sig do
142
+ override.returns(
143
+ {
144
+ session_id: String,
145
+ sip_headers:
146
+ T::Array[
147
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader
148
+ ]
149
+ }
150
+ )
151
+ end
152
+ def to_hash
153
+ end
154
+
155
+ class SipHeader < OpenAI::Internal::Type::BaseModel
156
+ OrHash =
157
+ T.type_alias do
158
+ T.any(
159
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader,
160
+ OpenAI::Internal::AnyHash
161
+ )
162
+ end
163
+
164
+ # Name of the SIP Header.
165
+ sig { returns(String) }
166
+ attr_accessor :name
167
+
168
+ # Value of the SIP Header.
169
+ sig { returns(String) }
170
+ attr_accessor :value
171
+
172
+ # A header from the SIP Invite.
173
+ sig do
174
+ params(name: String, value: String).returns(T.attached_class)
175
+ end
176
+ def self.new(
177
+ # Name of the SIP Header.
178
+ name:,
179
+ # Value of the SIP Header.
180
+ value:
181
+ )
182
+ end
183
+
184
+ sig { override.returns({ name: String, value: String }) }
185
+ def to_hash
186
+ end
187
+ end
188
+ end
189
+
190
+ # The object of the event. Always `event`.
191
+ module Object
192
+ extend OpenAI::Internal::Type::Enum
193
+
194
+ TaggedSymbol =
195
+ T.type_alias do
196
+ T.all(
197
+ Symbol,
198
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object
199
+ )
200
+ end
201
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
202
+
203
+ EVENT =
204
+ T.let(
205
+ :event,
206
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
207
+ )
208
+
209
+ sig do
210
+ override.returns(
211
+ T::Array[
212
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
213
+ ]
214
+ )
215
+ end
216
+ def self.values
217
+ end
218
+ end
219
+ end
220
+ end
221
+ end
222
+ end
@@ -56,7 +56,9 @@ module OpenAI
56
56
  end
57
57
  attr_writer :object
58
58
 
59
- # Sent when Realtime API Receives a incoming SIP call.
59
+ # Sent when an incoming API SIP session is available for Realtime acceptance. The
60
+ # same pending session can also emit `live.call.incoming`; the first successful
61
+ # Realtime or Live accept endpoint selects the runtime surface.
60
62
  sig do
61
63
  params(
62
64
  id: String,
@@ -106,7 +108,8 @@ module OpenAI
106
108
  )
107
109
  end
108
110
 
109
- # The unique ID of this call.
111
+ # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
112
+ # as `session_id` in `live.call.incoming`.
110
113
  sig { returns(String) }
111
114
  attr_accessor :call_id
112
115
 
@@ -131,7 +134,8 @@ module OpenAI
131
134
  ).returns(T.attached_class)
132
135
  end
133
136
  def self.new(
134
- # The unique ID of this call.
137
+ # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
138
+ # as `session_id` in `live.call.incoming`.
135
139
  call_id:,
136
140
  # Headers from the SIP Invite.
137
141
  sip_headers:
@@ -20,6 +20,7 @@ module OpenAI
20
20
  OpenAI::Webhooks::FineTuningJobCancelledWebhookEvent,
21
21
  OpenAI::Webhooks::FineTuningJobFailedWebhookEvent,
22
22
  OpenAI::Webhooks::FineTuningJobSucceededWebhookEvent,
23
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent,
23
24
  OpenAI::Webhooks::RealtimeCallIncomingWebhookEvent,
24
25
  OpenAI::Webhooks::ResponseCancelledWebhookEvent,
25
26
  OpenAI::Webhooks::ResponseCompletedWebhookEvent,
@@ -24,9 +24,11 @@ module OpenAI
24
24
  )
25
25
  ),
26
26
  include: T::Array[OpenAI::Audio::TranscriptionInclude::OrSymbol],
27
+ keywords: T::Array[String],
27
28
  known_speaker_names: T::Array[String],
28
29
  known_speaker_references: T::Array[String],
29
30
  language: String,
31
+ languages: T::Array[String],
30
32
  prompt: String,
31
33
  response_format: OpenAI::AudioResponseFormat::OrSymbol,
32
34
  temperature: Float,
@@ -44,7 +46,7 @@ module OpenAI
44
46
  # The audio file object (not file name) to transcribe, in one of these formats:
45
47
  # flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
46
48
  file:,
47
- # ID of the model to use. The options are `gpt-4o-transcribe`,
49
+ # ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`,
48
50
  # `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
49
51
  # (which is powered by our open source Whisper V2 model), and
50
52
  # `gpt-4o-transcribe-diarize`.
@@ -63,6 +65,9 @@ module OpenAI
63
65
  # `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
64
66
  # not supported when using `gpt-4o-transcribe-diarize`.
65
67
  include: nil,
68
+ # Words or phrases to guide transcription of the input audio. Supported by
69
+ # `gpt-transcribe`.
70
+ keywords: nil,
66
71
  # Optional list of speaker names that correspond to the audio samples provided in
67
72
  # `known_speaker_references[]`. Each entry should be a short identifier (for
68
73
  # example `customer` or `agent`). Up to 4 speakers are supported.
@@ -77,6 +82,10 @@ module OpenAI
77
82
  # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
78
83
  # format will improve accuracy and latency.
79
84
  language: nil,
85
+ # Possible languages of the input audio, in
86
+ # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
87
+ # Supported by `gpt-transcribe`.
88
+ languages: nil,
80
89
  # An optional text to guide the model's style or continue a previous audio
81
90
  # segment. The
82
91
  # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
@@ -128,9 +137,11 @@ module OpenAI
128
137
  )
129
138
  ),
130
139
  include: T::Array[OpenAI::Audio::TranscriptionInclude::OrSymbol],
140
+ keywords: T::Array[String],
131
141
  known_speaker_names: T::Array[String],
132
142
  known_speaker_references: T::Array[String],
133
143
  language: String,
144
+ languages: T::Array[String],
134
145
  prompt: String,
135
146
  response_format: OpenAI::AudioResponseFormat::OrSymbol,
136
147
  temperature: Float,
@@ -150,7 +161,7 @@ module OpenAI
150
161
  # The audio file object (not file name) to transcribe, in one of these formats:
151
162
  # flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
152
163
  file:,
153
- # ID of the model to use. The options are `gpt-4o-transcribe`,
164
+ # ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`,
154
165
  # `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
155
166
  # (which is powered by our open source Whisper V2 model), and
156
167
  # `gpt-4o-transcribe-diarize`.
@@ -169,6 +180,9 @@ module OpenAI
169
180
  # `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
170
181
  # not supported when using `gpt-4o-transcribe-diarize`.
171
182
  include: nil,
183
+ # Words or phrases to guide transcription of the input audio. Supported by
184
+ # `gpt-transcribe`.
185
+ keywords: nil,
172
186
  # Optional list of speaker names that correspond to the audio samples provided in
173
187
  # `known_speaker_references[]`. Each entry should be a short identifier (for
174
188
  # example `customer` or `agent`). Up to 4 speakers are supported.
@@ -183,6 +197,10 @@ module OpenAI
183
197
  # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
184
198
  # format will improve accuracy and latency.
185
199
  language: nil,
200
+ # Possible languages of the input audio, in
201
+ # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
202
+ # Supported by `gpt-transcribe`.
203
+ languages: nil,
186
204
  # An optional text to guide the model's style or continue a previous audio
187
205
  # segment. The
188
206
  # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
@@ -262,9 +262,13 @@ module OpenAI
262
262
  # will use 'default'.
263
263
  # - If set to 'default', then the request will be processed with the standard
264
264
  # pricing and performance for the selected model.
265
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
266
- # '[priority](https://openai.com/api-priority-processing/)', then the request
267
- # will be processed with the corresponding service tier.
265
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
266
+ # then the request will be processed with the Flex Processing service tier.
267
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
268
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
269
+ # Responses or Chat Completions. The response will show `service_tier=priority`
270
+ # regardless of if you specify `service_tier=fast` or `priority` in your
271
+ # request.
268
272
  # - When not set, the default behavior is 'auto'.
269
273
  #
270
274
  # When the `service_tier` parameter is set, the response body will include the
@@ -605,9 +609,13 @@ module OpenAI
605
609
  # will use 'default'.
606
610
  # - If set to 'default', then the request will be processed with the standard
607
611
  # pricing and performance for the selected model.
608
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
609
- # '[priority](https://openai.com/api-priority-processing/)', then the request
610
- # will be processed with the corresponding service tier.
612
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
613
+ # then the request will be processed with the Flex Processing service tier.
614
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
615
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
616
+ # Responses or Chat Completions. The response will show `service_tier=priority`
617
+ # regardless of if you specify `service_tier=fast` or `priority` in your
618
+ # request.
611
619
  # - When not set, the default behavior is 'auto'.
612
620
  #
613
621
  # When the `service_tier` parameter is set, the response body will include the
@@ -302,9 +302,13 @@ module OpenAI
302
302
  # will use 'default'.
303
303
  # - If set to 'default', then the request will be processed with the standard
304
304
  # pricing and performance for the selected model.
305
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
306
- # '[priority](https://openai.com/api-priority-processing/)', then the request
307
- # will be processed with the corresponding service tier.
305
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
306
+ # then the request will be processed with the Flex Processing service tier.
307
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
308
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
309
+ # Responses or Chat Completions. The response will show `service_tier=priority`
310
+ # regardless of if you specify `service_tier=fast` or `priority` in your
311
+ # request.
308
312
  # - When not set, the default behavior is 'auto'.
309
313
  #
310
314
  # When the `service_tier` parameter is set, the response body will include the
@@ -666,9 +670,13 @@ module OpenAI
666
670
  # will use 'default'.
667
671
  # - If set to 'default', then the request will be processed with the standard
668
672
  # pricing and performance for the selected model.
669
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
670
- # '[priority](https://openai.com/api-priority-processing/)', then the request
671
- # will be processed with the corresponding service tier.
673
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
674
+ # then the request will be processed with the Flex Processing service tier.
675
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
676
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
677
+ # Responses or Chat Completions. The response will show `service_tier=priority`
678
+ # regardless of if you specify `service_tier=fast` or `priority` in your
679
+ # request.
672
680
  # - When not set, the default behavior is 'auto'.
673
681
  #
674
682
  # When the `service_tier` parameter is set, the response body will include the
@@ -259,9 +259,13 @@ module OpenAI
259
259
  # will use 'default'.
260
260
  # - If set to 'default', then the request will be processed with the standard
261
261
  # pricing and performance for the selected model.
262
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
263
- # '[priority](https://openai.com/api-priority-processing/)', then the request
264
- # will be processed with the corresponding service tier.
262
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
263
+ # then the request will be processed with the Flex Processing service tier.
264
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
265
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
266
+ # Responses or Chat Completions. The response will show `service_tier=priority`
267
+ # regardless of if you specify `service_tier=fast` or `priority` in your
268
+ # request.
265
269
  # - When not set, the default behavior is 'auto'.
266
270
  #
267
271
  # When the `service_tier` parameter is set, the response body will include the
@@ -595,9 +599,13 @@ module OpenAI
595
599
  # will use 'default'.
596
600
  # - If set to 'default', then the request will be processed with the standard
597
601
  # pricing and performance for the selected model.
598
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
599
- # '[priority](https://openai.com/api-priority-processing/)', then the request
600
- # will be processed with the corresponding service tier.
602
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
603
+ # then the request will be processed with the Flex Processing service tier.
604
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
605
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
606
+ # Responses or Chat Completions. The response will show `service_tier=priority`
607
+ # regardless of if you specify `service_tier=fast` or `priority` in your
608
+ # request.
601
609
  # - When not set, the default behavior is 'auto'.
602
610
  #
603
611
  # When the `service_tier` parameter is set, the response body will include the
@@ -21,6 +21,7 @@ module OpenAI
21
21
  OpenAI::Webhooks::FineTuningJobCancelledWebhookEvent,
22
22
  OpenAI::Webhooks::FineTuningJobFailedWebhookEvent,
23
23
  OpenAI::Webhooks::FineTuningJobSucceededWebhookEvent,
24
+ OpenAI::Webhooks::LiveCallIncomingWebhookEvent,
24
25
  OpenAI::Webhooks::RealtimeCallIncomingWebhookEvent,
25
26
  OpenAI::Webhooks::ResponseCancelledWebhookEvent,
26
27
  OpenAI::Webhooks::ResponseCompletedWebhookEvent,
@@ -4,6 +4,7 @@ module OpenAI
4
4
  type transcription =
5
5
  {
6
6
  text: String,
7
+ languages: ::Array[OpenAI::Audio::TranscriptionLanguage],
7
8
  logprobs: ::Array[OpenAI::Audio::Transcription::Logprob],
8
9
  usage: OpenAI::Models::Audio::Transcription::usage
9
10
  }
@@ -11,6 +12,12 @@ module OpenAI
11
12
  class Transcription < OpenAI::Internal::Type::BaseModel
12
13
  attr_accessor text: String
13
14
 
15
+ attr_reader languages: ::Array[OpenAI::Audio::TranscriptionLanguage]?
16
+
17
+ def languages=: (
18
+ ::Array[OpenAI::Audio::TranscriptionLanguage]
19
+ ) -> ::Array[OpenAI::Audio::TranscriptionLanguage]
20
+
14
21
  attr_reader logprobs: ::Array[OpenAI::Audio::Transcription::Logprob]?
15
22
 
16
23
  def logprobs=: (
@@ -25,12 +32,14 @@ module OpenAI
25
32
 
26
33
  def initialize: (
27
34
  text: String,
35
+ ?languages: ::Array[OpenAI::Audio::TranscriptionLanguage],
28
36
  ?logprobs: ::Array[OpenAI::Audio::Transcription::Logprob],
29
37
  ?usage: OpenAI::Models::Audio::Transcription::usage
30
38
  ) -> void
31
39
 
32
40
  def to_hash: -> {
33
41
  text: String,
42
+ languages: ::Array[OpenAI::Audio::TranscriptionLanguage],
34
43
  logprobs: ::Array[OpenAI::Audio::Transcription::Logprob],
35
44
  usage: OpenAI::Models::Audio::Transcription::usage
36
45
  }