@picsart/ai-sdk 6.6.0 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +50 -0
  2. package/index.js +154 -106
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2042,6 +2042,21 @@ interface FileDescriptor {
2042
2042
  * worker stays the authoritative gate. Omit for no client-side cap.
2043
2043
  */
2044
2044
  maxDurationSec?: number;
2045
+ /**
2046
+ * Min intrinsic duration (seconds) accepted for a video/audio file. Unlike
2047
+ * every other bound here this one has no remedy: a clip that is too short
2048
+ * cannot be lengthened, so the client's only honest move is to refuse the
2049
+ * attachment and say why. Enforced client-side at upload by measuring the
2050
+ * media before it is sent; the backend worker stays the authoritative gate.
2051
+ * Omit for no client-side floor.
2052
+ */
2053
+ minDurationSec?: number;
2054
+ /**
2055
+ * Max intrinsic frame rate (fps) accepted for a video file. Enforced
2056
+ * client-side at upload by measuring the media before it is sent; the backend
2057
+ * worker stays the authoritative gate. Omit for no client-side cap.
2058
+ */
2059
+ maxFrameRate?: number;
2045
2060
  /**
2046
2061
  * Min intrinsic pixel count (width × height) accepted for an image/video file.
2047
2062
  * Enforced client-side at upload by measuring the media before it is sent; the
@@ -2057,6 +2072,41 @@ interface FileDescriptor {
2057
2072
  * authoritative gate. Omit for no client-side floor.
2058
2073
  */
2059
2074
  minSidePixels?: number;
2075
+ /**
2076
+ * Max intrinsic pixel count (width × height) accepted for an image/video
2077
+ * file. The ceiling matching `minPixels`, and a separate rule from
2078
+ * `maxSidePixels`: a 12000×2000 frame passes a 36 MP area cap and still
2079
+ * breaks a 6000 px per-side one. Enforced client-side at upload by measuring
2080
+ * the media before it is sent; the backend worker stays the authoritative
2081
+ * gate. Omit for no client-side ceiling.
2082
+ */
2083
+ maxPixels?: number;
2084
+ /**
2085
+ * Max intrinsic long-side length (pixels) accepted for an image/video file:
2086
+ * `max(width, height)` must not exceed this. The ceiling matching
2087
+ * `minSidePixels`, so the pair expresses the shape vendors usually publish
2088
+ * ("width and height must each be between 300 and 6000 px"). Distinct from
2089
+ * `maxShortSidePixels`, which bounds the OTHER side and exists for upscaler
2090
+ * sources. Enforced client-side at upload by measuring the media before it is
2091
+ * sent; the backend worker stays the authoritative gate. Omit for no
2092
+ * client-side ceiling.
2093
+ */
2094
+ maxSidePixels?: number;
2095
+ /**
2096
+ * Min intrinsic aspect ratio (width / height) accepted for an image/video
2097
+ * file. Vendors publish this as the bound a panorama or a tall crop breaks,
2098
+ * and it is not derivable from the pixel and side bounds: a 6000x1200 frame
2099
+ * satisfies a [300, 6000] per-side rule and a 36 MP area rule and is still
2100
+ * refused at 5.0. Enforced client-side at upload by measuring the media
2101
+ * before it is sent; the backend worker stays the authoritative gate. Omit
2102
+ * for no client-side floor.
2103
+ */
2104
+ minAspectRatio?: number;
2105
+ /**
2106
+ * Max intrinsic aspect ratio (width / height) accepted for an image/video
2107
+ * file. The ceiling matching `minAspectRatio`.
2108
+ */
2109
+ maxAspectRatio?: number;
2060
2110
  /**
2061
2111
  * Max intrinsic short-side length (pixels) accepted for an image/video file —
2062
2112
  * `min(width, height)` must not exceed this. Used by upscalers whose source
package/index.js CHANGED
@@ -927,8 +927,14 @@ var p = {
927
927
  accept,
928
928
  ...opts?.array ? { array: opts.array } : {},
929
929
  ...opts?.maxDurationSec != null ? { maxDurationSec: opts.maxDurationSec } : {},
930
+ ...opts?.minDurationSec != null ? { minDurationSec: opts.minDurationSec } : {},
931
+ ...opts?.maxFrameRate != null ? { maxFrameRate: opts.maxFrameRate } : {},
930
932
  ...opts?.minPixels != null ? { minPixels: opts.minPixels } : {},
933
+ ...opts?.maxPixels != null ? { maxPixels: opts.maxPixels } : {},
931
934
  ...opts?.minSidePixels != null ? { minSidePixels: opts.minSidePixels } : {},
935
+ ...opts?.maxSidePixels != null ? { maxSidePixels: opts.maxSidePixels } : {},
936
+ ...opts?.minAspectRatio != null ? { minAspectRatio: opts.minAspectRatio } : {},
937
+ ...opts?.maxAspectRatio != null ? { maxAspectRatio: opts.maxAspectRatio } : {},
932
938
  ...opts?.maxShortSidePixels != null ? { maxShortSidePixels: opts.maxShortSidePixels } : {},
933
939
  ...opts?.maxBytes != null ? { maxBytes: opts.maxBytes } : {}
934
940
  }
@@ -1162,50 +1168,37 @@ var params = {
1162
1168
  // `category` defaults to the most common role for the slot (overridable per call):
1163
1169
  // asset → start/end frame, sync audio (direct inputs to the output)
1164
1170
  // reference → ref images/videos/audios (guidance signals)
1165
- /** Array of image inputs (writes to `imageUrls`). `bounds` carries the
1166
- * client-side dimension floors enforced at upload: `minPixels` for a vendor
1167
- * rule stated as a total pixel count, `minSidePixels` for one stated per
1168
- * side (width and height each), which is what most vendors publish. */
1169
- imageInput: (max = 1, label = "Start Image", required = false, category = "reference", bounds) => p.file("imageUrls", "image", {
1170
- array: { max },
1171
- label,
1172
- required,
1173
- category,
1174
- ...bounds?.minPixels != null ? { minPixels: bounds.minPixels } : {},
1175
- ...bounds?.minSidePixels != null ? { minSidePixels: bounds.minSidePixels } : {}
1176
- }),
1171
+ /** Array of image inputs (writes to `imageUrls`). */
1172
+ imageInput: (max = 1, label = "Start Image", required = false, category = "reference", bounds) => p.file("imageUrls", "image", { array: { max }, label, required, category, ...bounds }),
1177
1173
  /** Single source-video slot (v2v / video edit). Writes to `videoUrl`.
1178
- * `maxDurationSec` caps the source clip length, `maxShortSidePixels` caps
1179
- * the shorter side (upscaler sources) and `maxBytes` caps the file size,
1180
- * all enforced client-side at upload. */
1181
- videoInput: (label = "Source Video", category = "reference", required = true, maxDurationSec, maxShortSidePixels, maxBytes) => p.file("videoUrl", "video", {
1174
+ * The four positional limits predate `bounds` and are kept so the dozens of
1175
+ * existing call sites do not churn; new limits go in `bounds`. */
1176
+ videoInput: (label = "Source Video", category = "reference", required = true, maxDurationSec, maxShortSidePixels, maxBytes, bounds) => p.file("videoUrl", "video", {
1182
1177
  label,
1183
1178
  required,
1184
1179
  category,
1185
- ...maxDurationSec != null ? { maxDurationSec } : {},
1186
- ...maxShortSidePixels != null ? { maxShortSidePixels } : {},
1187
- ...maxBytes != null ? { maxBytes } : {}
1180
+ maxDurationSec,
1181
+ maxShortSidePixels,
1182
+ maxBytes,
1183
+ ...bounds
1188
1184
  }),
1189
1185
  /** Single driving / sync-audio slot. Writes to `audioUrl`. */
1190
1186
  audioInput: (label = "Audio Track", required = false, category = "asset") => p.file("audioUrl", "audio", { label, required, category }),
1191
- /** Array of reference videos (writes to `videoUrls`). Backend enforces
1192
- * per-model total-duration caps (e.g. ≤ 15s for seedance). `bounds` carries
1193
- * the client-side checks run at upload: `minPixels` for a total-pixel floor,
1194
- * `minSidePixels` for a per-side one, `maxBytes` for each clip's file size. */
1195
- videoInputs: (max = 3, label = "Reference Videos", required = false, bounds) => p.file("videoUrls", "video", {
1196
- array: { max },
1197
- label,
1198
- required,
1199
- category: "reference",
1200
- ...bounds?.minPixels != null ? { minPixels: bounds.minPixels } : {},
1201
- ...bounds?.minSidePixels != null ? { minSidePixels: bounds.minSidePixels } : {},
1202
- ...bounds?.maxBytes != null ? { maxBytes: bounds.maxBytes } : {}
1203
- }),
1204
- /** Array of reference audios (writes to `audioUrls`). Backend enforces
1205
- * per-model total-duration caps. */
1206
- audioInputs: (max = 3, label = "Reference Audios", required = false) => p.file("audioUrls", "audio", { array: { max }, label, required, category: "reference" }),
1207
- startFrame: (label = "Start Frame", required = false) => p.file("startFrame", "image", { label, required, category: "asset" }),
1208
- endFrame: (label = "End Frame") => p.file("endFrame", "image", { label, category: "asset" })
1187
+ /** Array of reference videos (writes to `videoUrls`). `bounds` is checked per
1188
+ * clip. The backend also caps the COMBINED length of the array per model,
1189
+ * which no descriptor field expresses yet; declaring the per-clip bounds
1190
+ * still turns the common single-clip case into a trim prompt in the composer
1191
+ * instead of a vendor `400` after the user pressed Generate. */
1192
+ videoInputs: (max = 3, label = "Reference Videos", required = false, bounds) => p.file("videoUrls", "video", { array: { max }, label, required, category: "reference", ...bounds }),
1193
+ /** Array of reference audios (writes to `audioUrls`). `bounds` is checked per
1194
+ * clip; as with `videoInputs` the backend also caps the combined length. */
1195
+ audioInputs: (max = 3, label = "Reference Audios", required = false, bounds) => p.file("audioUrls", "audio", { array: { max }, label, required, category: "reference", ...bounds }),
1196
+ /** First-frame slot (writes to `startFrame`). Vendors routinely publish a
1197
+ * DIFFERENT pixel floor for a frame than for a reference image, because a
1198
+ * frame becomes the output's first rendered frame. */
1199
+ startFrame: (label = "Start Frame", required = false, bounds) => p.file("startFrame", "image", { label, required, category: "asset", ...bounds }),
1200
+ /** Last-frame slot (writes to `endFrame`). Same `bounds` as `startFrame`. */
1201
+ endFrame: (label = "End Frame", bounds) => p.file("endFrame", "image", { label, category: "asset", ...bounds })
1209
1202
  };
1210
1203
  var paramPresets = {
1211
1204
  videoStartEndWithAudio
@@ -3673,8 +3666,71 @@ registerPayloads(MODELS11, {
3673
3666
  // src/vendors/catalog/seedance.ts
3674
3667
  var SEEDANCE_FRAME_REF_REASON = "Start/End frames cannot be combined with reference images, videos, or audios";
3675
3668
  var SEEDANCE_MIN_SIDE_PIXELS = 300;
3669
+ var SEEDANCE_MAX_SIDE_PIXELS = 6e3;
3670
+ var SEEDANCE_MIN_ASPECT_RATIO = 0.39;
3671
+ var SEEDANCE_MAX_ASPECT_RATIO = 2.5;
3672
+ var SEEDANCE_MAX_IMAGE_PIXELS = 36e6;
3676
3673
  var SEEDANCE_VIDEO_MIN_PIXELS = 407696;
3677
- var SEEDANCE_25_MAX_VIDEO_BYTES = 209715200;
3674
+ var SEEDANCE_VIDEO_MAX_PIXELS = 8295044;
3675
+ var SEEDANCE_MIN_MEDIA_SEC = 1.8;
3676
+ var SEEDANCE_MAX_FRAME_RATE = 60;
3677
+ var SEEDANCE_MAX_VIDEO_BYTES = 209715200;
3678
+ var SEEDANCE_FRAME_MIN_PIXELS = 9e4;
3679
+ var SEEDANCE_MAX_IMAGE_BYTES = 31457280;
3680
+ var SEEDANCE_MAX_AUDIO_BYTES = 15728640;
3681
+ var SEEDANCE_25_MAX_MEDIA_SEC = 30;
3682
+ var SEEDANCE_20_MAX_MEDIA_SEC = 15;
3683
+ var SEEDANCE_IMAGE_BOUNDS = {
3684
+ minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
3685
+ maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
3686
+ minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
3687
+ maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
3688
+ maxPixels: SEEDANCE_MAX_IMAGE_PIXELS,
3689
+ maxBytes: SEEDANCE_MAX_IMAGE_BYTES
3690
+ };
3691
+ var SEEDANCE_FRAME_BOUNDS = {
3692
+ minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
3693
+ maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
3694
+ minPixels: SEEDANCE_FRAME_MIN_PIXELS,
3695
+ maxPixels: SEEDANCE_MAX_IMAGE_PIXELS,
3696
+ minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
3697
+ maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
3698
+ maxBytes: SEEDANCE_MAX_IMAGE_BYTES
3699
+ };
3700
+ var SEEDANCE_25_VIDEO_BOUNDS = {
3701
+ minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
3702
+ maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
3703
+ minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
3704
+ maxPixels: SEEDANCE_VIDEO_MAX_PIXELS,
3705
+ minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
3706
+ maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
3707
+ maxBytes: SEEDANCE_MAX_VIDEO_BYTES,
3708
+ minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
3709
+ maxDurationSec: SEEDANCE_25_MAX_MEDIA_SEC,
3710
+ maxFrameRate: SEEDANCE_MAX_FRAME_RATE
3711
+ };
3712
+ var SEEDANCE_20_VIDEO_BOUNDS = {
3713
+ minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
3714
+ maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
3715
+ minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
3716
+ maxPixels: SEEDANCE_VIDEO_MAX_PIXELS,
3717
+ minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
3718
+ maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
3719
+ maxBytes: SEEDANCE_MAX_VIDEO_BYTES,
3720
+ minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
3721
+ maxDurationSec: SEEDANCE_20_MAX_MEDIA_SEC,
3722
+ maxFrameRate: SEEDANCE_MAX_FRAME_RATE
3723
+ };
3724
+ var SEEDANCE_25_AUDIO_BOUNDS = {
3725
+ minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
3726
+ maxDurationSec: SEEDANCE_25_MAX_MEDIA_SEC,
3727
+ maxBytes: SEEDANCE_MAX_AUDIO_BYTES
3728
+ };
3729
+ var SEEDANCE_20_AUDIO_BOUNDS = {
3730
+ minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
3731
+ maxDurationSec: SEEDANCE_20_MAX_MEDIA_SEC,
3732
+ maxBytes: SEEDANCE_MAX_AUDIO_BYTES
3733
+ };
3678
3734
  var seedance20Constraints = [
3679
3735
  {
3680
3736
  when: {
@@ -3944,15 +4000,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3944
4000
  ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3945
4001
  ...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
3946
4002
  // 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
3947
- ...params.imageInput(30, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
3948
- ...params.videoInputs(10, "Reference Videos", false, {
3949
- minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
3950
- minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
3951
- maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES
3952
- }),
3953
- ...params.audioInputs(10, "Reference Audios"),
3954
- ...params.startFrame(),
3955
- ...params.endFrame()
4003
+ ...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
4004
+ ...params.videoInputs(10, "Reference Videos", false, SEEDANCE_25_VIDEO_BOUNDS),
4005
+ ...params.audioInputs(10, "Reference Audios", false, SEEDANCE_25_AUDIO_BOUNDS),
4006
+ ...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
4007
+ ...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
3956
4008
  }
3957
4009
  },
3958
4010
  {
@@ -3983,15 +4035,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3983
4035
  ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3984
4036
  ...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
3985
4037
  // 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
3986
- ...params.imageInput(30, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
3987
- ...params.videoInputs(10, "Reference Videos", false, {
3988
- minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
3989
- minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
3990
- maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES
3991
- }),
3992
- ...params.audioInputs(10, "Reference Audios"),
3993
- ...params.startFrame(),
3994
- ...params.endFrame()
4038
+ ...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
4039
+ ...params.videoInputs(10, "Reference Videos", false, SEEDANCE_25_VIDEO_BOUNDS),
4040
+ ...params.audioInputs(10, "Reference Audios", false, SEEDANCE_25_AUDIO_BOUNDS),
4041
+ ...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
4042
+ ...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
3995
4043
  }
3996
4044
  },
3997
4045
  {
@@ -4018,8 +4066,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4018
4066
  ...params.returnLastFrame(),
4019
4067
  ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4020
4068
  ...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
4021
- ...params.videoInput("Source Video", "reference", true, void 0, void 0, SEEDANCE_25_MAX_VIDEO_BYTES),
4022
- ...params.imageInput(30, "Reference Images")
4069
+ // Every limit rides in `bounds`; the positional maxDuration / maxShortSide
4070
+ // / maxBytes args predate it and are skipped rather than duplicated.
4071
+ ...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_25_VIDEO_BOUNDS),
4072
+ ...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
4023
4073
  }
4024
4074
  },
4025
4075
  {
@@ -4047,8 +4097,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4047
4097
  ...params.returnLastFrame(),
4048
4098
  ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4049
4099
  ...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
4050
- ...params.videoInput("Source Video", "reference", true, void 0, void 0, SEEDANCE_25_MAX_VIDEO_BYTES),
4051
- ...params.imageInput(30, "Reference Images")
4100
+ // Every limit rides in `bounds`; the positional maxDuration / maxShortSide
4101
+ // / maxBytes args predate it and are skipped rather than duplicated.
4102
+ ...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_25_VIDEO_BOUNDS),
4103
+ ...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
4052
4104
  }
4053
4105
  },
4054
4106
  {
@@ -4075,7 +4127,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4075
4127
  ...params.generateAudio(),
4076
4128
  ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4077
4129
  ...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
4078
- ...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
4130
+ ...params.videoInputs(10, "Source Videos", true, SEEDANCE_25_VIDEO_BOUNDS)
4079
4131
  }
4080
4132
  },
4081
4133
  {
@@ -4103,7 +4155,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4103
4155
  ...params.generateAudio(),
4104
4156
  ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4105
4157
  ...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
4106
- ...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
4158
+ ...params.videoInputs(10, "Source Videos", true, SEEDANCE_25_VIDEO_BOUNDS)
4107
4159
  }
4108
4160
  },
4109
4161
  {
@@ -4129,14 +4181,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4129
4181
  ...params.returnLastFrame(),
4130
4182
  // Reference roles map directly to backend `reference_*` content entries.
4131
4183
  // start/end frame stay on their own named slots.
4132
- ...params.imageInput(9, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
4133
- ...params.videoInputs(3, "Reference Videos", false, {
4134
- minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
4135
- minSidePixels: SEEDANCE_MIN_SIDE_PIXELS
4136
- }),
4137
- ...params.audioInputs(3, "Reference Audios"),
4138
- ...params.startFrame(),
4139
- ...params.endFrame()
4184
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
4185
+ ...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
4186
+ ...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
4187
+ ...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
4188
+ ...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
4140
4189
  }
4141
4190
  },
4142
4191
  {
@@ -4166,14 +4215,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4166
4215
  ...params.returnLastFrame(),
4167
4216
  // Reference roles map directly to backend `reference_*` content entries.
4168
4217
  // start/end frame stay on their own named slots.
4169
- ...params.imageInput(9, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
4170
- ...params.videoInputs(3, "Reference Videos", false, {
4171
- minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
4172
- minSidePixels: SEEDANCE_MIN_SIDE_PIXELS
4173
- }),
4174
- ...params.audioInputs(3, "Reference Audios"),
4175
- ...params.startFrame(),
4176
- ...params.endFrame()
4218
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
4219
+ ...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
4220
+ ...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
4221
+ ...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
4222
+ ...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
4177
4223
  }
4178
4224
  },
4179
4225
  {
@@ -4199,14 +4245,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4199
4245
  ...params.returnLastFrame(),
4200
4246
  // Reference roles map directly to backend `reference_*` content entries.
4201
4247
  // start/end frame stay on their own named slots.
4202
- ...params.imageInput(9, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
4203
- ...params.videoInputs(3, "Reference Videos", false, {
4204
- minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
4205
- minSidePixels: SEEDANCE_MIN_SIDE_PIXELS
4206
- }),
4207
- ...params.audioInputs(3, "Reference Audios"),
4208
- ...params.startFrame(),
4209
- ...params.endFrame()
4248
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
4249
+ ...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
4250
+ ...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
4251
+ ...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
4252
+ ...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
4210
4253
  }
4211
4254
  },
4212
4255
  {
@@ -4232,14 +4275,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4232
4275
  ...params.returnLastFrame(),
4233
4276
  // Reference roles map directly to backend `reference_*` content entries.
4234
4277
  // start/end frame stay on their own named slots.
4235
- ...params.imageInput(9, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
4236
- ...params.videoInputs(3, "Reference Videos", false, {
4237
- minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
4238
- minSidePixels: SEEDANCE_MIN_SIDE_PIXELS
4239
- }),
4240
- ...params.audioInputs(3, "Reference Audios"),
4241
- ...params.startFrame(),
4242
- ...params.endFrame()
4278
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
4279
+ ...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
4280
+ ...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
4281
+ ...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
4282
+ ...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
4243
4283
  }
4244
4284
  },
4245
4285
  {
@@ -4262,8 +4302,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4262
4302
  ...params.duration(SEEDANCE_V2_DURATIONS, 5),
4263
4303
  ...params.generateAudio(),
4264
4304
  ...params.returnLastFrame(),
4265
- ...params.videoInput("Source Video"),
4266
- ...params.imageInput(9, "Reference Images")
4305
+ // Every limit rides in `bounds`; the positional maxDuration / maxShortSide
4306
+ // / maxBytes args predate it and are skipped rather than duplicated.
4307
+ ...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
4308
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
4267
4309
  }
4268
4310
  },
4269
4311
  {
@@ -4287,8 +4329,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4287
4329
  ...params.duration(SEEDANCE_V2_DURATIONS, 5),
4288
4330
  ...params.generateAudio(),
4289
4331
  ...params.returnLastFrame(),
4290
- ...params.videoInput("Source Video"),
4291
- ...params.imageInput(9, "Reference Images")
4332
+ // Every limit rides in `bounds`; the positional maxDuration / maxShortSide
4333
+ // / maxBytes args predate it and are skipped rather than duplicated.
4334
+ ...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
4335
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
4292
4336
  }
4293
4337
  },
4294
4338
  {
@@ -4311,8 +4355,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4311
4355
  ...params.duration(SEEDANCE_V2_DURATIONS, 5),
4312
4356
  ...params.generateAudio(),
4313
4357
  ...params.returnLastFrame(),
4314
- ...params.videoInput("Source Video"),
4315
- ...params.imageInput(9, "Reference Images")
4358
+ // Every limit rides in `bounds`; the positional maxDuration / maxShortSide
4359
+ // / maxBytes args predate it and are skipped rather than duplicated.
4360
+ ...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
4361
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
4316
4362
  }
4317
4363
  },
4318
4364
  {
@@ -4335,8 +4381,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4335
4381
  ...params.duration(SEEDANCE_V2_DURATIONS, 5),
4336
4382
  ...params.generateAudio(),
4337
4383
  ...params.returnLastFrame(),
4338
- ...params.videoInput("Source Video"),
4339
- ...params.imageInput(9, "Reference Images")
4384
+ // Every limit rides in `bounds`; the positional maxDuration / maxShortSide
4385
+ // / maxBytes args predate it and are skipped rather than duplicated.
4386
+ ...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
4387
+ ...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
4340
4388
  }
4341
4389
  },
4342
4390
  {
@@ -4358,7 +4406,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4358
4406
  ...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
4359
4407
  ...params.duration(SEEDANCE_V2_DURATIONS, 15),
4360
4408
  ...params.generateAudio(),
4361
- ...params.videoInputs(3, "Source Videos", true)
4409
+ ...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
4362
4410
  }
4363
4411
  },
4364
4412
  {
@@ -4381,7 +4429,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4381
4429
  ...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
4382
4430
  ...params.duration(SEEDANCE_V2_DURATIONS, 15),
4383
4431
  ...params.generateAudio(),
4384
- ...params.videoInputs(3, "Source Videos", true)
4432
+ ...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
4385
4433
  }
4386
4434
  },
4387
4435
  {
@@ -4403,7 +4451,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4403
4451
  ...params.resolution(["480p", "720p"], "720p"),
4404
4452
  ...params.duration(SEEDANCE_V2_DURATIONS, 15),
4405
4453
  ...params.generateAudio(),
4406
- ...params.videoInputs(3, "Source Videos", true)
4454
+ ...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
4407
4455
  }
4408
4456
  },
4409
4457
  {
@@ -4425,7 +4473,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4425
4473
  ...params.resolution(["480p", "720p"], "720p"),
4426
4474
  ...params.duration(SEEDANCE_V2_DURATIONS, 15),
4427
4475
  ...params.generateAudio(),
4428
- ...params.videoInputs(3, "Source Videos", true)
4476
+ ...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
4429
4477
  }
4430
4478
  },
4431
4479
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.6.0",
3
+ "version": "6.7.0",
4
4
  "type": "module",
5
5
  "description": "Type-safe SDK for 100+ AI models — image, video, audio, and text generation with Picsart",
6
6
  "license": "MIT",