@picsart/ai-sdk 6.50.0 → 6.50.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.
Files changed (2) hide show
  1. package/index.js +17 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3813,6 +3813,9 @@ var buildWan27VideoEditPayload = (ctx) => {
3813
3813
  };
3814
3814
  var WAN27_AR = ["16:9", "9:16", "1:1", "4:3", "3:4"];
3815
3815
  var WAN27_RES = ["720P", "1080P"];
3816
+ var WAN_V3_IMAGE_BOUNDS = { minSidePixels: 240, maxBytes: 20 * 1024 * 1024 };
3817
+ var WAN_V3_VIDEO_BOUNDS = { minDurationSec: 1, maxDurationSec: 15, maxBytes: 100 * 1024 * 1024 };
3818
+ var WAN_V3_AUDIO_BOUNDS = { maxDurationSec: 15, maxBytes: 15 * 1024 * 1024 };
3816
3819
  var WAN_V3_FRAME_REF_REASON = "Start/End frames cannot be combined with reference images, videos, or audios";
3817
3820
  var wanV3Constraints = [
3818
3821
  // any reference input active → disable frame slots
@@ -3850,6 +3853,15 @@ var wanV3Constraints = [
3850
3853
  audioUrls: { exists: false }
3851
3854
  }, then: {
3852
3855
  prompt: { required: true, reason: "Add a prompt or at least one frame or reference." }
3856
+ } },
3857
+ // Vendor: input video duration + output duration must stay within 30 s.
3858
+ // Reference videos are capped at 15 s in total, so only the 30 s option can break it.
3859
+ { when: { videoUrls: { exists: true } }, then: {
3860
+ duration: { allowed: [-1, 5, 10, 15], reason: "With a reference video, the output can be at most 15 s." }
3861
+ } },
3862
+ // Vendor: last_frame must be accompanied by first_frame.
3863
+ { when: { startFrame: { exists: false } }, then: {
3864
+ endFrame: { disabled: true, reason: "End frame requires a start frame." }
3853
3865
  } }
3854
3866
  ];
3855
3867
  var wanV3Features = [feat("Image Input", "input"), feat("Video Input", "input"), feat("Audio", "audio"), feat("Start/End Frame", "frame"), feat("1080P", "resolution"), feat("Adaptive Ratio", "resolution")];
@@ -3870,11 +3882,11 @@ var wanV3ParamConfig = {
3870
3882
  // Vendor default is 'adaptive' (model chooses from intent and input media).
3871
3883
  ...params.aspectRatio(["16:9", "9:16", "1:1", "4:3", "3:4", "adaptive"], "adaptive"),
3872
3884
  ...params.generateAudio(true),
3873
- ...params.startFrame(),
3874
- ...params.endFrame(),
3875
- ...params.imageInput(10, "Reference Images"),
3876
- ...params.videoInputs(5, "Reference Videos", false),
3877
- ...params.audioInputs(5, "Reference Audios"),
3885
+ ...params.startFrame("Start Frame", false, WAN_V3_IMAGE_BOUNDS),
3886
+ ...params.endFrame("End Frame", WAN_V3_IMAGE_BOUNDS),
3887
+ ...params.imageInput(10, "Reference Images", false, "reference", WAN_V3_IMAGE_BOUNDS),
3888
+ ...params.videoInputs(5, "Reference Videos", false, WAN_V3_VIDEO_BOUNDS),
3889
+ ...params.audioInputs(5, "Reference Audios", false, WAN_V3_AUDIO_BOUNDS),
3878
3890
  ...p.boolean("enableThinking", false, "Deep Thinking"),
3879
3891
  ...p.boolean("watermark", false, "Watermark"),
3880
3892
  // No default: a materialized seed would pin every generation to one value.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.50.0",
3
+ "version": "6.50.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",