@runwayml/sdk 4.2.0 → 4.4.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 (64) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/image-to-video.d.mts +1 -1
  12. package/resources/image-to-video.d.mts.map +1 -1
  13. package/resources/image-to-video.d.ts +1 -1
  14. package/resources/image-to-video.d.ts.map +1 -1
  15. package/resources/index.d.mts +1 -0
  16. package/resources/index.d.mts.map +1 -1
  17. package/resources/index.d.ts +1 -0
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js +3 -1
  20. package/resources/index.js.map +1 -1
  21. package/resources/index.mjs +1 -0
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/organization.d.mts +2 -2
  24. package/resources/organization.d.mts.map +1 -1
  25. package/resources/organization.d.ts +2 -2
  26. package/resources/organization.d.ts.map +1 -1
  27. package/resources/recipes.d.mts +2 -2
  28. package/resources/recipes.d.mts.map +1 -1
  29. package/resources/recipes.d.ts +2 -2
  30. package/resources/recipes.d.ts.map +1 -1
  31. package/resources/text-to-image.d.mts +3 -6
  32. package/resources/text-to-image.d.mts.map +1 -1
  33. package/resources/text-to-image.d.ts +3 -6
  34. package/resources/text-to-image.d.ts.map +1 -1
  35. package/resources/text-to-video.d.mts +1 -11
  36. package/resources/text-to-video.d.mts.map +1 -1
  37. package/resources/text-to-video.d.ts +1 -11
  38. package/resources/text-to-video.d.ts.map +1 -1
  39. package/resources/video-to-video.d.mts +2 -13
  40. package/resources/video-to-video.d.mts.map +1 -1
  41. package/resources/video-to-video.d.ts +2 -13
  42. package/resources/video-to-video.d.ts.map +1 -1
  43. package/resources/video-upscale.d.mts +60 -0
  44. package/resources/video-upscale.d.mts.map +1 -0
  45. package/resources/video-upscale.d.ts +60 -0
  46. package/resources/video-upscale.d.ts.map +1 -0
  47. package/resources/video-upscale.js +25 -0
  48. package/resources/video-upscale.js.map +1 -0
  49. package/resources/video-upscale.mjs +21 -0
  50. package/resources/video-upscale.mjs.map +1 -0
  51. package/src/client.ts +16 -0
  52. package/src/resources/image-to-video.ts +7 -1
  53. package/src/resources/index.ts +5 -0
  54. package/src/resources/organization.ts +5 -1
  55. package/src/resources/recipes.ts +2 -2
  56. package/src/resources/text-to-image.ts +3 -6
  57. package/src/resources/text-to-video.ts +7 -13
  58. package/src/resources/video-to-video.ts +8 -15
  59. package/src/resources/video-upscale.ts +82 -0
  60. package/src/version.ts +1 -1
  61. package/version.d.mts +1 -1
  62. package/version.d.ts +1 -1
  63. package/version.js +1 -1
  64. package/version.mjs +1 -1
@@ -0,0 +1,60 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { RequestOptions } from "../internal/request-options.mjs";
3
+ import { APIPromiseWithAwaitableTask } from "../lib/polling.mjs";
4
+ export declare class VideoUpscale extends APIResource {
5
+ /**
6
+ * This endpoint starts a task to upscale a video. Set `model` to choose the
7
+ * upscaler.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const videoUpscale = await client.videoUpscale.create({
12
+ * model: 'magnific_video_upscaler_creative',
13
+ * videoUri: 'https://example.com/video.mp4',
14
+ * });
15
+ * ```
16
+ */
17
+ create(body: VideoUpscaleCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<VideoUpscaleCreateResponse>;
18
+ }
19
+ export interface VideoUpscaleCreateResponse {
20
+ /**
21
+ * The ID of the task that was created. Use this to retrieve the task later.
22
+ */
23
+ id: string;
24
+ }
25
+ export interface VideoUpscaleCreateParams {
26
+ model: 'magnific_video_upscaler_creative';
27
+ /**
28
+ * A HTTPS URL.
29
+ */
30
+ videoUri: string;
31
+ /**
32
+ * How much AI-generated detail to add during upscaling, from 0 (faithful) to 100.
33
+ */
34
+ creativity?: number;
35
+ /**
36
+ * Processing style: `vivid` for enhanced color and detail, `natural` for faithful
37
+ * reproduction.
38
+ */
39
+ flavor?: 'vivid' | 'natural';
40
+ /**
41
+ * Whether to increase the output frame rate.
42
+ */
43
+ fpsBoost?: boolean;
44
+ /**
45
+ * Target output resolution from 720p to 4k. Defaults to `2k`.
46
+ */
47
+ resolution?: '720p' | '1k' | '2k' | '4k';
48
+ /**
49
+ * Sharpness intensity from 0 (none) to 100.
50
+ */
51
+ sharpen?: number;
52
+ /**
53
+ * Grain and texture enhancement from 0 to 100.
54
+ */
55
+ smartGrain?: number;
56
+ }
57
+ export declare namespace VideoUpscale {
58
+ export { type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse, type VideoUpscaleCreateParams as VideoUpscaleCreateParams, };
59
+ }
60
+ //# sourceMappingURL=video-upscale.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-upscale.d.mts","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAC7D,OAAO,EAAE,2BAA2B,EAA0B,2BAAuB;AAErF,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,0BAA0B,CAAC;CAK3D;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,kCAAkC,CAAC;IAE1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -0,0 +1,60 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { RequestOptions } from "../internal/request-options.js";
3
+ import { APIPromiseWithAwaitableTask } from "../lib/polling.js";
4
+ export declare class VideoUpscale extends APIResource {
5
+ /**
6
+ * This endpoint starts a task to upscale a video. Set `model` to choose the
7
+ * upscaler.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const videoUpscale = await client.videoUpscale.create({
12
+ * model: 'magnific_video_upscaler_creative',
13
+ * videoUri: 'https://example.com/video.mp4',
14
+ * });
15
+ * ```
16
+ */
17
+ create(body: VideoUpscaleCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<VideoUpscaleCreateResponse>;
18
+ }
19
+ export interface VideoUpscaleCreateResponse {
20
+ /**
21
+ * The ID of the task that was created. Use this to retrieve the task later.
22
+ */
23
+ id: string;
24
+ }
25
+ export interface VideoUpscaleCreateParams {
26
+ model: 'magnific_video_upscaler_creative';
27
+ /**
28
+ * A HTTPS URL.
29
+ */
30
+ videoUri: string;
31
+ /**
32
+ * How much AI-generated detail to add during upscaling, from 0 (faithful) to 100.
33
+ */
34
+ creativity?: number;
35
+ /**
36
+ * Processing style: `vivid` for enhanced color and detail, `natural` for faithful
37
+ * reproduction.
38
+ */
39
+ flavor?: 'vivid' | 'natural';
40
+ /**
41
+ * Whether to increase the output frame rate.
42
+ */
43
+ fpsBoost?: boolean;
44
+ /**
45
+ * Target output resolution from 720p to 4k. Defaults to `2k`.
46
+ */
47
+ resolution?: '720p' | '1k' | '2k' | '4k';
48
+ /**
49
+ * Sharpness intensity from 0 (none) to 100.
50
+ */
51
+ sharpen?: number;
52
+ /**
53
+ * Grain and texture enhancement from 0 to 100.
54
+ */
55
+ smartGrain?: number;
56
+ }
57
+ export declare namespace VideoUpscale {
58
+ export { type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse, type VideoUpscaleCreateParams as VideoUpscaleCreateParams, };
59
+ }
60
+ //# sourceMappingURL=video-upscale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-upscale.d.ts","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAC7D,OAAO,EAAE,2BAA2B,EAA0B,0BAAuB;AAErF,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,0BAA0B,CAAC;CAK3D;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,kCAAkC,CAAC;IAE1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.VideoUpscale = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const polling_1 = require("../lib/polling.js");
7
+ class VideoUpscale extends resource_1.APIResource {
8
+ /**
9
+ * This endpoint starts a task to upscale a video. Set `model` to choose the
10
+ * upscaler.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const videoUpscale = await client.videoUpscale.create({
15
+ * model: 'magnific_video_upscaler_creative',
16
+ * videoUri: 'https://example.com/video.mp4',
17
+ * });
18
+ * ```
19
+ */
20
+ create(body, options) {
21
+ return (0, polling_1.wrapAsWaitableResource)(this._client)(this._client.post('/v1/video_upscale', { body, ...options }));
22
+ }
23
+ }
24
+ exports.VideoUpscale = VideoUpscale;
25
+ //# sourceMappingURL=video-upscale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-upscale.js","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,+CAAqF;AAErF,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAA,gCAAsB,EAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF;AArBD,oCAqBC"}
@@ -0,0 +1,21 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { wrapAsWaitableResource } from "../lib/polling.mjs";
4
+ export class VideoUpscale extends APIResource {
5
+ /**
6
+ * This endpoint starts a task to upscale a video. Set `model` to choose the
7
+ * upscaler.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const videoUpscale = await client.videoUpscale.create({
12
+ * model: 'magnific_video_upscaler_creative',
13
+ * videoUri: 'https://example.com/video.mp4',
14
+ * });
15
+ * ```
16
+ */
17
+ create(body, options) {
18
+ return wrapAsWaitableResource(this._client)(this._client.post('/v1/video_upscale', { body, ...options }));
19
+ }
20
+ }
21
+ //# sourceMappingURL=video-upscale.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-upscale.mjs","sourceRoot":"","sources":["../src/resources/video-upscale.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAA+B,sBAAsB,EAAE,2BAAuB;AAErF,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,sBAAsB,CAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -111,6 +111,11 @@ import {
111
111
  VideoToVideoCreateParams,
112
112
  VideoToVideoCreateResponse,
113
113
  } from './resources/video-to-video';
114
+ import {
115
+ VideoUpscale,
116
+ VideoUpscaleCreateParams,
117
+ VideoUpscaleCreateResponse,
118
+ } from './resources/video-upscale';
114
119
  import {
115
120
  VoiceDubbing,
116
121
  VoiceDubbingCreateParams,
@@ -951,6 +956,10 @@ export class RunwayML {
951
956
  * These endpoints all kick off tasks to create generations.
952
957
  */
953
958
  imageUpscale: API.ImageUpscale = new API.ImageUpscale(this);
959
+ /**
960
+ * These endpoints all kick off tasks to create generations.
961
+ */
962
+ videoUpscale: API.VideoUpscale = new API.VideoUpscale(this);
954
963
  organization: API.Organization = new API.Organization(this);
955
964
  avatars: API.Avatars = new API.Avatars(this);
956
965
  avatarConversations: API.AvatarConversations = new API.AvatarConversations(this);
@@ -976,6 +985,7 @@ RunwayML.VoiceIsolation = VoiceIsolation;
976
985
  RunwayML.VoiceDubbing = VoiceDubbing;
977
986
  RunwayML.SpeechToSpeech = SpeechToSpeech;
978
987
  RunwayML.ImageUpscale = ImageUpscale;
988
+ RunwayML.VideoUpscale = VideoUpscale;
979
989
  RunwayML.Organization = Organization;
980
990
  RunwayML.Avatars = Avatars;
981
991
  RunwayML.AvatarConversations = AvatarConversations;
@@ -1062,6 +1072,12 @@ export declare namespace RunwayML {
1062
1072
  type ImageUpscaleCreateParams as ImageUpscaleCreateParams,
1063
1073
  };
1064
1074
 
1075
+ export {
1076
+ VideoUpscale as VideoUpscale,
1077
+ type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse,
1078
+ type VideoUpscaleCreateParams as VideoUpscaleCreateParams,
1079
+ };
1080
+
1065
1081
  export {
1066
1082
  Organization as Organization,
1067
1083
  type OrganizationRetrieveResponse as OrganizationRetrieveResponse,
@@ -348,7 +348,13 @@ export declare namespace ImageToVideoCreateParams {
348
348
  | '1664:1248'
349
349
  | '1440:1440'
350
350
  | '1248:1664'
351
- | '1080:1920';
351
+ | '1080:1920'
352
+ | '3840:1646'
353
+ | '3840:2160'
354
+ | '3840:2880'
355
+ | '3840:3840'
356
+ | '2880:3840'
357
+ | '2160:3840';
352
358
 
353
359
  /**
354
360
  * An optional array of audio references. Audio references require a text prompt,
@@ -92,6 +92,11 @@ export {
92
92
  type VideoToVideoCreateResponse,
93
93
  type VideoToVideoCreateParams,
94
94
  } from './video-to-video';
95
+ export {
96
+ VideoUpscale,
97
+ type VideoUpscaleCreateResponse,
98
+ type VideoUpscaleCreateParams,
99
+ } from './video-upscale';
95
100
  export {
96
101
  VoiceDubbing,
97
102
  type VoiceDubbingCreateResponse,
@@ -129,6 +129,7 @@ export interface OrganizationRetrieveUsageResponse {
129
129
  | 'seedance2'
130
130
  | 'seedance2_fast'
131
131
  | 'magnific_precision_upscaler_v2'
132
+ | 'magnific_video_upscaler_creative'
132
133
  | 'kling2.5_turbo_pro'
133
134
  | 'kling3.0_pro'
134
135
  | 'kling3.0_4k'
@@ -144,6 +145,7 @@ export interface OrganizationRetrieveUsageResponse {
144
145
  | 'product_ugc'
145
146
  | 'marketing_stock_image'
146
147
  | 'product_campaign_image'
148
+ | 'ad_localization'
147
149
  >;
148
150
 
149
151
  results: Array<OrganizationRetrieveUsageResponse.Result>;
@@ -203,6 +205,7 @@ export namespace OrganizationRetrieveUsageResponse {
203
205
  | 'seedance2'
204
206
  | 'seedance2_fast'
205
207
  | 'magnific_precision_upscaler_v2'
208
+ | 'magnific_video_upscaler_creative'
206
209
  | 'kling2.5_turbo_pro'
207
210
  | 'kling3.0_pro'
208
211
  | 'kling3.0_4k'
@@ -217,7 +220,8 @@ export namespace OrganizationRetrieveUsageResponse {
217
220
  | 'multi_shot_video'
218
221
  | 'product_ugc'
219
222
  | 'marketing_stock_image'
220
- | 'product_campaign_image';
223
+ | 'product_campaign_image'
224
+ | 'ad_localization';
221
225
  }
222
226
  }
223
227
  }
@@ -295,10 +295,10 @@ export interface RecipeProductAdParams {
295
295
  productImages: Array<RecipeProductAdParams.ProductImage>;
296
296
 
297
297
  /**
298
- * Workflow version. Use a dated version (e.g. "2026-06") to pin behavior, or
298
+ * Workflow version. Use a dated version (e.g. "2026-07") to pin behavior, or
299
299
  * "unsafe-latest" to track the newest stable version (may break without notice).
300
300
  */
301
- version: '2026-06' | 'unsafe-latest';
301
+ version: '2026-06' | '2026-07' | 'unsafe-latest';
302
302
 
303
303
  /**
304
304
  * Whether to generate audio for the video.
@@ -275,8 +275,7 @@ export declare namespace TextToImageCreateParams {
275
275
  model: 'gemini_image3_pro';
276
276
 
277
277
  /**
278
- * A non-empty string up to 5,500 characters (measured in UTF-16 code units). This
279
- * should describe in detail what should appear in the output.
278
+ * This should describe in detail what should appear in the output.
280
279
  */
281
280
  promptText: string;
282
281
 
@@ -357,8 +356,7 @@ export declare namespace TextToImageCreateParams {
357
356
  model: 'gemini_image3.1_flash';
358
357
 
359
358
  /**
360
- * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
361
- * should describe in detail what should appear in the output.
359
+ * This should describe in detail what should appear in the output.
362
360
  */
363
361
  promptText: string;
364
362
 
@@ -465,8 +463,7 @@ export declare namespace TextToImageCreateParams {
465
463
  model: 'gemini_2.5_flash';
466
464
 
467
465
  /**
468
- * A non-empty string up to 1000 characters (measured in UTF-16 code units). This
469
- * should describe in detail what should appear in the output.
466
+ * This should describe in detail what should appear in the output.
470
467
  */
471
468
  promptText: string;
472
469
 
@@ -204,7 +204,13 @@ export declare namespace TextToVideoCreateParams {
204
204
  | '1664:1248'
205
205
  | '1440:1440'
206
206
  | '1248:1664'
207
- | '1080:1920';
207
+ | '1080:1920'
208
+ | '3840:1646'
209
+ | '3840:2160'
210
+ | '3840:2880'
211
+ | '3840:3840'
212
+ | '2880:3840'
213
+ | '2160:3840';
208
214
 
209
215
  /**
210
216
  * An optional array of audio references. Audio references require a text prompt,
@@ -245,12 +251,6 @@ export declare namespace TextToVideoCreateParams {
245
251
  * A HTTPS URL.
246
252
  */
247
253
  uri: string;
248
-
249
- /**
250
- * The position of the image in the output video. "first" will use the image as the
251
- * first frame, "last" as the last frame. Omit for a reference image.
252
- */
253
- position?: 'first' | 'last';
254
254
  }
255
255
 
256
256
  /**
@@ -343,12 +343,6 @@ export declare namespace TextToVideoCreateParams {
343
343
  * A HTTPS URL.
344
344
  */
345
345
  uri: string;
346
-
347
- /**
348
- * The position of the image in the output video. "first" will use the image as the
349
- * first frame, "last" as the last frame. Omit for a reference image.
350
- */
351
- position?: 'first' | 'last';
352
346
  }
353
347
 
354
348
  /**
@@ -62,8 +62,7 @@ export declare namespace VideoToVideoCreateParams {
62
62
  keyframes?: Array<Variant0.UnionMember0 | Variant0.UnionMember1>;
63
63
 
64
64
  /**
65
- * An optional string up to 1000 characters describing what should appear in the
66
- * output.
65
+ * A non-empty and optional string describing what should appear in the output.
67
66
  */
68
67
  promptText?: string;
69
68
 
@@ -170,7 +169,13 @@ export declare namespace VideoToVideoCreateParams {
170
169
  | '1664:1248'
171
170
  | '1440:1440'
172
171
  | '1248:1664'
173
- | '1080:1920';
172
+ | '1080:1920'
173
+ | '3840:1646'
174
+ | '3840:2160'
175
+ | '3840:2880'
176
+ | '3840:3840'
177
+ | '2880:3840'
178
+ | '2160:3840';
174
179
 
175
180
  /**
176
181
  * An optional array of audio references. Audio references require a text prompt,
@@ -211,12 +216,6 @@ export declare namespace VideoToVideoCreateParams {
211
216
  * A HTTPS URL.
212
217
  */
213
218
  uri: string;
214
-
215
- /**
216
- * The position of the image in the output video. "first" will use the image as the
217
- * first frame, "last" as the last frame. Omit for a reference image.
218
- */
219
- position?: 'first' | 'last';
220
219
  }
221
220
 
222
221
  /**
@@ -314,12 +313,6 @@ export declare namespace VideoToVideoCreateParams {
314
313
  * A HTTPS URL.
315
314
  */
316
315
  uri: string;
317
-
318
- /**
319
- * The position of the image in the output video. "first" will use the image as the
320
- * first frame, "last" as the last frame. Omit for a reference image.
321
- */
322
- position?: 'first' | 'last';
323
316
  }
324
317
 
325
318
  /**
@@ -0,0 +1,82 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { RequestOptions } from '../internal/request-options';
5
+ import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
6
+
7
+ export class VideoUpscale extends APIResource {
8
+ /**
9
+ * This endpoint starts a task to upscale a video. Set `model` to choose the
10
+ * upscaler.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const videoUpscale = await client.videoUpscale.create({
15
+ * model: 'magnific_video_upscaler_creative',
16
+ * videoUri: 'https://example.com/video.mp4',
17
+ * });
18
+ * ```
19
+ */
20
+ create(
21
+ body: VideoUpscaleCreateParams,
22
+ options?: RequestOptions,
23
+ ): APIPromiseWithAwaitableTask<VideoUpscaleCreateResponse> {
24
+ return wrapAsWaitableResource<VideoUpscaleCreateResponse>(this._client)(
25
+ this._client.post('/v1/video_upscale', { body, ...options }),
26
+ );
27
+ }
28
+ }
29
+
30
+ export interface VideoUpscaleCreateResponse {
31
+ /**
32
+ * The ID of the task that was created. Use this to retrieve the task later.
33
+ */
34
+ id: string;
35
+ }
36
+
37
+ export interface VideoUpscaleCreateParams {
38
+ model: 'magnific_video_upscaler_creative';
39
+
40
+ /**
41
+ * A HTTPS URL.
42
+ */
43
+ videoUri: string;
44
+
45
+ /**
46
+ * How much AI-generated detail to add during upscaling, from 0 (faithful) to 100.
47
+ */
48
+ creativity?: number;
49
+
50
+ /**
51
+ * Processing style: `vivid` for enhanced color and detail, `natural` for faithful
52
+ * reproduction.
53
+ */
54
+ flavor?: 'vivid' | 'natural';
55
+
56
+ /**
57
+ * Whether to increase the output frame rate.
58
+ */
59
+ fpsBoost?: boolean;
60
+
61
+ /**
62
+ * Target output resolution from 720p to 4k. Defaults to `2k`.
63
+ */
64
+ resolution?: '720p' | '1k' | '2k' | '4k';
65
+
66
+ /**
67
+ * Sharpness intensity from 0 (none) to 100.
68
+ */
69
+ sharpen?: number;
70
+
71
+ /**
72
+ * Grain and texture enhancement from 0 to 100.
73
+ */
74
+ smartGrain?: number;
75
+ }
76
+
77
+ export declare namespace VideoUpscale {
78
+ export {
79
+ type VideoUpscaleCreateResponse as VideoUpscaleCreateResponse,
80
+ type VideoUpscaleCreateParams as VideoUpscaleCreateParams,
81
+ };
82
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.2.0'; // x-release-please-version
1
+ export const VERSION = '4.4.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.2.0";
1
+ export declare const VERSION = "4.4.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.2.0";
1
+ export declare const VERSION = "4.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '4.2.0'; // x-release-please-version
4
+ exports.VERSION = '4.4.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.2.0'; // x-release-please-version
1
+ export const VERSION = '4.4.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map