@picsart/ai-sdk 6.2.0 → 6.2.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/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" | "mov" | "mp4_8bit";
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" | "mov" | "mp4_8bit";
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" | "mov" | "mp4_8bit";
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" | "mov" | "mp4_8bit";
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" | "mov" | "mp4_8bit";
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" | "mov" | "mp4_8bit";
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,7 @@ 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 = ["mp4", "mov", { id: "mp4_8bit", label: "MP4 8-bit" }];
3880
3887
  var SEEDANCE_V2_DURATIONS = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
3881
3888
  var SEEDANCE_25_DURATION = { min: 4, max: 30 };
3882
3889
  var { MODELS: MODELS12 } = defineModels("seedance", [
@@ -3892,7 +3899,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3892
3899
  mode: "video",
3893
3900
  inputType: "t2v",
3894
3901
  badge: ["new", "premium", "hot"],
3895
- description: "Latest cinematic video with audio, multi-reference input, and mp4/mov output. Up to 30s.",
3902
+ description: "Latest cinematic video with audio, multi-reference input, and mp4/mov/8-bit output. Up to 30s.",
3896
3903
  features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
3897
3904
  paramConfig: {
3898
3905
  ...params.prompt(),
@@ -3901,7 +3908,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3901
3908
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 5),
3902
3909
  ...params.generateAudio(),
3903
3910
  ...params.returnLastFrame(),
3904
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
3911
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3905
3912
  // 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
3906
3913
  ...params.imageInput(30, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
3907
3914
  ...params.videoInputs(10, "Reference Videos", false, {
@@ -3930,7 +3937,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3930
3937
  mode: "video",
3931
3938
  inputType: "t2v",
3932
3939
  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.",
3940
+ 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
3941
  features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
3935
3942
  paramConfig: {
3936
3943
  ...params.prompt(),
@@ -3939,7 +3946,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3939
3946
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 5),
3940
3947
  ...params.generateAudio(),
3941
3948
  ...params.returnLastFrame(),
3942
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
3949
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3943
3950
  // 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
3944
3951
  ...params.imageInput(30, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
3945
3952
  ...params.videoInputs(10, "Reference Videos", false, {
@@ -3959,6 +3966,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3959
3966
  addedAt: "2026-08-06",
3960
3967
  workflow: "seedance",
3961
3968
  buildPayload: buildSeedance25VideoEditPayloadFor("seedance_2_5"),
3969
+ constraints: seedance25FormatConstraints,
3962
3970
  estimatedTime: 60,
3963
3971
  mode: "video",
3964
3972
  inputType: "v2v",
@@ -3973,7 +3981,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3973
3981
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
3974
3982
  ...params.generateAudio(),
3975
3983
  ...params.returnLastFrame(),
3976
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
3984
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
3977
3985
  ...params.videoInput("Source Video", "reference", true, void 0, void 0, SEEDANCE_25_MAX_VIDEO_BYTES),
3978
3986
  ...params.imageInput(30, "Reference Images")
3979
3987
  }
@@ -3986,6 +3994,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
3986
3994
  release: "preview",
3987
3995
  workflow: "seedance",
3988
3996
  buildPayload: buildSeedance25VideoEditPayloadFor("seedance_2_5_without_moderation"),
3997
+ constraints: seedance25FormatConstraints,
3989
3998
  estimatedTime: 60,
3990
3999
  mode: "video",
3991
4000
  inputType: "v2v",
@@ -4000,7 +4009,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4000
4009
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
4001
4010
  ...params.generateAudio(),
4002
4011
  ...params.returnLastFrame(),
4003
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
4012
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4004
4013
  ...params.videoInput("Source Video", "reference", true, void 0, void 0, SEEDANCE_25_MAX_VIDEO_BYTES),
4005
4014
  ...params.imageInput(30, "Reference Images")
4006
4015
  }
@@ -4012,6 +4021,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4012
4021
  addedAt: "2026-08-06",
4013
4022
  workflow: "seedance",
4014
4023
  buildPayload: buildSeedance25VideoExtendPayloadFor("seedance_2_5"),
4024
+ constraints: seedance25FormatConstraints,
4015
4025
  estimatedTime: 200,
4016
4026
  mode: "video",
4017
4027
  inputType: "v2v",
@@ -4026,7 +4036,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4026
4036
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
4027
4037
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 15),
4028
4038
  ...params.generateAudio(),
4029
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
4039
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4030
4040
  ...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
4031
4041
  }
4032
4042
  },
@@ -4038,6 +4048,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4038
4048
  release: "preview",
4039
4049
  workflow: "seedance",
4040
4050
  buildPayload: buildSeedance25VideoExtendPayloadFor("seedance_2_5_without_moderation"),
4051
+ constraints: seedance25FormatConstraints,
4041
4052
  estimatedTime: 200,
4042
4053
  mode: "video",
4043
4054
  inputType: "v2v",
@@ -4052,7 +4063,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4052
4063
  ...params.resolution(["480p", "720p", "1080p"], "1080p"),
4053
4064
  ...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 15),
4054
4065
  ...params.generateAudio(),
4055
- ...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
4066
+ ...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
4056
4067
  ...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
4057
4068
  }
4058
4069
  },
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.1",
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",