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.
- package/CHANGELOG.md +36 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -2
- package/client.js.map +1 -1
- package/client.mjs +3 -2
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/chat/completions/completions.d.mts +8 -8
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +8 -8
- 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/completions.d.mts +2 -2
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +2 -2
- package/resources/completions.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/responses/internal-base.d.mts +3 -3
- package/resources/responses/internal-base.d.ts +3 -3
- package/resources/responses/internal-base.js +1 -1
- package/resources/responses/internal-base.js.map +1 -1
- package/resources/responses/internal-base.mjs +1 -1
- package/resources/responses/internal-base.mjs.map +1 -1
- package/resources/responses/responses.d.mts +12 -22
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +12 -22
- 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/videos.d.mts +112 -3
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +112 -3
- package/resources/videos.d.ts.map +1 -1
- package/resources/videos.js +26 -1
- package/resources/videos.js.map +1 -1
- package/resources/videos.mjs +27 -2
- package/resources/videos.mjs.map +1 -1
- package/src/client.ts +15 -2
- package/src/resources/chat/completions/completions.ts +8 -9
- package/src/resources/completions.ts +2 -2
- package/src/resources/index.ts +6 -0
- package/src/resources/responses/api.md +1 -1
- package/src/resources/responses/internal-base.ts +4 -4
- package/src/resources/responses/responses.ts +13 -25
- package/src/resources/videos.ts +160 -4
- 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
package/src/resources/videos.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ConversationCursorPage, type ConversationCursorPageParams, PagePromise
|
|
|
6
6
|
import { type Uploadable } from '../core/uploads';
|
|
7
7
|
import { buildHeaders } from '../internal/headers';
|
|
8
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
|
-
import { maybeMultipartFormRequestOptions } from '../internal/uploads';
|
|
9
|
+
import { maybeMultipartFormRequestOptions, multipartFormRequestOptions } from '../internal/uploads';
|
|
10
10
|
import { path } from '../internal/utils/path';
|
|
11
11
|
|
|
12
12
|
export class Videos extends APIResource {
|
|
@@ -14,7 +14,7 @@ export class Videos extends APIResource {
|
|
|
14
14
|
* Create a new video generation job from a prompt and optional reference assets.
|
|
15
15
|
*/
|
|
16
16
|
create(body: VideoCreateParams, options?: RequestOptions): APIPromise<Video> {
|
|
17
|
-
return this._client.post('/videos',
|
|
17
|
+
return this._client.post('/videos', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -41,6 +41,19 @@ export class Videos extends APIResource {
|
|
|
41
41
|
return this._client.delete(path`/videos/${videoID}`, options);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Create a character from an uploaded video.
|
|
46
|
+
*/
|
|
47
|
+
createCharacter(
|
|
48
|
+
body: VideoCreateCharacterParams,
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): APIPromise<VideoCreateCharacterResponse> {
|
|
51
|
+
return this._client.post(
|
|
52
|
+
'/videos/characters',
|
|
53
|
+
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
44
57
|
/**
|
|
45
58
|
* Download the generated video bytes or a derived preview asset.
|
|
46
59
|
*
|
|
@@ -59,6 +72,34 @@ export class Videos extends APIResource {
|
|
|
59
72
|
});
|
|
60
73
|
}
|
|
61
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Create a new video generation job by editing a source video or existing
|
|
77
|
+
* generated video.
|
|
78
|
+
*/
|
|
79
|
+
edit(body: VideoEditParams, options?: RequestOptions): APIPromise<Video> {
|
|
80
|
+
return this._client.post(
|
|
81
|
+
'/videos/edits',
|
|
82
|
+
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Create an extension of a completed video.
|
|
88
|
+
*/
|
|
89
|
+
extend(body: VideoExtendParams, options?: RequestOptions): APIPromise<Video> {
|
|
90
|
+
return this._client.post(
|
|
91
|
+
'/videos/extensions',
|
|
92
|
+
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Fetch a character.
|
|
98
|
+
*/
|
|
99
|
+
getCharacter(characterID: string, options?: RequestOptions): APIPromise<VideoGetCharacterResponse> {
|
|
100
|
+
return this._client.get(path`/videos/characters/${characterID}`, options);
|
|
101
|
+
}
|
|
102
|
+
|
|
62
103
|
/**
|
|
63
104
|
* Create a remix of a completed video using a refreshed prompt.
|
|
64
105
|
*/
|
|
@@ -72,6 +113,15 @@ export class Videos extends APIResource {
|
|
|
72
113
|
|
|
73
114
|
export type VideosPage = ConversationCursorPage<Video>;
|
|
74
115
|
|
|
116
|
+
export interface ImageInputReferenceParam {
|
|
117
|
+
file_id?: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* A fully qualified URL or base64-encoded data URL.
|
|
121
|
+
*/
|
|
122
|
+
image_url?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
75
125
|
/**
|
|
76
126
|
* Structured information describing a generated video job.
|
|
77
127
|
*/
|
|
@@ -190,6 +240,40 @@ export interface VideoDeleteResponse {
|
|
|
190
240
|
object: 'video.deleted';
|
|
191
241
|
}
|
|
192
242
|
|
|
243
|
+
export interface VideoCreateCharacterResponse {
|
|
244
|
+
/**
|
|
245
|
+
* Identifier for the character creation cameo.
|
|
246
|
+
*/
|
|
247
|
+
id: string | null;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Unix timestamp (in seconds) when the character was created.
|
|
251
|
+
*/
|
|
252
|
+
created_at: number;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Display name for the character.
|
|
256
|
+
*/
|
|
257
|
+
name: string | null;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface VideoGetCharacterResponse {
|
|
261
|
+
/**
|
|
262
|
+
* Identifier for the character creation cameo.
|
|
263
|
+
*/
|
|
264
|
+
id: string | null;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Unix timestamp (in seconds) when the character was created.
|
|
268
|
+
*/
|
|
269
|
+
created_at: number;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Display name for the character.
|
|
273
|
+
*/
|
|
274
|
+
name: string | null;
|
|
275
|
+
}
|
|
276
|
+
|
|
193
277
|
export interface VideoCreateParams {
|
|
194
278
|
/**
|
|
195
279
|
* Text prompt that describes the video to generate.
|
|
@@ -197,9 +281,9 @@ export interface VideoCreateParams {
|
|
|
197
281
|
prompt: string;
|
|
198
282
|
|
|
199
283
|
/**
|
|
200
|
-
* Optional
|
|
284
|
+
* Optional reference asset upload or reference object that guides generation.
|
|
201
285
|
*/
|
|
202
|
-
input_reference?: Uploadable;
|
|
286
|
+
input_reference?: Uploadable | ImageInputReferenceParam;
|
|
203
287
|
|
|
204
288
|
/**
|
|
205
289
|
* The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults
|
|
@@ -227,6 +311,18 @@ export interface VideoListParams extends ConversationCursorPageParams {
|
|
|
227
311
|
order?: 'asc' | 'desc';
|
|
228
312
|
}
|
|
229
313
|
|
|
314
|
+
export interface VideoCreateCharacterParams {
|
|
315
|
+
/**
|
|
316
|
+
* Display name for this API character.
|
|
317
|
+
*/
|
|
318
|
+
name: string;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Video file used to create a character.
|
|
322
|
+
*/
|
|
323
|
+
video: Uploadable;
|
|
324
|
+
}
|
|
325
|
+
|
|
230
326
|
export interface VideoDownloadContentParams {
|
|
231
327
|
/**
|
|
232
328
|
* Which downloadable asset to return. Defaults to the MP4 video.
|
|
@@ -234,6 +330,60 @@ export interface VideoDownloadContentParams {
|
|
|
234
330
|
variant?: 'video' | 'thumbnail' | 'spritesheet';
|
|
235
331
|
}
|
|
236
332
|
|
|
333
|
+
export interface VideoEditParams {
|
|
334
|
+
/**
|
|
335
|
+
* Text prompt that describes how to edit the source video.
|
|
336
|
+
*/
|
|
337
|
+
prompt: string;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Reference to the completed video to edit.
|
|
341
|
+
*/
|
|
342
|
+
video: Uploadable | VideoEditParams.VideoReferenceInputParam;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export namespace VideoEditParams {
|
|
346
|
+
/**
|
|
347
|
+
* Reference to the completed video.
|
|
348
|
+
*/
|
|
349
|
+
export interface VideoReferenceInputParam {
|
|
350
|
+
/**
|
|
351
|
+
* The identifier of the completed video.
|
|
352
|
+
*/
|
|
353
|
+
id: string;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface VideoExtendParams {
|
|
358
|
+
/**
|
|
359
|
+
* Updated text prompt that directs the extension generation.
|
|
360
|
+
*/
|
|
361
|
+
prompt: string;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Length of the newly generated extension segment in seconds (allowed values: 4,
|
|
365
|
+
* 8, 12, 16, 20).
|
|
366
|
+
*/
|
|
367
|
+
seconds: VideoSeconds;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Reference to the completed video to extend.
|
|
371
|
+
*/
|
|
372
|
+
video: Uploadable | VideoExtendParams.VideoReferenceInputParam;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export namespace VideoExtendParams {
|
|
376
|
+
/**
|
|
377
|
+
* Reference to the completed video.
|
|
378
|
+
*/
|
|
379
|
+
export interface VideoReferenceInputParam {
|
|
380
|
+
/**
|
|
381
|
+
* The identifier of the completed video.
|
|
382
|
+
*/
|
|
383
|
+
id: string;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
237
387
|
export interface VideoRemixParams {
|
|
238
388
|
/**
|
|
239
389
|
* Updated text prompt that directs the remix generation.
|
|
@@ -243,16 +393,22 @@ export interface VideoRemixParams {
|
|
|
243
393
|
|
|
244
394
|
export declare namespace Videos {
|
|
245
395
|
export {
|
|
396
|
+
type ImageInputReferenceParam as ImageInputReferenceParam,
|
|
246
397
|
type Video as Video,
|
|
247
398
|
type VideoCreateError as VideoCreateError,
|
|
248
399
|
type VideoModel as VideoModel,
|
|
249
400
|
type VideoSeconds as VideoSeconds,
|
|
250
401
|
type VideoSize as VideoSize,
|
|
251
402
|
type VideoDeleteResponse as VideoDeleteResponse,
|
|
403
|
+
type VideoCreateCharacterResponse as VideoCreateCharacterResponse,
|
|
404
|
+
type VideoGetCharacterResponse as VideoGetCharacterResponse,
|
|
252
405
|
type VideosPage as VideosPage,
|
|
253
406
|
type VideoCreateParams as VideoCreateParams,
|
|
254
407
|
type VideoListParams as VideoListParams,
|
|
408
|
+
type VideoCreateCharacterParams as VideoCreateCharacterParams,
|
|
255
409
|
type VideoDownloadContentParams as VideoDownloadContentParams,
|
|
410
|
+
type VideoEditParams as VideoEditParams,
|
|
411
|
+
type VideoExtendParams as VideoExtendParams,
|
|
256
412
|
type VideoRemixParams as VideoRemixParams,
|
|
257
413
|
};
|
|
258
414
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.28.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.28.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.28.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.28.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|