@picsart/ai-sdk 6.48.0 → 6.48.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.js +28 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1270,7 +1270,7 @@ var params = {
|
|
|
1270
1270
|
...bounds
|
|
1271
1271
|
}),
|
|
1272
1272
|
/** Single driving / sync-audio slot. Writes to `audioUrl`. */
|
|
1273
|
-
audioInput: (label = "Audio Track", required = false, category = "asset") => p.file("audioUrl", "audio", { label, required, category }),
|
|
1273
|
+
audioInput: (label = "Audio Track", required = false, category = "asset", bounds) => p.file("audioUrl", "audio", { label, required, category, ...bounds }),
|
|
1274
1274
|
/** Array of reference videos (writes to `videoUrls`). `bounds` is checked per
|
|
1275
1275
|
* clip. The backend also caps the COMBINED length of the array per model,
|
|
1276
1276
|
* which no descriptor field expresses yet; declaring the per-clip bounds
|
|
@@ -1445,6 +1445,27 @@ var V4_DURATION = { min: 3, max: 30 };
|
|
|
1445
1445
|
var V4_PROMPT_MAX = 26e3;
|
|
1446
1446
|
var V4_MAX_MIDDLE_FRAMES = 8;
|
|
1447
1447
|
var KLING_IMAGE_AR = ["16:9", "9:16", "1:1", "21:9", "4:3", "3:2", "2:3", "3:4"];
|
|
1448
|
+
var KLING_V3_OMNI_REFERENCE_VIDEO_BOUNDS = {
|
|
1449
|
+
minDurationSec: 3,
|
|
1450
|
+
maxDurationSec: 15.5,
|
|
1451
|
+
minSidePixels: 700,
|
|
1452
|
+
maxSidePixels: 4553
|
|
1453
|
+
};
|
|
1454
|
+
var KLING_MOTION_IMAGE_BOUNDS = {
|
|
1455
|
+
minSidePixels: 300,
|
|
1456
|
+
maxSidePixels: 65536,
|
|
1457
|
+
minAspectRatio: 1 / 2.5,
|
|
1458
|
+
maxAspectRatio: 2.5,
|
|
1459
|
+
maxBytes: 10 * 1024 * 1024
|
|
1460
|
+
};
|
|
1461
|
+
var KLING_MOTION_VIDEO_BOUNDS = {
|
|
1462
|
+
minDurationSec: 3,
|
|
1463
|
+
maxDurationSec: 30,
|
|
1464
|
+
minSidePixels: 340,
|
|
1465
|
+
maxSidePixels: 3850,
|
|
1466
|
+
maxBytes: 100 * 1024 * 1024
|
|
1467
|
+
};
|
|
1468
|
+
var KLING_AVATAR_AUDIO_BOUNDS = { maxDurationSec: 300 };
|
|
1448
1469
|
var klingV3ProVideoBase = {
|
|
1449
1470
|
workflow: "kling-text-to-video",
|
|
1450
1471
|
editWorkflow: "kling-image-to-video",
|
|
@@ -1620,7 +1641,7 @@ var { MODELS } = defineModels("kling", [
|
|
|
1620
1641
|
// Vendor cap: reference images + frames + multi-image elements ≤ 7
|
|
1621
1642
|
// (4 when a reference video is supplied).
|
|
1622
1643
|
...params.imageInput(7, "Reference Images"),
|
|
1623
|
-
...params.videoInput("Reference Video", "reference", false),
|
|
1644
|
+
...params.videoInput("Reference Video", "reference", false, void 0, void 0, void 0, KLING_V3_OMNI_REFERENCE_VIDEO_BOUNDS),
|
|
1624
1645
|
...klingOmniReferType,
|
|
1625
1646
|
...klingKeepOriginalSound,
|
|
1626
1647
|
...klingOmniAdvancedParams
|
|
@@ -1717,8 +1738,8 @@ var { MODELS } = defineModels("kling", [
|
|
|
1717
1738
|
...params.renderingSpeed([{ id: "std", label: "Standard" }, { id: "pro", label: "Pro" }], "std"),
|
|
1718
1739
|
...klingCharacterOrientation,
|
|
1719
1740
|
...klingKeepOriginalSound,
|
|
1720
|
-
...params.imageInput(1, "Person Photo (upper body)", true),
|
|
1721
|
-
...params.videoInput("Motion Reference Video")
|
|
1741
|
+
...params.imageInput(1, "Person Photo (upper body)", true, "reference", KLING_MOTION_IMAGE_BOUNDS),
|
|
1742
|
+
...params.videoInput("Motion Reference Video", "reference", true, void 0, void 0, void 0, KLING_MOTION_VIDEO_BOUNDS)
|
|
1722
1743
|
}
|
|
1723
1744
|
},
|
|
1724
1745
|
{
|
|
@@ -1737,8 +1758,8 @@ var { MODELS } = defineModels("kling", [
|
|
|
1737
1758
|
...params.renderingSpeed([{ id: "std", label: "Standard" }, { id: "pro", label: "Pro" }], "std"),
|
|
1738
1759
|
...klingCharacterOrientation,
|
|
1739
1760
|
...klingKeepOriginalSound,
|
|
1740
|
-
...params.imageInput(1, "Person Photo (upper body)", true),
|
|
1741
|
-
...params.videoInput("Motion Reference Video")
|
|
1761
|
+
...params.imageInput(1, "Person Photo (upper body)", true, "reference", KLING_MOTION_IMAGE_BOUNDS),
|
|
1762
|
+
...params.videoInput("Motion Reference Video", "reference", true, void 0, void 0, void 0, KLING_MOTION_VIDEO_BOUNDS)
|
|
1742
1763
|
}
|
|
1743
1764
|
},
|
|
1744
1765
|
// ── Video: Avatar ─────────────────────────────────────────────────
|
|
@@ -1760,7 +1781,7 @@ var { MODELS } = defineModels("kling", [
|
|
|
1760
1781
|
// audio file required; audio_id stays an additive alternative for raw
|
|
1761
1782
|
// API callers. The builder never emits both keys (file wins) and the
|
|
1762
1783
|
// worker enforces the XOR for un-typed callers.
|
|
1763
|
-
...params.audioInput("Speech Audio", true),
|
|
1784
|
+
...params.audioInput("Speech Audio", true, "asset", KLING_AVATAR_AUDIO_BOUNDS),
|
|
1764
1785
|
audioId: {
|
|
1765
1786
|
label: "TTS Audio ID",
|
|
1766
1787
|
descriptor: { kind: "text", placeholder: "audio_id from Kling TTS API" }
|