@shotstack/schemas 1.12.2 → 1.13.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/dist/api.bundled.json +71 -17
- package/dist/json-schema/asset.json +134 -3
- package/dist/json-schema/audio-asset.json +84 -17
- package/dist/json-schema/clip.json +134 -3
- package/dist/json-schema/edit.json +134 -3
- package/dist/json-schema/image-asset.json +34 -3
- package/dist/json-schema/image-to-video-asset.json +1 -1
- package/dist/json-schema/schemas.json +155 -14
- package/dist/json-schema/template.json +135 -4
- package/dist/json-schema/text-to-image-asset.json +1 -1
- package/dist/json-schema/text-to-speech-asset.json +19 -19
- package/dist/json-schema/timeline.json +134 -3
- package/dist/json-schema/track.json +134 -3
- package/dist/json-schema/video-asset.json +70 -27
- package/dist/schema.d.ts +118 -14
- package/dist/zod/zod.gen.cjs +101 -10
- package/dist/zod/zod.gen.d.ts +1834 -1093
- package/dist/zod/zod.gen.js +101 -10
- package/dist/zod/zod.gen.ts +101 -10
- package/package.json +1 -1
|
@@ -2,25 +2,65 @@
|
|
|
2
2
|
"name": "VideoAsset",
|
|
3
3
|
"strict": true,
|
|
4
4
|
"schema": {
|
|
5
|
-
"description": "The VideoAsset
|
|
5
|
+
"description": "The VideoAsset adds a video to a Clip. The video can be sourced from a URL\n(`src`) or generated from a text prompt (`prompt`), optionally seeded from a\nstarting image (`seed`). Exactly one of...",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"type": {
|
|
9
9
|
"enum": [
|
|
10
10
|
"video"
|
|
11
11
|
],
|
|
12
|
-
"description": "The type of
|
|
12
|
+
"description": "The type of a...",
|
|
13
13
|
"type": "string"
|
|
14
14
|
},
|
|
15
15
|
"src": {
|
|
16
|
-
"
|
|
17
|
-
|
|
16
|
+
"anyOf": [
|
|
17
|
+
{
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The video source URL. The URL must be pu..."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "null"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"prompt": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "A text prompt to generate the video from. When set without `src`, the ..."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "null"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"seed": {
|
|
38
|
+
"anyOf": [
|
|
39
|
+
{
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Seed image URL for image-to-video generation. The i..."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "null"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"model": {
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "The generation model to use when `prompt` is set..."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "null"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
18
58
|
},
|
|
19
59
|
"transcode": {
|
|
20
60
|
"anyOf": [
|
|
21
61
|
{
|
|
22
62
|
"type": "boolean",
|
|
23
|
-
"description": "Set to `true` to force re-encoding of the video during preprocessing. This can help
|
|
63
|
+
"description": "Set to `true` to force re-encoding of the video during preprocessing. This can help resol..."
|
|
24
64
|
},
|
|
25
65
|
{
|
|
26
66
|
"type": "null"
|
|
@@ -31,7 +71,7 @@
|
|
|
31
71
|
"anyOf": [
|
|
32
72
|
{
|
|
33
73
|
"type": "number",
|
|
34
|
-
"description": "The start trim point of the video clip, in seconds (defaults
|
|
74
|
+
"description": "The start trim point of the video clip, in seconds (defaults..."
|
|
35
75
|
},
|
|
36
76
|
{
|
|
37
77
|
"type": "null"
|
|
@@ -39,17 +79,17 @@
|
|
|
39
79
|
]
|
|
40
80
|
},
|
|
41
81
|
"volume": {
|
|
42
|
-
"description": "Set the volume of the video clip. Use a
|
|
82
|
+
"description": "Set the volume of the video clip. Use a nu...",
|
|
43
83
|
"anyOf": [
|
|
44
84
|
{
|
|
45
85
|
"type": "number",
|
|
46
|
-
"description": "The volume level for the video clip.
|
|
86
|
+
"description": "The volume level for the video clip. ...",
|
|
47
87
|
"minimum": 0,
|
|
48
88
|
"maximum": 1
|
|
49
89
|
},
|
|
50
90
|
{
|
|
51
91
|
"type": "array",
|
|
52
|
-
"description": "An array of [Tween](./#tocs_tween)
|
|
92
|
+
"description": "An array of [Tween](./#tocs_tween) obje...",
|
|
53
93
|
"items": {
|
|
54
94
|
"$ref": "#/$defs/Tween"
|
|
55
95
|
}
|
|
@@ -63,7 +103,7 @@
|
|
|
63
103
|
"anyOf": [
|
|
64
104
|
{
|
|
65
105
|
"type": "string",
|
|
66
|
-
"description": "Preset volume effects to apply to the video asset <ul>\n <li>`
|
|
106
|
+
"description": "Preset volume effects to apply to the video asset <ul>\n <li>`fade...",
|
|
67
107
|
"enum": [
|
|
68
108
|
"none",
|
|
69
109
|
"fadeIn",
|
|
@@ -80,7 +120,7 @@
|
|
|
80
120
|
"anyOf": [
|
|
81
121
|
{
|
|
82
122
|
"type": "number",
|
|
83
|
-
"description": "Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust
|
|
123
|
+
"description": "Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust...",
|
|
84
124
|
"minimum": 0,
|
|
85
125
|
"maximum": 10
|
|
86
126
|
},
|
|
@@ -114,6 +154,9 @@
|
|
|
114
154
|
"required": [
|
|
115
155
|
"type",
|
|
116
156
|
"src",
|
|
157
|
+
"prompt",
|
|
158
|
+
"seed",
|
|
159
|
+
"model",
|
|
117
160
|
"transcode",
|
|
118
161
|
"trim",
|
|
119
162
|
"volume",
|
|
@@ -124,13 +167,13 @@
|
|
|
124
167
|
],
|
|
125
168
|
"$defs": {
|
|
126
169
|
"Tween": {
|
|
127
|
-
"description": "Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and can be animated
|
|
170
|
+
"description": "Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and can be animated:...",
|
|
128
171
|
"properties": {
|
|
129
172
|
"from": {
|
|
130
173
|
"anyOf": [
|
|
131
174
|
{
|
|
132
175
|
"type": "string",
|
|
133
|
-
"description": "The initial
|
|
176
|
+
"description": "The initial prope..."
|
|
134
177
|
},
|
|
135
178
|
{
|
|
136
179
|
"type": "null"
|
|
@@ -141,7 +184,7 @@
|
|
|
141
184
|
"anyOf": [
|
|
142
185
|
{
|
|
143
186
|
"type": "string",
|
|
144
|
-
"description": "The final
|
|
187
|
+
"description": "The final prope..."
|
|
145
188
|
},
|
|
146
189
|
{
|
|
147
190
|
"type": "null"
|
|
@@ -152,7 +195,7 @@
|
|
|
152
195
|
"anyOf": [
|
|
153
196
|
{
|
|
154
197
|
"type": "number",
|
|
155
|
-
"description": "The time in seconds when
|
|
198
|
+
"description": "The time in seconds when th..."
|
|
156
199
|
},
|
|
157
200
|
{
|
|
158
201
|
"type": "null"
|
|
@@ -163,7 +206,7 @@
|
|
|
163
206
|
"anyOf": [
|
|
164
207
|
{
|
|
165
208
|
"type": "number",
|
|
166
|
-
"description": "The
|
|
209
|
+
"description": "The duratio..."
|
|
167
210
|
},
|
|
168
211
|
{
|
|
169
212
|
"type": "null"
|
|
@@ -174,7 +217,7 @@
|
|
|
174
217
|
"anyOf": [
|
|
175
218
|
{
|
|
176
219
|
"type": "string",
|
|
177
|
-
"description": "The interpolation method to use for the animation. Available options are: <ul>\n <li>`linear` - a linear interpolation between the
|
|
220
|
+
"description": "The interpolation method to use for the animation. Available options are: <ul>\n <li>`linear` - a linear interpolation between the st...",
|
|
178
221
|
"enum": [
|
|
179
222
|
"linear",
|
|
180
223
|
"bezier",
|
|
@@ -190,7 +233,7 @@
|
|
|
190
233
|
"anyOf": [
|
|
191
234
|
{
|
|
192
235
|
"type": "string",
|
|
193
|
-
"description": "The easing function to use for the animation. Easing controls the rate of change of
|
|
236
|
+
"description": "The easing function to use for the animation. Easing controls the rate of change of th...",
|
|
194
237
|
"enum": [
|
|
195
238
|
"ease",
|
|
196
239
|
"easeIn",
|
|
@@ -240,13 +283,13 @@
|
|
|
240
283
|
]
|
|
241
284
|
},
|
|
242
285
|
"Crop": {
|
|
243
|
-
"description": "Crop the sides of an asset by a relative amount. The size of the crop is specified using a
|
|
286
|
+
"description": "Crop the sides of an asset by a relative amount. The size of the crop is specified using a s...",
|
|
244
287
|
"properties": {
|
|
245
288
|
"top": {
|
|
246
289
|
"anyOf": [
|
|
247
290
|
{
|
|
248
291
|
"type": "number",
|
|
249
|
-
"description": "Crop
|
|
292
|
+
"description": "Crop fr...",
|
|
250
293
|
"minimum": 0,
|
|
251
294
|
"maximum": 1
|
|
252
295
|
},
|
|
@@ -259,7 +302,7 @@
|
|
|
259
302
|
"anyOf": [
|
|
260
303
|
{
|
|
261
304
|
"type": "number",
|
|
262
|
-
"description": "Crop
|
|
305
|
+
"description": "Crop fro...",
|
|
263
306
|
"minimum": 0,
|
|
264
307
|
"maximum": 1
|
|
265
308
|
},
|
|
@@ -272,7 +315,7 @@
|
|
|
272
315
|
"anyOf": [
|
|
273
316
|
{
|
|
274
317
|
"type": "number",
|
|
275
|
-
"description": "Crop
|
|
318
|
+
"description": "Crop fr...",
|
|
276
319
|
"minimum": 0,
|
|
277
320
|
"maximum": 1
|
|
278
321
|
},
|
|
@@ -285,7 +328,7 @@
|
|
|
285
328
|
"anyOf": [
|
|
286
329
|
{
|
|
287
330
|
"type": "number",
|
|
288
|
-
"description": "Crop
|
|
331
|
+
"description": "Crop fr...",
|
|
289
332
|
"minimum": 0,
|
|
290
333
|
"maximum": 1
|
|
291
334
|
},
|
|
@@ -305,17 +348,17 @@
|
|
|
305
348
|
]
|
|
306
349
|
},
|
|
307
350
|
"ChromaKey": {
|
|
308
|
-
"description": "Chroma key is a technique that replaces a specific color in a video with a
|
|
351
|
+
"description": "Chroma key is a technique that replaces a specific color in a video with a ...",
|
|
309
352
|
"properties": {
|
|
310
353
|
"color": {
|
|
311
|
-
"description": "The chroma key color as a hex value. Use green (#
|
|
354
|
+
"description": "The chroma key color as a hex value. Use green (#00b1...",
|
|
312
355
|
"type": "string"
|
|
313
356
|
},
|
|
314
357
|
"threshold": {
|
|
315
358
|
"anyOf": [
|
|
316
359
|
{
|
|
317
360
|
"type": "integer",
|
|
318
|
-
"description": "Pixels within this distance from
|
|
361
|
+
"description": "Pixels within this distance from...",
|
|
319
362
|
"minimum": 0,
|
|
320
363
|
"maximum": 250
|
|
321
364
|
},
|
|
@@ -328,7 +371,7 @@
|
|
|
328
371
|
"anyOf": [
|
|
329
372
|
{
|
|
330
373
|
"type": "integer",
|
|
331
|
-
"description": "Pixels within the halo distance from the
|
|
374
|
+
"description": "Pixels within the halo distance from the thre...",
|
|
332
375
|
"minimum": 0,
|
|
333
376
|
"maximum": 250
|
|
334
377
|
},
|
package/dist/schema.d.ts
CHANGED
|
@@ -550,7 +550,17 @@ export interface components {
|
|
|
550
550
|
};
|
|
551
551
|
/** @description The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below. */
|
|
552
552
|
Asset: components["schemas"]["VideoAsset"] | components["schemas"]["ImageAsset"] | components["schemas"]["TextAsset"] | components["schemas"]["RichTextAsset"] | components["schemas"]["AudioAsset"] | components["schemas"]["LumaAsset"] | components["schemas"]["CaptionAsset"] | components["schemas"]["RichCaptionAsset"] | components["schemas"]["HtmlAsset"] | components["schemas"]["Html5Asset"] | components["schemas"]["TitleAsset"] | components["schemas"]["ShapeAsset"] | components["schemas"]["SvgAsset"] | components["schemas"]["TextToImageAsset"] | components["schemas"]["ImageToVideoAsset"] | components["schemas"]["TextToSpeechAsset"];
|
|
553
|
-
/**
|
|
553
|
+
/**
|
|
554
|
+
* @description The VideoAsset adds a video to a Clip. The video can be sourced from a URL
|
|
555
|
+
* (`src`) or generated from a text prompt (`prompt`), optionally seeded from a
|
|
556
|
+
* starting image (`seed`). Exactly one of `src` or `prompt` must be provided.
|
|
557
|
+
*
|
|
558
|
+
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
559
|
+
* - **Generated:** set `prompt` to describe the motion. Optionally set `seed` to
|
|
560
|
+
* a starting image URL (image-to-video). Use `model` to choose the generator
|
|
561
|
+
* (e.g. `luma-ray-3`, `runpod-itv-mini`). The generated `src` is filled in
|
|
562
|
+
* automatically.
|
|
563
|
+
*/
|
|
554
564
|
VideoAsset: {
|
|
555
565
|
/**
|
|
556
566
|
* @description The type of asset - set to `video` for videos. (enum property replaced by openapi-typescript)
|
|
@@ -558,10 +568,25 @@ export interface components {
|
|
|
558
568
|
*/
|
|
559
569
|
type: "video";
|
|
560
570
|
/**
|
|
561
|
-
* @description The video source URL. The URL must be publicly accessible or include credentials.
|
|
571
|
+
* @description The video source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
|
|
562
572
|
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4
|
|
563
573
|
*/
|
|
564
|
-
src
|
|
574
|
+
src?: string;
|
|
575
|
+
/**
|
|
576
|
+
* @description A text prompt to generate the video from. When set without `src`, the engine generates a video and fills `src` automatically. Optionally pair with `seed` for image-to-video. Use `model` to choose the generator.
|
|
577
|
+
* @example Slowly zoom out and orbit left around the object.
|
|
578
|
+
*/
|
|
579
|
+
prompt?: string;
|
|
580
|
+
/**
|
|
581
|
+
* @description Seed image URL for image-to-video generation. The image is used as the starting frame; `prompt` describes the motion. Has no effect unless `prompt` is set.
|
|
582
|
+
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/seed-image.jpg
|
|
583
|
+
*/
|
|
584
|
+
seed?: string;
|
|
585
|
+
/**
|
|
586
|
+
* @description The generation model to use when `prompt` is set (e.g. `luma-ray-3`, `runpod-itv-mini`). Defaults to the platform's preferred generator if omitted.
|
|
587
|
+
* @example luma-ray-3
|
|
588
|
+
*/
|
|
589
|
+
model?: string;
|
|
565
590
|
/**
|
|
566
591
|
* @description Set to `true` to force re-encoding of the video during preprocessing. This can help resolve compatibility issues, fix rotation problems, synchronize audio, or convert formats. The video will be processed to ensure optimal compatibility with the rendering engine.
|
|
567
592
|
* @example false
|
|
@@ -585,14 +610,22 @@ export interface components {
|
|
|
585
610
|
volumeEffect?: "none" | "fadeIn" | "fadeOut" | "fadeInFadeOut";
|
|
586
611
|
/**
|
|
587
612
|
* Format: float
|
|
588
|
-
* @description Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to
|
|
613
|
+
* @description Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).
|
|
589
614
|
* @example 1
|
|
590
615
|
*/
|
|
591
616
|
speed?: number;
|
|
592
617
|
crop?: components["schemas"]["Crop"];
|
|
593
618
|
chromaKey?: components["schemas"]["ChromaKey"];
|
|
594
619
|
};
|
|
595
|
-
/**
|
|
620
|
+
/**
|
|
621
|
+
* @description The ImageAsset adds an image to a Clip. The image can be sourced from a URL
|
|
622
|
+
* (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
|
|
623
|
+
* `prompt` must be provided.
|
|
624
|
+
*
|
|
625
|
+
* - **Source URL:** set `src` to the publicly accessible URL of a jpg or png file.
|
|
626
|
+
* - **Generated:** set `prompt` to describe the image; the engine generates it
|
|
627
|
+
* using the provider chosen by `model` and fills `src` in automatically.
|
|
628
|
+
*/
|
|
596
629
|
ImageAsset: {
|
|
597
630
|
/**
|
|
598
631
|
* @description The type of asset - set to `image` for images. (enum property replaced by openapi-typescript)
|
|
@@ -600,10 +633,20 @@ export interface components {
|
|
|
600
633
|
*/
|
|
601
634
|
type: "image";
|
|
602
635
|
/**
|
|
603
|
-
* @description The image source URL. The URL must be publicly accessible or include credentials.
|
|
636
|
+
* @description The image source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
|
|
604
637
|
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg
|
|
605
638
|
*/
|
|
606
|
-
src
|
|
639
|
+
src?: string;
|
|
640
|
+
/**
|
|
641
|
+
* @description A text prompt to generate the image from. When set without `src`, the engine generates an image and fills `src` automatically. Use `model` to choose the generator.
|
|
642
|
+
* @example A serene landscape with a crystal-clear mountain lake at sunrise.
|
|
643
|
+
*/
|
|
644
|
+
prompt?: string;
|
|
645
|
+
/**
|
|
646
|
+
* @description The generation model to use when `prompt` is set (e.g. `flux-schnell`). Defaults to the platform's preferred generator if omitted.
|
|
647
|
+
* @example flux-schnell
|
|
648
|
+
*/
|
|
649
|
+
model?: string;
|
|
607
650
|
crop?: components["schemas"]["Crop"];
|
|
608
651
|
};
|
|
609
652
|
/**
|
|
@@ -756,7 +799,18 @@ export interface components {
|
|
|
756
799
|
/** @description Animation properties for text entrance effects. */
|
|
757
800
|
animation?: components["schemas"]["RichTextAnimation"];
|
|
758
801
|
};
|
|
759
|
-
/**
|
|
802
|
+
/**
|
|
803
|
+
* @description The AudioAsset adds audio to a Clip. The audio can be sourced from a URL
|
|
804
|
+
* (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
|
|
805
|
+
* `prompt` must be provided.
|
|
806
|
+
*
|
|
807
|
+
* - **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).
|
|
808
|
+
* - **Generated speech:** set `prompt` to the spoken text and `voice` to a voice
|
|
809
|
+
* identifier (text-to-speech). Optionally set `language`/`newscaster`.
|
|
810
|
+
* - **Generated music or SFX:** set `prompt` describing the sound; omit `voice`.
|
|
811
|
+
* - Use `model` to choose the generator. The generated `src` is filled in
|
|
812
|
+
* automatically.
|
|
813
|
+
*/
|
|
760
814
|
AudioAsset: {
|
|
761
815
|
/**
|
|
762
816
|
* @description The type of asset - set to `audio` for audio assets. (enum property replaced by openapi-typescript)
|
|
@@ -764,17 +818,42 @@ export interface components {
|
|
|
764
818
|
*/
|
|
765
819
|
type: "audio";
|
|
766
820
|
/**
|
|
767
|
-
* @description The audio source URL. The URL must be publicly accessible or include credentials.
|
|
821
|
+
* @description The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.
|
|
768
822
|
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3
|
|
769
823
|
*/
|
|
770
|
-
src
|
|
824
|
+
src?: string;
|
|
825
|
+
/**
|
|
826
|
+
* @description A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.
|
|
827
|
+
* @example Welcome to today's broadcast.
|
|
828
|
+
*/
|
|
829
|
+
prompt?: string;
|
|
830
|
+
/**
|
|
831
|
+
* @description Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.
|
|
832
|
+
* @example Matthew
|
|
833
|
+
*/
|
|
834
|
+
voice?: string;
|
|
835
|
+
/**
|
|
836
|
+
* @description Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.
|
|
837
|
+
* @example en-US
|
|
838
|
+
*/
|
|
839
|
+
language?: string;
|
|
840
|
+
/**
|
|
841
|
+
* @description Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.
|
|
842
|
+
* @default false
|
|
843
|
+
*/
|
|
844
|
+
newscaster?: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* @description The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.
|
|
847
|
+
* @example polly-neural
|
|
848
|
+
*/
|
|
849
|
+
model?: string;
|
|
771
850
|
/** @description The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached. */
|
|
772
851
|
trim?: number;
|
|
773
852
|
/** @description Set the volume of the audio clip. Use a number or an array of [Tween](./#tocs_tween) objects to create custom volume transitions. */
|
|
774
853
|
volume?: number | components["schemas"]["Tween"][];
|
|
775
854
|
/**
|
|
776
855
|
* Format: float
|
|
777
|
-
* @description Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to
|
|
856
|
+
* @description Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).
|
|
778
857
|
* @example 1
|
|
779
858
|
*/
|
|
780
859
|
speed?: number;
|
|
@@ -1117,7 +1196,14 @@ export interface components {
|
|
|
1117
1196
|
*/
|
|
1118
1197
|
direction?: "left" | "right" | "up" | "down";
|
|
1119
1198
|
};
|
|
1120
|
-
/**
|
|
1199
|
+
/**
|
|
1200
|
+
* @deprecated
|
|
1201
|
+
* @description **Notice: TextToImageAsset is deprecated. Use [ImageAsset](#tocs_imageasset)
|
|
1202
|
+
* with `prompt` instead.** This type continues to function and is internally
|
|
1203
|
+
* rewritten to ImageAsset; no behaviour change for existing integrations.
|
|
1204
|
+
*
|
|
1205
|
+
* The TextToImageAsset lets you create a dynamic image from a text prompt.
|
|
1206
|
+
*/
|
|
1121
1207
|
TextToImageAsset: {
|
|
1122
1208
|
/**
|
|
1123
1209
|
* @description The type of asset to generate - set to `text-to-image` for text-to-image. (enum property replaced by openapi-typescript)
|
|
@@ -1141,7 +1227,15 @@ export interface components {
|
|
|
1141
1227
|
height?: number;
|
|
1142
1228
|
crop?: components["schemas"]["Crop"];
|
|
1143
1229
|
};
|
|
1144
|
-
/**
|
|
1230
|
+
/**
|
|
1231
|
+
* @deprecated
|
|
1232
|
+
* @description **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
1233
|
+
* with `prompt` and `seed` instead.** This type continues to function and is
|
|
1234
|
+
* internally rewritten to VideoAsset; no behaviour change for existing
|
|
1235
|
+
* integrations.
|
|
1236
|
+
*
|
|
1237
|
+
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
1238
|
+
*/
|
|
1145
1239
|
ImageToVideoAsset: {
|
|
1146
1240
|
/**
|
|
1147
1241
|
* @description The type of asset to generate - set to `image-to-video` for image-to-video. (enum property replaced by openapi-typescript)
|
|
@@ -1172,7 +1266,17 @@ export interface components {
|
|
|
1172
1266
|
speed?: number;
|
|
1173
1267
|
crop?: components["schemas"]["Crop"];
|
|
1174
1268
|
};
|
|
1175
|
-
/**
|
|
1269
|
+
/**
|
|
1270
|
+
* @deprecated
|
|
1271
|
+
* @description **Notice: TextToSpeechAsset is deprecated. Use [AudioAsset](#tocs_audioasset)
|
|
1272
|
+
* with `prompt` (the spoken text) and `voice` instead.** This type continues to
|
|
1273
|
+
* function and is internally rewritten to AudioAsset; no behaviour change for
|
|
1274
|
+
* existing integrations.
|
|
1275
|
+
*
|
|
1276
|
+
* The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service.
|
|
1277
|
+
* The generated audio can be trimmed, faded and have its volume and speed adjusted using the
|
|
1278
|
+
* same properties available on the AudioAsset.
|
|
1279
|
+
*/
|
|
1176
1280
|
TextToSpeechAsset: {
|
|
1177
1281
|
/**
|
|
1178
1282
|
* @description The type of asset - set to `text-to-speech` for text-to-speech. (enum property replaced by openapi-typescript)
|
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -473,16 +473,43 @@ exports.htmlassetHtmlAssetSchema = zod_1.z.object({
|
|
|
473
473
|
}).strict();
|
|
474
474
|
exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema;
|
|
475
475
|
/**
|
|
476
|
-
* The ImageAsset
|
|
476
|
+
* The ImageAsset adds an image to a Clip. The image can be sourced from a URL
|
|
477
|
+
* (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
|
|
478
|
+
* `prompt` must be provided.
|
|
479
|
+
*
|
|
480
|
+
* - **Source URL:** set `src` to the publicly accessible URL of a jpg or png file.
|
|
481
|
+
* - **Generated:** set `prompt` to describe the image; the engine generates it
|
|
482
|
+
* using the provider chosen by `model` and fills `src` in automatically.
|
|
483
|
+
*
|
|
477
484
|
*/
|
|
478
485
|
exports.imageassetImageAssetSchema = zod_1.z.object({
|
|
479
486
|
type: zod_1.z.enum(['image']),
|
|
480
|
-
src: zod_1.z.string().min(1).regex(/\S/),
|
|
487
|
+
src: zod_1.z.optional(zod_1.z.string().min(1).regex(/\S/)),
|
|
488
|
+
prompt: zod_1.z.optional(zod_1.z.string().max(4000)),
|
|
489
|
+
model: zod_1.z.optional(zod_1.z.string()),
|
|
481
490
|
crop: zod_1.z.optional(exports.cropCropSchema)
|
|
482
|
-
}).strict()
|
|
491
|
+
}).strict().superRefine((data, ctx) => {
|
|
492
|
+
var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
|
|
493
|
+
var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
|
|
494
|
+
if (!hasSrc && !hasPrompt) {
|
|
495
|
+
ctx.addIssue({
|
|
496
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
497
|
+
message: "A media asset requires either \"src\" (a source URL) or \"prompt\" (to generate the asset). Provide one.",
|
|
498
|
+
path: ["src"],
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
});
|
|
483
502
|
exports.imageAssetSchema = exports.imageassetImageAssetSchema;
|
|
484
503
|
/**
|
|
504
|
+
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
505
|
+
* with `prompt` and `seed` instead.** This type continues to function and is
|
|
506
|
+
* internally rewritten to VideoAsset; no behaviour change for existing
|
|
507
|
+
* integrations.
|
|
508
|
+
*
|
|
485
509
|
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
510
|
+
*
|
|
511
|
+
*
|
|
512
|
+
* @deprecated
|
|
486
513
|
*/
|
|
487
514
|
exports.imagetovideoassetImageToVideoAssetSchema = zod_1.z.object({
|
|
488
515
|
type: zod_1.z.enum(['image-to-video']),
|
|
@@ -1820,7 +1847,14 @@ exports.textassetTextAssetSchema = zod_1.z.object({
|
|
|
1820
1847
|
});
|
|
1821
1848
|
exports.textAssetSchema = exports.textassetTextAssetSchema;
|
|
1822
1849
|
/**
|
|
1850
|
+
* **Notice: TextToImageAsset is deprecated. Use [ImageAsset](#tocs_imageasset)
|
|
1851
|
+
* with `prompt` instead.** This type continues to function and is internally
|
|
1852
|
+
* rewritten to ImageAsset; no behaviour change for existing integrations.
|
|
1853
|
+
*
|
|
1823
1854
|
* The TextToImageAsset lets you create a dynamic image from a text prompt.
|
|
1855
|
+
*
|
|
1856
|
+
*
|
|
1857
|
+
* @deprecated
|
|
1824
1858
|
*/
|
|
1825
1859
|
exports.texttoimageassetTextToImageAssetSchema = zod_1.z.object({
|
|
1826
1860
|
type: zod_1.z.enum(['text-to-image']),
|
|
@@ -2125,11 +2159,26 @@ exports.tweenTweenSchema = zod_1.z.object({
|
|
|
2125
2159
|
}).strict();
|
|
2126
2160
|
exports.tweenSchema = exports.tweenTweenSchema;
|
|
2127
2161
|
/**
|
|
2128
|
-
* The AudioAsset
|
|
2162
|
+
* The AudioAsset adds audio to a Clip. The audio can be sourced from a URL
|
|
2163
|
+
* (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or
|
|
2164
|
+
* `prompt` must be provided.
|
|
2165
|
+
*
|
|
2166
|
+
* - **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).
|
|
2167
|
+
* - **Generated speech:** set `prompt` to the spoken text and `voice` to a voice
|
|
2168
|
+
* identifier (text-to-speech). Optionally set `language`/`newscaster`.
|
|
2169
|
+
* - **Generated music or SFX:** set `prompt` describing the sound; omit `voice`.
|
|
2170
|
+
* - Use `model` to choose the generator. The generated `src` is filled in
|
|
2171
|
+
* automatically.
|
|
2172
|
+
*
|
|
2129
2173
|
*/
|
|
2130
2174
|
exports.audioassetAudioAssetSchema = zod_1.z.object({
|
|
2131
2175
|
type: zod_1.z.enum(['audio']),
|
|
2132
|
-
src: zod_1.z.string().min(1).regex(/\S/),
|
|
2176
|
+
src: zod_1.z.optional(zod_1.z.string().min(1).regex(/\S/)),
|
|
2177
|
+
prompt: zod_1.z.optional(zod_1.z.string().max(4000)),
|
|
2178
|
+
voice: zod_1.z.optional(zod_1.z.string()),
|
|
2179
|
+
language: zod_1.z.optional(zod_1.z.string()),
|
|
2180
|
+
newscaster: zod_1.z.optional(zod_1.z.boolean()).default(false),
|
|
2181
|
+
model: zod_1.z.optional(zod_1.z.string()),
|
|
2133
2182
|
trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2134
2183
|
return undefined; if (Array.isArray(v))
|
|
2135
2184
|
return v; if (typeof v === 'string') {
|
|
@@ -2160,7 +2209,17 @@ exports.audioassetAudioAssetSchema = zod_1.z.object({
|
|
|
2160
2209
|
'fadeOut',
|
|
2161
2210
|
'fadeInFadeOut'
|
|
2162
2211
|
]))
|
|
2163
|
-
}).strict()
|
|
2212
|
+
}).strict().superRefine((data, ctx) => {
|
|
2213
|
+
var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
|
|
2214
|
+
var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
|
|
2215
|
+
if (!hasSrc && !hasPrompt) {
|
|
2216
|
+
ctx.addIssue({
|
|
2217
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
2218
|
+
message: "A media asset requires either \"src\" (a source URL) or \"prompt\" (to generate the asset). Provide one.",
|
|
2219
|
+
path: ["src"],
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
});
|
|
2164
2223
|
exports.audioAssetSchema = exports.audioassetAudioAssetSchema;
|
|
2165
2224
|
/**
|
|
2166
2225
|
* Offsets the position of an asset horizontally or vertically by a relative distance.
|
|
@@ -2231,7 +2290,17 @@ exports.skewtransformationSkewTransformationSchema = zod_1.z.object({
|
|
|
2231
2290
|
}).strict();
|
|
2232
2291
|
exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema;
|
|
2233
2292
|
/**
|
|
2234
|
-
*
|
|
2293
|
+
* **Notice: TextToSpeechAsset is deprecated. Use [AudioAsset](#tocs_audioasset)
|
|
2294
|
+
* with `prompt` (the spoken text) and `voice` instead.** This type continues to
|
|
2295
|
+
* function and is internally rewritten to AudioAsset; no behaviour change for
|
|
2296
|
+
* existing integrations.
|
|
2297
|
+
*
|
|
2298
|
+
* The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service.
|
|
2299
|
+
* The generated audio can be trimmed, faded and have its volume and speed adjusted using the
|
|
2300
|
+
* same properties available on the AudioAsset.
|
|
2301
|
+
*
|
|
2302
|
+
*
|
|
2303
|
+
* @deprecated
|
|
2235
2304
|
*/
|
|
2236
2305
|
exports.texttospeechassetTextToSpeechAssetSchema = zod_1.z.object({
|
|
2237
2306
|
type: zod_1.z.enum(['text-to-speech']),
|
|
@@ -2329,11 +2398,23 @@ exports.transformationTransformationSchema = zod_1.z.object({
|
|
|
2329
2398
|
}).strict();
|
|
2330
2399
|
exports.transformationSchema = exports.transformationTransformationSchema;
|
|
2331
2400
|
/**
|
|
2332
|
-
* The VideoAsset
|
|
2401
|
+
* The VideoAsset adds a video to a Clip. The video can be sourced from a URL
|
|
2402
|
+
* (`src`) or generated from a text prompt (`prompt`), optionally seeded from a
|
|
2403
|
+
* starting image (`seed`). Exactly one of `src` or `prompt` must be provided.
|
|
2404
|
+
*
|
|
2405
|
+
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
2406
|
+
* - **Generated:** set `prompt` to describe the motion. Optionally set `seed` to
|
|
2407
|
+
* a starting image URL (image-to-video). Use `model` to choose the generator
|
|
2408
|
+
* (e.g. `luma-ray-3`, `runpod-itv-mini`). The generated `src` is filled in
|
|
2409
|
+
* automatically.
|
|
2410
|
+
*
|
|
2333
2411
|
*/
|
|
2334
2412
|
exports.videoassetVideoAssetSchema = zod_1.z.object({
|
|
2335
2413
|
type: zod_1.z.enum(['video']),
|
|
2336
|
-
src: zod_1.z.string().min(1).regex(/\S/),
|
|
2414
|
+
src: zod_1.z.optional(zod_1.z.string().min(1).regex(/\S/)),
|
|
2415
|
+
prompt: zod_1.z.optional(zod_1.z.string().max(4000)),
|
|
2416
|
+
seed: zod_1.z.optional(zod_1.z.string().min(1)),
|
|
2417
|
+
model: zod_1.z.optional(zod_1.z.string()),
|
|
2337
2418
|
transcode: zod_1.z.optional(zod_1.z.boolean()),
|
|
2338
2419
|
trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2339
2420
|
return undefined; if (Array.isArray(v))
|
|
@@ -2367,7 +2448,17 @@ exports.videoassetVideoAssetSchema = zod_1.z.object({
|
|
|
2367
2448
|
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2368
2449
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
2369
2450
|
chromaKey: zod_1.z.optional(exports.chromakeyChromaKeySchema)
|
|
2370
|
-
}).strict()
|
|
2451
|
+
}).strict().superRefine((data, ctx) => {
|
|
2452
|
+
var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
|
|
2453
|
+
var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
|
|
2454
|
+
if (!hasSrc && !hasPrompt) {
|
|
2455
|
+
ctx.addIssue({
|
|
2456
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
2457
|
+
message: "A media asset requires either \"src\" (a source URL) or \"prompt\" (to generate the asset). Provide one.",
|
|
2458
|
+
path: ["src"],
|
|
2459
|
+
});
|
|
2460
|
+
}
|
|
2461
|
+
});
|
|
2371
2462
|
exports.videoAssetSchema = exports.videoassetVideoAssetSchema;
|
|
2372
2463
|
/**
|
|
2373
2464
|
* The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below.
|