openai 6.26.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 (59) hide show
  1. package/CHANGELOG.md +36 -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/chat/completions/completions.d.mts +8 -8
  12. package/resources/chat/completions/completions.d.mts.map +1 -1
  13. package/resources/chat/completions/completions.d.ts +8 -8
  14. package/resources/chat/completions/completions.d.ts.map +1 -1
  15. package/resources/chat/completions/completions.js.map +1 -1
  16. package/resources/chat/completions/completions.mjs.map +1 -1
  17. package/resources/completions.d.mts +2 -2
  18. package/resources/completions.d.mts.map +1 -1
  19. package/resources/completions.d.ts +2 -2
  20. package/resources/completions.d.ts.map +1 -1
  21. package/resources/index.d.mts +1 -1
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +1 -1
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js.map +1 -1
  26. package/resources/index.mjs.map +1 -1
  27. package/resources/responses/internal-base.d.mts +3 -3
  28. package/resources/responses/internal-base.d.ts +3 -3
  29. package/resources/responses/internal-base.js +1 -1
  30. package/resources/responses/internal-base.js.map +1 -1
  31. package/resources/responses/internal-base.mjs +1 -1
  32. package/resources/responses/internal-base.mjs.map +1 -1
  33. package/resources/responses/responses.d.mts +12 -22
  34. package/resources/responses/responses.d.mts.map +1 -1
  35. package/resources/responses/responses.d.ts +12 -22
  36. package/resources/responses/responses.d.ts.map +1 -1
  37. package/resources/responses/responses.js.map +1 -1
  38. package/resources/responses/responses.mjs.map +1 -1
  39. package/resources/videos.d.mts +112 -3
  40. package/resources/videos.d.mts.map +1 -1
  41. package/resources/videos.d.ts +112 -3
  42. package/resources/videos.d.ts.map +1 -1
  43. package/resources/videos.js +26 -1
  44. package/resources/videos.js.map +1 -1
  45. package/resources/videos.mjs +27 -2
  46. package/resources/videos.mjs.map +1 -1
  47. package/src/client.ts +15 -2
  48. package/src/resources/chat/completions/completions.ts +8 -9
  49. package/src/resources/completions.ts +2 -2
  50. package/src/resources/index.ts +6 -0
  51. package/src/resources/responses/api.md +1 -1
  52. package/src/resources/responses/internal-base.ts +4 -4
  53. package/src/resources/responses/responses.ts +13 -25
  54. package/src/resources/videos.ts +160 -4
  55. package/src/version.ts +1 -1
  56. package/version.d.mts +1 -1
  57. package/version.d.ts +1 -1
  58. package/version.js +1 -1
  59. 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,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,WAAW,EAAE;OAC1E,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAI5E;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAItE;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC;IAIjC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAIlF;;;;OAIG;IACH,eAAe,CACb,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC;IASvB;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,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AyB,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;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAA,0CAAgC,EAAC,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,IAAA,WAAI,EAAA,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,mCAA6B,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,IAAA,WAAI,EAAA,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,IAAA,WAAI,E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,CAChE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,WAAmB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,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,IAAA,WAAI,EAAA,WAAW,OAAO,QAAQ,EAC9B,IAAA,0CAAgC,EAAC,EAAE,IAAI,EAAE,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,sBA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,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,eAAe,EACf,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,oBAAoB,EACpB,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,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
 
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
- import * as CompletionsCompletionsAPI from './completions';
4
+ import * as ChatCompletionsAPI from './completions';
5
5
  import * as CompletionsAPI from '../../completions';
6
6
  import * as Shared from '../../shared';
7
7
  import * as MessagesAPI from './messages';
@@ -338,7 +338,7 @@ export namespace ChatCompletion {
338
338
  /**
339
339
  * A chat completion message generated by the model.
340
340
  */
341
- message: CompletionsCompletionsAPI.ChatCompletionMessage;
341
+ message: ChatCompletionsAPI.ChatCompletionMessage;
342
342
  }
343
343
 
344
344
  export namespace Choice {
@@ -349,12 +349,12 @@ export namespace ChatCompletion {
349
349
  /**
350
350
  * A list of message content tokens with log probability information.
351
351
  */
352
- content: Array<CompletionsCompletionsAPI.ChatCompletionTokenLogprob> | null;
352
+ content: Array<ChatCompletionsAPI.ChatCompletionTokenLogprob> | null;
353
353
 
354
354
  /**
355
355
  * A list of message refusal tokens with log probability information.
356
356
  */
357
- refusal: Array<CompletionsCompletionsAPI.ChatCompletionTokenLogprob> | null;
357
+ refusal: Array<ChatCompletionsAPI.ChatCompletionTokenLogprob> | null;
358
358
  }
359
359
  }
360
360
  }
@@ -701,12 +701,12 @@ export namespace ChatCompletionChunk {
701
701
  /**
702
702
  * A list of message content tokens with log probability information.
703
703
  */
704
- content: Array<CompletionsCompletionsAPI.ChatCompletionTokenLogprob> | null;
704
+ content: Array<ChatCompletionsAPI.ChatCompletionTokenLogprob> | null;
705
705
 
706
706
  /**
707
707
  * A list of message refusal tokens with log probability information.
708
708
  */
709
- refusal: Array<CompletionsCompletionsAPI.ChatCompletionTokenLogprob> | null;
709
+ refusal: Array<ChatCompletionsAPI.ChatCompletionTokenLogprob> | null;
710
710
  }
711
711
  }
712
712
  }
@@ -1923,9 +1923,8 @@ export namespace ChatCompletionCreateParams {
1923
1923
  }
1924
1924
 
1925
1925
  export type ChatCompletionCreateParamsNonStreaming =
1926
- CompletionsCompletionsAPI.ChatCompletionCreateParamsNonStreaming;
1927
- export type ChatCompletionCreateParamsStreaming =
1928
- CompletionsCompletionsAPI.ChatCompletionCreateParamsStreaming;
1926
+ ChatCompletionsAPI.ChatCompletionCreateParamsNonStreaming;
1927
+ export type ChatCompletionCreateParamsStreaming = ChatCompletionsAPI.ChatCompletionCreateParamsStreaming;
1929
1928
  }
1930
1929
 
1931
1930
  export interface ChatCompletionCreateParamsNonStreaming extends ChatCompletionCreateParamsBase {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as CompletionsAPI from './completions';
5
- import * as CompletionsCompletionsAPI from './chat/completions/completions';
5
+ import * as ChatCompletionsAPI from './chat/completions/completions';
6
6
  import { APIPromise } from '../core/api-promise';
7
7
  import { Stream } from '../core/streaming';
8
8
  import { RequestOptions } from '../internal/request-options';
@@ -324,7 +324,7 @@ export interface CompletionCreateParamsBase {
324
324
  /**
325
325
  * Options for streaming response. Only set this when you set `stream: true`.
326
326
  */
327
- stream_options?: CompletionsCompletionsAPI.ChatCompletionStreamOptions | null;
327
+ stream_options?: ChatCompletionsAPI.ChatCompletionStreamOptions | null;
328
328
 
329
329
  /**
330
330
  * The suffix that comes after a completion of inserted text.
@@ -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';
@@ -7,7 +7,7 @@ Types:
7
7
  - <code><a href="./src/resources/responses/responses.ts">ComputerAction</a></code>
8
8
  - <code><a href="./src/resources/responses/responses.ts">ComputerActionList</a></code>
9
9
  - <code><a href="./src/resources/responses/responses.ts">ComputerTool</a></code>
10
- - <code><a href="./src/resources/responses/responses.ts">ComputerUseTool</a></code>
10
+ - <code><a href="./src/resources/responses/responses.ts">ComputerUsePreviewTool</a></code>
11
11
  - <code><a href="./src/resources/responses/responses.ts">ContainerAuto</a></code>
12
12
  - <code><a href="./src/resources/responses/responses.ts">ContainerNetworkPolicyAllowlist</a></code>
13
13
  - <code><a href="./src/resources/responses/responses.ts">ContainerNetworkPolicyDisabled</a></code>
@@ -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
 
@@ -493,6 +493,17 @@ export type ComputerActionList = Array<ComputerAction>;
493
493
  * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
494
494
  */
495
495
  export interface ComputerTool {
496
+ /**
497
+ * The type of the computer tool. Always `computer`.
498
+ */
499
+ type: 'computer';
500
+ }
501
+
502
+ /**
503
+ * A tool that controls a virtual computer. Learn more about the
504
+ * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
505
+ */
506
+ export interface ComputerUsePreviewTool {
496
507
  /**
497
508
  * The height of the computer display.
498
509
  */
@@ -514,17 +525,6 @@ export interface ComputerTool {
514
525
  type: 'computer_use_preview';
515
526
  }
516
527
 
517
- /**
518
- * A tool that controls a virtual computer. Learn more about the
519
- * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
520
- */
521
- export interface ComputerUseTool {
522
- /**
523
- * The type of the computer tool. Always `computer`.
524
- */
525
- type: 'computer';
526
- }
527
-
528
528
  export interface ContainerAuto {
529
529
  /**
530
530
  * Automatically creates a container for this request
@@ -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
  */
@@ -6638,8 +6626,8 @@ export interface SkillReference {
6638
6626
  export type Tool =
6639
6627
  | FunctionTool
6640
6628
  | FileSearchTool
6641
- | ComputerUseTool
6642
6629
  | ComputerTool
6630
+ | ComputerUsePreviewTool
6643
6631
  | WebSearchTool
6644
6632
  | Tool.Mcp
6645
6633
  | Tool.CodeInterpreter
@@ -7798,7 +7786,7 @@ export declare namespace Responses {
7798
7786
  type ComputerAction as ComputerAction,
7799
7787
  type ComputerActionList as ComputerActionList,
7800
7788
  type ComputerTool as ComputerTool,
7801
- type ComputerUseTool as ComputerUseTool,
7789
+ type ComputerUsePreviewTool as ComputerUsePreviewTool,
7802
7790
  type ContainerAuto as ContainerAuto,
7803
7791
  type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist,
7804
7792
  type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled,