@shotstack/schemas 1.13.2 → 1.14.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.
@@ -2,21 +2,21 @@
2
2
  "name": "VideoAsset",
3
3
  "strict": true,
4
4
  "schema": {
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 from a\nstarting image (`inputSrc`)....",
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 (`prom...",
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 typ...",
13
13
  "type": "string"
14
14
  },
15
15
  "src": {
16
16
  "anyOf": [
17
17
  {
18
18
  "type": "string",
19
- "description": "The video source URL. The URL must b..."
19
+ "description": "The video source URL. The..."
20
20
  },
21
21
  {
22
22
  "type": "null"
@@ -27,7 +27,7 @@
27
27
  "anyOf": [
28
28
  {
29
29
  "type": "string",
30
- "description": "A text prompt to generate the video from. When set without `src`,..."
30
+ "description": "A text prompt to generate the video from. Whe..."
31
31
  },
32
32
  {
33
33
  "type": "null"
@@ -38,29 +38,91 @@
38
38
  "anyOf": [
39
39
  {
40
40
  "type": "string",
41
- "description": "Input image URL for image-to-video generation...."
41
+ "description": "Input image URL for image-to-vid..."
42
42
  },
43
43
  {
44
44
  "type": "null"
45
45
  }
46
46
  ]
47
47
  },
48
- "seed": {
48
+ "model": {
49
49
  "anyOf": [
50
50
  {
51
51
  "type": "string",
52
- "description": "**Deprecated — use `inputSrc`.** Legacy alias for the image-to-video input image..."
52
+ "description": "The generation model to use when `..."
53
53
  },
54
54
  {
55
55
  "type": "null"
56
56
  }
57
57
  ]
58
58
  },
59
- "model": {
59
+ "resolution": {
60
+ "anyOf": [
61
+ {
62
+ "type": "string",
63
+ "description": "Output resolution for vid...",
64
+ "enum": [
65
+ "480p",
66
+ "720p",
67
+ "1080p"
68
+ ]
69
+ },
70
+ {
71
+ "type": "null"
72
+ }
73
+ ]
74
+ },
75
+ "duration": {
60
76
  "anyOf": [
61
77
  {
62
78
  "type": "string",
63
- "description": "The generation model to use when `prompt` i..."
79
+ "description": "Target video duration in sec...",
80
+ "enum": [
81
+ "auto",
82
+ "4",
83
+ "5",
84
+ "6",
85
+ "7",
86
+ "8",
87
+ "9",
88
+ "10",
89
+ "11",
90
+ "12",
91
+ "13",
92
+ "14",
93
+ "15"
94
+ ]
95
+ },
96
+ {
97
+ "type": "null"
98
+ }
99
+ ]
100
+ },
101
+ "aspectRatio": {
102
+ "anyOf": [
103
+ {
104
+ "type": "string",
105
+ "description": "Aspect ratio for th...",
106
+ "enum": [
107
+ "1:1",
108
+ "16:9",
109
+ "9:16",
110
+ "4:3",
111
+ "3:4",
112
+ "21:9",
113
+ "9:21"
114
+ ]
115
+ },
116
+ {
117
+ "type": "null"
118
+ }
119
+ ]
120
+ },
121
+ "generateAudio": {
122
+ "anyOf": [
123
+ {
124
+ "type": "boolean",
125
+ "description": "Set to `true` to request audio..."
64
126
  },
65
127
  {
66
128
  "type": "null"
@@ -71,7 +133,7 @@
71
133
  "anyOf": [
72
134
  {
73
135
  "type": "boolean",
74
- "description": "Set to `true` to force re-encoding of the video during preprocessing. This can h..."
136
+ "description": "Set to `true` to force re-encoding of the video during ..."
75
137
  },
76
138
  {
77
139
  "type": "null"
@@ -82,7 +144,7 @@
82
144
  "anyOf": [
83
145
  {
84
146
  "type": "number",
85
- "description": "The start trim point of the video clip, in seconds (de..."
147
+ "description": "The start trim point of the video cli..."
86
148
  },
87
149
  {
88
150
  "type": "null"
@@ -90,17 +152,17 @@
90
152
  ]
91
153
  },
92
154
  "volume": {
93
- "description": "Set the volume of the video clip. Use ...",
155
+ "description": "Set the volume of the vid...",
94
156
  "anyOf": [
95
157
  {
96
158
  "type": "number",
97
- "description": "The volume level for the video cl...",
159
+ "description": "The volume level for th...",
98
160
  "minimum": 0,
99
161
  "maximum": 1
100
162
  },
101
163
  {
102
164
  "type": "array",
103
- "description": "An array of [Tween](./#tocs_tween) ...",
165
+ "description": "An array of [Tween](./#t...",
104
166
  "items": {
105
167
  "$ref": "#/$defs/Tween"
106
168
  }
@@ -114,7 +176,7 @@
114
176
  "anyOf": [
115
177
  {
116
178
  "type": "string",
117
- "description": "Preset volume effects to apply to the video asset <ul>\n <l...",
179
+ "description": "Preset volume effects to apply to the vid...",
118
180
  "enum": [
119
181
  "none",
120
182
  "fadeIn",
@@ -131,7 +193,7 @@
131
193
  "anyOf": [
132
194
  {
133
195
  "type": "number",
134
- "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 ...",
196
+ "description": "Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is norma...",
135
197
  "minimum": 0,
136
198
  "maximum": 10
137
199
  },
@@ -167,8 +229,11 @@
167
229
  "src",
168
230
  "prompt",
169
231
  "inputSrc",
170
- "seed",
171
232
  "model",
233
+ "resolution",
234
+ "duration",
235
+ "aspectRatio",
236
+ "generateAudio",
172
237
  "transcode",
173
238
  "trim",
174
239
  "volume",
@@ -179,13 +244,13 @@
179
244
  ],
180
245
  "$defs": {
181
246
  "Tween": {
182
- "description": "Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and ...",
247
+ "description": "Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The fol...",
183
248
  "properties": {
184
249
  "from": {
185
250
  "anyOf": [
186
251
  {
187
252
  "type": "string",
188
- "description": "The initial pro..."
253
+ "description": "The initi..."
189
254
  },
190
255
  {
191
256
  "type": "null"
@@ -196,7 +261,7 @@
196
261
  "anyOf": [
197
262
  {
198
263
  "type": "string",
199
- "description": "The final pro..."
264
+ "description": "The fina..."
200
265
  },
201
266
  {
202
267
  "type": "null"
@@ -207,7 +272,7 @@
207
272
  "anyOf": [
208
273
  {
209
274
  "type": "number",
210
- "description": "The time in seconds when..."
275
+ "description": "The time in seco..."
211
276
  },
212
277
  {
213
278
  "type": "null"
@@ -218,7 +283,7 @@
218
283
  "anyOf": [
219
284
  {
220
285
  "type": "number",
221
- "description": "The durati..."
286
+ "description": "The du..."
222
287
  },
223
288
  {
224
289
  "type": "null"
@@ -229,7 +294,7 @@
229
294
  "anyOf": [
230
295
  {
231
296
  "type": "string",
232
- "description": "The interpolation method to use for the animation. Available options are: <ul>\n <li>`linear` - a linear interpolation b...",
297
+ "description": "The interpolation method to use for the animation. Available options are: <ul>\n <li...",
233
298
  "enum": [
234
299
  "linear",
235
300
  "bezier",
@@ -245,7 +310,7 @@
245
310
  "anyOf": [
246
311
  {
247
312
  "type": "string",
248
- "description": "The easing function to use for the animation. Easing controls the rate of chan...",
313
+ "description": "The easing function to use for the animation. Easing c...",
249
314
  "enum": [
250
315
  "ease",
251
316
  "easeIn",
@@ -295,13 +360,13 @@
295
360
  ]
296
361
  },
297
362
  "Crop": {
298
- "description": "Crop the sides of an asset by a relative amount. The size of the crop is specified ...",
363
+ "description": "Crop the sides of an asset by a relative amount. The size ...",
299
364
  "properties": {
300
365
  "top": {
301
366
  "anyOf": [
302
367
  {
303
368
  "type": "number",
304
- "description": "Crop f...",
369
+ "description": "Cro...",
305
370
  "minimum": 0,
306
371
  "maximum": 1
307
372
  },
@@ -314,7 +379,7 @@
314
379
  "anyOf": [
315
380
  {
316
381
  "type": "number",
317
- "description": "Crop fr...",
382
+ "description": "Crop...",
318
383
  "minimum": 0,
319
384
  "maximum": 1
320
385
  },
@@ -327,7 +392,7 @@
327
392
  "anyOf": [
328
393
  {
329
394
  "type": "number",
330
- "description": "Crop f...",
395
+ "description": "Cro...",
331
396
  "minimum": 0,
332
397
  "maximum": 1
333
398
  },
@@ -340,7 +405,7 @@
340
405
  "anyOf": [
341
406
  {
342
407
  "type": "number",
343
- "description": "Crop f...",
408
+ "description": "Cro...",
344
409
  "minimum": 0,
345
410
  "maximum": 1
346
411
  },
@@ -360,17 +425,17 @@
360
425
  ]
361
426
  },
362
427
  "ChromaKey": {
363
- "description": "Chroma key is a technique that replaces a specific color in a video...",
428
+ "description": "Chroma key is a technique that replaces a spec...",
364
429
  "properties": {
365
430
  "color": {
366
- "description": "The chroma key color as a hex value. Use green ...",
431
+ "description": "The chroma key color as a hex va...",
367
432
  "type": "string"
368
433
  },
369
434
  "threshold": {
370
435
  "anyOf": [
371
436
  {
372
437
  "type": "integer",
373
- "description": "Pixels within this distance ...",
438
+ "description": "Pixels within this ...",
374
439
  "minimum": 0,
375
440
  "maximum": 250
376
441
  },
@@ -383,7 +448,7 @@
383
448
  "anyOf": [
384
449
  {
385
450
  "type": "integer",
386
- "description": "Pixels within the halo distance from the ...",
451
+ "description": "Pixels within the halo dista...",
387
452
  "minimum": 0,
388
453
  "maximum": 250
389
454
  },
package/dist/schema.d.ts CHANGED
@@ -583,16 +583,34 @@ export interface components {
583
583
  */
584
584
  inputSrc?: string;
585
585
  /**
586
- * @deprecated
587
- * @description **Deprecated — use `inputSrc`.** Legacy alias for the image-to-video input image URL, accepted and normalised to `inputSrc` on ingest. The name is misleading — industry-wide `seed` means an integer RNG sampling seed — and will be removed in a future major version.
588
- * @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/seed-image.jpg
589
- */
590
- seed?: string;
591
- /**
592
- * @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.
586
+ * @description The generation model to use when `prompt` is set (e.g. `luma-ray-3`, `runpod-itv-mini`, `fal/seedance-2.0`). Defaults to the platform's preferred generator if omitted.
593
587
  * @example luma-ray-3
594
588
  */
595
589
  model?: string;
590
+ /**
591
+ * @description Output resolution for video generation. Only meaningful when `prompt` is set and the model supports it (e.g. `fal/seedance-2.0`).
592
+ * @example 720p
593
+ * @enum {string}
594
+ */
595
+ resolution?: "480p" | "720p" | "1080p";
596
+ /**
597
+ * @description Target video duration in seconds for generation models that accept it. `"auto"` lets the model decide. Only meaningful when `prompt` is set.
598
+ * @default auto
599
+ * @example 5
600
+ * @enum {string}
601
+ */
602
+ duration?: "auto" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15";
603
+ /**
604
+ * @description Aspect ratio for the generated video. Only meaningful when `prompt` is set and the model supports it.
605
+ * @example 16:9
606
+ * @enum {string}
607
+ */
608
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "21:9" | "9:21";
609
+ /**
610
+ * @description Set to `true` to request audio generation alongside the video. Only meaningful for video generation models that support it (e.g. `fal/seedance-2.0`).
611
+ * @default false
612
+ */
613
+ generateAudio?: boolean;
596
614
  /**
597
615
  * @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.
598
616
  * @example false
@@ -649,10 +667,22 @@ export interface components {
649
667
  */
650
668
  prompt?: string;
651
669
  /**
652
- * @description The generation model to use when `prompt` is set (e.g. `flux-schnell`). Defaults to the platform's preferred generator if omitted.
670
+ * @description The generation model to use when `prompt` is set (e.g. `flux-schnell`, `fal/flux-schnell`, `fal/nano-banana-2`). Defaults to the platform's preferred generator if omitted.
653
671
  * @example flux-schnell
654
672
  */
655
673
  model?: string;
674
+ /**
675
+ * @description Output resolution tier for supported image generation models. `1K` (default), `2K`, or `4K`. Only meaningful when `prompt` is set.
676
+ * @example 1K
677
+ * @enum {string}
678
+ */
679
+ resolution?: "1K" | "2K" | "4K";
680
+ /**
681
+ * @description Aspect ratio for the generated image. Only meaningful when `prompt` is set and the model supports it.
682
+ * @example 1:1
683
+ * @enum {string}
684
+ */
685
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "21:9" | "9:21";
656
686
  crop?: components["schemas"]["Crop"];
657
687
  };
658
688
  /**
@@ -849,10 +879,22 @@ export interface components {
849
879
  */
850
880
  newscaster?: boolean;
851
881
  /**
852
- * @description The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.
882
+ * @description The generation model to use when `prompt` is set (e.g. `polly-neural`, `fal/elevenlabs-tts`, `fal/minimax-speech`, `fal/elevenlabs-music`). Defaults to the platform's preferred generator if omitted.
853
883
  * @example polly-neural
854
884
  */
855
885
  model?: string;
886
+ /**
887
+ * @description Target duration in milliseconds for generated music (3,000–600,000). Only meaningful when `prompt` is set and the model is a music generator (e.g. `fal/elevenlabs-music`).
888
+ * @example 30000
889
+ */
890
+ musicLengthMs?: number;
891
+ /**
892
+ * @description Set to `true` to force instrumental music (no vocals). Only meaningful for music generation models.
893
+ * @default false
894
+ */
895
+ forceInstrumental?: boolean;
896
+ /** @description An optional structured composition plan for music generation. Only meaningful for music generation models (e.g. `fal/elevenlabs-music`). */
897
+ compositionPlan?: string;
856
898
  /** @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. */
857
899
  trim?: number;
858
900
  /** @description Set the volume of the audio clip. Use a number or an array of [Tween](./#tocs_tween) objects to create custom volume transitions. */
@@ -487,6 +487,20 @@ exports.imageassetImageAssetSchema = zod_1.z.object({
487
487
  src: zod_1.z.optional(zod_1.z.string().min(1).regex(/\S/)),
488
488
  prompt: zod_1.z.optional(zod_1.z.string().max(4000)),
489
489
  model: zod_1.z.optional(zod_1.z.string()),
490
+ resolution: zod_1.z.optional(zod_1.z.enum([
491
+ '1K',
492
+ '2K',
493
+ '4K'
494
+ ])),
495
+ aspectRatio: zod_1.z.optional(zod_1.z.enum([
496
+ '1:1',
497
+ '16:9',
498
+ '9:16',
499
+ '4:3',
500
+ '3:4',
501
+ '21:9',
502
+ '9:21'
503
+ ])),
490
504
  crop: zod_1.z.optional(exports.cropCropSchema)
491
505
  }).strict().superRefine((data, ctx) => {
492
506
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
@@ -2190,6 +2204,15 @@ exports.audioassetAudioAssetSchema = zod_1.z.object({
2190
2204
  language: zod_1.z.optional(zod_1.z.string()),
2191
2205
  newscaster: zod_1.z.optional(zod_1.z.boolean()).default(false),
2192
2206
  model: zod_1.z.optional(zod_1.z.string()),
2207
+ musicLengthMs: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2208
+ return undefined; if (Array.isArray(v))
2209
+ return v; if (typeof v === 'string') {
2210
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2211
+ return v;
2212
+ return Number(v);
2213
+ } return v; }), zod_1.z.number().gte(3000).lte(600000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2214
+ forceInstrumental: zod_1.z.optional(zod_1.z.boolean()).default(false),
2215
+ compositionPlan: zod_1.z.optional(zod_1.z.string().max(4000)),
2193
2216
  trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2194
2217
  return undefined; if (Array.isArray(v))
2195
2218
  return v; if (typeof v === 'string') {
@@ -2425,8 +2448,37 @@ exports.videoassetVideoAssetSchema = zod_1.z.object({
2425
2448
  src: zod_1.z.optional(zod_1.z.string().min(1).regex(/\S/)),
2426
2449
  prompt: zod_1.z.optional(zod_1.z.string().max(4000)),
2427
2450
  inputSrc: zod_1.z.optional(zod_1.z.string().min(1)),
2428
- seed: zod_1.z.optional(zod_1.z.string().min(1)),
2429
2451
  model: zod_1.z.optional(zod_1.z.string()),
2452
+ resolution: zod_1.z.optional(zod_1.z.enum([
2453
+ '480p',
2454
+ '720p',
2455
+ '1080p'
2456
+ ])),
2457
+ duration: zod_1.z.optional(zod_1.z.enum([
2458
+ 'auto',
2459
+ '4',
2460
+ '5',
2461
+ '6',
2462
+ '7',
2463
+ '8',
2464
+ '9',
2465
+ '10',
2466
+ '11',
2467
+ '12',
2468
+ '13',
2469
+ '14',
2470
+ '15'
2471
+ ])),
2472
+ aspectRatio: zod_1.z.optional(zod_1.z.enum([
2473
+ '1:1',
2474
+ '16:9',
2475
+ '9:16',
2476
+ '4:3',
2477
+ '3:4',
2478
+ '21:9',
2479
+ '9:21'
2480
+ ])),
2481
+ generateAudio: zod_1.z.optional(zod_1.z.boolean()).default(false),
2430
2482
  transcode: zod_1.z.optional(zod_1.z.boolean()),
2431
2483
  trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2432
2484
  return undefined; if (Array.isArray(v))