@shotstack/schemas 1.21.0 → 1.21.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.
@@ -816,7 +816,8 @@
816
816
  }
817
817
  ],
818
818
  "requestBody": {
819
- "description": "A prompt-bearing image, video or audio asset to generate.",
819
+ "required": true,
820
+ "description": "The asset to generate and, for models that generate to a duration, the length of the clip it fills.",
820
821
  "content": {
821
822
  "application/json": {
822
823
  "example": {
@@ -830,17 +831,7 @@
830
831
  "type": "object",
831
832
  "properties": {
832
833
  "asset": {
833
- "oneOf": [
834
- {
835
- "$ref": "#/components/schemas/ImageAsset"
836
- },
837
- {
838
- "$ref": "#/components/schemas/VideoAsset"
839
- },
840
- {
841
- "$ref": "#/components/schemas/AudioAsset"
842
- }
843
- ]
834
+ "$ref": "#/components/schemas/GenerationAsset"
844
835
  },
845
836
  "length": {
846
837
  "description": "The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it.",
@@ -1744,7 +1735,7 @@
1744
1735
  "additionalProperties": false
1745
1736
  },
1746
1737
  "VideoAsset": {
1747
- "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",
1738
+ "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 an image take it as `options.startSrc` (the original\n image-to-video models use `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",
1748
1739
  "type": "object",
1749
1740
  "properties": {
1750
1741
  "type": {
@@ -1763,7 +1754,7 @@
1763
1754
  "example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4"
1764
1755
  },
1765
1756
  "prompt": {
1766
- "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.",
1757
+ "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.startSrc` — or `options.inputSrc` on the original image-to-video models — on the models that accept one.",
1767
1758
  "type": "string",
1768
1759
  "maxLength": 4000,
1769
1760
  "example": "Slowly zoom out and orbit left around the object."
@@ -2723,7 +2714,7 @@
2723
2714
  },
2724
2715
  "ImageToVideoAsset": {
2725
2716
  "deprecated": true,
2726
- "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",
2717
+ "description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt`, a `model` that accepts a starting image, and that image in\n`options.startSrc` — 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",
2727
2718
  "properties": {
2728
2719
  "type": {
2729
2720
  "type": "string",
@@ -5111,6 +5102,48 @@
5111
5102
  ],
5112
5103
  "type": "object"
5113
5104
  },
5105
+ "GenerationAsset": {
5106
+ "description": "An image, video or audio asset to generate from a text prompt.",
5107
+ "type": "object",
5108
+ "properties": {
5109
+ "type": {
5110
+ "description": "The kind of asset to generate.",
5111
+ "type": "string",
5112
+ "enum": [
5113
+ "image",
5114
+ "video",
5115
+ "audio"
5116
+ ],
5117
+ "example": "image"
5118
+ },
5119
+ "prompt": {
5120
+ "description": "A description of the asset to generate. For text-to-speech models it is the text spoken.",
5121
+ "type": "string",
5122
+ "minLength": 1,
5123
+ "maxLength": 4000,
5124
+ "pattern": "\\S",
5125
+ "example": "A lighthouse on a rocky coast at sunset, cinematic lighting"
5126
+ },
5127
+ "model": {
5128
+ "description": "The generation model. Defaults to `nano-banana-2` for images, `seedance-2.0-text-to-video` for video and `elevenlabs-multilingual-v2` for audio. `GET /models` lists the models for each type.",
5129
+ "type": "string",
5130
+ "example": "nano-banana-2"
5131
+ },
5132
+ "options": {
5133
+ "description": "Settings for the chosen `model`. `GET /models` lists the options each model accepts; omitted options use the model's defaults and unknown or invalid options are rejected. A starting image for video goes in `startSrc` (`inputSrc` on the original image-to-video models) and a speech voice in `voice`.",
5134
+ "type": "object",
5135
+ "additionalProperties": true,
5136
+ "example": {
5137
+ "aspectRatio": "16:9"
5138
+ }
5139
+ }
5140
+ },
5141
+ "additionalProperties": false,
5142
+ "required": [
5143
+ "type",
5144
+ "prompt"
5145
+ ]
5146
+ },
5114
5147
  "GenerationModel": {
5115
5148
  "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.",
5116
5149
  "properties": {
@@ -1155,7 +1155,7 @@
1155
1155
  },
1156
1156
  "ImageToVideoAsset": {
1157
1157
  "deprecated": true,
1158
- "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.",
1158
+ "description": "**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)\nwith `prompt`, a `model` that accepts a starting image, and that image in\n`options.startSrc` — 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.",
1159
1159
  "properties": {
1160
1160
  "type": {
1161
1161
  "type": "string",
@@ -3687,7 +3687,7 @@
3687
3687
  "type": "object"
3688
3688
  },
3689
3689
  "VideoAsset": {
3690
- "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.",
3690
+ "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 an image take it as `options.startSrc` (the original\n image-to-video models use `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.",
3691
3691
  "type": "object",
3692
3692
  "properties": {
3693
3693
  "type": {
@@ -3708,7 +3708,7 @@
3708
3708
  ]
3709
3709
  },
3710
3710
  "prompt": {
3711
- "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.",
3711
+ "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.startSrc` — or `options.inputSrc` on the original image-to-video models — on the models that accept one.",
3712
3712
  "type": "string",
3713
3713
  "maxLength": 4000,
3714
3714
  "examples": [