@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.
package/dist/schema.d.ts CHANGED
@@ -688,7 +688,8 @@ export interface components {
688
688
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
689
689
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
690
690
  * with `model` and configure it with model-specific `options`. Models that
691
- * animate a starting image take it as `options.inputSrc`; the default model
691
+ * animate an image take it as `options.startSrc` (the original
692
+ * image-to-video models use `options.inputSrc`); the default model
692
693
  * generates from the prompt alone. The generated `src` is filled in
693
694
  * automatically.
694
695
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
@@ -707,7 +708,7 @@ export interface components {
707
708
  */
708
709
  src?: string;
709
710
  /**
710
- * @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.
711
+ * @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.
711
712
  * @example Slowly zoom out and orbit left around the object.
712
713
  */
713
714
  prompt?: string;
@@ -1344,7 +1345,7 @@ export interface components {
1344
1345
  * @deprecated
1345
1346
  * @description **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
1346
1347
  * with `prompt`, a `model` that accepts a starting image, and that image in
1347
- * `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
1348
+ * `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
1348
1349
  * function and is internally rewritten to VideoAsset; no behaviour change for
1349
1350
  * existing integrations.
1350
1351
  *
@@ -2971,6 +2972,34 @@ export interface components {
2971
2972
  /** @description Specify the storage locations and hosting services to send the file to. */
2972
2973
  destinations: components["schemas"]["Destinations"][];
2973
2974
  };
2975
+ /** @description An image, video or audio asset to generate from a text prompt. */
2976
+ GenerationAsset: {
2977
+ /**
2978
+ * @description The kind of asset to generate.
2979
+ * @example image
2980
+ * @enum {string}
2981
+ */
2982
+ type: "image" | "video" | "audio";
2983
+ /**
2984
+ * @description A description of the asset to generate. For text-to-speech models it is the text spoken.
2985
+ * @example A lighthouse on a rocky coast at sunset, cinematic lighting
2986
+ */
2987
+ prompt: string;
2988
+ /**
2989
+ * @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.
2990
+ * @example nano-banana-2
2991
+ */
2992
+ model?: string;
2993
+ /**
2994
+ * @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`.
2995
+ * @example {
2996
+ * "aspectRatio": "16:9"
2997
+ * }
2998
+ */
2999
+ options?: {
3000
+ [key: string]: unknown;
3001
+ };
3002
+ };
2974
3003
  /** @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. */
2975
3004
  GenerationModel: {
2976
3005
  /**
@@ -4386,8 +4415,8 @@ export interface operations {
4386
4415
  path?: never;
4387
4416
  cookie?: never;
4388
4417
  };
4389
- /** @description A prompt-bearing image, video or audio asset to generate. */
4390
- requestBody?: {
4418
+ /** @description The asset to generate and, for models that generate to a duration, the length of the clip it fills. */
4419
+ requestBody: {
4391
4420
  content: {
4392
4421
  /**
4393
4422
  * @example {
@@ -4399,7 +4428,7 @@ export interface operations {
4399
4428
  * }
4400
4429
  */
4401
4430
  "application/json": {
4402
- asset: components["schemas"]["ImageAsset"] | components["schemas"]["VideoAsset"] | components["schemas"]["AudioAsset"];
4431
+ asset: components["schemas"]["GenerationAsset"];
4403
4432
  /**
4404
4433
  * @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.
4405
4434
  * @example 5
@@ -2,12 +2,12 @@
2
2
  // This file is auto-generated by @hey-api/openapi-ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema = exports.s3DestinationOptionsSchema = exports.s3DestinationOptionsS3DestinationOptionsSchema = exports.muxDestinationSchema = exports.muxDestinationMuxDestinationSchema = exports.muxDestinationOptionsSchema = exports.muxDestinationOptionsMuxDestinationOptionsSchema = exports.googleDriveDestinationSchema = exports.googleDriveDestinationGoogleDriveDestinationSchema = exports.googleDriveDestinationOptionsSchema = exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = exports.googleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationOptionsSchema = exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema = exports.azureBlobStorageDestinationAzureBlobStorageDestinationSchema = exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = exports.akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = exports.cropSchema = exports.cropCropSchema = exports.chromaKeySchema = exports.chromakeyChromaKeySchema = exports.captionAssetSchema = exports.captionassetCaptionAssetSchema = exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema = exports.captionFontSchema = exports.captionpropertiesCaptionFontSchema = exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSchema = exports.uploadRootSchema = exports.templatesrenderRootSchema = exports.templatesidRootSchema = exports.templatesRootSchema = exports.sourcesidRootSchema = exports.sourcesRootSchema = exports.renderidRootSchema = exports.renderRootSchema = exports.probeRootSchema = exports.modelsidRootSchema = exports.modelsRootSchema = exports.generateidRootSchema = exports.generateRootSchema = exports.assetsrenderidRootSchema = exports.assetsidRootSchema = exports.assetsRootSchema = exports.sourceRootSchema = exports.editRootSchema = void 0;
5
- exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema = exports.uploadResponseDataSchema = exports.uploadresponsedataUploadResponseDataSchema = exports.uploadResponseAttributesSchema = exports.uploadresponseattributesUploadResponseAttributesSchema = exports.queuedSourceResponseSchema = exports.queuedsourceresponseQueuedSourceResponseSchema = exports.queuedSourceResponseDataSchema = exports.queuedsourceresponsedataQueuedSourceResponseDataSchema = exports.ingestErrorResponseSchema = exports.ingesterrorresponseIngestErrorResponseSchema = exports.ingestErrorResponseDataSchema = exports.ingesterrorresponsedataIngestErrorResponseDataSchema = exports.enhancementsSchema = exports.enhancementsEnhancementsSchema = exports.audioEnhancementSchema = exports.audioEnhancementAudioEnhancementSchema = exports.dolbyEnhancementSchema = exports.dolbyEnhancementDolbyEnhancementSchema = exports.dolbyEnhancementOptionsSchema = exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema = exports.imageAssetSchema = exports.imageassetImageAssetSchema = exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema = exports.html5AssetSchema = exports.html5AssetHtml5AssetSchema = exports.generationModelSchema = exports.generationmodelGenerationModelSchema = exports.generationModelPricingSchema = exports.generationmodelpricingGenerationModelPricingSchema = exports.fontSchema = exports.fontFontSchema = exports.flipTransformationSchema = exports.fliptransformationFlipTransformationSchema = exports.destinationsSchema = exports.destinationsDestinationsSchema = exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema = exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema = exports.vimeoDestinationPrivacyOptionsSchema = exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = exports.tiktokDestinationTiktokDestinationSchema = exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema = void 0;
6
- exports.richtextpropertiesRichTextAlignmentSchema = exports.richcaptionpropertiesRichCaptionFontSchema = exports.richCaptionAnimationSchema = exports.richcaptionpropertiesRichCaptionAnimationSchema = exports.richCaptionActiveFontSchema = exports.richcaptionpropertiesRichCaptionActiveFontSchema = exports.templateResponseSchema = exports.templateresponseTemplateResponseSchema = exports.templateResponseDataSchema = exports.templateresponsedataTemplateResponseDataSchema = exports.templateListResponseSchema = exports.templatelistresponseTemplateListResponseSchema = exports.templateListResponseDataSchema = exports.templatelistresponsedataTemplateListResponseDataSchema = exports.templateListResponseItemSchema = exports.templatelistresponseitemTemplateListResponseItemSchema = exports.queuedResponseSchema = exports.queuedresponseQueuedResponseSchema = exports.queuedResponseDataSchema = exports.queuedresponsedataQueuedResponseDataSchema = exports.probeResponseSchema = exports.proberesponseProbeResponseSchema = exports.generationResponseSchema = exports.generationresponseGenerationResponseSchema = exports.generationModelListResponseSchema = exports.generationmodellistresponseGenerationModelListResponseSchema = exports.generationModelErrorResponseSchema = exports.generationmodelerrorresponseGenerationModelErrorResponseSchema = exports.generationErrorResponseSchema = exports.generationerrorresponseGenerationErrorResponseSchema = exports.assetResponseSchema = exports.assetresponseAssetResponseSchema = exports.assetRenderResponseSchema = exports.assetrenderresponseAssetRenderResponseSchema = exports.assetResponseDataSchema = exports.assetresponsedataAssetResponseDataSchema = exports.assetResponseAttributesSchema = exports.assetresponseattributesAssetResponseAttributesSchema = exports.rangeSchema = exports.rangeRangeSchema = exports.posterSchema = exports.posterPosterSchema = exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema = exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema = exports.transcriptionSchema = exports.transcriptionTranscriptionSchema = exports.speedSchema = exports.speedSpeedSchema = void 0;
7
- exports.sourceResponseDataSchema = exports.sourceresponsedataSourceResponseDataSchema = exports.sourceResponseAttributesSchema = exports.sourceresponseattributesSourceResponseAttributesSchema = exports.outputsResponseSchema = exports.outputsresponseOutputsResponseSchema = exports.renditionResponseAttributesSchema = exports.renditionresponseattributesRenditionResponseAttributesSchema = exports.outputsSchema = exports.outputsOutputsSchema = exports.renditionSchema = exports.renditionRenditionSchema = exports.sizeSchema = exports.sizeSizeSchema = exports.shapeAssetSchema = exports.shapeassetShapeAssetSchema = exports.transferSchema = exports.transferTransferSchema = exports.transferResponseSchema = exports.transferresponseTransferResponseSchema = exports.transferResponseDataSchema = exports.transferresponsedataTransferResponseDataSchema = exports.transferResponseAttributesSchema = exports.transferresponseattributesTransferResponseAttributesSchema = exports.richTextAssetSchema = exports.richtextassetRichTextAssetSchema = exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema = exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema = exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema = exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema = exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema = exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema = exports.richTextPaddingSchema = exports.richtextpropertiesRichTextPaddingSchema = exports.richcaptionpropertiesRichCaptionStyleSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richTextBorderSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = void 0;
8
- exports.assetSchema = exports.assetAssetSchema = exports.videoAssetSchema = exports.videoassetVideoAssetSchema = exports.transformationSchema = exports.transformationTransformationSchema = exports.titleAssetSchema = exports.titleassetTitleAssetSchema = exports.textToSpeechAssetSchema = exports.texttospeechassetTextToSpeechAssetSchema = exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema = exports.rotateTransformationSchema = exports.rotatetransformationRotateTransformationSchema = exports.offsetSchema = exports.offsetOffsetSchema = exports.audioAssetSchema = exports.audioassetAudioAssetSchema = exports.tweenSchema = exports.tweenTweenSchema = exports.transitionSchema = exports.transitionTransitionSchema = exports.outputSchema = exports.outputOutputSchema = exports.thumbnailSchema = exports.thumbnailThumbnailSchema = exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema = exports.textAssetSchema = exports.textassetTextAssetSchema = exports.textpropertiesTextStrokeSchema = exports.textFontSchema = exports.textpropertiesTextFontSchema = exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema = exports.textpropertiesTextAnimationSchema = exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema = exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema = exports.svgAssetSchema = exports.svgassetSvgAssetSchema = exports.soundtrackSchema = exports.soundtrackSoundtrackSchema = exports.sourceSchema = exports.sourceSourceSchema = exports.sourceResponseSchema = exports.sourceresponseSourceResponseSchema = exports.sourceListResponseSchema = exports.sourcelistresponseSourceListResponseSchema = void 0;
9
- exports.getAssetByRenderIdResponse = exports.getAssetByRenderIdRequest = exports.getAssetResponse = exports.getAssetRequest = exports.deleteAssetResponse = exports.deleteAssetRequest = exports.getModelResponse = exports.getModelRequest = exports.getModelsResponse = exports.getModelsRequest = exports.getGenerateResponse = exports.getGenerateRequest = exports.postGenerateResponse = exports.postGenerateRequest = exports.probeResponse = exports.probeRequest = exports.postTemplateRenderResponse = exports.postTemplateRenderRequest = exports.putTemplateResponse = exports.putTemplateRequest = exports.getTemplateResponse = exports.getTemplateRequest = exports.deleteTemplateResponse = exports.deleteTemplateRequest = exports.postTemplateResponse = exports.postTemplateRequest = exports.getTemplatesResponse = exports.getTemplatesRequest = exports.getRenderResponse = exports.getRenderRequest = exports.postRenderResponse = exports.postRenderRequest = exports.templateSchema = exports.templateTemplateSchema = exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataResponseSchema = exports.templateDataResponseDataSchema = exports.templatedataresponsedataTemplateDataResponseDataSchema = exports.renderResponseSchema = exports.renderresponseRenderResponseSchema = exports.renderResponseDataSchema = exports.renderresponsedataRenderResponseDataSchema = exports.editSchema = exports.editEditSchema = exports.timelineSchema = exports.timelineTimelineSchema = exports.trackSchema = exports.trackTrackSchema = exports.clipSchema = exports.clipClipSchema = void 0;
10
- exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = exports.postServeAssetResponse = exports.postServeAssetRequest = void 0;
5
+ exports.uploadResponseDataSchema = exports.uploadresponsedataUploadResponseDataSchema = exports.uploadResponseAttributesSchema = exports.uploadresponseattributesUploadResponseAttributesSchema = exports.queuedSourceResponseSchema = exports.queuedsourceresponseQueuedSourceResponseSchema = exports.queuedSourceResponseDataSchema = exports.queuedsourceresponsedataQueuedSourceResponseDataSchema = exports.ingestErrorResponseSchema = exports.ingesterrorresponseIngestErrorResponseSchema = exports.ingestErrorResponseDataSchema = exports.ingesterrorresponsedataIngestErrorResponseDataSchema = exports.enhancementsSchema = exports.enhancementsEnhancementsSchema = exports.audioEnhancementSchema = exports.audioEnhancementAudioEnhancementSchema = exports.dolbyEnhancementSchema = exports.dolbyEnhancementDolbyEnhancementSchema = exports.dolbyEnhancementOptionsSchema = exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema = exports.imageAssetSchema = exports.imageassetImageAssetSchema = exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema = exports.html5AssetSchema = exports.html5AssetHtml5AssetSchema = exports.generationModelSchema = exports.generationmodelGenerationModelSchema = exports.generationModelPricingSchema = exports.generationmodelpricingGenerationModelPricingSchema = exports.generationAssetSchema = exports.generationassetGenerationAssetSchema = exports.fontSchema = exports.fontFontSchema = exports.flipTransformationSchema = exports.fliptransformationFlipTransformationSchema = exports.destinationsSchema = exports.destinationsDestinationsSchema = exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema = exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema = exports.vimeoDestinationPrivacyOptionsSchema = exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = exports.tiktokDestinationTiktokDestinationSchema = exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema = void 0;
6
+ exports.richCaptionAnimationSchema = exports.richcaptionpropertiesRichCaptionAnimationSchema = exports.richCaptionActiveFontSchema = exports.richcaptionpropertiesRichCaptionActiveFontSchema = exports.templateResponseSchema = exports.templateresponseTemplateResponseSchema = exports.templateResponseDataSchema = exports.templateresponsedataTemplateResponseDataSchema = exports.templateListResponseSchema = exports.templatelistresponseTemplateListResponseSchema = exports.templateListResponseDataSchema = exports.templatelistresponsedataTemplateListResponseDataSchema = exports.templateListResponseItemSchema = exports.templatelistresponseitemTemplateListResponseItemSchema = exports.queuedResponseSchema = exports.queuedresponseQueuedResponseSchema = exports.queuedResponseDataSchema = exports.queuedresponsedataQueuedResponseDataSchema = exports.probeResponseSchema = exports.proberesponseProbeResponseSchema = exports.generationResponseSchema = exports.generationresponseGenerationResponseSchema = exports.generationModelListResponseSchema = exports.generationmodellistresponseGenerationModelListResponseSchema = exports.generationModelErrorResponseSchema = exports.generationmodelerrorresponseGenerationModelErrorResponseSchema = exports.generationErrorResponseSchema = exports.generationerrorresponseGenerationErrorResponseSchema = exports.assetResponseSchema = exports.assetresponseAssetResponseSchema = exports.assetRenderResponseSchema = exports.assetrenderresponseAssetRenderResponseSchema = exports.assetResponseDataSchema = exports.assetresponsedataAssetResponseDataSchema = exports.assetResponseAttributesSchema = exports.assetresponseattributesAssetResponseAttributesSchema = exports.rangeSchema = exports.rangeRangeSchema = exports.posterSchema = exports.posterPosterSchema = exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema = exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema = exports.transcriptionSchema = exports.transcriptionTranscriptionSchema = exports.speedSchema = exports.speedSpeedSchema = exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema = void 0;
7
+ exports.sourceResponseAttributesSchema = exports.sourceresponseattributesSourceResponseAttributesSchema = exports.outputsResponseSchema = exports.outputsresponseOutputsResponseSchema = exports.renditionResponseAttributesSchema = exports.renditionresponseattributesRenditionResponseAttributesSchema = exports.outputsSchema = exports.outputsOutputsSchema = exports.renditionSchema = exports.renditionRenditionSchema = exports.sizeSchema = exports.sizeSizeSchema = exports.shapeAssetSchema = exports.shapeassetShapeAssetSchema = exports.transferSchema = exports.transferTransferSchema = exports.transferResponseSchema = exports.transferresponseTransferResponseSchema = exports.transferResponseDataSchema = exports.transferresponsedataTransferResponseDataSchema = exports.transferResponseAttributesSchema = exports.transferresponseattributesTransferResponseAttributesSchema = exports.richTextAssetSchema = exports.richtextassetRichTextAssetSchema = exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema = exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema = exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema = exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema = exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema = exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema = exports.richTextPaddingSchema = exports.richtextpropertiesRichTextPaddingSchema = exports.richcaptionpropertiesRichCaptionStyleSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richTextBorderSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = exports.richtextpropertiesRichTextAlignmentSchema = exports.richcaptionpropertiesRichCaptionFontSchema = void 0;
8
+ exports.videoAssetSchema = exports.videoassetVideoAssetSchema = exports.transformationSchema = exports.transformationTransformationSchema = exports.titleAssetSchema = exports.titleassetTitleAssetSchema = exports.textToSpeechAssetSchema = exports.texttospeechassetTextToSpeechAssetSchema = exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema = exports.rotateTransformationSchema = exports.rotatetransformationRotateTransformationSchema = exports.offsetSchema = exports.offsetOffsetSchema = exports.audioAssetSchema = exports.audioassetAudioAssetSchema = exports.tweenSchema = exports.tweenTweenSchema = exports.transitionSchema = exports.transitionTransitionSchema = exports.outputSchema = exports.outputOutputSchema = exports.thumbnailSchema = exports.thumbnailThumbnailSchema = exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema = exports.textAssetSchema = exports.textassetTextAssetSchema = exports.textpropertiesTextStrokeSchema = exports.textFontSchema = exports.textpropertiesTextFontSchema = exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema = exports.textpropertiesTextAnimationSchema = exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema = exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema = exports.svgAssetSchema = exports.svgassetSvgAssetSchema = exports.soundtrackSchema = exports.soundtrackSoundtrackSchema = exports.sourceSchema = exports.sourceSourceSchema = exports.sourceResponseSchema = exports.sourceresponseSourceResponseSchema = exports.sourceListResponseSchema = exports.sourcelistresponseSourceListResponseSchema = exports.sourceResponseDataSchema = exports.sourceresponsedataSourceResponseDataSchema = void 0;
9
+ exports.getAssetResponse = exports.getAssetRequest = exports.deleteAssetResponse = exports.deleteAssetRequest = exports.getModelResponse = exports.getModelRequest = exports.getModelsResponse = exports.getModelsRequest = exports.getGenerateResponse = exports.getGenerateRequest = exports.postGenerateResponse = exports.postGenerateRequest = exports.probeResponse = exports.probeRequest = exports.postTemplateRenderResponse = exports.postTemplateRenderRequest = exports.putTemplateResponse = exports.putTemplateRequest = exports.getTemplateResponse = exports.getTemplateRequest = exports.deleteTemplateResponse = exports.deleteTemplateRequest = exports.postTemplateResponse = exports.postTemplateRequest = exports.getTemplatesResponse = exports.getTemplatesRequest = exports.getRenderResponse = exports.getRenderRequest = exports.postRenderResponse = exports.postRenderRequest = exports.templateSchema = exports.templateTemplateSchema = exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataResponseSchema = exports.templateDataResponseDataSchema = exports.templatedataresponsedataTemplateDataResponseDataSchema = exports.renderResponseSchema = exports.renderresponseRenderResponseSchema = exports.renderResponseDataSchema = exports.renderresponsedataRenderResponseDataSchema = exports.editSchema = exports.editEditSchema = exports.timelineSchema = exports.timelineTimelineSchema = exports.trackSchema = exports.trackTrackSchema = exports.clipSchema = exports.clipClipSchema = exports.assetSchema = exports.assetAssetSchema = void 0;
10
+ exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = exports.postServeAssetResponse = exports.postServeAssetRequest = exports.getAssetByRenderIdResponse = exports.getAssetByRenderIdRequest = void 0;
11
11
  const zod_1 = require("zod");
12
12
  exports.editRootSchema = zod_1.z.unknown();
13
13
  exports.sourceRootSchema = zod_1.z.unknown();
@@ -440,6 +440,20 @@ exports.fontFontSchema = zod_1.z.object({
440
440
  src: zod_1.z.string()
441
441
  }).strict();
442
442
  exports.fontSchema = exports.fontFontSchema;
443
+ /**
444
+ * An image, video or audio asset to generate from a text prompt.
445
+ */
446
+ exports.generationassetGenerationAssetSchema = zod_1.z.object({
447
+ type: zod_1.z.enum([
448
+ 'image',
449
+ 'video',
450
+ 'audio'
451
+ ]),
452
+ prompt: zod_1.z.string().min(1).max(4000).regex(/\S/),
453
+ model: zod_1.z.optional(zod_1.z.string()),
454
+ options: zod_1.z.optional(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
455
+ }).strict();
456
+ exports.generationAssetSchema = exports.generationassetGenerationAssetSchema;
443
457
  /**
444
458
  * 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.
445
459
  */
@@ -610,7 +624,7 @@ exports.imageAssetSchema = exports.imageassetImageAssetSchema;
610
624
  /**
611
625
  * **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
612
626
  * with `prompt`, a `model` that accepts a starting image, and that image in
613
- * `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
627
+ * `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
614
628
  * function and is internally rewritten to VideoAsset; no behaviour change for
615
629
  * existing integrations.
616
630
  *
@@ -2585,7 +2599,8 @@ exports.transformationSchema = exports.transformationTransformationSchema;
2585
2599
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
2586
2600
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
2587
2601
  * with `model` and configure it with model-specific `options`. Models that
2588
- * animate a starting image take it as `options.inputSrc`; the default model
2602
+ * animate an image take it as `options.startSrc` (the original
2603
+ * image-to-video models use `options.inputSrc`); the default model
2589
2604
  * generates from the prompt alone. The generated `src` is filled in
2590
2605
  * automatically.
2591
2606
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
@@ -3006,12 +3021,8 @@ exports.probeRequest = zod_1.z.object({
3006
3021
  */
3007
3022
  exports.probeResponse = exports.proberesponseProbeResponseSchema;
3008
3023
  exports.postGenerateRequest = zod_1.z.object({
3009
- body: zod_1.z.optional(zod_1.z.object({
3010
- asset: zod_1.z.union([
3011
- exports.imageassetImageAssetSchema,
3012
- exports.videoassetVideoAssetSchema,
3013
- exports.audioassetAudioAssetSchema
3014
- ]),
3024
+ body: zod_1.z.object({
3025
+ asset: exports.generationassetGenerationAssetSchema,
3015
3026
  length: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3016
3027
  return undefined; if (Array.isArray(v))
3017
3028
  return v; if (typeof v === 'string') {
@@ -3019,7 +3030,7 @@ exports.postGenerateRequest = zod_1.z.object({
3019
3030
  return v;
3020
3031
  return Number(v);
3021
3032
  } return v; }), zod_1.z.number().gt(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
3022
- })),
3033
+ }),
3023
3034
  path: zod_1.z.optional(zod_1.z.never()),
3024
3035
  query: zod_1.z.optional(zod_1.z.never()),
3025
3036
  headers: zod_1.z.optional(zod_1.z.object({
@@ -772,6 +772,29 @@ export declare const fontFontSchema: z.ZodObject<{
772
772
  export declare const fontSchema: z.ZodObject<{
773
773
  src: z.ZodString;
774
774
  }, z.core.$strict>;
775
+ /**
776
+ * An image, video or audio asset to generate from a text prompt.
777
+ */
778
+ export declare const generationassetGenerationAssetSchema: z.ZodObject<{
779
+ type: z.ZodEnum<{
780
+ image: "image";
781
+ video: "video";
782
+ audio: "audio";
783
+ }>;
784
+ prompt: z.ZodString;
785
+ model: z.ZodOptional<z.ZodString>;
786
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
787
+ }, z.core.$strict>;
788
+ export declare const generationAssetSchema: z.ZodObject<{
789
+ type: z.ZodEnum<{
790
+ image: "image";
791
+ video: "video";
792
+ audio: "audio";
793
+ }>;
794
+ prompt: z.ZodString;
795
+ model: z.ZodOptional<z.ZodString>;
796
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
797
+ }, z.core.$strict>;
775
798
  /**
776
799
  * 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.
777
800
  */
@@ -1015,7 +1038,7 @@ export declare const imageAssetSchema: z.ZodObject<{
1015
1038
  /**
1016
1039
  * **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
1017
1040
  * with `prompt`, a `model` that accepts a starting image, and that image in
1018
- * `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
1041
+ * `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
1019
1042
  * function and is internally rewritten to VideoAsset; no behaviour change for
1020
1043
  * existing integrations.
1021
1044
  *
@@ -7197,7 +7220,8 @@ export declare const transformationSchema: z.ZodObject<{
7197
7220
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
7198
7221
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
7199
7222
  * with `model` and configure it with model-specific `options`. Models that
7200
- * animate a starting image take it as `options.inputSrc`; the default model
7223
+ * animate an image take it as `options.startSrc` (the original
7224
+ * image-to-video models use `options.inputSrc`); the default model
7201
7225
  * generates from the prompt alone. The generated `src` is filled in
7202
7226
  * automatically.
7203
7227
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
@@ -61883,190 +61907,19 @@ export declare const probeResponse: z.ZodObject<{
61883
61907
  response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
61884
61908
  }, z.core.$strict>;
61885
61909
  export declare const postGenerateRequest: z.ZodObject<{
61886
- body: z.ZodOptional<z.ZodObject<{
61887
- asset: z.ZodUnion<readonly [z.ZodObject<{
61910
+ body: z.ZodObject<{
61911
+ asset: z.ZodObject<{
61888
61912
  type: z.ZodEnum<{
61889
61913
  image: "image";
61890
- }>;
61891
- src: z.ZodOptional<z.ZodString>;
61892
- prompt: z.ZodOptional<z.ZodString>;
61893
- model: z.ZodOptional<z.ZodString>;
61894
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
61895
- crop: z.ZodOptional<z.ZodObject<{
61896
- top: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61897
- bottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61898
- left: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61899
- right: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61900
- }, z.core.$strict>>;
61901
- }, z.core.$strict>, z.ZodObject<{
61902
- type: z.ZodEnum<{
61903
61914
  video: "video";
61904
- }>;
61905
- src: z.ZodOptional<z.ZodString>;
61906
- prompt: z.ZodOptional<z.ZodString>;
61907
- model: z.ZodOptional<z.ZodString>;
61908
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
61909
- transcode: z.ZodOptional<z.ZodBoolean>;
61910
- trim: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61911
- volume: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodArray<z.ZodObject<{
61912
- from: z.ZodOptional<z.ZodUnknown>;
61913
- to: z.ZodOptional<z.ZodUnknown>;
61914
- start: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61915
- length: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61916
- interpolation: z.ZodOptional<z.ZodEnum<{
61917
- linear: "linear";
61918
- bezier: "bezier";
61919
- constant: "constant";
61920
- }>>;
61921
- easing: z.ZodOptional<z.ZodEnum<{
61922
- ease: "ease";
61923
- easeIn: "easeIn";
61924
- easeOut: "easeOut";
61925
- easeInOut: "easeInOut";
61926
- easeInQuad: "easeInQuad";
61927
- easeInCubic: "easeInCubic";
61928
- easeInQuart: "easeInQuart";
61929
- easeInQuint: "easeInQuint";
61930
- easeInSine: "easeInSine";
61931
- easeInExpo: "easeInExpo";
61932
- easeInCirc: "easeInCirc";
61933
- easeInBack: "easeInBack";
61934
- easeOutQuad: "easeOutQuad";
61935
- easeOutCubic: "easeOutCubic";
61936
- easeOutQuart: "easeOutQuart";
61937
- easeOutQuint: "easeOutQuint";
61938
- easeOutSine: "easeOutSine";
61939
- easeOutExpo: "easeOutExpo";
61940
- easeOutCirc: "easeOutCirc";
61941
- easeOutBack: "easeOutBack";
61942
- easeInOutQuad: "easeInOutQuad";
61943
- easeInOutCubic: "easeInOutCubic";
61944
- easeInOutQuart: "easeInOutQuart";
61945
- easeInOutQuint: "easeInOutQuint";
61946
- easeInOutSine: "easeInOutSine";
61947
- easeInOutExpo: "easeInOutExpo";
61948
- easeInOutCirc: "easeInOutCirc";
61949
- easeInOutBack: "easeInOutBack";
61950
- }>>;
61951
- }, z.core.$strict>>]>>;
61952
- volumeEffect: z.ZodOptional<z.ZodEnum<{
61953
- none: "none";
61954
- fadeIn: "fadeIn";
61955
- fadeOut: "fadeOut";
61956
- fadeInFadeOut: "fadeInFadeOut";
61957
- }>>;
61958
- speed: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodArray<z.ZodObject<{
61959
- from: z.ZodOptional<z.ZodUnknown>;
61960
- to: z.ZodOptional<z.ZodUnknown>;
61961
- start: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61962
- length: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
61963
- interpolation: z.ZodOptional<z.ZodEnum<{
61964
- linear: "linear";
61965
- bezier: "bezier";
61966
- constant: "constant";
61967
- }>>;
61968
- easing: z.ZodOptional<z.ZodEnum<{
61969
- ease: "ease";
61970
- easeIn: "easeIn";
61971
- easeOut: "easeOut";
61972
- easeInOut: "easeInOut";
61973
- easeInQuad: "easeInQuad";
61974
- easeInCubic: "easeInCubic";
61975
- easeInQuart: "easeInQuart";
61976
- easeInQuint: "easeInQuint";
61977
- easeInSine: "easeInSine";
61978
- easeInExpo: "easeInExpo";
61979
- easeInCirc: "easeInCirc";
61980
- easeInBack: "easeInBack";
61981
- easeOutQuad: "easeOutQuad";
61982
- easeOutCubic: "easeOutCubic";
61983
- easeOutQuart: "easeOutQuart";
61984
- easeOutQuint: "easeOutQuint";
61985
- easeOutSine: "easeOutSine";
61986
- easeOutExpo: "easeOutExpo";
61987
- easeOutCirc: "easeOutCirc";
61988
- easeOutBack: "easeOutBack";
61989
- easeInOutQuad: "easeInOutQuad";
61990
- easeInOutCubic: "easeInOutCubic";
61991
- easeInOutQuart: "easeInOutQuart";
61992
- easeInOutQuint: "easeInOutQuint";
61993
- easeInOutSine: "easeInOutSine";
61994
- easeInOutExpo: "easeInOutExpo";
61995
- easeInOutCirc: "easeInOutCirc";
61996
- easeInOutBack: "easeInOutBack";
61997
- }>>;
61998
- }, z.core.$strict>>]>>;
61999
- crop: z.ZodOptional<z.ZodObject<{
62000
- top: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62001
- bottom: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62002
- left: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62003
- right: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62004
- }, z.core.$strict>>;
62005
- chromaKey: z.ZodOptional<z.ZodObject<{
62006
- color: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
62007
- threshold: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62008
- halo: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62009
- }, z.core.$strict>>;
62010
- }, z.core.$strict>, z.ZodObject<{
62011
- type: z.ZodEnum<{
62012
61915
  audio: "audio";
62013
61916
  }>;
62014
- src: z.ZodOptional<z.ZodString>;
62015
- prompt: z.ZodOptional<z.ZodString>;
61917
+ prompt: z.ZodString;
62016
61918
  model: z.ZodOptional<z.ZodString>;
62017
61919
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
62018
- trim: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62019
- volume: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodArray<z.ZodObject<{
62020
- from: z.ZodOptional<z.ZodUnknown>;
62021
- to: z.ZodOptional<z.ZodUnknown>;
62022
- start: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62023
- length: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62024
- interpolation: z.ZodOptional<z.ZodEnum<{
62025
- linear: "linear";
62026
- bezier: "bezier";
62027
- constant: "constant";
62028
- }>>;
62029
- easing: z.ZodOptional<z.ZodEnum<{
62030
- ease: "ease";
62031
- easeIn: "easeIn";
62032
- easeOut: "easeOut";
62033
- easeInOut: "easeInOut";
62034
- easeInQuad: "easeInQuad";
62035
- easeInCubic: "easeInCubic";
62036
- easeInQuart: "easeInQuart";
62037
- easeInQuint: "easeInQuint";
62038
- easeInSine: "easeInSine";
62039
- easeInExpo: "easeInExpo";
62040
- easeInCirc: "easeInCirc";
62041
- easeInBack: "easeInBack";
62042
- easeOutQuad: "easeOutQuad";
62043
- easeOutCubic: "easeOutCubic";
62044
- easeOutQuart: "easeOutQuart";
62045
- easeOutQuint: "easeOutQuint";
62046
- easeOutSine: "easeOutSine";
62047
- easeOutExpo: "easeOutExpo";
62048
- easeOutCirc: "easeOutCirc";
62049
- easeOutBack: "easeOutBack";
62050
- easeInOutQuad: "easeInOutQuad";
62051
- easeInOutCubic: "easeInOutCubic";
62052
- easeInOutQuart: "easeInOutQuart";
62053
- easeInOutQuint: "easeInOutQuint";
62054
- easeInOutSine: "easeInOutSine";
62055
- easeInOutExpo: "easeInOutExpo";
62056
- easeInOutCirc: "easeInOutCirc";
62057
- easeInOutBack: "easeInOutBack";
62058
- }>>;
62059
- }, z.core.$strict>>]>>;
62060
- speed: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62061
- effect: z.ZodOptional<z.ZodEnum<{
62062
- none: "none";
62063
- fadeIn: "fadeIn";
62064
- fadeOut: "fadeOut";
62065
- fadeInFadeOut: "fadeInFadeOut";
62066
- }>>;
62067
- }, z.core.$strict>]>;
61920
+ }, z.core.$strict>;
62068
61921
  length: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
62069
- }, z.core.$strip>>;
61922
+ }, z.core.$strip>;
62070
61923
  path: z.ZodOptional<z.ZodNever>;
62071
61924
  query: z.ZodOptional<z.ZodNever>;
62072
61925
  headers: z.ZodOptional<z.ZodObject<{
@@ -431,6 +431,20 @@ export const fontFontSchema = z.object({
431
431
  src: z.string()
432
432
  }).strict();
433
433
  export const fontSchema = fontFontSchema;
434
+ /**
435
+ * An image, video or audio asset to generate from a text prompt.
436
+ */
437
+ export const generationassetGenerationAssetSchema = z.object({
438
+ type: z.enum([
439
+ 'image',
440
+ 'video',
441
+ 'audio'
442
+ ]),
443
+ prompt: z.string().min(1).max(4000).regex(/\S/),
444
+ model: z.optional(z.string()),
445
+ options: z.optional(z.record(z.string(), z.unknown()))
446
+ }).strict();
447
+ export const generationAssetSchema = generationassetGenerationAssetSchema;
434
448
  /**
435
449
  * 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.
436
450
  */
@@ -601,7 +615,7 @@ export const imageAssetSchema = imageassetImageAssetSchema;
601
615
  /**
602
616
  * **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
603
617
  * with `prompt`, a `model` that accepts a starting image, and that image in
604
- * `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
618
+ * `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
605
619
  * function and is internally rewritten to VideoAsset; no behaviour change for
606
620
  * existing integrations.
607
621
  *
@@ -2576,7 +2590,8 @@ export const transformationSchema = transformationTransformationSchema;
2576
2590
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
2577
2591
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
2578
2592
  * with `model` and configure it with model-specific `options`. Models that
2579
- * animate a starting image take it as `options.inputSrc`; the default model
2593
+ * animate an image take it as `options.startSrc` (the original
2594
+ * image-to-video models use `options.inputSrc`); the default model
2580
2595
  * generates from the prompt alone. The generated `src` is filled in
2581
2596
  * automatically.
2582
2597
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
@@ -2997,12 +3012,8 @@ export const probeRequest = z.object({
2997
3012
  */
2998
3013
  export const probeResponse = proberesponseProbeResponseSchema;
2999
3014
  export const postGenerateRequest = z.object({
3000
- body: z.optional(z.object({
3001
- asset: z.union([
3002
- imageassetImageAssetSchema,
3003
- videoassetVideoAssetSchema,
3004
- audioassetAudioAssetSchema
3005
- ]),
3015
+ body: z.object({
3016
+ asset: generationassetGenerationAssetSchema,
3006
3017
  length: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3007
3018
  return undefined; if (Array.isArray(v))
3008
3019
  return v; if (typeof v === 'string') {
@@ -3010,7 +3021,7 @@ export const postGenerateRequest = z.object({
3010
3021
  return v;
3011
3022
  return Number(v);
3012
3023
  } return v; }), z.number().gt(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
3013
- })),
3024
+ }),
3014
3025
  path: z.optional(z.never()),
3015
3026
  query: z.optional(z.never()),
3016
3027
  headers: z.optional(z.object({
@@ -391,6 +391,22 @@ export const fontFontSchema = z.object({
391
391
 
392
392
  export const fontSchema = fontFontSchema;
393
393
 
394
+ /**
395
+ * An image, video or audio asset to generate from a text prompt.
396
+ */
397
+ export const generationassetGenerationAssetSchema = z.object({
398
+ type: z.enum([
399
+ 'image',
400
+ 'video',
401
+ 'audio'
402
+ ]),
403
+ prompt: z.string().min(1).max(4000).regex(/\S/),
404
+ model: z.optional(z.string()),
405
+ options: z.optional(z.record(z.string(), z.unknown()))
406
+ }).strict();
407
+
408
+ export const generationAssetSchema = generationassetGenerationAssetSchema;
409
+
394
410
  /**
395
411
  * 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.
396
412
  */
@@ -523,7 +539,7 @@ export const imageAssetSchema = imageassetImageAssetSchema;
523
539
  /**
524
540
  * **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
525
541
  * with `prompt`, a `model` that accepts a starting image, and that image in
526
- * `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
542
+ * `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
527
543
  * function and is internally rewritten to VideoAsset; no behaviour change for
528
544
  * existing integrations.
529
545
  *
@@ -2116,7 +2132,8 @@ export const transformationSchema = transformationTransformationSchema;
2116
2132
  * - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
2117
2133
  * - **Generated:** set `prompt` to describe the motion. Choose a generator
2118
2134
  * with `model` and configure it with model-specific `options`. Models that
2119
- * animate a starting image take it as `options.inputSrc`; the default model
2135
+ * animate an image take it as `options.startSrc` (the original
2136
+ * image-to-video models use `options.inputSrc`); the default model
2120
2137
  * generates from the prompt alone. The generated `src` is filled in
2121
2138
  * automatically.
2122
2139
  * - **Both:** `src` acts as a preview placeholder while `prompt` drives
@@ -2512,14 +2529,10 @@ export const probeRequest = z.object({
2512
2529
  export const probeResponse = proberesponseProbeResponseSchema;
2513
2530
 
2514
2531
  export const postGenerateRequest = z.object({
2515
- body: z.optional(z.object({
2516
- asset: z.union([
2517
- imageassetImageAssetSchema,
2518
- videoassetVideoAssetSchema,
2519
- audioassetAudioAssetSchema
2520
- ]),
2532
+ body: z.object({
2533
+ asset: generationassetGenerationAssetSchema,
2521
2534
  length: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gt(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
2522
- })),
2535
+ }),
2523
2536
  path: z.optional(z.never()),
2524
2537
  query: z.optional(z.never()),
2525
2538
  headers: z.optional(z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",