@runwayml/sdk 4.15.0 → 4.16.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 (50) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/README.md +16 -8
  3. package/client.d.mts +11 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +11 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js +11 -5
  8. package/client.js.map +1 -1
  9. package/client.mjs +11 -5
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/image-to-video.d.mts +27 -9
  13. package/resources/image-to-video.d.mts.map +1 -1
  14. package/resources/image-to-video.d.ts +27 -9
  15. package/resources/image-to-video.d.ts.map +1 -1
  16. package/resources/index.d.mts +1 -0
  17. package/resources/index.d.mts.map +1 -1
  18. package/resources/index.d.ts +1 -0
  19. package/resources/index.d.ts.map +1 -1
  20. package/resources/index.js +3 -1
  21. package/resources/index.js.map +1 -1
  22. package/resources/index.mjs +1 -0
  23. package/resources/index.mjs.map +1 -1
  24. package/resources/text-to-video.d.mts +26 -8
  25. package/resources/text-to-video.d.mts.map +1 -1
  26. package/resources/text-to-video.d.ts +26 -8
  27. package/resources/text-to-video.d.ts.map +1 -1
  28. package/resources/video-to-hdr.d.mts +83 -0
  29. package/resources/video-to-hdr.d.mts.map +1 -0
  30. package/resources/video-to-hdr.d.ts +83 -0
  31. package/resources/video-to-hdr.d.ts.map +1 -0
  32. package/resources/video-to-hdr.js +36 -0
  33. package/resources/video-to-hdr.js.map +1 -0
  34. package/resources/video-to-hdr.mjs +32 -0
  35. package/resources/video-to-hdr.mjs.map +1 -0
  36. package/resources/video-to-video.d.mts +9 -7
  37. package/resources/video-to-video.d.mts.map +1 -1
  38. package/resources/video-to-video.d.ts +9 -7
  39. package/resources/video-to-video.d.ts.map +1 -1
  40. package/src/client.ts +34 -22
  41. package/src/resources/image-to-video.ts +38 -10
  42. package/src/resources/index.ts +1 -0
  43. package/src/resources/text-to-video.ts +37 -9
  44. package/src/resources/video-to-hdr.ts +103 -0
  45. package/src/resources/video-to-video.ts +9 -13
  46. package/src/version.ts +1 -1
  47. package/version.d.mts +1 -1
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
  50. package/version.mjs +1 -1
@@ -89,14 +89,42 @@ export declare namespace TextToVideoCreateParams {
89
89
  /**
90
90
  * The container/encoding of the output. `mp4` (default) returns an H.264 .mp4.
91
91
  * `prores` returns a ProRes .mov. `png_sequence` returns a .zip of PNG frames
92
- * (plus a separate .wav artifact when the output has audio). Non-mp4 formats incur
93
- * an additional surcharge of 5 credits per second of output.
94
- */
95
- outputFormat?: 'mp4' | 'prores' | 'png_sequence';
96
-
97
- /**
98
- * The ProRes profile to use. Only valid when `outputFormat` is `prores`. Defaults
99
- * to `4444`.
92
+ * (plus a separate .wav artifact when the output has audio). `hdr10` (HEVC Main
93
+ * 10, BT.2020 + PQ) and `hlg` (HEVC Main 10, BT.2020 + HLG) return true-HDR 10-bit
94
+ * .mp4s; `sdr_rec709_10bit` returns a 10-bit Rec.709 HEVC .mp4 for SDR grading
95
+ * pipelines; `hdr_pq_12bit_master` returns a 12-bit 4:4:4 BT.2020 + PQ HEVC .mov
96
+ * with measured HDR10 content-light metadata for mastering; `hdr_prores` returns a
97
+ * BT.2020 + PQ ProRes .mov editorial mezzanine, whose tier is selectable with
98
+ * `proresProfile` (`422`, `422 HQ`, or `4444`; defaults to `422 HQ`);
99
+ * `hdr_png_sequence` returns a .zip of 16-bit PNG frames carrying the PQ signal
100
+ * losslessly (plus a colorimetry.json sidecar and a separate .wav when the output
101
+ * has audio); `hdr_exr_sequence` returns a .zip of half-float OpenEXR frames
102
+ * carrying the HDR signal as linear BT.2020 display light, 1.0 = 100 nits (plus a
103
+ * colorimetry.json sidecar and a separate .wav when the output has audio). Non-mp4
104
+ * formats incur an additional per-second credit surcharge: 5 credits per second
105
+ * for `prores` and `png_sequence`, and 20 credits per second for every 10-bit and
106
+ * deeper profile (including the 12-bit, 16-bit, and EXR ones), rising to 40
107
+ * credits per second when the output is larger than 4 megapixels (roughly 4K).
108
+ */
109
+ outputFormat?:
110
+ | 'mp4'
111
+ | 'prores'
112
+ | 'png_sequence'
113
+ | 'hdr10'
114
+ | 'hlg'
115
+ | 'sdr_rec709_10bit'
116
+ | 'hdr_pq_12bit_master'
117
+ | 'hdr_prores'
118
+ | 'hdr_png_sequence'
119
+ | 'hdr_exr_sequence';
120
+
121
+ /**
122
+ * The ProRes profile to use. Only valid when `outputFormat` is `prores` or
123
+ * `hdr_prores`. For `prores`, any profile is accepted and the default is `4444`.
124
+ * For `hdr_prores`, only `422`, `422 HQ` and `4444` are available and the default
125
+ * is `422 HQ` — `422 Proxy` and `422 LT` quantize too heavily to hold the HDR
126
+ * gradients, and 12-bit output is served by `hdr_pq_12bit_master` instead of
127
+ * `4444 XQ`.
100
128
  */
101
129
  proresProfile?: '422' | '4444' | '422 Proxy' | '422 LT' | '422 HQ' | '4444 XQ';
102
130
 
@@ -220,7 +248,7 @@ export declare namespace TextToVideoCreateParams {
220
248
  referenceVideos?: Array<Hailuo3.ReferenceVideo>;
221
249
 
222
250
  /**
223
- * The output resolution. Hailuo 3.0 supports 768P and 2K.
251
+ * The output resolution. MiniMax H3 supports 768P and 2K.
224
252
  */
225
253
  resolution?: '2K' | '768P';
226
254
  }
@@ -0,0 +1,103 @@
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
+ /**
8
+ * These endpoints all kick off tasks to create generations.
9
+ */
10
+ export class VideoToHdr extends APIResource {
11
+ /**
12
+ * This endpoint starts a task to upconvert an SDR video to true HDR with Ruby,
13
+ * Runway's HDR grading model. The output keeps the source's own pixels — luma and
14
+ * color are extended into the HDR range, nothing is re-synthesized. Set
15
+ * `outputFormat` to choose the delivery profile: `hdr10` (HEVC Main 10, BT.2020 +
16
+ * PQ, the default), `hlg` (HEVC Main 10, BT.2020 + HLG), `hdr_prores` (BT.2020 +
17
+ * PQ ProRes .mov editorial mezzanine, tier selectable with `proresProfile`), or
18
+ * `hdr_exr_sequence` (a .zip of half-float OpenEXR frames in linear BT.2020
19
+ * display light, for compositing). Tasks bill per second of output at 20 credits
20
+ * per second, rising to 40 credits per second when the source is larger than 4
21
+ * megapixels (roughly 4K) — an upconvert delivers at the source's own resolution.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const videoToHdr = await client.videoToHdr.create({
26
+ * model: 'ruby',
27
+ * videoUri: 'https://example.com/video.mp4',
28
+ * });
29
+ * ```
30
+ */
31
+ create(
32
+ body: VideoToHdrCreateParams,
33
+ options?: RequestOptions,
34
+ ): APIPromiseWithAwaitableTask<VideoToHdrCreateResponse> {
35
+ return wrapAsWaitableResource<VideoToHdrCreateResponse>(this._client)(
36
+ this._client.post('/v1/video_to_hdr', { body, ...options }),
37
+ );
38
+ }
39
+ }
40
+
41
+ export interface VideoToHdrCreateResponse {
42
+ /**
43
+ * The ID of the task that was created. Use this to retrieve the task later.
44
+ */
45
+ id: string;
46
+
47
+ /**
48
+ * The maximum credits this task may charge. The final amount may be lower after
49
+ * the task completes.
50
+ */
51
+ estimatedCost: VideoToHdrCreateResponse.EstimatedCost;
52
+ }
53
+
54
+ export namespace VideoToHdrCreateResponse {
55
+ /**
56
+ * The maximum credits this task may charge. The final amount may be lower after
57
+ * the task completes.
58
+ */
59
+ export interface EstimatedCost {
60
+ /**
61
+ * Estimated cost of the generation in credits.
62
+ */
63
+ credits: number;
64
+ }
65
+ }
66
+
67
+ export interface VideoToHdrCreateParams {
68
+ model: 'ruby';
69
+
70
+ /**
71
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
72
+ * `data:video/mp4;base64,...`, up to 16MB) containing an encoded video. See
73
+ * [our docs](/assets/inputs#videos) on video inputs for more information.
74
+ */
75
+ videoUri: string;
76
+
77
+ /**
78
+ * The HDR delivery profile of the output. `hdr10` (default) returns an HEVC Main
79
+ * 10, BT.2020 + PQ .mp4; `hlg` returns an HEVC Main 10, BT.2020 + HLG .mp4;
80
+ * `hdr_prores` returns a BT.2020 + PQ ProRes .mov editorial mezzanine, whose tier
81
+ * is selectable with `proresProfile`; `hdr_exr_sequence` returns a .zip of
82
+ * half-float OpenEXR frames holding the HDR signal as linear BT.2020 display
83
+ * light, 1.0 = 100 nits, ready to composite. The EXR zip is the whole delivery —
84
+ * the frames, a colorimetry.json sidecar, a provenance.json sidecar declaring the
85
+ * upconvert, and the source audio as audio.wav when the source has any. All four
86
+ * profiles bill at the same rate: 20 credits per second of output, rising to 40
87
+ * credits per second when the source is larger than 4 megapixels (roughly 4K).
88
+ */
89
+ outputFormat?: 'hdr10' | 'hlg' | 'hdr_prores' | 'hdr_exr_sequence';
90
+
91
+ /**
92
+ * The ProRes tier of the `hdr_prores` mezzanine. Only valid when `outputFormat` is
93
+ * `hdr_prores`. Defaults to `422 HQ`.
94
+ */
95
+ proresProfile?: '422' | '4444' | '422 HQ';
96
+ }
97
+
98
+ export declare namespace VideoToHdr {
99
+ export {
100
+ type VideoToHdrCreateResponse as VideoToHdrCreateResponse,
101
+ type VideoToHdrCreateParams as VideoToHdrCreateParams,
102
+ };
103
+ }
@@ -88,11 +88,13 @@ export declare namespace VideoToVideoCreateParams {
88
88
 
89
89
  /**
90
90
  * The container/encoding of the output. `mp4` (default) returns an H.264 .mp4.
91
- * `prores` returns a ProRes .mov. `png_sequence` returns a .zip of PNG frames
92
- * (plus a separate .wav artifact when the output has audio). Non-mp4 formats incur
93
- * an additional surcharge of 5 credits per second of output.
91
+ * `prores` returns a ProRes .mov. `png_sequence` returns a .zip of PNG frames.
92
+ * `sdr_rec709_10bit` returns a 10-bit Rec.709 HEVC .mp4 for SDR grading pipelines.
93
+ * Non-mp4 formats incur an additional surcharge: 5 credits per second for `prores`
94
+ * and `png_sequence`, and 20 credits per second for `sdr_rec709_10bit` — 40
95
+ * credits per second when the output is larger than 4 megapixels (roughly 4K).
94
96
  */
95
- outputFormat?: 'mp4' | 'prores' | 'png_sequence';
97
+ outputFormat?: 'mp4' | 'prores' | 'png_sequence' | 'sdr_rec709_10bit';
96
98
 
97
99
  /**
98
100
  * A non-empty and optional string describing what should appear in the output.
@@ -267,7 +269,7 @@ export declare namespace VideoToVideoCreateParams {
267
269
  referenceVideos?: Array<Hailuo3.ReferenceVideo>;
268
270
 
269
271
  /**
270
- * The output resolution. Hailuo 3.0 supports 768P and 2K.
272
+ * The output resolution. MiniMax H3 supports 768P and 2K.
271
273
  */
272
274
  resolution?: '2K' | '768P';
273
275
  }
@@ -706,7 +708,7 @@ export declare namespace VideoToVideoCreateParams {
706
708
  promptText?: string;
707
709
 
708
710
  /**
709
- * The resolution of the output video. Seedance 2.5 supports 480p, 720p, and 1080p.
711
+ * The resolution of the output video. Seedance 2.5 supports 480p and 720p only.
710
712
  */
711
713
  ratio?:
712
714
  | '992:432'
@@ -720,13 +722,7 @@ export declare namespace VideoToVideoCreateParams {
720
722
  | '1112:834'
721
723
  | '960:960'
722
724
  | '834:1112'
723
- | '720:1280'
724
- | '2206:946'
725
- | '1920:1080'
726
- | '1664:1248'
727
- | '1440:1440'
728
- | '1248:1664'
729
- | '1080:1920';
725
+ | '720:1280';
730
726
 
731
727
  /**
732
728
  * An optional array of audio references. The total combined duration must be less
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.15.0'; // x-release-please-version
1
+ export const VERSION = '4.16.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.15.0";
1
+ export declare const VERSION = "4.16.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.15.0";
1
+ export declare const VERSION = "4.16.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.15.0'; // x-release-please-version
4
+ exports.VERSION = '4.16.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.15.0'; // x-release-please-version
1
+ export const VERSION = '4.16.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map