@shotstack/schemas 1.18.0 → 1.18.2

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/schema.d.ts CHANGED
@@ -684,8 +684,9 @@ export interface components {
684
684
  *
685
685
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
686
686
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
687
- * with `model` and configure it with model-specific `options` (including a
688
- * starting image for image-to-video). The generated `src` is filled in
687
+ * with `model` and configure it with model-specific `options`. Models that
688
+ * animate a starting image take it as `options.inputSrc`; the default model
689
+ * generates from the prompt alone. The generated `src` is filled in
689
690
  * automatically.
690
691
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
691
692
  * generation — the video is regenerated from the prompt at render time.
@@ -703,7 +704,7 @@ export interface components {
703
704
  */
704
705
  src?: string;
705
706
  /**
706
- * @description A text prompt to generate the video from. The engine generates a video at render time and fills `src` automatically; an existing `src` is treated as a preview placeholder and replaced. Use `model` to choose the generator and `options` to configure it (including a starting image for image-to-video).
707
+ * @description A text prompt to generate the video from. The engine generates a video at render time and fills `src` automatically; an existing `src` is treated as a preview placeholder and replaced. Use `model` to choose the generator and `options` to configure it. A starting image goes in `options.inputSrc`, on the models that accept one.
707
708
  * @example Slowly zoom out and orbit left around the object.
708
709
  */
709
710
  prompt?: string;
@@ -1127,7 +1128,10 @@ export interface components {
1127
1128
  trim?: number;
1128
1129
  };
1129
1130
  /**
1130
- * @description The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
1131
+ * @deprecated
1132
+ * @description **Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**
1133
+ *
1134
+ * The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
1131
1135
  * be read and burnt to the video.
1132
1136
  *
1133
1137
  * Captions can be applied independently from a video or audio file for greater
@@ -1390,9 +1394,10 @@ export interface components {
1390
1394
  /**
1391
1395
  * @deprecated
1392
1396
  * @description **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
1393
- * with `prompt` and `inputSrc` instead.** This type continues to function and is
1394
- * internally rewritten to VideoAsset; no behaviour change for existing
1395
- * integrations.
1397
+ * with `prompt`, a `model` that accepts a starting image, and that image in
1398
+ * `options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to
1399
+ * function and is internally rewritten to VideoAsset; no behaviour change for
1400
+ * existing integrations.
1396
1401
  *
1397
1402
  * The ImageToVideoAsset lets you create a video from an image and a text prompt.
1398
1403
  */
@@ -3018,6 +3023,7 @@ export interface components {
3018
3023
  * <li>`fetching` - assets are being fetched</li>
3019
3024
  * <li>`preprocessing` - video assets are being processed for compatibility</li>
3020
3025
  * <li>`rendering` - the asset is being rendered</li>
3026
+ * <li>`generating` - AI/media generation is in progress</li>
3021
3027
  * <li>`saving` - the final asset is being saved to storage</li>
3022
3028
  * <li>`done` - the asset is ready to be downloaded</li>
3023
3029
  * <li>`failed` - there was an error rendering the asset</li>
@@ -3025,7 +3031,7 @@ export interface components {
3025
3031
  * @example done
3026
3032
  * @enum {string}
3027
3033
  */
3028
- status: "queued" | "fetching" | "preprocessing" | "rendering" | "saving" | "done" | "failed";
3034
+ status: "queued" | "fetching" | "preprocessing" | "rendering" | "generating" | "saving" | "done" | "failed";
3029
3035
  /**
3030
3036
  * @description An error message, only displayed if an error occurred.
3031
3037
  * @example
@@ -4042,13 +4048,7 @@ export interface operations {
4042
4048
  /** @description What one generation with this model costs. */
4043
4049
  pricing?: {
4044
4050
  /**
4045
- * @description What one unit is. `render` means the whole generation counts as one unit, whatever its size.
4046
- * @example second
4047
- * @enum {string}
4048
- */
4049
- unit: "render" | "second" | "minute" | "thousandCharacters";
4050
- /**
4051
- * @description Credits per unit. A number when the rate is flat, or an object keyed by the values of the options named in `tieredBy`.
4051
+ * @description Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.
4052
4052
  * @example {
4053
4053
  * "480p": 0.9375,
4054
4054
  * "720p": 1.8962,
@@ -4058,18 +4058,48 @@ export interface operations {
4058
4058
  credits: number | {
4059
4059
  [key: string]: unknown;
4060
4060
  };
4061
- /**
4062
- * @description The options whose values select the rate, outermost first. Absent when `credits` is a single number.
4063
- * @example [
4064
- * "resolution"
4065
- * ]
4066
- */
4067
- tieredBy?: string[];
4068
- /**
4069
- * @description The fewest units a generation is charged for, when a model has a minimum charge.
4070
- * @example 0.1
4071
- */
4072
- minUnits?: number;
4061
+ /** @description The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed. */
4062
+ tieredBy?: {
4063
+ /** @example resolution */
4064
+ option: string;
4065
+ /** @example 720p */
4066
+ default: string;
4067
+ };
4068
+ /** @description How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit. */
4069
+ quantity?: {
4070
+ /**
4071
+ * @description What the count is taken from, and the scale it is measured in.
4072
+ * @example clipSeconds
4073
+ * @enum {string}
4074
+ */
4075
+ measure: "clipSeconds" | "promptCharacters";
4076
+ /**
4077
+ * @description How many of `measure` make one billable unit.
4078
+ * @example 60
4079
+ */
4080
+ per: number;
4081
+ /**
4082
+ * @description Fewest accepted. A smaller request is charged at this.
4083
+ * @example 3
4084
+ */
4085
+ min?: number;
4086
+ /**
4087
+ * @description Most accepted. A larger request is charged at this.
4088
+ * @example 600
4089
+ */
4090
+ max?: number;
4091
+ /**
4092
+ * @description Assumed when the request carries no value.
4093
+ * @example 30
4094
+ */
4095
+ default?: number;
4096
+ /**
4097
+ * @description Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.
4098
+ * @example up
4099
+ * @enum {string}
4100
+ */
4101
+ round?: "up";
4102
+ };
4073
4103
  /**
4074
4104
  * @description The date this rate took effect, or `legacy` for a rate that predates dated pricing.
4075
4105
  * @example 2026-08-13
@@ -120,6 +120,8 @@ exports.captionpropertiesCaptionMarginSchema = zod_1.z.object({
120
120
  }).strict();
121
121
  exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
122
122
  /**
123
+ * **Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**
124
+ *
123
125
  * The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
124
126
  * be read and burnt to the video.
125
127
  *
@@ -130,6 +132,8 @@ exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
130
132
  * To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
131
133
  * matching start and end time.
132
134
  *
135
+ *
136
+ * @deprecated
133
137
  */
134
138
  exports.captionassetCaptionAssetSchema = zod_1.z.object({
135
139
  type: zod_1.z.enum(['caption']),
@@ -425,15 +429,9 @@ exports.fontFontSchema = zod_1.z.object({
425
429
  }).strict();
426
430
  exports.fontSchema = exports.fontFontSchema;
427
431
  /**
428
- * What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
432
+ * What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
429
433
  */
430
434
  exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
431
- unit: zod_1.z.enum([
432
- 'render',
433
- 'second',
434
- 'minute',
435
- 'thousandCharacters'
436
- ]),
437
435
  credits: zod_1.z.union([
438
436
  zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
439
437
  return undefined; if (Array.isArray(v))
@@ -444,14 +442,42 @@ exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
444
442
  } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
445
443
  zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())
446
444
  ]),
447
- tieredBy: zod_1.z.optional(zod_1.z.array(zod_1.z.string())),
448
- minUnits: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
449
- return undefined; if (Array.isArray(v))
450
- return v; if (typeof v === 'string') {
451
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
452
- return v;
453
- return Number(v);
454
- } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
445
+ tieredBy: zod_1.z.optional(zod_1.z.object({
446
+ option: zod_1.z.string(),
447
+ default: zod_1.z.string()
448
+ })),
449
+ quantity: zod_1.z.optional(zod_1.z.object({
450
+ measure: zod_1.z.enum(['clipSeconds', 'promptCharacters']),
451
+ per: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
452
+ return undefined; if (Array.isArray(v))
453
+ return v; if (typeof v === 'string') {
454
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
455
+ return v;
456
+ return Number(v);
457
+ } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
458
+ min: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
459
+ return undefined; if (Array.isArray(v))
460
+ return v; if (typeof v === 'string') {
461
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
462
+ return v;
463
+ return Number(v);
464
+ } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
465
+ max: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
466
+ return undefined; if (Array.isArray(v))
467
+ return v; if (typeof v === 'string') {
468
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
469
+ return v;
470
+ return Number(v);
471
+ } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
472
+ default: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
473
+ return undefined; if (Array.isArray(v))
474
+ return v; if (typeof v === 'string') {
475
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
476
+ return v;
477
+ return Number(v);
478
+ } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
479
+ round: zod_1.z.optional(zod_1.z.enum(['up']))
480
+ })),
455
481
  effectiveFrom: zod_1.z.string()
456
482
  }).strict();
457
483
  /**
@@ -555,9 +581,10 @@ exports.imageassetImageAssetSchema = zod_1.z.object({
555
581
  exports.imageAssetSchema = exports.imageassetImageAssetSchema;
556
582
  /**
557
583
  * **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
558
- * with `prompt` and `inputSrc` instead.** This type continues to function and is
559
- * internally rewritten to VideoAsset; no behaviour change for existing
560
- * integrations.
584
+ * with `prompt`, a `model` that accepts a starting image, and that image in
585
+ * `options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to
586
+ * function and is internally rewritten to VideoAsset; no behaviour change for
587
+ * existing integrations.
561
588
  *
562
589
  * The ImageToVideoAsset lets you create a video from an image and a text prompt.
563
590
  *
@@ -2500,8 +2527,9 @@ exports.transformationSchema = exports.transformationTransformationSchema;
2500
2527
  *
2501
2528
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
2502
2529
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
2503
- * with `model` and configure it with model-specific `options` (including a
2504
- * starting image for image-to-video). The generated `src` is filled in
2530
+ * with `model` and configure it with model-specific `options`. Models that
2531
+ * animate a starting image take it as `options.inputSrc`; the default model
2532
+ * generates from the prompt alone. The generated `src` is filled in
2505
2533
  * automatically.
2506
2534
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
2507
2535
  * generation — the video is regenerated from the prompt at render time.
@@ -2753,6 +2781,7 @@ exports.renderresponsedataRenderResponseDataSchema = zod_1.z.object({
2753
2781
  'fetching',
2754
2782
  'preprocessing',
2755
2783
  'rendering',
2784
+ 'generating',
2756
2785
  'saving',
2757
2786
  'done',
2758
2787
  'failed'
@@ -67,6 +67,8 @@ export declare const captionMarginSchema: z.ZodObject<{
67
67
  right: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
68
68
  }, z.core.$strict>;
69
69
  /**
70
+ * **Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**
71
+ *
70
72
  * The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
71
73
  * be read and burnt to the video.
72
74
  *
@@ -77,6 +79,8 @@ export declare const captionMarginSchema: z.ZodObject<{
77
79
  * To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
78
80
  * matching start and end time.
79
81
  *
82
+ *
83
+ * @deprecated
80
84
  */
81
85
  export declare const captionassetCaptionAssetSchema: z.ZodObject<{
82
86
  type: z.ZodEnum<{
@@ -757,18 +761,27 @@ export declare const fontSchema: z.ZodObject<{
757
761
  src: z.ZodString;
758
762
  }, z.core.$strict>;
759
763
  /**
760
- * What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
764
+ * What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
761
765
  */
762
766
  export declare const generationmodelpricingGenerationModelPricingSchema: z.ZodObject<{
763
- unit: z.ZodEnum<{
764
- render: "render";
765
- second: "second";
766
- minute: "minute";
767
- thousandCharacters: "thousandCharacters";
768
- }>;
769
767
  credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
770
- tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
771
- minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
768
+ tieredBy: z.ZodOptional<z.ZodObject<{
769
+ option: z.ZodString;
770
+ default: z.ZodString;
771
+ }, z.core.$strip>>;
772
+ quantity: z.ZodOptional<z.ZodObject<{
773
+ measure: z.ZodEnum<{
774
+ clipSeconds: "clipSeconds";
775
+ promptCharacters: "promptCharacters";
776
+ }>;
777
+ per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
778
+ min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
779
+ max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
780
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
781
+ round: z.ZodOptional<z.ZodEnum<{
782
+ up: "up";
783
+ }>>;
784
+ }, z.core.$strip>>;
772
785
  effectiveFrom: z.ZodString;
773
786
  }, z.core.$strict>;
774
787
  /**
@@ -782,15 +795,24 @@ export declare const generationmodelGenerationModelSchema: z.ZodObject<{
782
795
  audio: "audio";
783
796
  }>;
784
797
  pricing: z.ZodOptional<z.ZodObject<{
785
- unit: z.ZodEnum<{
786
- render: "render";
787
- second: "second";
788
- minute: "minute";
789
- thousandCharacters: "thousandCharacters";
790
- }>;
791
798
  credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
792
- tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
793
- minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
799
+ tieredBy: z.ZodOptional<z.ZodObject<{
800
+ option: z.ZodString;
801
+ default: z.ZodString;
802
+ }, z.core.$strip>>;
803
+ quantity: z.ZodOptional<z.ZodObject<{
804
+ measure: z.ZodEnum<{
805
+ clipSeconds: "clipSeconds";
806
+ promptCharacters: "promptCharacters";
807
+ }>;
808
+ per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
809
+ min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
810
+ max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
811
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
812
+ round: z.ZodOptional<z.ZodEnum<{
813
+ up: "up";
814
+ }>>;
815
+ }, z.core.$strip>>;
794
816
  effectiveFrom: z.ZodString;
795
817
  }, z.core.$strict>>;
796
818
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -913,9 +935,10 @@ export declare const imageAssetSchema: z.ZodObject<{
913
935
  }, z.core.$strict>;
914
936
  /**
915
937
  * **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
916
- * with `prompt` and `inputSrc` instead.** This type continues to function and is
917
- * internally rewritten to VideoAsset; no behaviour change for existing
918
- * integrations.
938
+ * with `prompt`, a `model` that accepts a starting image, and that image in
939
+ * `options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to
940
+ * function and is internally rewritten to VideoAsset; no behaviour change for
941
+ * existing integrations.
919
942
  *
920
943
  * The ImageToVideoAsset lets you create a video from an image and a text prompt.
921
944
  *
@@ -1492,15 +1515,24 @@ export declare const generationmodellistresponseGenerationModelListResponseSchem
1492
1515
  audio: "audio";
1493
1516
  }>;
1494
1517
  pricing: z.ZodOptional<z.ZodObject<{
1495
- unit: z.ZodEnum<{
1496
- render: "render";
1497
- second: "second";
1498
- minute: "minute";
1499
- thousandCharacters: "thousandCharacters";
1500
- }>;
1501
1518
  credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
1502
- tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
1503
- minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
1519
+ tieredBy: z.ZodOptional<z.ZodObject<{
1520
+ option: z.ZodString;
1521
+ default: z.ZodString;
1522
+ }, z.core.$strip>>;
1523
+ quantity: z.ZodOptional<z.ZodObject<{
1524
+ measure: z.ZodEnum<{
1525
+ clipSeconds: "clipSeconds";
1526
+ promptCharacters: "promptCharacters";
1527
+ }>;
1528
+ per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
1529
+ min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
1530
+ max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
1531
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
1532
+ round: z.ZodOptional<z.ZodEnum<{
1533
+ up: "up";
1534
+ }>>;
1535
+ }, z.core.$strip>>;
1504
1536
  effectiveFrom: z.ZodString;
1505
1537
  }, z.core.$strict>>;
1506
1538
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -6980,8 +7012,9 @@ export declare const transformationSchema: z.ZodObject<{
6980
7012
  *
6981
7013
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
6982
7014
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
6983
- * with `model` and configure it with model-specific `options` (including a
6984
- * starting image for image-to-video). The generated `src` is filled in
7015
+ * with `model` and configure it with model-specific `options`. Models that
7016
+ * animate a starting image take it as `options.inputSrc`; the default model
7017
+ * generates from the prompt alone. The generated `src` is filled in
6985
7018
  * automatically.
6986
7019
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
6987
7020
  * generation — the video is regenerated from the prompt at render time.
@@ -24575,6 +24608,7 @@ export declare const renderresponsedataRenderResponseDataSchema: z.ZodObject<{
24575
24608
  fetching: "fetching";
24576
24609
  preprocessing: "preprocessing";
24577
24610
  rendering: "rendering";
24611
+ generating: "generating";
24578
24612
  saving: "saving";
24579
24613
  }>;
24580
24614
  error: z.ZodOptional<z.ZodString>;
@@ -26957,6 +26991,7 @@ export declare const renderResponseDataSchema: z.ZodObject<{
26957
26991
  fetching: "fetching";
26958
26992
  preprocessing: "preprocessing";
26959
26993
  rendering: "rendering";
26994
+ generating: "generating";
26960
26995
  saving: "saving";
26961
26996
  }>;
26962
26997
  error: z.ZodOptional<z.ZodString>;
@@ -29345,6 +29380,7 @@ export declare const renderresponseRenderResponseSchema: z.ZodObject<{
29345
29380
  fetching: "fetching";
29346
29381
  preprocessing: "preprocessing";
29347
29382
  rendering: "rendering";
29383
+ generating: "generating";
29348
29384
  saving: "saving";
29349
29385
  }>;
29350
29386
  error: z.ZodOptional<z.ZodString>;
@@ -31731,6 +31767,7 @@ export declare const renderResponseSchema: z.ZodObject<{
31731
31767
  fetching: "fetching";
31732
31768
  preprocessing: "preprocessing";
31733
31769
  rendering: "rendering";
31770
+ generating: "generating";
31734
31771
  saving: "saving";
31735
31772
  }>;
31736
31773
  error: z.ZodOptional<z.ZodString>;
@@ -50708,6 +50745,7 @@ export declare const getRenderResponse: z.ZodObject<{
50708
50745
  fetching: "fetching";
50709
50746
  preprocessing: "preprocessing";
50710
50747
  rendering: "rendering";
50748
+ generating: "generating";
50711
50749
  saving: "saving";
50712
50750
  }>;
50713
50751
  error: z.ZodOptional<z.ZodString>;
@@ -60489,15 +60527,24 @@ export declare const getModelsResponse: z.ZodObject<{
60489
60527
  audio: "audio";
60490
60528
  }>;
60491
60529
  pricing: z.ZodOptional<z.ZodObject<{
60492
- unit: z.ZodEnum<{
60493
- render: "render";
60494
- second: "second";
60495
- minute: "minute";
60496
- thousandCharacters: "thousandCharacters";
60497
- }>;
60498
60530
  credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
60499
- tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
60500
- minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60531
+ tieredBy: z.ZodOptional<z.ZodObject<{
60532
+ option: z.ZodString;
60533
+ default: z.ZodString;
60534
+ }, z.core.$strip>>;
60535
+ quantity: z.ZodOptional<z.ZodObject<{
60536
+ measure: z.ZodEnum<{
60537
+ clipSeconds: "clipSeconds";
60538
+ promptCharacters: "promptCharacters";
60539
+ }>;
60540
+ per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
60541
+ min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60542
+ max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60543
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60544
+ round: z.ZodOptional<z.ZodEnum<{
60545
+ up: "up";
60546
+ }>>;
60547
+ }, z.core.$strip>>;
60501
60548
  effectiveFrom: z.ZodString;
60502
60549
  }, z.core.$strict>>;
60503
60550
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -60521,15 +60568,24 @@ export declare const getModelResponse: z.ZodObject<{
60521
60568
  audio: "audio";
60522
60569
  }>;
60523
60570
  pricing: z.ZodOptional<z.ZodObject<{
60524
- unit: z.ZodEnum<{
60525
- render: "render";
60526
- second: "second";
60527
- minute: "minute";
60528
- thousandCharacters: "thousandCharacters";
60529
- }>;
60530
60571
  credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
60531
- tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
60532
- minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60572
+ tieredBy: z.ZodOptional<z.ZodObject<{
60573
+ option: z.ZodString;
60574
+ default: z.ZodString;
60575
+ }, z.core.$strip>>;
60576
+ quantity: z.ZodOptional<z.ZodObject<{
60577
+ measure: z.ZodEnum<{
60578
+ clipSeconds: "clipSeconds";
60579
+ promptCharacters: "promptCharacters";
60580
+ }>;
60581
+ per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
60582
+ min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60583
+ max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60584
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
60585
+ round: z.ZodOptional<z.ZodEnum<{
60586
+ up: "up";
60587
+ }>>;
60588
+ }, z.core.$strip>>;
60533
60589
  effectiveFrom: z.ZodString;
60534
60590
  }, z.core.$strict>>;
60535
60591
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -111,6 +111,8 @@ export const captionpropertiesCaptionMarginSchema = z.object({
111
111
  }).strict();
112
112
  export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
113
113
  /**
114
+ * **Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**
115
+ *
114
116
  * The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
115
117
  * be read and burnt to the video.
116
118
  *
@@ -121,6 +123,8 @@ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
121
123
  * To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
122
124
  * matching start and end time.
123
125
  *
126
+ *
127
+ * @deprecated
124
128
  */
125
129
  export const captionassetCaptionAssetSchema = z.object({
126
130
  type: z.enum(['caption']),
@@ -416,15 +420,9 @@ export const fontFontSchema = z.object({
416
420
  }).strict();
417
421
  export const fontSchema = fontFontSchema;
418
422
  /**
419
- * What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
423
+ * What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
420
424
  */
421
425
  export const generationmodelpricingGenerationModelPricingSchema = z.object({
422
- unit: z.enum([
423
- 'render',
424
- 'second',
425
- 'minute',
426
- 'thousandCharacters'
427
- ]),
428
426
  credits: z.union([
429
427
  z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
430
428
  return undefined; if (Array.isArray(v))
@@ -435,14 +433,42 @@ export const generationmodelpricingGenerationModelPricingSchema = z.object({
435
433
  } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
436
434
  z.record(z.string(), z.unknown())
437
435
  ]),
438
- tieredBy: z.optional(z.array(z.string())),
439
- minUnits: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
440
- return undefined; if (Array.isArray(v))
441
- return v; if (typeof v === 'string') {
442
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
443
- return v;
444
- return Number(v);
445
- } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
436
+ tieredBy: z.optional(z.object({
437
+ option: z.string(),
438
+ default: z.string()
439
+ })),
440
+ quantity: z.optional(z.object({
441
+ measure: z.enum(['clipSeconds', 'promptCharacters']),
442
+ per: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
443
+ return undefined; if (Array.isArray(v))
444
+ return v; if (typeof v === 'string') {
445
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
446
+ return v;
447
+ return Number(v);
448
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
449
+ min: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
450
+ return undefined; if (Array.isArray(v))
451
+ return v; if (typeof v === 'string') {
452
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
453
+ return v;
454
+ return Number(v);
455
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
456
+ max: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
457
+ return undefined; if (Array.isArray(v))
458
+ return v; if (typeof v === 'string') {
459
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
460
+ return v;
461
+ return Number(v);
462
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
463
+ default: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
464
+ return undefined; if (Array.isArray(v))
465
+ return v; if (typeof v === 'string') {
466
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
467
+ return v;
468
+ return Number(v);
469
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
470
+ round: z.optional(z.enum(['up']))
471
+ })),
446
472
  effectiveFrom: z.string()
447
473
  }).strict();
448
474
  /**
@@ -546,9 +572,10 @@ export const imageassetImageAssetSchema = z.object({
546
572
  export const imageAssetSchema = imageassetImageAssetSchema;
547
573
  /**
548
574
  * **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
549
- * with `prompt` and `inputSrc` instead.** This type continues to function and is
550
- * internally rewritten to VideoAsset; no behaviour change for existing
551
- * integrations.
575
+ * with `prompt`, a `model` that accepts a starting image, and that image in
576
+ * `options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to
577
+ * function and is internally rewritten to VideoAsset; no behaviour change for
578
+ * existing integrations.
552
579
  *
553
580
  * The ImageToVideoAsset lets you create a video from an image and a text prompt.
554
581
  *
@@ -2491,8 +2518,9 @@ export const transformationSchema = transformationTransformationSchema;
2491
2518
  *
2492
2519
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
2493
2520
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
2494
- * with `model` and configure it with model-specific `options` (including a
2495
- * starting image for image-to-video). The generated `src` is filled in
2521
+ * with `model` and configure it with model-specific `options`. Models that
2522
+ * animate a starting image take it as `options.inputSrc`; the default model
2523
+ * generates from the prompt alone. The generated `src` is filled in
2496
2524
  * automatically.
2497
2525
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
2498
2526
  * generation — the video is regenerated from the prompt at render time.
@@ -2744,6 +2772,7 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
2744
2772
  'fetching',
2745
2773
  'preprocessing',
2746
2774
  'rendering',
2775
+ 'generating',
2747
2776
  'saving',
2748
2777
  'done',
2749
2778
  'failed'