openai 6.27.0 → 6.28.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 (46) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +12 -1
  11. package/resources/index.d.mts +1 -1
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -1
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js.map +1 -1
  16. package/resources/index.mjs.map +1 -1
  17. package/resources/responses/internal-base.d.mts +3 -3
  18. package/resources/responses/internal-base.d.ts +3 -3
  19. package/resources/responses/internal-base.js +1 -1
  20. package/resources/responses/internal-base.js.map +1 -1
  21. package/resources/responses/internal-base.mjs +1 -1
  22. package/resources/responses/internal-base.mjs.map +1 -1
  23. package/resources/responses/responses.d.mts +0 -10
  24. package/resources/responses/responses.d.mts.map +1 -1
  25. package/resources/responses/responses.d.ts +0 -10
  26. package/resources/responses/responses.d.ts.map +1 -1
  27. package/resources/responses/responses.js.map +1 -1
  28. package/resources/responses/responses.mjs.map +1 -1
  29. package/resources/videos.d.mts +112 -3
  30. package/resources/videos.d.mts.map +1 -1
  31. package/resources/videos.d.ts +112 -3
  32. package/resources/videos.d.ts.map +1 -1
  33. package/resources/videos.js +26 -1
  34. package/resources/videos.js.map +1 -1
  35. package/resources/videos.mjs +27 -2
  36. package/resources/videos.mjs.map +1 -1
  37. package/src/client.ts +15 -2
  38. package/src/resources/index.ts +6 -0
  39. package/src/resources/responses/internal-base.ts +4 -4
  40. package/src/resources/responses/responses.ts +0 -12
  41. package/src/resources/videos.ts +160 -4
  42. package/src/version.ts +1 -1
  43. package/version.d.mts +1 -1
  44. package/version.d.ts +1 -1
  45. package/version.js +1 -1
  46. package/version.mjs +1 -1
@@ -20,18 +20,42 @@ export declare class Videos extends APIResource {
20
20
  * Permanently delete a completed or failed video and its stored assets.
21
21
  */
22
22
  delete(videoID: string, options?: RequestOptions): APIPromise<VideoDeleteResponse>;
23
+ /**
24
+ * Create a character from an uploaded video.
25
+ */
26
+ createCharacter(body: VideoCreateCharacterParams, options?: RequestOptions): APIPromise<VideoCreateCharacterResponse>;
23
27
  /**
24
28
  * Download the generated video bytes or a derived preview asset.
25
29
  *
26
30
  * Streams the rendered video content for the specified video job.
27
31
  */
28
32
  downloadContent(videoID: string, query?: VideoDownloadContentParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
33
+ /**
34
+ * Create a new video generation job by editing a source video or existing
35
+ * generated video.
36
+ */
37
+ edit(body: VideoEditParams, options?: RequestOptions): APIPromise<Video>;
38
+ /**
39
+ * Create an extension of a completed video.
40
+ */
41
+ extend(body: VideoExtendParams, options?: RequestOptions): APIPromise<Video>;
42
+ /**
43
+ * Fetch a character.
44
+ */
45
+ getCharacter(characterID: string, options?: RequestOptions): APIPromise<VideoGetCharacterResponse>;
29
46
  /**
30
47
  * Create a remix of a completed video using a refreshed prompt.
31
48
  */
32
49
  remix(videoID: string, body: VideoRemixParams, options?: RequestOptions): APIPromise<Video>;
33
50
  }
34
51
  export type VideosPage = ConversationCursorPage<Video>;
52
+ export interface ImageInputReferenceParam {
53
+ file_id?: string;
54
+ /**
55
+ * A fully qualified URL or base64-encoded data URL.
56
+ */
57
+ image_url?: string;
58
+ }
35
59
  /**
36
60
  * Structured information describing a generated video job.
37
61
  */
@@ -123,15 +147,43 @@ export interface VideoDeleteResponse {
123
147
  */
124
148
  object: 'video.deleted';
125
149
  }
150
+ export interface VideoCreateCharacterResponse {
151
+ /**
152
+ * Identifier for the character creation cameo.
153
+ */
154
+ id: string | null;
155
+ /**
156
+ * Unix timestamp (in seconds) when the character was created.
157
+ */
158
+ created_at: number;
159
+ /**
160
+ * Display name for the character.
161
+ */
162
+ name: string | null;
163
+ }
164
+ export interface VideoGetCharacterResponse {
165
+ /**
166
+ * Identifier for the character creation cameo.
167
+ */
168
+ id: string | null;
169
+ /**
170
+ * Unix timestamp (in seconds) when the character was created.
171
+ */
172
+ created_at: number;
173
+ /**
174
+ * Display name for the character.
175
+ */
176
+ name: string | null;
177
+ }
126
178
  export interface VideoCreateParams {
127
179
  /**
128
180
  * Text prompt that describes the video to generate.
129
181
  */
130
182
  prompt: string;
131
183
  /**
132
- * Optional multipart reference asset that guides generation.
184
+ * Optional reference asset upload or reference object that guides generation.
133
185
  */
134
- input_reference?: Uploadable;
186
+ input_reference?: Uploadable | ImageInputReferenceParam;
135
187
  /**
136
188
  * The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults
137
189
  * to `sora-2`.
@@ -154,12 +206,69 @@ export interface VideoListParams extends ConversationCursorPageParams {
154
206
  */
155
207
  order?: 'asc' | 'desc';
156
208
  }
209
+ export interface VideoCreateCharacterParams {
210
+ /**
211
+ * Display name for this API character.
212
+ */
213
+ name: string;
214
+ /**
215
+ * Video file used to create a character.
216
+ */
217
+ video: Uploadable;
218
+ }
157
219
  export interface VideoDownloadContentParams {
158
220
  /**
159
221
  * Which downloadable asset to return. Defaults to the MP4 video.
160
222
  */
161
223
  variant?: 'video' | 'thumbnail' | 'spritesheet';
162
224
  }
225
+ export interface VideoEditParams {
226
+ /**
227
+ * Text prompt that describes how to edit the source video.
228
+ */
229
+ prompt: string;
230
+ /**
231
+ * Reference to the completed video to edit.
232
+ */
233
+ video: Uploadable | VideoEditParams.VideoReferenceInputParam;
234
+ }
235
+ export declare namespace VideoEditParams {
236
+ /**
237
+ * Reference to the completed video.
238
+ */
239
+ interface VideoReferenceInputParam {
240
+ /**
241
+ * The identifier of the completed video.
242
+ */
243
+ id: string;
244
+ }
245
+ }
246
+ export interface VideoExtendParams {
247
+ /**
248
+ * Updated text prompt that directs the extension generation.
249
+ */
250
+ prompt: string;
251
+ /**
252
+ * Length of the newly generated extension segment in seconds (allowed values: 4,
253
+ * 8, 12, 16, 20).
254
+ */
255
+ seconds: VideoSeconds;
256
+ /**
257
+ * Reference to the completed video to extend.
258
+ */
259
+ video: Uploadable | VideoExtendParams.VideoReferenceInputParam;
260
+ }
261
+ export declare namespace VideoExtendParams {
262
+ /**
263
+ * Reference to the completed video.
264
+ */
265
+ interface VideoReferenceInputParam {
266
+ /**
267
+ * The identifier of the completed video.
268
+ */
269
+ id: string;
270
+ }
271
+ }
163
272
  export interface VideoRemixParams {
164
273
  /**
165
274
  * Updated text prompt that directs the remix generation.
@@ -167,6 +276,6 @@ export interface VideoRemixParams {
167
276
  prompt: string;
168
277
  }
169
278
  export declare namespace Videos {
170
- export { type Video as Video, type VideoCreateError as VideoCreateError, type VideoModel as VideoModel, type VideoSeconds as VideoSeconds, type VideoSize as VideoSize, type VideoDeleteResponse as VideoDeleteResponse, type VideosPage as VideosPage, type VideoCreateParams as VideoCreateParams, type VideoListParams as VideoListParams, type VideoDownloadContentParams as VideoDownloadContentParams, type VideoRemixParams as VideoRemixParams, };
279
+ export { type ImageInputReferenceParam as ImageInputReferenceParam, type Video as Video, type VideoCreateError as VideoCreateError, type VideoModel as VideoModel, type VideoSeconds as VideoSeconds, type VideoSize as VideoSize, type VideoDeleteResponse as VideoDeleteResponse, type VideoCreateCharacterResponse as VideoCreateCharacterResponse, type VideoGetCharacterResponse as VideoGetCharacterResponse, type VideosPage as VideosPage, type VideoCreateParams as VideoCreateParams, type VideoListParams as VideoListParams, type VideoCreateCharacterParams as VideoCreateCharacterParams, type VideoDownloadContentParams as VideoDownloadContentParams, type VideoEditParams as VideoEditParams, type VideoExtendParams as VideoExtendParams, type VideoRemixParams as VideoRemixParams, };
171
280
  }
172
281
  //# sourceMappingURL=videos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"videos.d.ts","sourceRoot":"","sources":["../src/resources/videos.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,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AAwB,CAAC;CAC9D;AAED,yBAAiB,eAAe,CAAC;IAC/B;;OAEG;IACH,UAAiB,wBAAwB;QACvC;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,EAAE,YAAY,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC,wBAAwB,CAAC;CAChE;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;OAEG;IACH,UAAiB,wBAAwB;QACvC;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -12,7 +12,7 @@ class Videos extends resource_1.APIResource {
12
12
  * Create a new video generation job from a prompt and optional reference assets.
13
13
  */
14
14
  create(body, options) {
15
- return this._client.post('/videos', (0, uploads_1.maybeMultipartFormRequestOptions)({ body, ...options }, this._client));
15
+ return this._client.post('/videos', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
16
16
  }
17
17
  /**
18
18
  * Fetch the latest metadata for a generated video.
@@ -32,6 +32,12 @@ class Videos extends resource_1.APIResource {
32
32
  delete(videoID, options) {
33
33
  return this._client.delete((0, path_1.path) `/videos/${videoID}`, options);
34
34
  }
35
+ /**
36
+ * Create a character from an uploaded video.
37
+ */
38
+ createCharacter(body, options) {
39
+ return this._client.post('/videos/characters', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
40
+ }
35
41
  /**
36
42
  * Download the generated video bytes or a derived preview asset.
37
43
  *
@@ -45,6 +51,25 @@ class Videos extends resource_1.APIResource {
45
51
  __binaryResponse: true,
46
52
  });
47
53
  }
54
+ /**
55
+ * Create a new video generation job by editing a source video or existing
56
+ * generated video.
57
+ */
58
+ edit(body, options) {
59
+ return this._client.post('/videos/edits', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
60
+ }
61
+ /**
62
+ * Create an extension of a completed video.
63
+ */
64
+ extend(body, options) {
65
+ return this._client.post('/videos/extensions', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
66
+ }
67
+ /**
68
+ * Fetch a character.
69
+ */
70
+ getCharacter(characterID, options) {
71
+ return this._client.get((0, path_1.path) `/videos/characters/${characterID}`, options);
72
+ }
48
73
  /**
49
74
  * Create a remix of a completed video using a refreshed prompt.
50
75
  */
@@ -1 +1 @@
1
- {"version":3,"file":"videos.js","sourceRoot":"","sources":["../src/resources/videos.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4G;AAE5G,oDAAmD;AAEnD,oDAAuE;AACvE,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;Q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,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACrE,CAAC;IACJ,CAAC;CACF;AApGD,wBAoGC"}
@@ -2,14 +2,14 @@
2
2
  import { APIResource } from "../core/resource.mjs";
3
3
  import { ConversationCursorPage } from "../core/pagination.mjs";
4
4
  import { buildHeaders } from "../internal/headers.mjs";
5
- import { maybeMultipartFormRequestOptions } from "../internal/uploads.mjs";
5
+ import { maybeMultipartFormRequestOptions, multipartFormRequestOptions } from "../internal/uploads.mjs";
6
6
  import { path } from "../internal/utils/path.mjs";
7
7
  export class Videos extends APIResource {
8
8
  /**
9
9
  * Create a new video generation job from a prompt and optional reference assets.
10
10
  */
11
11
  create(body, options) {
12
- return this._client.post('/videos', maybeMultipartFormRequestOptions({ body, ...options }, this._client));
12
+ return this._client.post('/videos', multipartFormRequestOptions({ body, ...options }, this._client));
13
13
  }
14
14
  /**
15
15
  * Fetch the latest metadata for a generated video.
@@ -29,6 +29,12 @@ export class Videos extends APIResource {
29
29
  delete(videoID, options) {
30
30
  return this._client.delete(path `/videos/${videoID}`, options);
31
31
  }
32
+ /**
33
+ * Create a character from an uploaded video.
34
+ */
35
+ createCharacter(body, options) {
36
+ return this._client.post('/videos/characters', multipartFormRequestOptions({ body, ...options }, this._client));
37
+ }
32
38
  /**
33
39
  * Download the generated video bytes or a derived preview asset.
34
40
  *
@@ -42,6 +48,25 @@ export class Videos extends APIResource {
42
48
  __binaryResponse: true,
43
49
  });
44
50
  }
51
+ /**
52
+ * Create a new video generation job by editing a source video or existing
53
+ * generated video.
54
+ */
55
+ edit(body, options) {
56
+ return this._client.post('/videos/edits', multipartFormRequestOptions({ body, ...options }, this._client));
57
+ }
58
+ /**
59
+ * Create an extension of a completed video.
60
+ */
61
+ extend(body, options) {
62
+ return this._client.post('/videos/extensions', multipartFormRequestOptions({ body, ...options }, this._client));
63
+ }
64
+ /**
65
+ * Fetch a character.
66
+ */
67
+ getCharacter(characterID, options) {
68
+ return this._client.get(path `/videos/characters/${characterID}`, options);
69
+ }
45
70
  /**
46
71
  * Create a remix of a completed video using a refreshed prompt.
47
72
  */
@@ -1 +1 @@
1
- {"version":3,"file":"videos.mjs","sourceRoot":"","sources":["../src/resources/videos.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,sBAAsB,EAAkD;OAE1E,EAAE,YAAY,EAAE;OAEhB,EAAE,gCAAgC,EAAE;OACpC,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,gCAAgC,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5G,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,sBAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,WAAW,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;OAIG;IACH,eAAe,CACb,OAAe,EACf,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,OAAO,UAAU,EAA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H,YAAY,CAAC,WAAmB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAe,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,WAAW,OAAO,QAAQ,EAC9B,gCAAgC,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACrE,CAAC;IACJ,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -93,11 +93,17 @@ import {
93
93
  Moderations,
94
94
  } from './resources/moderations';
95
95
  import {
96
+ ImageInputReferenceParam,
96
97
  Video,
98
+ VideoCreateCharacterParams,
99
+ VideoCreateCharacterResponse,
97
100
  VideoCreateError,
98
101
  VideoCreateParams,
99
102
  VideoDeleteResponse,
100
103
  VideoDownloadContentParams,
104
+ VideoEditParams,
105
+ VideoExtendParams,
106
+ VideoGetCharacterResponse,
101
107
  VideoListParams,
102
108
  VideoModel,
103
109
  VideoRemixParams,
@@ -525,8 +531,9 @@ export class OpenAI {
525
531
  : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
526
532
 
527
533
  const defaultQuery = this.defaultQuery();
528
- if (!isEmptyObj(defaultQuery)) {
529
- query = { ...defaultQuery, ...query };
534
+ const pathQuery = Object.fromEntries(url.searchParams);
535
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
536
+ query = { ...pathQuery, ...defaultQuery, ...query };
530
537
  }
531
538
 
532
539
  if (typeof query === 'object' && query && !Array.isArray(query)) {
@@ -1326,16 +1333,22 @@ export declare namespace OpenAI {
1326
1333
 
1327
1334
  export {
1328
1335
  Videos as Videos,
1336
+ type ImageInputReferenceParam as ImageInputReferenceParam,
1329
1337
  type Video as Video,
1330
1338
  type VideoCreateError as VideoCreateError,
1331
1339
  type VideoModel as VideoModel,
1332
1340
  type VideoSeconds as VideoSeconds,
1333
1341
  type VideoSize as VideoSize,
1334
1342
  type VideoDeleteResponse as VideoDeleteResponse,
1343
+ type VideoCreateCharacterResponse as VideoCreateCharacterResponse,
1344
+ type VideoGetCharacterResponse as VideoGetCharacterResponse,
1335
1345
  type VideosPage as VideosPage,
1336
1346
  type VideoCreateParams as VideoCreateParams,
1337
1347
  type VideoListParams as VideoListParams,
1348
+ type VideoCreateCharacterParams as VideoCreateCharacterParams,
1338
1349
  type VideoDownloadContentParams as VideoDownloadContentParams,
1350
+ type VideoEditParams as VideoEditParams,
1351
+ type VideoExtendParams as VideoExtendParams,
1339
1352
  type VideoRemixParams as VideoRemixParams,
1340
1353
  };
1341
1354
 
@@ -130,15 +130,21 @@ export {
130
130
  } from './vector-stores/vector-stores';
131
131
  export {
132
132
  Videos,
133
+ type ImageInputReferenceParam,
133
134
  type Video,
134
135
  type VideoCreateError,
135
136
  type VideoModel,
136
137
  type VideoSeconds,
137
138
  type VideoSize,
138
139
  type VideoDeleteResponse,
140
+ type VideoCreateCharacterResponse,
141
+ type VideoGetCharacterResponse,
139
142
  type VideoCreateParams,
140
143
  type VideoListParams,
144
+ type VideoCreateCharacterParams,
141
145
  type VideoDownloadContentParams,
146
+ type VideoEditParams,
147
+ type VideoExtendParams,
142
148
  type VideoRemixParams,
143
149
  type VideosPage,
144
150
  } from './videos';
@@ -22,7 +22,7 @@ export class WebSocketError extends OpenAIError {
22
22
 
23
23
  type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
24
24
 
25
- type WebsocketEvents = Simplify<
25
+ type WebSocketEvents = Simplify<
26
26
  {
27
27
  event: (event: ResponsesAPI.ResponsesServerEvent) => void;
28
28
  error: (error: WebSocketError) => void;
@@ -33,14 +33,14 @@ type WebsocketEvents = Simplify<
33
33
  }
34
34
  >;
35
35
 
36
- export abstract class ResponsesEmitter extends EventEmitter<WebsocketEvents> {
36
+ export abstract class ResponsesEmitter extends EventEmitter<WebSocketEvents> {
37
37
  /**
38
38
  * Send an event to the API.
39
39
  */
40
40
  abstract send(event: ResponsesAPI.ResponsesClientEvent): void;
41
41
 
42
42
  /**
43
- * Close the websocket connection.
43
+ * Close the WebSocket connection.
44
44
  */
45
45
  abstract close(props?: { code: number; reason: string }): void;
46
46
 
@@ -80,7 +80,7 @@ export function buildURL(client: OpenAI, query?: object | null): URL {
80
80
  if (query) {
81
81
  url.search = stringifyQuery(query);
82
82
  }
83
- url.protocol = 'wss';
83
+ url.protocol = url.protocol === 'http:' ? 'ws:' : 'wss:';
84
84
  return url;
85
85
  }
86
86
 
@@ -3300,12 +3300,6 @@ export interface ResponseInputFile {
3300
3300
  */
3301
3301
  type: 'input_file';
3302
3302
 
3303
- /**
3304
- * The detail level of the file to be sent to the model. One of `high` or `low`.
3305
- * Defaults to `high`.
3306
- */
3307
- detail?: 'low' | 'high';
3308
-
3309
3303
  /**
3310
3304
  * The content of the file to be sent to the model.
3311
3305
  */
@@ -3336,12 +3330,6 @@ export interface ResponseInputFileContent {
3336
3330
  */
3337
3331
  type: 'input_file';
3338
3332
 
3339
- /**
3340
- * The detail level of the file to be sent to the model. One of `high` or `low`.
3341
- * Defaults to `high`.
3342
- */
3343
- detail?: 'high' | 'low';
3344
-
3345
3333
  /**
3346
3334
  * The base64-encoded data of the file to be sent to the model.
3347
3335
  */