@shotstack/schemas 1.20.0 → 1.20.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
@@ -2956,6 +2956,168 @@ export interface components {
2956
2956
  /** @description Specify the storage locations and hosting services to send the file to. */
2957
2957
  destinations: components["schemas"]["Destinations"][];
2958
2958
  };
2959
+ /** @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. */
2960
+ GenerationModel: {
2961
+ /**
2962
+ * @description The identifier to set as the asset `model`. Carries no provider name, so routing can change without a public rename.
2963
+ * @example seedance-2.0-text-to-video
2964
+ */
2965
+ model: string;
2966
+ /**
2967
+ * @description The asset type this model generates.
2968
+ * @example video
2969
+ * @enum {string}
2970
+ */
2971
+ type: "image" | "video" | "audio";
2972
+ /**
2973
+ * @description The model's display name, for a model picker.
2974
+ * @example Seedance 2.0 · Text to video
2975
+ */
2976
+ name?: string;
2977
+ /**
2978
+ * @description What the model is suited to, in a sentence or two.
2979
+ * @example Generate cinematic video with realistic motion, prompt-directed camera movement and optional synchronised audio.
2980
+ */
2981
+ description?: string;
2982
+ /** @description What one generation with this model costs. */
2983
+ pricing?: components["schemas"]["GenerationModelPricing"];
2984
+ /** @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. */
2985
+ options?: {
2986
+ [key: string]: unknown;
2987
+ };
2988
+ /**
2989
+ * @description Whether the account behind the calling API key can generate with this model. Omitted when that cannot be determined; treat a missing value as unknown, not as available. Generation requests are checked either way.
2990
+ * @example false
2991
+ */
2992
+ available?: boolean;
2993
+ /**
2994
+ * @description Why `available` is false. `AiCapabilityNotIncluded`: the account's plan does not include this kind of generation. `AiDisabled`: AI generation is turned off for the account. `AiAccessUnavailable`: access could not be confirmed; try again later.
2995
+ * @example AiCapabilityNotIncluded
2996
+ * @enum {string}
2997
+ */
2998
+ unavailableReason?: "AiCapabilityNotIncluded" | "AiDisabled" | "AiAccessUnavailable";
2999
+ };
3000
+ /** @description 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. */
3001
+ GenerationModelPricing: {
3002
+ /**
3003
+ * @description Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.
3004
+ * @example {
3005
+ * "480p": 0.9375,
3006
+ * "720p": 1.8962,
3007
+ * "1080p": 4.2625
3008
+ * }
3009
+ */
3010
+ credits: number | {
3011
+ [key: string]: number;
3012
+ };
3013
+ /** @description The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed. */
3014
+ tieredBy?: {
3015
+ /** @example resolution */
3016
+ option: string;
3017
+ /** @example 720p */
3018
+ default: string;
3019
+ };
3020
+ /** @description How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit. */
3021
+ quantity?: {
3022
+ /**
3023
+ * @description What the count is taken from, and the scale it is measured in.
3024
+ * @example clipSeconds
3025
+ * @enum {string}
3026
+ */
3027
+ measure: "clipSeconds" | "promptCharacters";
3028
+ /**
3029
+ * @description How many of `measure` make one billable unit.
3030
+ * @example 60
3031
+ */
3032
+ per: number;
3033
+ /**
3034
+ * @description Fewest accepted. A smaller request is charged at this.
3035
+ * @example 3
3036
+ */
3037
+ min?: number;
3038
+ /**
3039
+ * @description Most accepted. A larger request is charged at this.
3040
+ * @example 600
3041
+ */
3042
+ max?: number;
3043
+ /**
3044
+ * @description Assumed when the request carries no value.
3045
+ * @example 30
3046
+ */
3047
+ default?: number;
3048
+ /**
3049
+ * @description Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.
3050
+ * @example up
3051
+ * @enum {string}
3052
+ */
3053
+ round?: "up";
3054
+ };
3055
+ /**
3056
+ * @description The date this rate took effect, or `legacy` for a rate that predates dated pricing.
3057
+ * @example 2026-08-13
3058
+ */
3059
+ effectiveFrom: string;
3060
+ };
3061
+ /** @description The generation models available to this account. */
3062
+ GenerationModelListResponse: {
3063
+ /** @description The available models. */
3064
+ models: components["schemas"]["GenerationModel"][];
3065
+ };
3066
+ /** @description The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset. */
3067
+ GenerationResponse: {
3068
+ /**
3069
+ * @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.
3070
+ * @example 8a1f2c3d-4e5b-5a6c-9d7e-1f2a3b4c5d6e
3071
+ */
3072
+ id: string;
3073
+ /**
3074
+ * @description The status of the generation job.
3075
+ * @example done
3076
+ * @enum {string}
3077
+ */
3078
+ status: "queued" | "processing" | "done" | "failed";
3079
+ /**
3080
+ * @description The public URL of the generated asset. Present only when `status` is `done`.
3081
+ * @example https://shotstack-api-v1-output.s3-ap-southeast-2.amazonaws.com/owner/8a1f2c3d.png
3082
+ */
3083
+ url?: string;
3084
+ /** @description A human readable error message. Present only when `status` is `failed`. */
3085
+ error?: string;
3086
+ };
3087
+ /** @description Why a generation request was not accepted or a job could not be found. */
3088
+ GenerationErrorResponse: {
3089
+ /**
3090
+ * @description A human readable error message.
3091
+ * @example Insufficient generation credits.
3092
+ */
3093
+ error: string;
3094
+ /**
3095
+ * @description Why access to AI generation was refused. `AiCapabilityNotIncluded`: the account's plan does not include this kind of generation. `FeatureNotIncluded`: the plan does not include a feature the asset uses. `AiDisabled`: AI generation is turned off for the account. `AiAccessUnavailable`: access could not be confirmed; try again later.
3096
+ * @example AiCapabilityNotIncluded
3097
+ */
3098
+ code?: string;
3099
+ /**
3100
+ * @description The credits the account has available. Present when it has too few.
3101
+ * @example 1.5
3102
+ */
3103
+ available?: number;
3104
+ };
3105
+ /** @description Why a generation model could not be returned. */
3106
+ GenerationModelErrorResponse: {
3107
+ error: {
3108
+ /**
3109
+ * @description `UnknownGenerationModel`: no model has this identifier. `WithdrawnGenerationModel`: the model is no longer listed, but edits that already use it still validate, bill and render.
3110
+ * @example UnknownGenerationModel
3111
+ * @enum {string}
3112
+ */
3113
+ name: "UnknownGenerationModel" | "WithdrawnGenerationModel";
3114
+ /**
3115
+ * @description A human readable error message.
3116
+ * @example Unknown generation model "seedance-9".
3117
+ */
3118
+ message: string;
3119
+ };
3120
+ };
2959
3121
  /** @description The response received after a [render request](#render-asset) or [template render](#render-template) is submitted. The render task is queued for rendering and a unique render id is returned. */
2960
3122
  QueuedResponse: {
2961
3123
  /**
@@ -3894,7 +4056,10 @@ export interface operations {
3894
4056
  postGenerate: {
3895
4057
  parameters: {
3896
4058
  query?: never;
3897
- header?: never;
4059
+ header?: {
4060
+ /** @description A key that makes this request its own generation. Retrying with the same key returns the job it first created instead of generating and billing again, and a new key generates afresh even when the asset matches an earlier one. Without a key, identical assets share one cached result. For 24 hours a key reused for a different asset is rejected; after that it returns its first result. */
4061
+ "Idempotency-Key"?: string;
4062
+ };
3898
4063
  path?: never;
3899
4064
  cookie?: never;
3900
4065
  };
@@ -3903,36 +4068,22 @@ export interface operations {
3903
4068
  content: {
3904
4069
  "application/json": {
3905
4070
  asset: components["schemas"]["ImageAsset"] | components["schemas"]["VideoAsset"] | components["schemas"]["AudioAsset"];
4071
+ /**
4072
+ * @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.
4073
+ * @example 5
4074
+ */
4075
+ length?: number;
3906
4076
  };
3907
4077
  };
3908
4078
  };
3909
4079
  responses: {
3910
- /** @description The generated asset was already cached and is immediately available. */
4080
+ /** @description The asset was generated before: `done` with its URL, or `failed` with the error that ended it. */
3911
4081
  200: {
3912
4082
  headers: {
3913
4083
  [name: string]: unknown;
3914
4084
  };
3915
4085
  content: {
3916
- "application/json": {
3917
- /**
3918
- * @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.
3919
- * @example 8a1f2c3d-4e5b-5a6c-9d7e-1f2a3b4c5d6e
3920
- */
3921
- id: string;
3922
- /**
3923
- * @description The status of the generation job.
3924
- * @example done
3925
- * @enum {string}
3926
- */
3927
- status: "queued" | "processing" | "done" | "failed";
3928
- /**
3929
- * @description The public URL of the generated asset. Present only when `status` is `done`.
3930
- * @example https://shotstack-api-v1-output.s3-ap-southeast-2.amazonaws.com/owner/8a1f2c3d.png
3931
- */
3932
- url?: string;
3933
- /** @description A human readable error message. Present only when `status` is `failed`. */
3934
- error?: string;
3935
- };
4086
+ "application/json": components["schemas"]["GenerationResponse"];
3936
4087
  };
3937
4088
  };
3938
4089
  /** @description The generation job has been queued. Poll the status endpoint. */
@@ -3945,7 +4096,63 @@ export interface operations {
3945
4096
  [name: string]: unknown;
3946
4097
  };
3947
4098
  content: {
3948
- "application/json": paths["/generate"]["post"]["responses"]["200"]["content"]["application/json"]["schema"];
4099
+ "application/json": components["schemas"]["GenerationResponse"];
4100
+ };
4101
+ };
4102
+ /** @description The request is invalid, for example a missing asset or prompt, a disallowed URL or a `length` that is not positive. */
4103
+ 400: {
4104
+ headers: {
4105
+ [name: string]: unknown;
4106
+ };
4107
+ content: {
4108
+ "application/json": components["schemas"]["GenerationErrorResponse"];
4109
+ };
4110
+ };
4111
+ /** @description The account has too few credits for this generation. `available` holds how many it has. */
4112
+ 402: {
4113
+ headers: {
4114
+ [name: string]: unknown;
4115
+ };
4116
+ content: {
4117
+ "application/json": components["schemas"]["GenerationErrorResponse"];
4118
+ };
4119
+ };
4120
+ /** @description The account cannot use this generation. `code` says why. */
4121
+ 403: {
4122
+ headers: {
4123
+ [name: string]: unknown;
4124
+ };
4125
+ content: {
4126
+ "application/json": components["schemas"]["GenerationErrorResponse"];
4127
+ };
4128
+ };
4129
+ /** @description The `Idempotency-Key` was already used for a different asset. */
4130
+ 409: {
4131
+ headers: {
4132
+ [name: string]: unknown;
4133
+ };
4134
+ content: {
4135
+ "application/json": components["schemas"]["GenerationErrorResponse"];
4136
+ };
4137
+ };
4138
+ /** @description The account has reached its generation quota. */
4139
+ 429: {
4140
+ headers: {
4141
+ [name: string]: unknown;
4142
+ };
4143
+ content: {
4144
+ "application/json": components["schemas"]["GenerationErrorResponse"];
4145
+ };
4146
+ };
4147
+ /** @description A service the request depends on is temporarily unavailable. `code` is `AiAccessUnavailable` when access to AI generation could not be confirmed. */
4148
+ 503: {
4149
+ headers: {
4150
+ /** @description Suggested seconds to wait before retrying. */
4151
+ "Retry-After"?: number;
4152
+ [name: string]: unknown;
4153
+ };
4154
+ content: {
4155
+ "application/json": components["schemas"]["GenerationErrorResponse"];
3949
4156
  };
3950
4157
  };
3951
4158
  };
@@ -3968,16 +4175,27 @@ export interface operations {
3968
4175
  [name: string]: unknown;
3969
4176
  };
3970
4177
  content: {
3971
- "application/json": paths["/generate"]["post"]["responses"]["200"]["content"]["application/json"]["schema"];
4178
+ "application/json": components["schemas"]["GenerationResponse"];
3972
4179
  };
3973
4180
  };
3974
4181
  /** @description The generation job is still processing. */
3975
4182
  202: {
3976
4183
  headers: {
4184
+ /** @description Suggested seconds to wait before polling again. */
4185
+ "Retry-After"?: number;
3977
4186
  [name: string]: unknown;
3978
4187
  };
3979
4188
  content: {
3980
- "application/json": paths["/generate"]["post"]["responses"]["200"]["content"]["application/json"]["schema"];
4189
+ "application/json": components["schemas"]["GenerationResponse"];
4190
+ };
4191
+ };
4192
+ /** @description No generation job with this id exists for the calling account. */
4193
+ 404: {
4194
+ headers: {
4195
+ [name: string]: unknown;
4196
+ };
4197
+ content: {
4198
+ "application/json": components["schemas"]["GenerationErrorResponse"];
3981
4199
  };
3982
4200
  };
3983
4201
  };
@@ -4003,10 +4221,7 @@ export interface operations {
4003
4221
  [name: string]: unknown;
4004
4222
  };
4005
4223
  content: {
4006
- "application/json": {
4007
- /** @description The available models. */
4008
- models: paths["/models/{id}"]["get"]["responses"]["200"]["content"]["application/json"]["schema"][];
4009
- };
4224
+ "application/json": components["schemas"]["GenerationModelListResponse"];
4010
4225
  };
4011
4226
  };
4012
4227
  };
@@ -4032,113 +4247,17 @@ export interface operations {
4032
4247
  [name: string]: unknown;
4033
4248
  };
4034
4249
  content: {
4035
- "application/json": {
4036
- /**
4037
- * @description The identifier to set as the asset `model`. Carries no provider name, so routing can change without a public rename.
4038
- * @example seedance-2.0-text-to-video
4039
- */
4040
- model: string;
4041
- /**
4042
- * @description The asset type this model generates.
4043
- * @example video
4044
- * @enum {string}
4045
- */
4046
- type: "image" | "video" | "audio";
4047
- /**
4048
- * @description The model's display name, for a model picker.
4049
- * @example Seedance 2.0 · Text to video
4050
- */
4051
- name?: string;
4052
- /**
4053
- * @description What the model is suited to, in a sentence or two.
4054
- * @example Generate cinematic video with realistic motion, prompt-directed camera movement and optional synchronised audio.
4055
- */
4056
- description?: string;
4057
- /** @description What one generation with this model costs. */
4058
- pricing?: {
4059
- /**
4060
- * @description Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.
4061
- * @example {
4062
- * "480p": 0.9375,
4063
- * "720p": 1.8962,
4064
- * "1080p": 4.2625
4065
- * }
4066
- */
4067
- credits: number | {
4068
- [key: string]: unknown;
4069
- };
4070
- /** @description The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed. */
4071
- tieredBy?: {
4072
- /** @example resolution */
4073
- option: string;
4074
- /** @example 720p */
4075
- default: string;
4076
- };
4077
- /** @description How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit. */
4078
- quantity?: {
4079
- /**
4080
- * @description What the count is taken from, and the scale it is measured in.
4081
- * @example clipSeconds
4082
- * @enum {string}
4083
- */
4084
- measure: "clipSeconds" | "promptCharacters";
4085
- /**
4086
- * @description How many of `measure` make one billable unit.
4087
- * @example 60
4088
- */
4089
- per: number;
4090
- /**
4091
- * @description Fewest accepted. A smaller request is charged at this.
4092
- * @example 3
4093
- */
4094
- min?: number;
4095
- /**
4096
- * @description Most accepted. A larger request is charged at this.
4097
- * @example 600
4098
- */
4099
- max?: number;
4100
- /**
4101
- * @description Assumed when the request carries no value.
4102
- * @example 30
4103
- */
4104
- default?: number;
4105
- /**
4106
- * @description Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.
4107
- * @example up
4108
- * @enum {string}
4109
- */
4110
- round?: "up";
4111
- };
4112
- /**
4113
- * @description The date this rate took effect, or `legacy` for a rate that predates dated pricing.
4114
- * @example 2026-08-13
4115
- */
4116
- effectiveFrom: string;
4117
- };
4118
- /** @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. */
4119
- options?: {
4120
- [key: string]: unknown;
4121
- };
4122
- /**
4123
- * @description Whether the account behind the calling API key can generate with this model. Omitted when that cannot be determined; treat a missing value as unknown, not as available. Generation requests are checked either way.
4124
- * @example false
4125
- */
4126
- available?: boolean;
4127
- /**
4128
- * @description Why `available` is false. `AiCapabilityNotIncluded`: the account's plan does not include this kind of generation. `AiDisabled`: AI generation is turned off for the account. `AiAccessUnavailable`: access could not be confirmed; try again later.
4129
- * @example AiCapabilityNotIncluded
4130
- * @enum {string}
4131
- */
4132
- unavailableReason?: "AiCapabilityNotIncluded" | "AiDisabled" | "AiAccessUnavailable";
4133
- };
4250
+ "application/json": components["schemas"]["GenerationModel"];
4134
4251
  };
4135
4252
  };
4136
- /** @description No model exists with that identifier. */
4253
+ /** @description No listed model has that identifier. `error.name` tells an unknown model from one that has been withdrawn. */
4137
4254
  404: {
4138
4255
  headers: {
4139
4256
  [name: string]: unknown;
4140
4257
  };
4141
- content?: never;
4258
+ content: {
4259
+ "application/json": components["schemas"]["GenerationModelErrorResponse"];
4260
+ };
4142
4261
  };
4143
4262
  };
4144
4263
  };
@@ -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.speedSchema = exports.speedSpeedSchema = 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.generationmodelGenerationModelSchema = 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.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = 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.generationresponseGenerationResponseSchema = exports.generationmodellistresponseGenerationModelListResponseSchema = 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 = void 0;
7
- exports.svgAssetSchema = exports.svgassetSvgAssetSchema = exports.soundtrackSchema = exports.soundtrackSoundtrackSchema = exports.sourceSchema = exports.sourceSourceSchema = exports.sourceResponseSchema = exports.sourceresponseSourceResponseSchema = exports.sourceListResponseSchema = exports.sourcelistresponseSourceListResponseSchema = 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.richtextpropertiesRichTextPaddingSchema = exports.richcaptionpropertiesRichCaptionStyleSchema = void 0;
8
- exports.renderResponseDataSchema = exports.renderresponsedataRenderResponseDataSchema = exports.editSchema = exports.editEditSchema = exports.timelineSchema = exports.timelineTimelineSchema = exports.trackSchema = exports.trackTrackSchema = exports.clipSchema = exports.clipClipSchema = 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 = void 0;
9
- exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = exports.postServeAssetResponse = exports.postServeAssetRequest = 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 = void 0;
10
- exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = 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.sourceListResponseSchema = exports.sourcelistresponseSourceListResponseSchema = 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.richtextpropertiesRichTextPaddingSchema = exports.richcaptionpropertiesRichCaptionStyleSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = void 0;
8
+ exports.clipSchema = exports.clipClipSchema = 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 = void 0;
9
+ exports.postServeAssetResponse = exports.postServeAssetRequest = 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 = void 0;
10
+ exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = 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,7 +440,13 @@ exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
440
440
  return v;
441
441
  return Number(v);
442
442
  } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
443
- zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())
443
+ zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
444
+ return undefined; if (Array.isArray(v))
445
+ return v; if (typeof v === 'string') {
446
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
447
+ return v;
448
+ return Number(v);
449
+ } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
444
450
  ]),
445
451
  tieredBy: zod_1.z.optional(zod_1.z.object({
446
452
  option: zod_1.z.string(),
@@ -480,6 +486,7 @@ exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
480
486
  })),
481
487
  effectiveFrom: zod_1.z.string()
482
488
  }).strict();
489
+ exports.generationModelPricingSchema = exports.generationmodelpricingGenerationModelPricingSchema;
483
490
  /**
484
491
  * 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.
485
492
  */
@@ -501,6 +508,7 @@ exports.generationmodelGenerationModelSchema = zod_1.z.object({
501
508
  'AiAccessUnavailable'
502
509
  ]))
503
510
  }).strict();
511
+ exports.generationModelSchema = exports.generationmodelGenerationModelSchema;
504
512
  /**
505
513
  * The Html5Asset renders full HTML5/CSS3/JS.
506
514
  *
@@ -840,12 +848,38 @@ exports.assetresponseAssetResponseSchema = zod_1.z.object({
840
848
  data: exports.assetresponsedataAssetResponseDataSchema
841
849
  }).strict();
842
850
  exports.assetResponseSchema = exports.assetresponseAssetResponseSchema;
851
+ /**
852
+ * Why a generation request was not accepted or a job could not be found.
853
+ */
854
+ exports.generationerrorresponseGenerationErrorResponseSchema = zod_1.z.object({
855
+ error: zod_1.z.string(),
856
+ code: zod_1.z.optional(zod_1.z.string()),
857
+ available: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
858
+ return undefined; if (Array.isArray(v))
859
+ return v; if (typeof v === 'string') {
860
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
861
+ return v;
862
+ return Number(v);
863
+ } return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
864
+ }).strict();
865
+ exports.generationErrorResponseSchema = exports.generationerrorresponseGenerationErrorResponseSchema;
866
+ /**
867
+ * Why a generation model could not be returned.
868
+ */
869
+ exports.generationmodelerrorresponseGenerationModelErrorResponseSchema = zod_1.z.object({
870
+ error: zod_1.z.object({
871
+ name: zod_1.z.enum(['UnknownGenerationModel', 'WithdrawnGenerationModel']),
872
+ message: zod_1.z.string()
873
+ })
874
+ }).strict();
875
+ exports.generationModelErrorResponseSchema = exports.generationmodelerrorresponseGenerationModelErrorResponseSchema;
843
876
  /**
844
877
  * The generation models available to this account.
845
878
  */
846
879
  exports.generationmodellistresponseGenerationModelListResponseSchema = zod_1.z.object({
847
880
  models: zod_1.z.array(exports.generationmodelGenerationModelSchema)
848
881
  }).strict();
882
+ exports.generationModelListResponseSchema = exports.generationmodellistresponseGenerationModelListResponseSchema;
849
883
  /**
850
884
  * The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset.
851
885
  */
@@ -860,6 +894,7 @@ exports.generationresponseGenerationResponseSchema = zod_1.z.object({
860
894
  url: zod_1.z.optional(zod_1.z.string()),
861
895
  error: zod_1.z.optional(zod_1.z.string())
862
896
  }).strict();
897
+ exports.generationResponseSchema = exports.generationresponseGenerationResponseSchema;
863
898
  /**
864
899
  * The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
865
900
  */
@@ -2962,13 +2997,23 @@ exports.postGenerateRequest = zod_1.z.object({
2962
2997
  exports.imageassetImageAssetSchema,
2963
2998
  exports.videoassetVideoAssetSchema,
2964
2999
  exports.audioassetAudioAssetSchema
2965
- ])
3000
+ ]),
3001
+ length: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3002
+ return undefined; if (Array.isArray(v))
3003
+ return v; if (typeof v === 'string') {
3004
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3005
+ return v;
3006
+ return Number(v);
3007
+ } return v; }), zod_1.z.number().gt(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
2966
3008
  })),
2967
3009
  path: zod_1.z.optional(zod_1.z.never()),
2968
- query: zod_1.z.optional(zod_1.z.never())
3010
+ query: zod_1.z.optional(zod_1.z.never()),
3011
+ headers: zod_1.z.optional(zod_1.z.object({
3012
+ 'Idempotency-Key': zod_1.z.optional(zod_1.z.string())
3013
+ }))
2969
3014
  }).strict();
2970
3015
  /**
2971
- * The generated asset was already cached and is immediately available.
3016
+ * The asset was generated before: `done` with its URL, or `failed` with the error that ended it.
2972
3017
  */
2973
3018
  exports.postGenerateResponse = exports.generationresponseGenerationResponseSchema;
2974
3019
  exports.getGenerateRequest = zod_1.z.object({