openai 7.0.0 → 7.2.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.
- package/CHANGELOG.md +21 -0
- package/package.json +1 -1
- package/resources/audio/audio.d.mts +3 -3
- package/resources/audio/audio.d.mts.map +1 -1
- package/resources/audio/audio.d.ts +3 -3
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/index.d.mts +1 -1
- package/resources/audio/index.d.mts.map +1 -1
- package/resources/audio/index.d.ts +1 -1
- package/resources/audio/index.d.ts.map +1 -1
- package/resources/audio/index.js.map +1 -1
- package/resources/audio/index.mjs.map +1 -1
- package/resources/audio/transcriptions.d.mts +32 -2
- package/resources/audio/transcriptions.d.mts.map +1 -1
- package/resources/audio/transcriptions.d.ts +32 -2
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/beta/responses/responses.d.mts +24 -12
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +24 -12
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +24 -12
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +24 -12
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/realtime/realtime.d.mts +22 -4
- package/resources/realtime/realtime.d.mts.map +1 -1
- package/resources/realtime/realtime.d.ts +22 -4
- package/resources/realtime/realtime.d.ts.map +1 -1
- package/resources/realtime/realtime.js.map +1 -1
- package/resources/realtime/realtime.mjs.map +1 -1
- package/resources/responses/responses.d.mts +24 -12
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +24 -12
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +65 -4
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +65 -4
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/src/resources/audio/audio.ts +3 -0
- package/src/resources/audio/index.ts +1 -0
- package/src/resources/audio/transcriptions.ts +37 -1
- package/src/resources/beta/responses/responses.ts +24 -12
- package/src/resources/chat/completions/completions.ts +24 -12
- package/src/resources/realtime/realtime.ts +26 -3
- package/src/resources/responses/responses.ts +24 -12
- package/src/resources/webhooks/api.md +1 -0
- package/src/resources/webhooks/webhooks.ts +74 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -379,7 +379,67 @@ export declare namespace FineTuningJobSucceededWebhookEvent {
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
/**
|
|
382
|
-
* Sent when
|
|
382
|
+
* Sent when an incoming API SIP session is available for Live acceptance. The same
|
|
383
|
+
* pending session can also emit `realtime.call.incoming`; the first successful
|
|
384
|
+
* Realtime or Live accept endpoint selects the runtime surface.
|
|
385
|
+
*/
|
|
386
|
+
export interface LiveCallIncomingWebhookEvent {
|
|
387
|
+
/**
|
|
388
|
+
* The unique ID of the event.
|
|
389
|
+
*/
|
|
390
|
+
id: string;
|
|
391
|
+
/**
|
|
392
|
+
* The Unix timestamp (in seconds) of when the event was created.
|
|
393
|
+
*/
|
|
394
|
+
created_at: number;
|
|
395
|
+
/**
|
|
396
|
+
* Event data payload.
|
|
397
|
+
*/
|
|
398
|
+
data: LiveCallIncomingWebhookEvent.Data;
|
|
399
|
+
/**
|
|
400
|
+
* The type of the event. Always `live.call.incoming`.
|
|
401
|
+
*/
|
|
402
|
+
type: 'live.call.incoming';
|
|
403
|
+
/**
|
|
404
|
+
* The object of the event. Always `event`.
|
|
405
|
+
*/
|
|
406
|
+
object?: 'event';
|
|
407
|
+
}
|
|
408
|
+
export declare namespace LiveCallIncomingWebhookEvent {
|
|
409
|
+
/**
|
|
410
|
+
* Event data payload.
|
|
411
|
+
*/
|
|
412
|
+
interface Data {
|
|
413
|
+
/**
|
|
414
|
+
* The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
415
|
+
* as `call_id` in `realtime.call.incoming`.
|
|
416
|
+
*/
|
|
417
|
+
session_id: string;
|
|
418
|
+
/**
|
|
419
|
+
* Headers from the SIP Invite.
|
|
420
|
+
*/
|
|
421
|
+
sip_headers: Array<Data.SipHeader>;
|
|
422
|
+
}
|
|
423
|
+
namespace Data {
|
|
424
|
+
/**
|
|
425
|
+
* A header from the SIP Invite.
|
|
426
|
+
*/
|
|
427
|
+
interface SipHeader {
|
|
428
|
+
/**
|
|
429
|
+
* Name of the SIP Header.
|
|
430
|
+
*/
|
|
431
|
+
name: string;
|
|
432
|
+
/**
|
|
433
|
+
* Value of the SIP Header.
|
|
434
|
+
*/
|
|
435
|
+
value: string;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Sent when an incoming API SIP session is available for Realtime acceptance. The
|
|
441
|
+
* same pending session can also emit `live.call.incoming`; the first successful
|
|
442
|
+
* Realtime or Live accept endpoint selects the runtime surface.
|
|
383
443
|
*/
|
|
384
444
|
export interface RealtimeCallIncomingWebhookEvent {
|
|
385
445
|
/**
|
|
@@ -409,7 +469,8 @@ export declare namespace RealtimeCallIncomingWebhookEvent {
|
|
|
409
469
|
*/
|
|
410
470
|
interface Data {
|
|
411
471
|
/**
|
|
412
|
-
* The
|
|
472
|
+
* The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
473
|
+
* as `session_id` in `live.call.incoming`.
|
|
413
474
|
*/
|
|
414
475
|
call_id: string;
|
|
415
476
|
/**
|
|
@@ -580,8 +641,8 @@ export declare namespace ResponseIncompleteWebhookEvent {
|
|
|
580
641
|
/**
|
|
581
642
|
* Sent when a batch API request has been cancelled.
|
|
582
643
|
*/
|
|
583
|
-
export type UnwrapWebhookEvent = BatchCancelledWebhookEvent | BatchCompletedWebhookEvent | BatchExpiredWebhookEvent | BatchFailedWebhookEvent | EvalRunCanceledWebhookEvent | EvalRunFailedWebhookEvent | EvalRunSucceededWebhookEvent | FineTuningJobCancelledWebhookEvent | FineTuningJobFailedWebhookEvent | FineTuningJobSucceededWebhookEvent | RealtimeCallIncomingWebhookEvent | ResponseCancelledWebhookEvent | ResponseCompletedWebhookEvent | ResponseFailedWebhookEvent | ResponseIncompleteWebhookEvent;
|
|
644
|
+
export type UnwrapWebhookEvent = BatchCancelledWebhookEvent | BatchCompletedWebhookEvent | BatchExpiredWebhookEvent | BatchFailedWebhookEvent | EvalRunCanceledWebhookEvent | EvalRunFailedWebhookEvent | EvalRunSucceededWebhookEvent | FineTuningJobCancelledWebhookEvent | FineTuningJobFailedWebhookEvent | FineTuningJobSucceededWebhookEvent | LiveCallIncomingWebhookEvent | RealtimeCallIncomingWebhookEvent | ResponseCancelledWebhookEvent | ResponseCompletedWebhookEvent | ResponseFailedWebhookEvent | ResponseIncompleteWebhookEvent;
|
|
584
645
|
export declare namespace Webhooks {
|
|
585
|
-
export { type BatchCancelledWebhookEvent as BatchCancelledWebhookEvent, type BatchCompletedWebhookEvent as BatchCompletedWebhookEvent, type BatchExpiredWebhookEvent as BatchExpiredWebhookEvent, type BatchFailedWebhookEvent as BatchFailedWebhookEvent, type EvalRunCanceledWebhookEvent as EvalRunCanceledWebhookEvent, type EvalRunFailedWebhookEvent as EvalRunFailedWebhookEvent, type EvalRunSucceededWebhookEvent as EvalRunSucceededWebhookEvent, type FineTuningJobCancelledWebhookEvent as FineTuningJobCancelledWebhookEvent, type FineTuningJobFailedWebhookEvent as FineTuningJobFailedWebhookEvent, type FineTuningJobSucceededWebhookEvent as FineTuningJobSucceededWebhookEvent, type RealtimeCallIncomingWebhookEvent as RealtimeCallIncomingWebhookEvent, type ResponseCancelledWebhookEvent as ResponseCancelledWebhookEvent, type ResponseCompletedWebhookEvent as ResponseCompletedWebhookEvent, type ResponseFailedWebhookEvent as ResponseFailedWebhookEvent, type ResponseIncompleteWebhookEvent as ResponseIncompleteWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
|
|
646
|
+
export { type BatchCancelledWebhookEvent as BatchCancelledWebhookEvent, type BatchCompletedWebhookEvent as BatchCompletedWebhookEvent, type BatchExpiredWebhookEvent as BatchExpiredWebhookEvent, type BatchFailedWebhookEvent as BatchFailedWebhookEvent, type EvalRunCanceledWebhookEvent as EvalRunCanceledWebhookEvent, type EvalRunFailedWebhookEvent as EvalRunFailedWebhookEvent, type EvalRunSucceededWebhookEvent as EvalRunSucceededWebhookEvent, type FineTuningJobCancelledWebhookEvent as FineTuningJobCancelledWebhookEvent, type FineTuningJobFailedWebhookEvent as FineTuningJobFailedWebhookEvent, type FineTuningJobSucceededWebhookEvent as FineTuningJobSucceededWebhookEvent, type LiveCallIncomingWebhookEvent as LiveCallIncomingWebhookEvent, type RealtimeCallIncomingWebhookEvent as RealtimeCallIncomingWebhookEvent, type ResponseCancelledWebhookEvent as ResponseCancelledWebhookEvent, type ResponseCompletedWebhookEvent as ResponseCompletedWebhookEvent, type ResponseFailedWebhookEvent as ResponseFailedWebhookEvent, type ResponseIncompleteWebhookEvent as ResponseIncompleteWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
|
|
586
647
|
}
|
|
587
648
|
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/resources/webhooks/webhooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAgB,WAAW,EAAE,kCAA+B;AAEnE,qBAAa,QAAS,SAAQ,WAAW;;IACvC;;OAEG;IACG,MAAM,CACV,OAA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AE/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,+BAA+B,CAAC;IAC/C;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,kCAAkC,CAAC,IAAI,CAAC;IAE9C;;OAEG;IACH,IAAI,EAAE,2BAA2B,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,kCAAkC,CAAC;IAClD;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED;;
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/resources/webhooks/webhooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAgB,WAAW,EAAE,kCAA+B;AAEnE,qBAAa,QAAS,SAAQ,WAAW;;IACvC;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,EAC9D,SAAS,GAAE,MAAY,GACtB,OAAO,CAAC,kBAAkB,CAAC;IAM9B;;;;;;;;;OASG;IACG,eAAe,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,EAC9D,SAAS,GAAE,MAAY,GACtB,OAAO,CAAC,IAAI,CAAC;CAuGjB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;I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IAAI,gCAAgC,EACzE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
TranscriptionDiarized,
|
|
14
14
|
TranscriptionDiarizedSegment,
|
|
15
15
|
TranscriptionInclude,
|
|
16
|
+
TranscriptionLanguage,
|
|
16
17
|
TranscriptionSegment,
|
|
17
18
|
TranscriptionStreamEvent,
|
|
18
19
|
TranscriptionTextDeltaEvent,
|
|
@@ -39,6 +40,7 @@ export class Audio extends APIResource {
|
|
|
39
40
|
|
|
40
41
|
export type AudioModel =
|
|
41
42
|
| 'whisper-1'
|
|
43
|
+
| 'gpt-transcribe'
|
|
42
44
|
| 'gpt-4o-transcribe'
|
|
43
45
|
| 'gpt-4o-mini-transcribe'
|
|
44
46
|
| 'gpt-4o-mini-transcribe-2025-12-15'
|
|
@@ -66,6 +68,7 @@ export declare namespace Audio {
|
|
|
66
68
|
type TranscriptionDiarized as TranscriptionDiarized,
|
|
67
69
|
type TranscriptionDiarizedSegment as TranscriptionDiarizedSegment,
|
|
68
70
|
type TranscriptionInclude as TranscriptionInclude,
|
|
71
|
+
type TranscriptionLanguage as TranscriptionLanguage,
|
|
69
72
|
type TranscriptionSegment as TranscriptionSegment,
|
|
70
73
|
type TranscriptionStreamEvent as TranscriptionStreamEvent,
|
|
71
74
|
type TranscriptionTextDeltaEvent as TranscriptionTextDeltaEvent,
|
|
@@ -79,6 +79,12 @@ export interface Transcription {
|
|
|
79
79
|
*/
|
|
80
80
|
text: string;
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
84
|
+
* array indicates that no language could be reliably detected.
|
|
85
|
+
*/
|
|
86
|
+
languages?: Array<TranscriptionLanguage>;
|
|
87
|
+
|
|
82
88
|
/**
|
|
83
89
|
* The log probabilities of the tokens in the transcription. Only returned with the
|
|
84
90
|
* models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added
|
|
@@ -307,6 +313,16 @@ export interface TranscriptionDiarizedSegment {
|
|
|
307
313
|
|
|
308
314
|
export type TranscriptionInclude = 'logprobs';
|
|
309
315
|
|
|
316
|
+
/**
|
|
317
|
+
* A language detected in transcribed audio.
|
|
318
|
+
*/
|
|
319
|
+
export interface TranscriptionLanguage {
|
|
320
|
+
/**
|
|
321
|
+
* The code of a language detected in the audio.
|
|
322
|
+
*/
|
|
323
|
+
code: string;
|
|
324
|
+
}
|
|
325
|
+
|
|
310
326
|
export interface TranscriptionSegment {
|
|
311
327
|
/**
|
|
312
328
|
* Unique identifier of the segment.
|
|
@@ -440,6 +456,12 @@ export interface TranscriptionTextDoneEvent {
|
|
|
440
456
|
*/
|
|
441
457
|
type: 'transcript.text.done';
|
|
442
458
|
|
|
459
|
+
/**
|
|
460
|
+
* The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
461
|
+
* array indicates that no language could be reliably detected.
|
|
462
|
+
*/
|
|
463
|
+
languages?: Array<TranscriptionLanguage>;
|
|
464
|
+
|
|
443
465
|
/**
|
|
444
466
|
* The log probabilities of the individual tokens in the transcription. Only
|
|
445
467
|
* included if you
|
|
@@ -648,7 +670,7 @@ export interface TranscriptionCreateParamsBase<
|
|
|
648
670
|
file: Uploadable;
|
|
649
671
|
|
|
650
672
|
/**
|
|
651
|
-
* ID of the model to use. The options are `gpt-4o-transcribe`,
|
|
673
|
+
* ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`,
|
|
652
674
|
* `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
|
|
653
675
|
* (which is powered by our open source Whisper V2 model), and
|
|
654
676
|
* `gpt-4o-transcribe-diarize`.
|
|
@@ -675,6 +697,12 @@ export interface TranscriptionCreateParamsBase<
|
|
|
675
697
|
*/
|
|
676
698
|
include?: Array<TranscriptionInclude>;
|
|
677
699
|
|
|
700
|
+
/**
|
|
701
|
+
* Words or phrases to guide transcription of the input audio. Supported by
|
|
702
|
+
* `gpt-transcribe`.
|
|
703
|
+
*/
|
|
704
|
+
keywords?: Array<string>;
|
|
705
|
+
|
|
678
706
|
/**
|
|
679
707
|
* Optional list of speaker names that correspond to the audio samples provided in
|
|
680
708
|
* `known_speaker_references[]`. Each entry should be a short identifier (for
|
|
@@ -698,6 +726,13 @@ export interface TranscriptionCreateParamsBase<
|
|
|
698
726
|
*/
|
|
699
727
|
language?: string;
|
|
700
728
|
|
|
729
|
+
/**
|
|
730
|
+
* Possible languages of the input audio, in
|
|
731
|
+
* [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
732
|
+
* Supported by `gpt-transcribe`.
|
|
733
|
+
*/
|
|
734
|
+
languages?: Array<string>;
|
|
735
|
+
|
|
701
736
|
/**
|
|
702
737
|
* An optional text to guide the model's style or continue a previous audio
|
|
703
738
|
* segment. The
|
|
@@ -815,6 +850,7 @@ export declare namespace Transcriptions {
|
|
|
815
850
|
type TranscriptionDiarized as TranscriptionDiarized,
|
|
816
851
|
type TranscriptionDiarizedSegment as TranscriptionDiarizedSegment,
|
|
817
852
|
type TranscriptionInclude as TranscriptionInclude,
|
|
853
|
+
type TranscriptionLanguage as TranscriptionLanguage,
|
|
818
854
|
type TranscriptionSegment as TranscriptionSegment,
|
|
819
855
|
type TranscriptionStreamEvent as TranscriptionStreamEvent,
|
|
820
856
|
type TranscriptionTextDeltaEvent as TranscriptionTextDeltaEvent,
|
|
@@ -1385,9 +1385,13 @@ export interface BetaResponse {
|
|
|
1385
1385
|
* will use 'default'.
|
|
1386
1386
|
* - If set to 'default', then the request will be processed with the standard
|
|
1387
1387
|
* pricing and performance for the selected model.
|
|
1388
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1389
|
-
*
|
|
1390
|
-
*
|
|
1388
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1389
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
1390
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1391
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1392
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1393
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1394
|
+
* request.
|
|
1391
1395
|
* - When not set, the default behavior is 'auto'.
|
|
1392
1396
|
*
|
|
1393
1397
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1395,7 +1399,7 @@ export interface BetaResponse {
|
|
|
1395
1399
|
* request. This response value may be different from the value set in the
|
|
1396
1400
|
* parameter.
|
|
1397
1401
|
*/
|
|
1398
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
1402
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
1399
1403
|
|
|
1400
1404
|
/**
|
|
1401
1405
|
* The status of the response generation. One of `completed`, `failed`,
|
|
@@ -10459,9 +10463,13 @@ export namespace BetaResponsesClientEvent {
|
|
|
10459
10463
|
* will use 'default'.
|
|
10460
10464
|
* - If set to 'default', then the request will be processed with the standard
|
|
10461
10465
|
* pricing and performance for the selected model.
|
|
10462
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
10463
|
-
*
|
|
10464
|
-
*
|
|
10466
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
10467
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
10468
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
10469
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
10470
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
10471
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
10472
|
+
* request.
|
|
10465
10473
|
* - When not set, the default behavior is 'auto'.
|
|
10466
10474
|
*
|
|
10467
10475
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -10469,7 +10477,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
10469
10477
|
* request. This response value may be different from the value set in the
|
|
10470
10478
|
* parameter.
|
|
10471
10479
|
*/
|
|
10472
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
10480
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
10473
10481
|
|
|
10474
10482
|
/**
|
|
10475
10483
|
* Whether to store the generated model response for later retrieval via API.
|
|
@@ -11832,9 +11840,13 @@ export interface ResponseCreateParamsBase {
|
|
|
11832
11840
|
* will use 'default'.
|
|
11833
11841
|
* - If set to 'default', then the request will be processed with the standard
|
|
11834
11842
|
* pricing and performance for the selected model.
|
|
11835
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
11836
|
-
*
|
|
11837
|
-
*
|
|
11843
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
11844
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
11845
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
11846
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
11847
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
11848
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
11849
|
+
* request.
|
|
11838
11850
|
* - When not set, the default behavior is 'auto'.
|
|
11839
11851
|
*
|
|
11840
11852
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -11842,7 +11854,7 @@ export interface ResponseCreateParamsBase {
|
|
|
11842
11854
|
* request. This response value may be different from the value set in the
|
|
11843
11855
|
* parameter.
|
|
11844
11856
|
*/
|
|
11845
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
11857
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
11846
11858
|
|
|
11847
11859
|
/**
|
|
11848
11860
|
* Body param: Whether to store the generated model response for later retrieval
|
|
@@ -366,9 +366,13 @@ export interface ChatCompletion {
|
|
|
366
366
|
* will use 'default'.
|
|
367
367
|
* - If set to 'default', then the request will be processed with the standard
|
|
368
368
|
* pricing and performance for the selected model.
|
|
369
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
370
|
-
*
|
|
371
|
-
*
|
|
369
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
370
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
371
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
372
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
373
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
374
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
375
|
+
* request.
|
|
372
376
|
* - When not set, the default behavior is 'auto'.
|
|
373
377
|
*
|
|
374
378
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -376,7 +380,7 @@ export interface ChatCompletion {
|
|
|
376
380
|
* request. This response value may be different from the value set in the
|
|
377
381
|
* parameter.
|
|
378
382
|
*/
|
|
379
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
383
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
380
384
|
|
|
381
385
|
/**
|
|
382
386
|
* @deprecated This fingerprint represents the backend configuration that the model
|
|
@@ -829,9 +833,13 @@ export interface ChatCompletionChunk {
|
|
|
829
833
|
* will use 'default'.
|
|
830
834
|
* - If set to 'default', then the request will be processed with the standard
|
|
831
835
|
* pricing and performance for the selected model.
|
|
832
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
833
|
-
*
|
|
834
|
-
*
|
|
836
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
837
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
838
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
839
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
840
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
841
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
842
|
+
* request.
|
|
835
843
|
* - When not set, the default behavior is 'auto'.
|
|
836
844
|
*
|
|
837
845
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -839,7 +847,7 @@ export interface ChatCompletionChunk {
|
|
|
839
847
|
* request. This response value may be different from the value set in the
|
|
840
848
|
* parameter.
|
|
841
849
|
*/
|
|
842
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
850
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
843
851
|
|
|
844
852
|
/**
|
|
845
853
|
* @deprecated This fingerprint represents the backend configuration that the model
|
|
@@ -2268,9 +2276,13 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2268
2276
|
* will use 'default'.
|
|
2269
2277
|
* - If set to 'default', then the request will be processed with the standard
|
|
2270
2278
|
* pricing and performance for the selected model.
|
|
2271
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
2272
|
-
*
|
|
2273
|
-
*
|
|
2279
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
2280
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
2281
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
2282
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
2283
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2284
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2285
|
+
* request.
|
|
2274
2286
|
* - When not set, the default behavior is 'auto'.
|
|
2275
2287
|
*
|
|
2276
2288
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2278,7 +2290,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2278
2290
|
* request. This response value may be different from the value set in the
|
|
2279
2291
|
* parameter.
|
|
2280
2292
|
*/
|
|
2281
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
2293
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
2282
2294
|
|
|
2283
2295
|
/**
|
|
2284
2296
|
* Not supported with latest reasoning models `o3` and `o4-mini`.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as RealtimeAPI from './realtime';
|
|
5
5
|
import * as Shared from '../shared';
|
|
6
|
+
import * as TranscriptionsAPI from '../audio/transcriptions';
|
|
6
7
|
import * as CallsAPI from './calls';
|
|
7
8
|
import { CallAcceptParams, CallReferParams, CallRejectParams, Calls } from './calls';
|
|
8
9
|
import * as ClientSecretsAPI from './client-secrets';
|
|
@@ -29,6 +30,12 @@ export interface AudioTranscription {
|
|
|
29
30
|
*/
|
|
30
31
|
delay?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
31
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Words or phrases to guide transcription of the input audio. Supported by
|
|
35
|
+
* `gpt-transcribe` and `gpt-live-transcribe`.
|
|
36
|
+
*/
|
|
37
|
+
keywords?: Array<string>;
|
|
38
|
+
|
|
32
39
|
/**
|
|
33
40
|
* The language of the input audio. Supplying the input language in
|
|
34
41
|
* [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
|
@@ -36,15 +43,25 @@ export interface AudioTranscription {
|
|
|
36
43
|
*/
|
|
37
44
|
language?: string;
|
|
38
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Possible languages of the input audio, in
|
|
48
|
+
* [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
49
|
+
* Supported by `gpt-transcribe` and `gpt-live-transcribe`.
|
|
50
|
+
*/
|
|
51
|
+
languages?: Array<string>;
|
|
52
|
+
|
|
39
53
|
/**
|
|
40
54
|
* The model to use for transcription. Current options are `whisper-1`,
|
|
41
|
-
* `gpt-
|
|
42
|
-
* `gpt-4o-transcribe`, `gpt-4o-transcribe
|
|
43
|
-
*
|
|
55
|
+
* `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`,
|
|
56
|
+
* `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
|
57
|
+
* `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
|
58
|
+
* `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
|
44
59
|
*/
|
|
45
60
|
model?:
|
|
46
61
|
| (string & {})
|
|
47
62
|
| 'whisper-1'
|
|
63
|
+
| 'gpt-transcribe'
|
|
64
|
+
| 'gpt-live-transcribe'
|
|
48
65
|
| 'gpt-4o-mini-transcribe'
|
|
49
66
|
| 'gpt-4o-mini-transcribe-2025-12-15'
|
|
50
67
|
| 'gpt-4o-transcribe'
|
|
@@ -348,6 +365,12 @@ export interface ConversationItemInputAudioTranscriptionCompletedEvent {
|
|
|
348
365
|
| ConversationItemInputAudioTranscriptionCompletedEvent.TranscriptTextUsageTokens
|
|
349
366
|
| ConversationItemInputAudioTranscriptionCompletedEvent.TranscriptTextUsageDuration;
|
|
350
367
|
|
|
368
|
+
/**
|
|
369
|
+
* The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
370
|
+
* array indicates that no language could be reliably detected.
|
|
371
|
+
*/
|
|
372
|
+
languages?: Array<TranscriptionsAPI.TranscriptionLanguage>;
|
|
373
|
+
|
|
351
374
|
/**
|
|
352
375
|
* The log probabilities of the transcription.
|
|
353
376
|
*/
|
|
@@ -1228,15 +1228,19 @@ export interface Response {
|
|
|
1228
1228
|
* will use 'default'.
|
|
1229
1229
|
* - If set to 'default', then the request will be processed with the standard
|
|
1230
1230
|
* pricing and performance for the selected model.
|
|
1231
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1231
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1232
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
1233
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1234
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1235
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1236
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1237
|
+
* request.
|
|
1234
1238
|
* - When not set, the default behavior is 'auto'.
|
|
1235
1239
|
*
|
|
1236
1240
|
* When this parameter is set, the response body will include the `service_tier`
|
|
1237
1241
|
* utilized.
|
|
1238
1242
|
*/
|
|
1239
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
1243
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
1240
1244
|
|
|
1241
1245
|
/**
|
|
1242
1246
|
* The status of the response generation. One of `completed`, `failed`,
|
|
@@ -7552,9 +7556,13 @@ export interface ResponsesClientEvent {
|
|
|
7552
7556
|
* will use 'default'.
|
|
7553
7557
|
* - If set to 'default', then the request will be processed with the standard
|
|
7554
7558
|
* pricing and performance for the selected model.
|
|
7555
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7559
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
7560
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
7561
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
7562
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
7563
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
7564
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
7565
|
+
* request.
|
|
7558
7566
|
* - When not set, the default behavior is 'auto'.
|
|
7559
7567
|
*
|
|
7560
7568
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -7562,7 +7570,7 @@ export interface ResponsesClientEvent {
|
|
|
7562
7570
|
* request. This response value may be different from the value set in the
|
|
7563
7571
|
* parameter.
|
|
7564
7572
|
*/
|
|
7565
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
7573
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
7566
7574
|
|
|
7567
7575
|
/**
|
|
7568
7576
|
* Whether to store the generated model response for later retrieval via API.
|
|
@@ -8742,15 +8750,19 @@ export interface ResponseCreateParamsBase {
|
|
|
8742
8750
|
* will use 'default'.
|
|
8743
8751
|
* - If set to 'default', then the request will be processed with the standard
|
|
8744
8752
|
* pricing and performance for the selected model.
|
|
8745
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
8746
|
-
*
|
|
8747
|
-
*
|
|
8753
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
8754
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
8755
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
8756
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
8757
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
8758
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
8759
|
+
* request.
|
|
8748
8760
|
* - When not set, the default behavior is 'auto'.
|
|
8749
8761
|
*
|
|
8750
8762
|
* When this parameter is set, the response body will include the `service_tier`
|
|
8751
8763
|
* utilized.
|
|
8752
8764
|
*/
|
|
8753
|
-
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
|
|
8765
|
+
service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
|
|
8754
8766
|
|
|
8755
8767
|
/**
|
|
8756
8768
|
* Whether to store the generated model response for later retrieval via API.
|
|
@@ -12,6 +12,7 @@ Types:
|
|
|
12
12
|
- <code><a href="./src/resources/webhooks.ts">FineTuningJobCancelledWebhookEvent</a></code>
|
|
13
13
|
- <code><a href="./src/resources/webhooks.ts">FineTuningJobFailedWebhookEvent</a></code>
|
|
14
14
|
- <code><a href="./src/resources/webhooks.ts">FineTuningJobSucceededWebhookEvent</a></code>
|
|
15
|
+
- <code><a href="./src/resources/webhooks.ts">LiveCallIncomingWebhookEvent</a></code>
|
|
15
16
|
- <code><a href="./src/resources/webhooks.ts">RealtimeCallIncomingWebhookEvent</a></code>
|
|
16
17
|
- <code><a href="./src/resources/webhooks.ts">ResponseCancelledWebhookEvent</a></code>
|
|
17
18
|
- <code><a href="./src/resources/webhooks.ts">ResponseCompletedWebhookEvent</a></code>
|
|
@@ -560,7 +560,76 @@ export namespace FineTuningJobSucceededWebhookEvent {
|
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
/**
|
|
563
|
-
* Sent when
|
|
563
|
+
* Sent when an incoming API SIP session is available for Live acceptance. The same
|
|
564
|
+
* pending session can also emit `realtime.call.incoming`; the first successful
|
|
565
|
+
* Realtime or Live accept endpoint selects the runtime surface.
|
|
566
|
+
*/
|
|
567
|
+
export interface LiveCallIncomingWebhookEvent {
|
|
568
|
+
/**
|
|
569
|
+
* The unique ID of the event.
|
|
570
|
+
*/
|
|
571
|
+
id: string;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* The Unix timestamp (in seconds) of when the event was created.
|
|
575
|
+
*/
|
|
576
|
+
created_at: number;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Event data payload.
|
|
580
|
+
*/
|
|
581
|
+
data: LiveCallIncomingWebhookEvent.Data;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* The type of the event. Always `live.call.incoming`.
|
|
585
|
+
*/
|
|
586
|
+
type: 'live.call.incoming';
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* The object of the event. Always `event`.
|
|
590
|
+
*/
|
|
591
|
+
object?: 'event';
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export namespace LiveCallIncomingWebhookEvent {
|
|
595
|
+
/**
|
|
596
|
+
* Event data payload.
|
|
597
|
+
*/
|
|
598
|
+
export interface Data {
|
|
599
|
+
/**
|
|
600
|
+
* The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
601
|
+
* as `call_id` in `realtime.call.incoming`.
|
|
602
|
+
*/
|
|
603
|
+
session_id: string;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Headers from the SIP Invite.
|
|
607
|
+
*/
|
|
608
|
+
sip_headers: Array<Data.SipHeader>;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export namespace Data {
|
|
612
|
+
/**
|
|
613
|
+
* A header from the SIP Invite.
|
|
614
|
+
*/
|
|
615
|
+
export interface SipHeader {
|
|
616
|
+
/**
|
|
617
|
+
* Name of the SIP Header.
|
|
618
|
+
*/
|
|
619
|
+
name: string;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Value of the SIP Header.
|
|
623
|
+
*/
|
|
624
|
+
value: string;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Sent when an incoming API SIP session is available for Realtime acceptance. The
|
|
631
|
+
* same pending session can also emit `live.call.incoming`; the first successful
|
|
632
|
+
* Realtime or Live accept endpoint selects the runtime surface.
|
|
564
633
|
*/
|
|
565
634
|
export interface RealtimeCallIncomingWebhookEvent {
|
|
566
635
|
/**
|
|
@@ -595,7 +664,8 @@ export namespace RealtimeCallIncomingWebhookEvent {
|
|
|
595
664
|
*/
|
|
596
665
|
export interface Data {
|
|
597
666
|
/**
|
|
598
|
-
* The
|
|
667
|
+
* The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
668
|
+
* as `session_id` in `live.call.incoming`.
|
|
599
669
|
*/
|
|
600
670
|
call_id: string;
|
|
601
671
|
|
|
@@ -805,6 +875,7 @@ export type UnwrapWebhookEvent =
|
|
|
805
875
|
| FineTuningJobCancelledWebhookEvent
|
|
806
876
|
| FineTuningJobFailedWebhookEvent
|
|
807
877
|
| FineTuningJobSucceededWebhookEvent
|
|
878
|
+
| LiveCallIncomingWebhookEvent
|
|
808
879
|
| RealtimeCallIncomingWebhookEvent
|
|
809
880
|
| ResponseCancelledWebhookEvent
|
|
810
881
|
| ResponseCompletedWebhookEvent
|
|
@@ -823,6 +894,7 @@ export declare namespace Webhooks {
|
|
|
823
894
|
type FineTuningJobCancelledWebhookEvent as FineTuningJobCancelledWebhookEvent,
|
|
824
895
|
type FineTuningJobFailedWebhookEvent as FineTuningJobFailedWebhookEvent,
|
|
825
896
|
type FineTuningJobSucceededWebhookEvent as FineTuningJobSucceededWebhookEvent,
|
|
897
|
+
type LiveCallIncomingWebhookEvent as LiveCallIncomingWebhookEvent,
|
|
826
898
|
type RealtimeCallIncomingWebhookEvent as RealtimeCallIncomingWebhookEvent,
|
|
827
899
|
type ResponseCancelledWebhookEvent as ResponseCancelledWebhookEvent,
|
|
828
900
|
type ResponseCompletedWebhookEvent as ResponseCompletedWebhookEvent,
|