@shotstack/schemas 1.15.1 → 1.16.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.
- package/dist/api.bundled.json +197 -122
- package/dist/json-schema/edit.json +38 -134
- package/dist/json-schema/index.cjs +1 -1
- package/dist/json-schema/index.js +1 -1
- package/dist/schema.d.ts +208 -88
- package/dist/zod/zod.gen.cjs +78 -79
- package/dist/zod/zod.gen.d.ts +525 -2032
- package/dist/zod/zod.gen.js +72 -73
- package/dist/zod/zod.gen.ts +79 -67
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -191,6 +191,61 @@ export interface paths {
|
|
|
191
191
|
patch?: never;
|
|
192
192
|
trace?: never;
|
|
193
193
|
};
|
|
194
|
+
"/generate": {
|
|
195
|
+
parameters: {
|
|
196
|
+
query?: never;
|
|
197
|
+
header?: never;
|
|
198
|
+
path?: never;
|
|
199
|
+
cookie?: never;
|
|
200
|
+
};
|
|
201
|
+
get?: never;
|
|
202
|
+
put?: never;
|
|
203
|
+
/**
|
|
204
|
+
* Generate Asset
|
|
205
|
+
* @description Generate a single image, video or audio asset from a text prompt without
|
|
206
|
+
* rendering a full edit. Submit a prompt-bearing asset; the response is
|
|
207
|
+
* immediate when an identical asset has been generated before (results are
|
|
208
|
+
* cached by prompt, model and options), otherwise the job is queued and can
|
|
209
|
+
* be polled via the status endpoint.
|
|
210
|
+
*
|
|
211
|
+
* Generation is billed in credits per asset. Identical repeat requests
|
|
212
|
+
* resolve from the cache at no charge.
|
|
213
|
+
*
|
|
214
|
+
* **Base URL:** <a href="#">https://api.shotstack.io/edit/{version}</a>
|
|
215
|
+
*/
|
|
216
|
+
post: operations["postGenerate"];
|
|
217
|
+
delete?: never;
|
|
218
|
+
options?: never;
|
|
219
|
+
head?: never;
|
|
220
|
+
patch?: never;
|
|
221
|
+
trace?: never;
|
|
222
|
+
};
|
|
223
|
+
"/generate/{id}": {
|
|
224
|
+
parameters: {
|
|
225
|
+
query?: never;
|
|
226
|
+
header?: never;
|
|
227
|
+
path: {
|
|
228
|
+
/** @description The generation job id returned by the generate endpoint. */
|
|
229
|
+
id: string;
|
|
230
|
+
};
|
|
231
|
+
cookie?: never;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Get Generation Status
|
|
235
|
+
* @description Get the status of an on-demand asset generation job created with the
|
|
236
|
+
* generate endpoint. Jobs are owner-scoped.
|
|
237
|
+
*
|
|
238
|
+
* **Base URL:** <a href="#">https://api.shotstack.io/edit/{version}</a>
|
|
239
|
+
*/
|
|
240
|
+
get: operations["getGenerate"];
|
|
241
|
+
put?: never;
|
|
242
|
+
post?: never;
|
|
243
|
+
delete?: never;
|
|
244
|
+
options?: never;
|
|
245
|
+
head?: never;
|
|
246
|
+
patch?: never;
|
|
247
|
+
trace?: never;
|
|
248
|
+
};
|
|
194
249
|
"/assets/{id}": {
|
|
195
250
|
parameters: {
|
|
196
251
|
query?: never;
|
|
@@ -559,14 +614,17 @@ export interface components {
|
|
|
559
614
|
Asset: components["schemas"]["VideoAsset"] | components["schemas"]["ImageAsset"] | components["schemas"]["TextAsset"] | components["schemas"]["RichTextAsset"] | components["schemas"]["AudioAsset"] | components["schemas"]["LumaAsset"] | components["schemas"]["CaptionAsset"] | components["schemas"]["RichCaptionAsset"] | components["schemas"]["HtmlAsset"] | components["schemas"]["Html5Asset"] | components["schemas"]["TitleAsset"] | components["schemas"]["ShapeAsset"] | components["schemas"]["SvgAsset"] | components["schemas"]["TextToImageAsset"] | components["schemas"]["ImageToVideoAsset"] | components["schemas"]["TextToSpeechAsset"];
|
|
560
615
|
/**
|
|
561
616
|
* @description The VideoAsset adds a video to a Clip. The video can be sourced from a URL
|
|
562
|
-
* (`src`)
|
|
563
|
-
*
|
|
617
|
+
* (`src`), generated from a text prompt (`prompt`), or both. At least one of
|
|
618
|
+
* `src` or `prompt` must be provided.
|
|
564
619
|
*
|
|
565
620
|
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
566
|
-
* - **Generated:** set `prompt` to describe the motion.
|
|
567
|
-
*
|
|
568
|
-
*
|
|
621
|
+
* - **Generated:** set `prompt` to describe the motion. Choose a generator
|
|
622
|
+
* with `model` and configure it with model-specific `options` (including a
|
|
623
|
+
* starting image for image-to-video). The generated `src` is filled in
|
|
569
624
|
* automatically.
|
|
625
|
+
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
626
|
+
* generation — the video is regenerated from the prompt at render time.
|
|
627
|
+
* Unchanged prompts and options resolve from the generation cache.
|
|
570
628
|
*/
|
|
571
629
|
VideoAsset: {
|
|
572
630
|
/**
|
|
@@ -575,49 +633,31 @@ export interface components {
|
|
|
575
633
|
*/
|
|
576
634
|
type: "video";
|
|
577
635
|
/**
|
|
578
|
-
* @description The video source URL. The URL must be publicly accessible or include credentials.
|
|
636
|
+
* @description The video source URL. The URL must be publicly accessible or include credentials. When `prompt` is also set, `src` serves as a preview placeholder and the video is regenerated from the prompt at render time.
|
|
579
637
|
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4
|
|
580
638
|
*/
|
|
581
639
|
src?: string;
|
|
582
640
|
/**
|
|
583
|
-
* @description A text prompt to generate the video from.
|
|
641
|
+
* @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).
|
|
584
642
|
* @example Slowly zoom out and orbit left around the object.
|
|
585
643
|
*/
|
|
586
644
|
prompt?: string;
|
|
587
645
|
/**
|
|
588
|
-
* @description
|
|
589
|
-
* @example
|
|
590
|
-
*/
|
|
591
|
-
inputSrc?: string;
|
|
592
|
-
/**
|
|
593
|
-
* @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.
|
|
594
|
-
* @example luma-ray-3
|
|
646
|
+
* @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.
|
|
647
|
+
* @example seedance-2.0
|
|
595
648
|
*/
|
|
596
649
|
model?: string;
|
|
597
650
|
/**
|
|
598
|
-
* @description
|
|
599
|
-
* @example
|
|
600
|
-
*
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
* @description Target video duration in seconds for generation models that accept it. `"auto"` lets the model decide. Only meaningful when `prompt` is set.
|
|
605
|
-
* @default auto
|
|
606
|
-
* @example 5
|
|
607
|
-
* @enum {string}
|
|
608
|
-
*/
|
|
609
|
-
duration?: "auto" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15";
|
|
610
|
-
/**
|
|
611
|
-
* @description Aspect ratio for the generated video. Only meaningful when `prompt` is set and the model supports it.
|
|
612
|
-
* @example 16:9
|
|
613
|
-
* @enum {string}
|
|
614
|
-
*/
|
|
615
|
-
aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "21:9" | "9:21";
|
|
616
|
-
/**
|
|
617
|
-
* @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`).
|
|
618
|
-
* @default false
|
|
651
|
+
* @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.
|
|
652
|
+
* @example {
|
|
653
|
+
* "resolution": "720p",
|
|
654
|
+
* "duration": "8",
|
|
655
|
+
* "generateAudio": true
|
|
656
|
+
* }
|
|
619
657
|
*/
|
|
620
|
-
|
|
658
|
+
options?: {
|
|
659
|
+
[key: string]: unknown;
|
|
660
|
+
};
|
|
621
661
|
/**
|
|
622
662
|
* @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.
|
|
623
663
|
* @example false
|
|
@@ -650,12 +690,16 @@ export interface components {
|
|
|
650
690
|
};
|
|
651
691
|
/**
|
|
652
692
|
* @description The ImageAsset adds an image to a Clip. The image can be sourced from a URL
|
|
653
|
-
* (`src`)
|
|
654
|
-
* `prompt` must be provided.
|
|
693
|
+
* (`src`), generated from a text prompt (`prompt`), or both. At least one of
|
|
694
|
+
* `src` or `prompt` must be provided.
|
|
655
695
|
*
|
|
656
696
|
* - **Source URL:** set `src` to the publicly accessible URL of a jpg or png file.
|
|
657
|
-
* - **Generated:** set `prompt` to describe the image
|
|
658
|
-
*
|
|
697
|
+
* - **Generated:** set `prompt` to describe the image. Choose a generator with
|
|
698
|
+
* `model` and configure it with model-specific `options`; the engine fills
|
|
699
|
+
* `src` in automatically.
|
|
700
|
+
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
701
|
+
* generation — the image is regenerated from the prompt at render time.
|
|
702
|
+
* Unchanged prompts and options resolve from the generation cache.
|
|
659
703
|
*/
|
|
660
704
|
ImageAsset: {
|
|
661
705
|
/**
|
|
@@ -664,32 +708,30 @@ export interface components {
|
|
|
664
708
|
*/
|
|
665
709
|
type: "image";
|
|
666
710
|
/**
|
|
667
|
-
* @description The image source URL. The URL must be publicly accessible or include credentials.
|
|
711
|
+
* @description The image source URL. The URL must be publicly accessible or include credentials. When `prompt` is also set, `src` serves as a preview placeholder and the image is regenerated from the prompt at render time.
|
|
668
712
|
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg
|
|
669
713
|
*/
|
|
670
714
|
src?: string;
|
|
671
715
|
/**
|
|
672
|
-
* @description A text prompt to generate the image from.
|
|
716
|
+
* @description A text prompt to generate the image from. The engine generates an image 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.
|
|
673
717
|
* @example A serene landscape with a crystal-clear mountain lake at sunrise.
|
|
674
718
|
*/
|
|
675
719
|
prompt?: string;
|
|
676
720
|
/**
|
|
677
|
-
* @description The generation model to use when `prompt` is set (e.g. `flux-schnell`, `
|
|
721
|
+
* @description The generation model to use when `prompt` is set (e.g. `flux-schnell`, `nano-banana-2`). Defaults to `nano-banana-2` if omitted. Each model's available options are defined by the model registry.
|
|
678
722
|
* @example flux-schnell
|
|
679
723
|
*/
|
|
680
724
|
model?: string;
|
|
681
725
|
/**
|
|
682
|
-
* @description
|
|
683
|
-
* @example
|
|
684
|
-
*
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* @description Aspect ratio for the generated image. Only meaningful when `prompt` is set and the model supports it.
|
|
689
|
-
* @example 1:1
|
|
690
|
-
* @enum {string}
|
|
726
|
+
* @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.
|
|
727
|
+
* @example {
|
|
728
|
+
* "resolution": "1K",
|
|
729
|
+
* "aspectRatio": "16:9"
|
|
730
|
+
* }
|
|
691
731
|
*/
|
|
692
|
-
|
|
732
|
+
options?: {
|
|
733
|
+
[key: string]: unknown;
|
|
734
|
+
};
|
|
693
735
|
crop?: components["schemas"]["Crop"];
|
|
694
736
|
};
|
|
695
737
|
/**
|
|
@@ -848,15 +890,19 @@ export interface components {
|
|
|
848
890
|
};
|
|
849
891
|
/**
|
|
850
892
|
* @description The AudioAsset adds audio to a Clip. The audio can be sourced from a URL
|
|
851
|
-
* (`src`)
|
|
852
|
-
* `prompt` must be provided.
|
|
893
|
+
* (`src`), generated from a text prompt (`prompt`), or both. At least one of
|
|
894
|
+
* `src` or `prompt` must be provided.
|
|
853
895
|
*
|
|
854
896
|
* - **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).
|
|
855
|
-
* - **Generated speech:** set `prompt` to the spoken text and
|
|
856
|
-
*
|
|
857
|
-
* - **Generated music or SFX:** set `prompt` describing the sound
|
|
858
|
-
*
|
|
859
|
-
*
|
|
897
|
+
* - **Generated speech:** set `prompt` to the spoken text and choose a
|
|
898
|
+
* text-to-speech `model`; set the voice via `options`.
|
|
899
|
+
* - **Generated music or SFX:** set `prompt` describing the sound and choose
|
|
900
|
+
* a music generation `model`.
|
|
901
|
+
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
902
|
+
* generation — the audio is regenerated from the prompt at render time.
|
|
903
|
+
* Unchanged prompts and options resolve from the generation cache.
|
|
904
|
+
* - Use `model` to choose the generator and `options` to configure it. The
|
|
905
|
+
* generated `src` is filled in automatically.
|
|
860
906
|
*/
|
|
861
907
|
AudioAsset: {
|
|
862
908
|
/**
|
|
@@ -865,47 +911,30 @@ export interface components {
|
|
|
865
911
|
*/
|
|
866
912
|
type: "audio";
|
|
867
913
|
/**
|
|
868
|
-
* @description The audio source URL. The URL must be publicly accessible or include credentials.
|
|
914
|
+
* @description The audio source URL. The URL must be publicly accessible or include credentials. When `prompt` is also set, `src` serves as a preview placeholder and the audio is regenerated from the prompt at render time.
|
|
869
915
|
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3
|
|
870
916
|
*/
|
|
871
917
|
src?: string;
|
|
872
918
|
/**
|
|
873
|
-
* @description A text prompt.
|
|
919
|
+
* @description A text prompt. For text-to-speech models the prompt is the spoken text; for music models it describes the sound to generate. The generated `src` is filled in automatically; an existing `src` is treated as a preview placeholder and replaced.
|
|
874
920
|
* @example Welcome to today's broadcast.
|
|
875
921
|
*/
|
|
876
922
|
prompt?: string;
|
|
877
923
|
/**
|
|
878
|
-
* @description
|
|
879
|
-
* @example Matthew
|
|
880
|
-
*/
|
|
881
|
-
voice?: string;
|
|
882
|
-
/**
|
|
883
|
-
* @description Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.
|
|
884
|
-
* @example en-US
|
|
885
|
-
*/
|
|
886
|
-
language?: string;
|
|
887
|
-
/**
|
|
888
|
-
* @description Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.
|
|
889
|
-
* @default false
|
|
890
|
-
*/
|
|
891
|
-
newscaster?: boolean;
|
|
892
|
-
/**
|
|
893
|
-
* @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.
|
|
924
|
+
* @description The generation model to use when `prompt` is set (e.g. `polly-neural`, `elevenlabs-tts`, `elevenlabs-music`). Defaults to `elevenlabs-tts` (with a default voice) if omitted. Each model's available options are defined by the model registry.
|
|
894
925
|
* @example polly-neural
|
|
895
926
|
*/
|
|
896
927
|
model?: string;
|
|
897
928
|
/**
|
|
898
|
-
* @description
|
|
899
|
-
* @example
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
* @description Set to `true` to force instrumental music (no vocals). Only meaningful for music generation models.
|
|
904
|
-
* @default false
|
|
929
|
+
* @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.
|
|
930
|
+
* @example {
|
|
931
|
+
* "voice": "Matthew",
|
|
932
|
+
* "language": "en-US"
|
|
933
|
+
* }
|
|
905
934
|
*/
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
935
|
+
options?: {
|
|
936
|
+
[key: string]: unknown;
|
|
937
|
+
};
|
|
909
938
|
/** @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. */
|
|
910
939
|
trim?: number;
|
|
911
940
|
/** @description Set the volume of the audio clip. Use a number or an array of [Tween](./#tocs_tween) objects to create custom volume transitions. */
|
|
@@ -3778,6 +3807,97 @@ export interface operations {
|
|
|
3778
3807
|
};
|
|
3779
3808
|
};
|
|
3780
3809
|
};
|
|
3810
|
+
postGenerate: {
|
|
3811
|
+
parameters: {
|
|
3812
|
+
query?: never;
|
|
3813
|
+
header?: never;
|
|
3814
|
+
path?: never;
|
|
3815
|
+
cookie?: never;
|
|
3816
|
+
};
|
|
3817
|
+
/** @description A prompt-bearing image, video or audio asset to generate. */
|
|
3818
|
+
requestBody?: {
|
|
3819
|
+
content: {
|
|
3820
|
+
"application/json": {
|
|
3821
|
+
asset: components["schemas"]["ImageAsset"] | components["schemas"]["VideoAsset"] | components["schemas"]["AudioAsset"];
|
|
3822
|
+
};
|
|
3823
|
+
};
|
|
3824
|
+
};
|
|
3825
|
+
responses: {
|
|
3826
|
+
/** @description The generated asset was already cached and is immediately available. */
|
|
3827
|
+
200: {
|
|
3828
|
+
headers: {
|
|
3829
|
+
[name: string]: unknown;
|
|
3830
|
+
};
|
|
3831
|
+
content: {
|
|
3832
|
+
"application/json": {
|
|
3833
|
+
/**
|
|
3834
|
+
* @description The generation job id. Deterministic for a given owner and asset payload (or idempotency key), so identical requests return the same job and cached result.
|
|
3835
|
+
* @example 8a1f2c3d-4e5b-5a6c-9d7e-1f2a3b4c5d6e
|
|
3836
|
+
*/
|
|
3837
|
+
id: string;
|
|
3838
|
+
/**
|
|
3839
|
+
* @description The status of the generation job.
|
|
3840
|
+
* @example done
|
|
3841
|
+
* @enum {string}
|
|
3842
|
+
*/
|
|
3843
|
+
status: "queued" | "processing" | "done" | "failed";
|
|
3844
|
+
/**
|
|
3845
|
+
* @description The public URL of the generated asset. Present only when `status` is `done`.
|
|
3846
|
+
* @example https://shotstack-api-v1-output.s3-ap-southeast-2.amazonaws.com/owner/8a1f2c3d.png
|
|
3847
|
+
*/
|
|
3848
|
+
url?: string;
|
|
3849
|
+
/** @description A human readable error message. Present only when `status` is `failed`. */
|
|
3850
|
+
error?: string;
|
|
3851
|
+
};
|
|
3852
|
+
};
|
|
3853
|
+
};
|
|
3854
|
+
/** @description The generation job has been queued. Poll the status endpoint. */
|
|
3855
|
+
202: {
|
|
3856
|
+
headers: {
|
|
3857
|
+
/** @description The relative URL to poll for job status. */
|
|
3858
|
+
Location?: string;
|
|
3859
|
+
/** @description Suggested seconds to wait before polling. */
|
|
3860
|
+
"Retry-After"?: number;
|
|
3861
|
+
[name: string]: unknown;
|
|
3862
|
+
};
|
|
3863
|
+
content: {
|
|
3864
|
+
"application/json": paths["/generate"]["post"]["responses"]["200"]["content"]["application/json"]["schema"];
|
|
3865
|
+
};
|
|
3866
|
+
};
|
|
3867
|
+
};
|
|
3868
|
+
};
|
|
3869
|
+
getGenerate: {
|
|
3870
|
+
parameters: {
|
|
3871
|
+
query?: never;
|
|
3872
|
+
header?: never;
|
|
3873
|
+
path: {
|
|
3874
|
+
/** @description The generation job id returned by the generate endpoint. */
|
|
3875
|
+
id: string;
|
|
3876
|
+
};
|
|
3877
|
+
cookie?: never;
|
|
3878
|
+
};
|
|
3879
|
+
requestBody?: never;
|
|
3880
|
+
responses: {
|
|
3881
|
+
/** @description The generation job has finished (done or failed). */
|
|
3882
|
+
200: {
|
|
3883
|
+
headers: {
|
|
3884
|
+
[name: string]: unknown;
|
|
3885
|
+
};
|
|
3886
|
+
content: {
|
|
3887
|
+
"application/json": paths["/generate"]["post"]["responses"]["200"]["content"]["application/json"]["schema"];
|
|
3888
|
+
};
|
|
3889
|
+
};
|
|
3890
|
+
/** @description The generation job is still processing. */
|
|
3891
|
+
202: {
|
|
3892
|
+
headers: {
|
|
3893
|
+
[name: string]: unknown;
|
|
3894
|
+
};
|
|
3895
|
+
content: {
|
|
3896
|
+
"application/json": paths["/generate"]["post"]["responses"]["200"]["content"]["application/json"]["schema"];
|
|
3897
|
+
};
|
|
3898
|
+
};
|
|
3899
|
+
};
|
|
3900
|
+
};
|
|
3781
3901
|
getAsset: {
|
|
3782
3902
|
parameters: {
|
|
3783
3903
|
query?: never;
|