@shotstack/schemas 1.18.1 → 1.18.3

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.
@@ -710,7 +710,7 @@
710
710
  "model": {
711
711
  "description": "The identifier to set as the asset `model`. Carries no provider name, so routing can change without a public rename.",
712
712
  "type": "string",
713
- "example": "seedance-2.0"
713
+ "example": "seedance-2.0-text-to-video"
714
714
  },
715
715
  "type": {
716
716
  "description": "The asset type this model generates.",
@@ -725,19 +725,8 @@
725
725
  "pricing": {
726
726
  "description": "What one generation with this model costs.",
727
727
  "properties": {
728
- "unit": {
729
- "description": "What one unit is. `render` means the whole generation counts as one unit, whatever its size.",
730
- "type": "string",
731
- "enum": [
732
- "render",
733
- "second",
734
- "minute",
735
- "thousandCharacters"
736
- ],
737
- "example": "second"
738
- },
739
728
  "credits": {
740
- "description": "Credits per unit. A number when the rate is flat, or an object keyed by the values of the options named in `tieredBy`.",
729
+ "description": "Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.",
741
730
  "oneOf": [
742
731
  {
743
732
  "type": "number"
@@ -754,19 +743,69 @@
754
743
  }
755
744
  },
756
745
  "tieredBy": {
757
- "description": "The options whose values select the rate, outermost first. Absent when `credits` is a single number.",
758
- "type": "array",
759
- "items": {
760
- "type": "string"
746
+ "description": "The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed.",
747
+ "type": "object",
748
+ "properties": {
749
+ "option": {
750
+ "type": "string",
751
+ "example": "resolution"
752
+ },
753
+ "default": {
754
+ "type": "string",
755
+ "example": "720p"
756
+ }
761
757
  },
762
- "example": [
763
- "resolution"
758
+ "required": [
759
+ "option",
760
+ "default"
764
761
  ]
765
762
  },
766
- "minUnits": {
767
- "description": "The fewest units a generation is charged for, when a model has a minimum charge.",
768
- "type": "number",
769
- "example": 0.1
763
+ "quantity": {
764
+ "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.",
765
+ "type": "object",
766
+ "properties": {
767
+ "measure": {
768
+ "description": "What the count is taken from, and the scale it is measured in.",
769
+ "type": "string",
770
+ "enum": [
771
+ "clipSeconds",
772
+ "promptCharacters"
773
+ ],
774
+ "example": "clipSeconds"
775
+ },
776
+ "per": {
777
+ "description": "How many of `measure` make one billable unit.",
778
+ "type": "number",
779
+ "example": 60
780
+ },
781
+ "min": {
782
+ "description": "Fewest accepted. A smaller request is charged at this.",
783
+ "type": "number",
784
+ "example": 3
785
+ },
786
+ "max": {
787
+ "description": "Most accepted. A larger request is charged at this.",
788
+ "type": "number",
789
+ "example": 600
790
+ },
791
+ "default": {
792
+ "description": "Assumed when the request carries no value.",
793
+ "type": "number",
794
+ "example": 30
795
+ },
796
+ "round": {
797
+ "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.",
798
+ "type": "string",
799
+ "enum": [
800
+ "up"
801
+ ],
802
+ "example": "up"
803
+ }
804
+ },
805
+ "required": [
806
+ "measure",
807
+ "per"
808
+ ]
770
809
  },
771
810
  "effectiveFrom": {
772
811
  "description": "The date this rate took effect, or `legacy` for a rate that predates dated pricing.",
@@ -775,7 +814,6 @@
775
814
  }
776
815
  },
777
816
  "required": [
778
- "unit",
779
817
  "credits",
780
818
  "effectiveFrom"
781
819
  ],
@@ -818,7 +856,7 @@
818
856
  "schema": {
819
857
  "type": "string"
820
858
  },
821
- "example": "seedance-2.0"
859
+ "example": "seedance-2.0-text-to-video"
822
860
  }
823
861
  ]
824
862
  },
@@ -1558,9 +1596,9 @@
1558
1596
  "example": "Slowly zoom out and orbit left around the object."
1559
1597
  },
1560
1598
  "model": {
1561
- "description": "The generation model to use when `prompt` is set (e.g. `shotstack-itv-mini`, `ray-flash-2`, `seedance-2.0`). Defaults to `seedance-2.0` if omitted. Each model's available options are defined by the model registry.",
1599
+ "description": "The generation model to use when `prompt` is set (e.g. `seedance-2.0-text-to-video`). Defaults to `seedance-2.0-text-to-video` if omitted. `GET /models` lists what is available and the options each accepts.",
1562
1600
  "type": "string",
1563
- "example": "seedance-2.0"
1601
+ "example": "seedance-2.0-text-to-video"
1564
1602
  },
1565
1603
  "options": {
1566
1604
  "description": "Model-specific generation settings. Valid keys and values depend on the chosen `model` and are defined by the model registry. Omitted options use the model's defaults. Unknown or invalid options are rejected.",
@@ -2564,7 +2602,7 @@
2564
2602
  },
2565
2603
  "ImageToVideoAsset": {
2566
2604
  "deprecated": true,
2567
- "description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt`, a `model` that accepts a starting image, and that image in\n`options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to\nfunction and is internally rewritten to VideoAsset; no behaviour change for\nexisting integrations.\n\nThe ImageToVideoAsset lets you create a video from an image and a text prompt.\n",
2605
+ "description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt`, a `model` that accepts a starting image, and that image in\n`options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to\nfunction and is internally rewritten to VideoAsset; no behaviour change for\nexisting integrations.\n\nThe ImageToVideoAsset lets you create a video from an image and a text prompt.\n",
2568
2606
  "properties": {
2569
2607
  "type": {
2570
2608
  "type": "string",
@@ -1153,7 +1153,7 @@
1153
1153
  },
1154
1154
  "ImageToVideoAsset": {
1155
1155
  "deprecated": true,
1156
- "description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt`, a `model` that accepts a starting image, and that image in\n`options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to\nfunction and is internally rewritten to VideoAsset; no behaviour change for\nexisting integrations.\n\nThe ImageToVideoAsset lets you create a video from an image and a text prompt.",
1156
+ "description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt`, a `model` that accepts a starting image, and that image in\n`options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to\nfunction and is internally rewritten to VideoAsset; no behaviour change for\nexisting integrations.\n\nThe ImageToVideoAsset lets you create a video from an image and a text prompt.",
1157
1157
  "properties": {
1158
1158
  "type": {
1159
1159
  "type": "string",
@@ -3705,10 +3705,10 @@
3705
3705
  ]
3706
3706
  },
3707
3707
  "model": {
3708
- "description": "The generation model to use when `prompt` is set (e.g. `shotstack-itv-mini`, `ray-flash-2`, `seedance-2.0`). Defaults to `seedance-2.0` if omitted. Each model's available options are defined by the model registry.",
3708
+ "description": "The generation model to use when `prompt` is set (e.g. `seedance-2.0-text-to-video`). Defaults to `seedance-2.0-text-to-video` if omitted. `GET /models` lists what is available and the options each accepts.",
3709
3709
  "type": "string",
3710
3710
  "examples": [
3711
- "seedance-2.0"
3711
+ "seedance-2.0-text-to-video"
3712
3712
  ]
3713
3713
  },
3714
3714
  "options": {