@shotstack/schemas 1.17.0 → 1.18.1
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 +190 -5
- package/dist/json-schema/edit.json +5 -4
- package/dist/json-schema/index.cjs +1 -1
- package/dist/json-schema/index.js +1 -1
- package/dist/schema.d.ts +194 -8
- package/dist/zod/zod.gen.cjs +92 -11
- package/dist/zod/zod.gen.d.ts +149 -5
- package/dist/zod/zod.gen.js +85 -5
- package/dist/zod/zod.gen.ts +82 -5
- package/package.json +1 -1
package/dist/api.bundled.json
CHANGED
|
@@ -639,6 +639,189 @@
|
|
|
639
639
|
}
|
|
640
640
|
]
|
|
641
641
|
},
|
|
642
|
+
"/models": {
|
|
643
|
+
"get": {
|
|
644
|
+
"description": "List the generation models available for `prompt`-bearing image, video and audio\nassets, with the options each accepts and what it costs in credits.\n\nUse this to populate a model picker and render its option fields, rather than\nhard coding a model list. A newly launched model appears here without any change\non your side. Each entry carries the asset type it generates, so filter the list\nclient side when a picker only needs one kind.\n\nOption schemas are omitted by default. Request them with `expand=options`.\n\n**Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>\n",
|
|
645
|
+
"summary": "List Generation Models",
|
|
646
|
+
"operationId": "getModels",
|
|
647
|
+
"responses": {
|
|
648
|
+
"200": {
|
|
649
|
+
"description": "The available generation models.",
|
|
650
|
+
"content": {
|
|
651
|
+
"application/json": {
|
|
652
|
+
"schema": {
|
|
653
|
+
"description": "The generation models available to this account.",
|
|
654
|
+
"properties": {
|
|
655
|
+
"models": {
|
|
656
|
+
"description": "The available models.",
|
|
657
|
+
"type": "array",
|
|
658
|
+
"items": {
|
|
659
|
+
"$ref": "#/paths/~1models~1%7Bid%7D/get/responses/200/content/application~1json/schema"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"required": [
|
|
664
|
+
"models"
|
|
665
|
+
],
|
|
666
|
+
"type": "object"
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"security": [
|
|
673
|
+
{
|
|
674
|
+
"DeveloperKey": []
|
|
675
|
+
}
|
|
676
|
+
],
|
|
677
|
+
"tags": [
|
|
678
|
+
"Edit"
|
|
679
|
+
]
|
|
680
|
+
},
|
|
681
|
+
"parameters": [
|
|
682
|
+
{
|
|
683
|
+
"in": "query",
|
|
684
|
+
"name": "expand",
|
|
685
|
+
"required": false,
|
|
686
|
+
"description": "Set to `options` to include each model's option schema in the list. Omitted by default to keep the response small.",
|
|
687
|
+
"schema": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"enum": [
|
|
690
|
+
"options"
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
"example": "options"
|
|
694
|
+
}
|
|
695
|
+
]
|
|
696
|
+
},
|
|
697
|
+
"/models/{id}": {
|
|
698
|
+
"get": {
|
|
699
|
+
"description": "Get one generation model, including the JSON Schema for the options it accepts and\nwhat it costs in credits.\n\n**Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>\n",
|
|
700
|
+
"summary": "Get Generation Model",
|
|
701
|
+
"operationId": "getModel",
|
|
702
|
+
"responses": {
|
|
703
|
+
"200": {
|
|
704
|
+
"description": "The generation model, with its option schema.",
|
|
705
|
+
"content": {
|
|
706
|
+
"application/json": {
|
|
707
|
+
"schema": {
|
|
708
|
+
"description": "A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts and what it costs. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.",
|
|
709
|
+
"properties": {
|
|
710
|
+
"model": {
|
|
711
|
+
"description": "The identifier to set as the asset `model`. Carries no provider name, so routing can change without a public rename.",
|
|
712
|
+
"type": "string",
|
|
713
|
+
"example": "seedance-2.0"
|
|
714
|
+
},
|
|
715
|
+
"type": {
|
|
716
|
+
"description": "The asset type this model generates.",
|
|
717
|
+
"type": "string",
|
|
718
|
+
"enum": [
|
|
719
|
+
"image",
|
|
720
|
+
"video",
|
|
721
|
+
"audio"
|
|
722
|
+
],
|
|
723
|
+
"example": "video"
|
|
724
|
+
},
|
|
725
|
+
"pricing": {
|
|
726
|
+
"description": "What one generation with this model costs.",
|
|
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
|
+
"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`.",
|
|
741
|
+
"oneOf": [
|
|
742
|
+
{
|
|
743
|
+
"type": "number"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"type": "object",
|
|
747
|
+
"additionalProperties": true
|
|
748
|
+
}
|
|
749
|
+
],
|
|
750
|
+
"example": {
|
|
751
|
+
"480p": 0.9375,
|
|
752
|
+
"720p": 1.8962,
|
|
753
|
+
"1080p": 4.2625
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
"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"
|
|
761
|
+
},
|
|
762
|
+
"example": [
|
|
763
|
+
"resolution"
|
|
764
|
+
]
|
|
765
|
+
},
|
|
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
|
|
770
|
+
},
|
|
771
|
+
"effectiveFrom": {
|
|
772
|
+
"description": "The date this rate took effect, or `legacy` for a rate that predates dated pricing.",
|
|
773
|
+
"type": "string",
|
|
774
|
+
"example": "2026-08-13"
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
"required": [
|
|
778
|
+
"unit",
|
|
779
|
+
"credits",
|
|
780
|
+
"effectiveFrom"
|
|
781
|
+
],
|
|
782
|
+
"type": "object"
|
|
783
|
+
},
|
|
784
|
+
"options": {
|
|
785
|
+
"description": "JSON Schema for the model's `options` object. Only returned for a single model, or for a list requested with `expand=options`. Values outside this schema are rejected.",
|
|
786
|
+
"type": "object",
|
|
787
|
+
"additionalProperties": true
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
"required": [
|
|
791
|
+
"model",
|
|
792
|
+
"type"
|
|
793
|
+
],
|
|
794
|
+
"type": "object"
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"404": {
|
|
800
|
+
"description": "No model exists with that identifier."
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"security": [
|
|
804
|
+
{
|
|
805
|
+
"DeveloperKey": []
|
|
806
|
+
}
|
|
807
|
+
],
|
|
808
|
+
"tags": [
|
|
809
|
+
"Edit"
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
"parameters": [
|
|
813
|
+
{
|
|
814
|
+
"in": "path",
|
|
815
|
+
"name": "id",
|
|
816
|
+
"required": true,
|
|
817
|
+
"description": "The model identifier, as returned by the list endpoint.",
|
|
818
|
+
"schema": {
|
|
819
|
+
"type": "string"
|
|
820
|
+
},
|
|
821
|
+
"example": "seedance-2.0"
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
},
|
|
642
825
|
"/assets/{id}": {
|
|
643
826
|
"get": {
|
|
644
827
|
"responses": {
|
|
@@ -1350,7 +1533,7 @@
|
|
|
1350
1533
|
"additionalProperties": false
|
|
1351
1534
|
},
|
|
1352
1535
|
"VideoAsset": {
|
|
1353
|
-
"description": "The VideoAsset adds a video to a Clip. The video can be sourced from a URL\n(`src`), generated from a text prompt (`prompt`), or both. At least one of\n`src` or `prompt` must be provided.\n\n- **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.\n- **Generated:** set `prompt` to describe the motion. Choose a generator\n with `model` and configure it with model-specific `options
|
|
1536
|
+
"description": "The VideoAsset adds a video to a Clip. The video can be sourced from a URL\n(`src`), generated from a text prompt (`prompt`), or both. At least one of\n`src` or `prompt` must be provided.\n\n- **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.\n- **Generated:** set `prompt` to describe the motion. Choose a generator\n with `model` and configure it with model-specific `options`. Models that\n animate a starting image take it as `options.inputSrc`; the default model\n generates from the prompt alone. The generated `src` is filled in\n automatically.\n- **Both:** `src` acts as a preview placeholder while `prompt` drives\n generation — the video is regenerated from the prompt at render time.\n Unchanged prompts and options resolve from the generation cache.\n",
|
|
1354
1537
|
"type": "object",
|
|
1355
1538
|
"properties": {
|
|
1356
1539
|
"type": {
|
|
@@ -1369,7 +1552,7 @@
|
|
|
1369
1552
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4"
|
|
1370
1553
|
},
|
|
1371
1554
|
"prompt": {
|
|
1372
|
-
"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
|
|
1555
|
+
"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.",
|
|
1373
1556
|
"type": "string",
|
|
1374
1557
|
"maxLength": 4000,
|
|
1375
1558
|
"example": "Slowly zoom out and orbit left around the object."
|
|
@@ -1981,7 +2164,8 @@
|
|
|
1981
2164
|
]
|
|
1982
2165
|
},
|
|
1983
2166
|
"CaptionAsset": {
|
|
1984
|
-
"
|
|
2167
|
+
"deprecated": true,
|
|
2168
|
+
"description": "**Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**\n\nThe CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with\nmatching start and end time.\n",
|
|
1985
2169
|
"type": "object",
|
|
1986
2170
|
"properties": {
|
|
1987
2171
|
"type": {
|
|
@@ -2380,7 +2564,7 @@
|
|
|
2380
2564
|
},
|
|
2381
2565
|
"ImageToVideoAsset": {
|
|
2382
2566
|
"deprecated": true,
|
|
2383
|
-
"description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt` and `inputSrc`
|
|
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",
|
|
2384
2568
|
"properties": {
|
|
2385
2569
|
"type": {
|
|
2386
2570
|
"type": "string",
|
|
@@ -4782,12 +4966,13 @@
|
|
|
4782
4966
|
"example": "basic"
|
|
4783
4967
|
},
|
|
4784
4968
|
"status": {
|
|
4785
|
-
"description": "The status of the render task. <ul>\n <li>`queued` - render is queued waiting to be rendered</li>\n <li>`fetching` - assets are being fetched</li>\n <li>`preprocessing` - video assets are being processed for compatibility</li>\n <li>`rendering` - the asset is being rendered</li>\n <li>`saving` - the final asset is being saved to storage</li>\n <li>`done` - the asset is ready to be downloaded</li>\n <li>`failed` - there was an error rendering the asset</li>\n</ul>",
|
|
4969
|
+
"description": "The status of the render task. <ul>\n <li>`queued` - render is queued waiting to be rendered</li>\n <li>`fetching` - assets are being fetched</li>\n <li>`preprocessing` - video assets are being processed for compatibility</li>\n <li>`rendering` - the asset is being rendered</li>\n <li>`generating` - AI/media generation is in progress</li>\n <li>`saving` - the final asset is being saved to storage</li>\n <li>`done` - the asset is ready to be downloaded</li>\n <li>`failed` - there was an error rendering the asset</li>\n</ul>",
|
|
4786
4970
|
"enum": [
|
|
4787
4971
|
"queued",
|
|
4788
4972
|
"fetching",
|
|
4789
4973
|
"preprocessing",
|
|
4790
4974
|
"rendering",
|
|
4975
|
+
"generating",
|
|
4791
4976
|
"saving",
|
|
4792
4977
|
"done",
|
|
4793
4978
|
"failed"
|
|
@@ -202,7 +202,8 @@
|
|
|
202
202
|
]
|
|
203
203
|
},
|
|
204
204
|
"CaptionAsset": {
|
|
205
|
-
"
|
|
205
|
+
"deprecated": true,
|
|
206
|
+
"description": "**Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**\n\nThe CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with\nmatching start and end time.",
|
|
206
207
|
"type": "object",
|
|
207
208
|
"properties": {
|
|
208
209
|
"type": {
|
|
@@ -1152,7 +1153,7 @@
|
|
|
1152
1153
|
},
|
|
1153
1154
|
"ImageToVideoAsset": {
|
|
1154
1155
|
"deprecated": true,
|
|
1155
|
-
"description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt` and `inputSrc`
|
|
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
1157
|
"properties": {
|
|
1157
1158
|
"type": {
|
|
1158
1159
|
"type": "string",
|
|
@@ -3675,7 +3676,7 @@
|
|
|
3675
3676
|
"type": "object"
|
|
3676
3677
|
},
|
|
3677
3678
|
"VideoAsset": {
|
|
3678
|
-
"description": "The VideoAsset adds a video to a Clip. The video can be sourced from a URL\n(`src`), generated from a text prompt (`prompt`), or both. At least one of\n`src` or `prompt` must be provided.\n\n- **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.\n- **Generated:** set `prompt` to describe the motion. Choose a generator\n with `model` and configure it with model-specific `options
|
|
3679
|
+
"description": "The VideoAsset adds a video to a Clip. The video can be sourced from a URL\n(`src`), generated from a text prompt (`prompt`), or both. At least one of\n`src` or `prompt` must be provided.\n\n- **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.\n- **Generated:** set `prompt` to describe the motion. Choose a generator\n with `model` and configure it with model-specific `options`. Models that\n animate a starting image take it as `options.inputSrc`; the default model\n generates from the prompt alone. The generated `src` is filled in\n automatically.\n- **Both:** `src` acts as a preview placeholder while `prompt` drives\n generation — the video is regenerated from the prompt at render time.\n Unchanged prompts and options resolve from the generation cache.",
|
|
3679
3680
|
"type": "object",
|
|
3680
3681
|
"properties": {
|
|
3681
3682
|
"type": {
|
|
@@ -3696,7 +3697,7 @@
|
|
|
3696
3697
|
]
|
|
3697
3698
|
},
|
|
3698
3699
|
"prompt": {
|
|
3699
|
-
"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
|
|
3700
|
+
"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.",
|
|
3700
3701
|
"type": "string",
|
|
3701
3702
|
"maxLength": 4000,
|
|
3702
3703
|
"examples": [
|