@picsart/ai-sdk 6.2.0 → 6.2.2

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/index.d.ts CHANGED
@@ -1509,7 +1509,7 @@ type ModelInputById = {
1509
1509
  duration?: number;
1510
1510
  generateAudio?: boolean;
1511
1511
  returnLastFrame?: boolean;
1512
- outputFormat?: "mp4" | "mov";
1512
+ outputFormat?: "mp4_8bit" | "mp4" | "mov";
1513
1513
  imageUrls?: string[];
1514
1514
  videoUrls?: string[];
1515
1515
  audioUrls?: string[];
@@ -1522,7 +1522,7 @@ type ModelInputById = {
1522
1522
  resolution?: "480p" | "720p" | "1080p";
1523
1523
  generateAudio?: boolean;
1524
1524
  returnLastFrame?: boolean;
1525
- outputFormat?: "mp4" | "mov";
1525
+ outputFormat?: "mp4_8bit" | "mp4" | "mov";
1526
1526
  videoUrl: string;
1527
1527
  imageUrls?: string[];
1528
1528
  };
@@ -1532,7 +1532,7 @@ type ModelInputById = {
1532
1532
  resolution?: "480p" | "720p" | "1080p";
1533
1533
  duration?: number;
1534
1534
  generateAudio?: boolean;
1535
- outputFormat?: "mp4" | "mov";
1535
+ outputFormat?: "mp4_8bit" | "mp4" | "mov";
1536
1536
  videoUrls: [string, ...string[]];
1537
1537
  };
1538
1538
  "seedance-2.5-without-moderation": {
@@ -1542,7 +1542,7 @@ type ModelInputById = {
1542
1542
  duration?: number;
1543
1543
  generateAudio?: boolean;
1544
1544
  returnLastFrame?: boolean;
1545
- outputFormat?: "mp4" | "mov";
1545
+ outputFormat?: "mp4_8bit" | "mp4" | "mov";
1546
1546
  imageUrls?: string[];
1547
1547
  videoUrls?: string[];
1548
1548
  audioUrls?: string[];
@@ -1555,7 +1555,7 @@ type ModelInputById = {
1555
1555
  resolution?: "480p" | "720p" | "1080p";
1556
1556
  generateAudio?: boolean;
1557
1557
  returnLastFrame?: boolean;
1558
- outputFormat?: "mp4" | "mov";
1558
+ outputFormat?: "mp4_8bit" | "mp4" | "mov";
1559
1559
  videoUrl: string;
1560
1560
  imageUrls?: string[];
1561
1561
  };
@@ -1565,7 +1565,7 @@ type ModelInputById = {
1565
1565
  resolution?: "480p" | "720p" | "1080p";
1566
1566
  duration?: number;
1567
1567
  generateAudio?: boolean;
1568
- outputFormat?: "mp4" | "mov";
1568
+ outputFormat?: "mp4_8bit" | "mp4" | "mov";
1569
1569
  videoUrls: [string, ...string[]];
1570
1570
  };
1571
1571
  "seedance-i2v": {
package/index.js CHANGED
@@ -3784,6 +3784,11 @@ var buildSeedance20VideoExtendPayloadFor = (modelAlias) => (ctx) => ({
3784
3784
  resolution: ctx.resolution ?? "720p",
3785
3785
  generate_audio: ctx.generateAudio ?? true
3786
3786
  });
3787
+ var SEEDANCE_25_8BIT_REASON = "8-bit MP4 applies to 1080p only \u2014 480p and 720p are already 8-bit H.264.";
3788
+ var seedance25FormatConstraints = ["480p", "720p"].map((resolution) => ({
3789
+ when: { resolution: { is: resolution } },
3790
+ then: { outputFormat: { allowed: ["mp4", "mov"], reason: SEEDANCE_25_8BIT_REASON } }
3791
+ }));
3787
3792
  var SEEDANCE_25_FRAME_ADAPTIVE_REASON = "First/Last Frame mode requires an adaptive aspect ratio \u2014 the vendor rejects any fixed ratio.";
3788
3793
  var seedance25Constraints = [
3789
3794
  ...seedance20Constraints.slice(1),
@@ -3805,7 +3810,8 @@ var seedance25Constraints = [
3805
3810
  {
3806
3811
  when: { endFrame: { exists: true } },
3807
3812
  then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_FRAME_ADAPTIVE_REASON } }
3808
- }
3813
+ },
3814
+ ...seedance25FormatConstraints
3809
3815
  ];
3810
3816
  var buildSeedance25PayloadFor = (modelAlias) => (ctx) => {
3811
3817
  const refImages = ctx.imageUrls ?? [];
@@ -3877,6 +3883,11 @@ var buildSeedance25VideoExtendPayloadFor = (modelAlias) => (ctx) => ({
3877
3883
  output_format: ctx.outputFormat ?? "mp4"
3878
3884
  });
3879
3885
  var SEEDANCE_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"];
3886
+ var SEEDANCE_25_FORMATS = [
3887
+ { id: "mp4_8bit", label: "MP4" },
3888
+ { id: "mp4", label: "MP4 10Bit" },
3889
+ { id: "mov", label: "MOV" }
3890
+ ];
3880
3891
  var SEEDANCE_V2_DURATIONS = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
3881
3892
  var SEEDANCE_25_DURATION = { min: 4, max: 30 };
3882
3893
  var { MODELS: MODELS12 } = defineModels("seedance", [
@@ -3892,7 +3903,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3892
3903
  mode: "video",
3893
3904
  inputType: "t2v",
3894
3905
  badge: ["new", "premium", "hot"],
3895
- description: "Latest cinematic video with audio, multi-reference input, and mp4/mov output. Up to 30s.",
3906
+ description: "Latest cinematic video with audio, multi-reference input, and mp4/mov/8-bit output. Up to 30s.",
3896
3907
  features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
3897
3908
  paramConfig: {
3898
3909
  ...params.prompt(),
@@ -3901,7 +3912,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3901
3912
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 5),
3902
3913
  ...params.generateAudio(),
3903
3914
  ...params.returnLastFrame(),
3904
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
3915
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3905
3916
  // 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
3906
3917
  ...params.imageInput(30, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
3907
3918
  ...params.videoInputs(10, "Reference Videos", false, {
@@ -3930,7 +3941,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3930
3941
  mode: "video",
3931
3942
  inputType: "t2v",
3932
3943
  badge: ["new", "premium", "hot"],
3933
- description: "Seedance 2.5 with vendor moderation disabled \u2014 cinematic video with audio, multi-reference input, and mp4/mov output. Up to 30s.",
3944
+ description: "Seedance 2.5 with vendor moderation disabled \u2014 cinematic video with audio, multi-reference input, and mp4/mov/8-bit output. Up to 30s.",
3934
3945
  features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
3935
3946
  paramConfig: {
3936
3947
  ...params.prompt(),
@@ -3939,7 +3950,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3939
3950
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 5),
3940
3951
  ...params.generateAudio(),
3941
3952
  ...params.returnLastFrame(),
3942
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
3953
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3943
3954
  // 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
3944
3955
  ...params.imageInput(30, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
3945
3956
  ...params.videoInputs(10, "Reference Videos", false, {
@@ -3959,6 +3970,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3959
3970
  addedAt: "2026-08-06",
3960
3971
  workflow: "seedance",
3961
3972
  buildPayload: buildSeedance25VideoEditPayloadFor("seedance_2_5"),
3973
+ constraints: seedance25FormatConstraints,
3962
3974
  estimatedTime: 60,
3963
3975
  mode: "video",
3964
3976
  inputType: "v2v",
@@ -3973,7 +3985,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3973
3985
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
3974
3986
  ...params.generateAudio(),
3975
3987
  ...params.returnLastFrame(),
3976
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
3988
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3977
3989
  ...params.videoInput("Source Video", "reference", true, void 0, void 0, SEEDANCE_25_MAX_VIDEO_BYTES),
3978
3990
  ...params.imageInput(30, "Reference Images")
3979
3991
  }
@@ -3986,6 +3998,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3986
3998
  release: "preview",
3987
3999
  workflow: "seedance",
3988
4000
  buildPayload: buildSeedance25VideoEditPayloadFor("seedance_2_5_without_moderation"),
4001
+ constraints: seedance25FormatConstraints,
3989
4002
  estimatedTime: 60,
3990
4003
  mode: "video",
3991
4004
  inputType: "v2v",
@@ -4000,7 +4013,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4000
4013
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
4001
4014
  ...params.generateAudio(),
4002
4015
  ...params.returnLastFrame(),
4003
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
4016
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4004
4017
  ...params.videoInput("Source Video", "reference", true, void 0, void 0, SEEDANCE_25_MAX_VIDEO_BYTES),
4005
4018
  ...params.imageInput(30, "Reference Images")
4006
4019
  }
@@ -4012,6 +4025,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4012
4025
  addedAt: "2026-08-06",
4013
4026
  workflow: "seedance",
4014
4027
  buildPayload: buildSeedance25VideoExtendPayloadFor("seedance_2_5"),
4028
+ constraints: seedance25FormatConstraints,
4015
4029
  estimatedTime: 200,
4016
4030
  mode: "video",
4017
4031
  inputType: "v2v",
@@ -4026,7 +4040,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4026
4040
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
4027
4041
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 15),
4028
4042
  ...params.generateAudio(),
4029
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
4043
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4030
4044
  ...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
4031
4045
  }
4032
4046
  },
@@ -4038,6 +4052,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4038
4052
  release: "preview",
4039
4053
  workflow: "seedance",
4040
4054
  buildPayload: buildSeedance25VideoExtendPayloadFor("seedance_2_5_without_moderation"),
4055
+ constraints: seedance25FormatConstraints,
4041
4056
  estimatedTime: 200,
4042
4057
  mode: "video",
4043
4058
  inputType: "v2v",
@@ -4052,7 +4067,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4052
4067
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
4053
4068
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 15),
4054
4069
  ...params.generateAudio(),
4055
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
4070
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4056
4071
  ...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
4057
4072
  }
4058
4073
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
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",