@picsart/ai-sdk 6.16.0 → 6.17.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 +39 -18
- package/index.js +231 -22
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -725,6 +725,25 @@ type ModelInputById = {
|
|
|
725
725
|
negativePrompt?: string;
|
|
726
726
|
cfgScale?: number;
|
|
727
727
|
};
|
|
728
|
+
"ideogram-4-5": {
|
|
729
|
+
prompt: string;
|
|
730
|
+
imageUrls?: string[];
|
|
731
|
+
mask?: string;
|
|
732
|
+
size?: "auto" | "source" | "2048x2048" | "1440x2880" | "2880x1440" | "1664x2496" | "2496x1664" | "1792x2240" | "2240x1792" | "1440x2560" | "2560x1440" | "1600x2560" | "2560x1600" | "1728x2304" | "2304x1728" | "1296x3168" | "3168x1296" | "1152x2944" | "2944x1152" | "1248x3328" | "3328x1248" | "1280x3072" | "3072x1280" | "1024x3072" | "3072x1024" | "1024x1024" | "896x1120" | "1120x896" | "864x1152" | "1152x864" | "832x1248" | "1248x832" | "800x1280" | "1280x800" | "720x1280" | "1280x720" | "720x1440" | "1440x720" | "512x1536" | "1536x512";
|
|
733
|
+
magicPrompt?: "auto" | "on" | "off";
|
|
734
|
+
quality?: "low" | "medium" | "high";
|
|
735
|
+
count?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
736
|
+
seed?: number;
|
|
737
|
+
};
|
|
738
|
+
"ideogram-4-5-precise-edit": {
|
|
739
|
+
prompt: string;
|
|
740
|
+
startFrame: string;
|
|
741
|
+
mask?: string;
|
|
742
|
+
imageUrls?: string[];
|
|
743
|
+
quality?: "low" | "medium" | "high" | "very_high";
|
|
744
|
+
count?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
745
|
+
seed?: number;
|
|
746
|
+
};
|
|
728
747
|
"ideogram-character": {
|
|
729
748
|
prompt: string;
|
|
730
749
|
resolution?: "1024x1024" | "1344x768" | "768x1344" | "1152x864" | "864x1152" | "832x1248" | "1280x800";
|
|
@@ -1565,7 +1584,7 @@ type ModelInputById = {
|
|
|
1565
1584
|
prompt: string;
|
|
1566
1585
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1567
1586
|
resolution?: "480p" | "720p";
|
|
1568
|
-
duration?: 4 | 5 | 8 | 10 | 12;
|
|
1587
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
1569
1588
|
generateAudio?: boolean;
|
|
1570
1589
|
startFrame?: string;
|
|
1571
1590
|
endFrame?: string;
|
|
@@ -1574,7 +1593,7 @@ type ModelInputById = {
|
|
|
1574
1593
|
prompt: string;
|
|
1575
1594
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1576
1595
|
resolution?: "480p" | "720p" | "1080p" | "4k";
|
|
1577
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1596
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1578
1597
|
generateAudio?: boolean;
|
|
1579
1598
|
returnLastFrame?: boolean;
|
|
1580
1599
|
imageUrls?: string[];
|
|
@@ -1587,7 +1606,7 @@ type ModelInputById = {
|
|
|
1587
1606
|
prompt: string;
|
|
1588
1607
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1589
1608
|
resolution?: "480p" | "720p";
|
|
1590
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1609
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1591
1610
|
generateAudio?: boolean;
|
|
1592
1611
|
returnLastFrame?: boolean;
|
|
1593
1612
|
imageUrls?: string[];
|
|
@@ -1600,7 +1619,7 @@ type ModelInputById = {
|
|
|
1600
1619
|
prompt: string;
|
|
1601
1620
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1602
1621
|
resolution?: "480p" | "720p";
|
|
1603
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1622
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1604
1623
|
generateAudio?: boolean;
|
|
1605
1624
|
returnLastFrame?: boolean;
|
|
1606
1625
|
videoUrl: string;
|
|
@@ -1610,7 +1629,7 @@ type ModelInputById = {
|
|
|
1610
1629
|
prompt: string;
|
|
1611
1630
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1612
1631
|
resolution?: "480p" | "720p";
|
|
1613
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1632
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1614
1633
|
generateAudio?: boolean;
|
|
1615
1634
|
videoUrls: [string, ...string[]];
|
|
1616
1635
|
};
|
|
@@ -1618,7 +1637,7 @@ type ModelInputById = {
|
|
|
1618
1637
|
prompt: string;
|
|
1619
1638
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1620
1639
|
resolution?: "480p" | "720p";
|
|
1621
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1640
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1622
1641
|
generateAudio?: boolean;
|
|
1623
1642
|
returnLastFrame?: boolean;
|
|
1624
1643
|
imageUrls?: string[];
|
|
@@ -1631,7 +1650,7 @@ type ModelInputById = {
|
|
|
1631
1650
|
prompt: string;
|
|
1632
1651
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1633
1652
|
resolution?: "480p" | "720p";
|
|
1634
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1653
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1635
1654
|
generateAudio?: boolean;
|
|
1636
1655
|
returnLastFrame?: boolean;
|
|
1637
1656
|
videoUrl: string;
|
|
@@ -1641,7 +1660,7 @@ type ModelInputById = {
|
|
|
1641
1660
|
prompt: string;
|
|
1642
1661
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1643
1662
|
resolution?: "480p" | "720p";
|
|
1644
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1663
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1645
1664
|
generateAudio?: boolean;
|
|
1646
1665
|
videoUrls: [string, ...string[]];
|
|
1647
1666
|
};
|
|
@@ -1649,7 +1668,7 @@ type ModelInputById = {
|
|
|
1649
1668
|
prompt: string;
|
|
1650
1669
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1651
1670
|
resolution?: "480p" | "720p" | "1080p" | "4k";
|
|
1652
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1671
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1653
1672
|
generateAudio?: boolean;
|
|
1654
1673
|
returnLastFrame?: boolean;
|
|
1655
1674
|
videoUrl: string;
|
|
@@ -1659,7 +1678,7 @@ type ModelInputById = {
|
|
|
1659
1678
|
prompt: string;
|
|
1660
1679
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1661
1680
|
resolution?: "480p" | "720p" | "1080p" | "4k";
|
|
1662
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1681
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1663
1682
|
generateAudio?: boolean;
|
|
1664
1683
|
videoUrls: [string, ...string[]];
|
|
1665
1684
|
};
|
|
@@ -1667,7 +1686,7 @@ type ModelInputById = {
|
|
|
1667
1686
|
prompt: string;
|
|
1668
1687
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1669
1688
|
resolution?: "480p" | "720p" | "1080p" | "4k";
|
|
1670
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1689
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1671
1690
|
generateAudio?: boolean;
|
|
1672
1691
|
returnLastFrame?: boolean;
|
|
1673
1692
|
imageUrls?: string[];
|
|
@@ -1680,7 +1699,7 @@ type ModelInputById = {
|
|
|
1680
1699
|
prompt: string;
|
|
1681
1700
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1682
1701
|
resolution?: "480p" | "720p" | "1080p" | "4k";
|
|
1683
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1702
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1684
1703
|
generateAudio?: boolean;
|
|
1685
1704
|
returnLastFrame?: boolean;
|
|
1686
1705
|
videoUrl: string;
|
|
@@ -1690,7 +1709,7 @@ type ModelInputById = {
|
|
|
1690
1709
|
prompt: string;
|
|
1691
1710
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1692
1711
|
resolution?: "480p" | "720p" | "1080p" | "4k";
|
|
1693
|
-
duration?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1712
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
1694
1713
|
generateAudio?: boolean;
|
|
1695
1714
|
videoUrls: [string, ...string[]];
|
|
1696
1715
|
};
|
|
@@ -1698,7 +1717,7 @@ type ModelInputById = {
|
|
|
1698
1717
|
prompt?: string;
|
|
1699
1718
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1700
1719
|
resolution?: "480p" | "720p" | "1080p";
|
|
1701
|
-
duration?:
|
|
1720
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30;
|
|
1702
1721
|
generateAudio?: boolean;
|
|
1703
1722
|
returnLastFrame?: boolean;
|
|
1704
1723
|
outputFormat?: "mp4" | "mov";
|
|
@@ -1731,7 +1750,7 @@ type ModelInputById = {
|
|
|
1731
1750
|
prompt: string;
|
|
1732
1751
|
aspectRatio?: "adaptive";
|
|
1733
1752
|
resolution?: "480p" | "720p" | "1080p";
|
|
1734
|
-
duration?:
|
|
1753
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30;
|
|
1735
1754
|
generateAudio?: boolean;
|
|
1736
1755
|
outputFormat?: "mp4" | "mov";
|
|
1737
1756
|
colorDepth?: "10bit" | "8bit";
|
|
@@ -1742,7 +1761,7 @@ type ModelInputById = {
|
|
|
1742
1761
|
prompt?: string;
|
|
1743
1762
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1744
1763
|
resolution?: "480p" | "720p" | "1080p";
|
|
1745
|
-
duration?:
|
|
1764
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30;
|
|
1746
1765
|
generateAudio?: boolean;
|
|
1747
1766
|
returnLastFrame?: boolean;
|
|
1748
1767
|
outputFormat?: "mp4" | "mov";
|
|
@@ -1775,7 +1794,7 @@ type ModelInputById = {
|
|
|
1775
1794
|
prompt: string;
|
|
1776
1795
|
aspectRatio?: "adaptive";
|
|
1777
1796
|
resolution?: "480p" | "720p" | "1080p";
|
|
1778
|
-
duration?:
|
|
1797
|
+
duration?: -1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30;
|
|
1779
1798
|
generateAudio?: boolean;
|
|
1780
1799
|
outputFormat?: "mp4" | "mov";
|
|
1781
1800
|
colorDepth?: "10bit" | "8bit";
|
|
@@ -1786,7 +1805,7 @@ type ModelInputById = {
|
|
|
1786
1805
|
prompt: string;
|
|
1787
1806
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1788
1807
|
resolution?: "480p" | "720p" | "1080p";
|
|
1789
|
-
duration?: 5 | 10;
|
|
1808
|
+
duration?: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
1790
1809
|
startFrame: string;
|
|
1791
1810
|
};
|
|
1792
1811
|
"seedream-4.0": {
|
|
@@ -3285,6 +3304,8 @@ declare const Models: {
|
|
|
3285
3304
|
readonly HeygenTalkingPhoto: "heygen-talking-photo";
|
|
3286
3305
|
readonly HeygenVideoAvatar: "heygen-video-avatar";
|
|
3287
3306
|
readonly HunyuanV3: "hunyuan-v3";
|
|
3307
|
+
readonly Ideogram45: "ideogram-4-5";
|
|
3308
|
+
readonly Ideogram45PreciseEdit: "ideogram-4-5-precise-edit";
|
|
3288
3309
|
readonly IdeogramCharacter: "ideogram-character";
|
|
3289
3310
|
readonly IdeogramPImage: "ideogram-p-image";
|
|
3290
3311
|
readonly IdeogramV3: "ideogram-v3";
|
package/index.js
CHANGED
|
@@ -736,14 +736,19 @@ var p = {
|
|
|
736
736
|
}
|
|
737
737
|
};
|
|
738
738
|
},
|
|
739
|
+
/** Options are bare seconds (`[5, 10]`) or `{ id, label }` pairs when a value
|
|
740
|
+
* needs a friendly label — e.g. `{ id: -1, label: 'Auto' }`. */
|
|
739
741
|
duration(opts, def) {
|
|
742
|
+
const normalized = opts.map(
|
|
743
|
+
(opt) => typeof opt === "object" ? opt : { id: opt }
|
|
744
|
+
);
|
|
740
745
|
return {
|
|
741
746
|
duration: {
|
|
742
747
|
descriptor: {
|
|
743
748
|
kind: "enum",
|
|
744
749
|
valueType: "number",
|
|
745
|
-
options:
|
|
746
|
-
default: def ??
|
|
750
|
+
options: normalized,
|
|
751
|
+
default: def ?? normalized[0].id
|
|
747
752
|
}
|
|
748
753
|
}
|
|
749
754
|
};
|
|
@@ -4517,8 +4522,14 @@ var buildSeedance25VideoExtendPayloadFor = (modelAlias) => withSeedance25DraftMo
|
|
|
4517
4522
|
var SEEDANCE_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"];
|
|
4518
4523
|
var SEEDANCE_25_FORMATS = ["mp4", "mov"];
|
|
4519
4524
|
var SEEDANCE_25_COLOR_DEPTHS = ["10bit", "8bit"];
|
|
4520
|
-
var
|
|
4521
|
-
|
|
4525
|
+
var seedanceDurations = (min, max, withAuto = true) => [
|
|
4526
|
+
...withAuto ? [{ id: -1, label: "Auto" }] : [],
|
|
4527
|
+
...Array.from({ length: max - min + 1 }, (_, i) => min + i)
|
|
4528
|
+
];
|
|
4529
|
+
var SEEDANCE_25_DURATIONS = seedanceDurations(4, 30);
|
|
4530
|
+
var SEEDANCE_20_DURATIONS = seedanceDurations(4, 15);
|
|
4531
|
+
var SEEDANCE_15_DURATIONS = seedanceDurations(4, 12);
|
|
4532
|
+
var SEEDANCE_10_DURATIONS = seedanceDurations(2, 12, false);
|
|
4522
4533
|
var seedance25DraftParam = p.boolean("draft", false, "Draft");
|
|
4523
4534
|
var seedance25DraftTaskParam = {
|
|
4524
4535
|
draftTask: {
|
|
@@ -4555,7 +4566,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4555
4566
|
...params.prompt({ required: false }),
|
|
4556
4567
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4557
4568
|
...params.resolution(["480p", "720p", "1080p"], "1080p"),
|
|
4558
|
-
...params.
|
|
4569
|
+
...params.duration(SEEDANCE_25_DURATIONS, 5),
|
|
4559
4570
|
...params.generateAudio(),
|
|
4560
4571
|
...params.returnLastFrame(),
|
|
4561
4572
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
@@ -4594,7 +4605,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4594
4605
|
...params.prompt({ required: false }),
|
|
4595
4606
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4596
4607
|
...params.resolution(["480p", "720p", "1080p"], "1080p"),
|
|
4597
|
-
...params.
|
|
4608
|
+
...params.duration(SEEDANCE_25_DURATIONS, 5),
|
|
4598
4609
|
...params.generateAudio(),
|
|
4599
4610
|
...params.returnLastFrame(),
|
|
4600
4611
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
@@ -4692,7 +4703,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4692
4703
|
// duration stays user-selectable.
|
|
4693
4704
|
...params.aspectRatio(["adaptive"]),
|
|
4694
4705
|
...params.resolution(["480p", "720p", "1080p"], "1080p"),
|
|
4695
|
-
...params.
|
|
4706
|
+
...params.duration(SEEDANCE_25_DURATIONS, 15),
|
|
4696
4707
|
...params.generateAudio(),
|
|
4697
4708
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
4698
4709
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
@@ -4721,7 +4732,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4721
4732
|
// duration stays user-selectable.
|
|
4722
4733
|
...params.aspectRatio(["adaptive"]),
|
|
4723
4734
|
...params.resolution(["480p", "720p", "1080p"], "1080p"),
|
|
4724
|
-
...params.
|
|
4735
|
+
...params.duration(SEEDANCE_25_DURATIONS, 15),
|
|
4725
4736
|
...params.generateAudio(),
|
|
4726
4737
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
4727
4738
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
@@ -4747,7 +4758,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4747
4758
|
...params.prompt(),
|
|
4748
4759
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4749
4760
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
4750
|
-
...params.duration(
|
|
4761
|
+
...params.duration(SEEDANCE_20_DURATIONS, 10),
|
|
4751
4762
|
...params.generateAudio(),
|
|
4752
4763
|
...params.returnLastFrame(),
|
|
4753
4764
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
@@ -4781,7 +4792,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4781
4792
|
...params.prompt(),
|
|
4782
4793
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4783
4794
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
4784
|
-
...params.duration(
|
|
4795
|
+
...params.duration(SEEDANCE_20_DURATIONS, 10),
|
|
4785
4796
|
...params.generateAudio(),
|
|
4786
4797
|
...params.returnLastFrame(),
|
|
4787
4798
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
@@ -4811,7 +4822,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4811
4822
|
...params.prompt(),
|
|
4812
4823
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4813
4824
|
...params.resolution(["480p", "720p"], "720p"),
|
|
4814
|
-
...params.duration(
|
|
4825
|
+
...params.duration(SEEDANCE_20_DURATIONS, 10),
|
|
4815
4826
|
...params.generateAudio(),
|
|
4816
4827
|
...params.returnLastFrame(),
|
|
4817
4828
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
@@ -4841,7 +4852,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4841
4852
|
...params.prompt(),
|
|
4842
4853
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4843
4854
|
...params.resolution(["480p", "720p"], "720p"),
|
|
4844
|
-
...params.duration(
|
|
4855
|
+
...params.duration(SEEDANCE_20_DURATIONS, 10),
|
|
4845
4856
|
...params.generateAudio(),
|
|
4846
4857
|
...params.returnLastFrame(),
|
|
4847
4858
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
@@ -4870,7 +4881,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4870
4881
|
...params.prompt(),
|
|
4871
4882
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4872
4883
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
4873
|
-
...params.duration(
|
|
4884
|
+
...params.duration(SEEDANCE_20_DURATIONS, 5),
|
|
4874
4885
|
...params.generateAudio(),
|
|
4875
4886
|
...params.returnLastFrame(),
|
|
4876
4887
|
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
@@ -4897,7 +4908,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4897
4908
|
...params.prompt(),
|
|
4898
4909
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4899
4910
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
4900
|
-
...params.duration(
|
|
4911
|
+
...params.duration(SEEDANCE_20_DURATIONS, 5),
|
|
4901
4912
|
...params.generateAudio(),
|
|
4902
4913
|
...params.returnLastFrame(),
|
|
4903
4914
|
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
@@ -4923,7 +4934,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4923
4934
|
...params.prompt(),
|
|
4924
4935
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4925
4936
|
...params.resolution(["480p", "720p"], "720p"),
|
|
4926
|
-
...params.duration(
|
|
4937
|
+
...params.duration(SEEDANCE_20_DURATIONS, 5),
|
|
4927
4938
|
...params.generateAudio(),
|
|
4928
4939
|
...params.returnLastFrame(),
|
|
4929
4940
|
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
@@ -4949,7 +4960,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4949
4960
|
...params.prompt(),
|
|
4950
4961
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4951
4962
|
...params.resolution(["480p", "720p"], "720p"),
|
|
4952
|
-
...params.duration(
|
|
4963
|
+
...params.duration(SEEDANCE_20_DURATIONS, 5),
|
|
4953
4964
|
...params.generateAudio(),
|
|
4954
4965
|
...params.returnLastFrame(),
|
|
4955
4966
|
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
@@ -4975,7 +4986,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4975
4986
|
...params.prompt(),
|
|
4976
4987
|
...params.aspectRatio(SEEDANCE_AR),
|
|
4977
4988
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
4978
|
-
...params.duration(
|
|
4989
|
+
...params.duration(SEEDANCE_20_DURATIONS, 15),
|
|
4979
4990
|
...params.generateAudio(),
|
|
4980
4991
|
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
4981
4992
|
}
|
|
@@ -4998,7 +5009,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4998
5009
|
...params.prompt(),
|
|
4999
5010
|
...params.aspectRatio(SEEDANCE_AR),
|
|
5000
5011
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
5001
|
-
...params.duration(
|
|
5012
|
+
...params.duration(SEEDANCE_20_DURATIONS, 15),
|
|
5002
5013
|
...params.generateAudio(),
|
|
5003
5014
|
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
5004
5015
|
}
|
|
@@ -5020,7 +5031,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
5020
5031
|
...params.prompt(),
|
|
5021
5032
|
...params.aspectRatio(SEEDANCE_AR),
|
|
5022
5033
|
...params.resolution(["480p", "720p"], "720p"),
|
|
5023
|
-
...params.duration(
|
|
5034
|
+
...params.duration(SEEDANCE_20_DURATIONS, 15),
|
|
5024
5035
|
...params.generateAudio(),
|
|
5025
5036
|
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
5026
5037
|
}
|
|
@@ -5042,7 +5053,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
5042
5053
|
...params.prompt(),
|
|
5043
5054
|
...params.aspectRatio(SEEDANCE_AR),
|
|
5044
5055
|
...params.resolution(["480p", "720p"], "720p"),
|
|
5045
|
-
...params.duration(
|
|
5056
|
+
...params.duration(SEEDANCE_20_DURATIONS, 15),
|
|
5046
5057
|
...params.generateAudio(),
|
|
5047
5058
|
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
5048
5059
|
}
|
|
@@ -5065,7 +5076,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
5065
5076
|
...params.prompt(),
|
|
5066
5077
|
...params.aspectRatio(SEEDANCE_AR),
|
|
5067
5078
|
...params.resolution(["480p", "720p"], "720p"),
|
|
5068
|
-
...params.duration(
|
|
5079
|
+
...params.duration(SEEDANCE_15_DURATIONS, 5),
|
|
5069
5080
|
...params.generateAudio(false),
|
|
5070
5081
|
...params.startFrame(),
|
|
5071
5082
|
...params.endFrame()
|
|
@@ -5089,7 +5100,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
5089
5100
|
...params.prompt(),
|
|
5090
5101
|
...params.aspectRatio(SEEDANCE_AR),
|
|
5091
5102
|
...params.resolution(["480p", "720p", "1080p"], "720p"),
|
|
5092
|
-
...params.duration(
|
|
5103
|
+
...params.duration(SEEDANCE_10_DURATIONS, 5),
|
|
5093
5104
|
...params.startFrame("First Frame", true)
|
|
5094
5105
|
}
|
|
5095
5106
|
}
|
|
@@ -7802,7 +7813,138 @@ var buildIdeogramPImagePayload = (ctx) => ({
|
|
|
7802
7813
|
resolution: ctx.resolution ?? "1024x1024",
|
|
7803
7814
|
rendering_speed: ctx.renderingSpeed ?? "medium"
|
|
7804
7815
|
});
|
|
7816
|
+
var IDEOGRAM_45_IMAGE_BOUNDS = {
|
|
7817
|
+
maxBytes: 25 * 1024 * 1024,
|
|
7818
|
+
minAspectRatio: 1 / 6,
|
|
7819
|
+
maxAspectRatio: 6
|
|
7820
|
+
};
|
|
7821
|
+
var IDEOGRAM_45_T2I_SIZES = [
|
|
7822
|
+
"2048x2048",
|
|
7823
|
+
"1440x2880",
|
|
7824
|
+
"2880x1440",
|
|
7825
|
+
"1664x2496",
|
|
7826
|
+
"2496x1664",
|
|
7827
|
+
"1792x2240",
|
|
7828
|
+
"2240x1792",
|
|
7829
|
+
"1440x2560",
|
|
7830
|
+
"2560x1440",
|
|
7831
|
+
"1600x2560",
|
|
7832
|
+
"2560x1600",
|
|
7833
|
+
"1728x2304",
|
|
7834
|
+
"2304x1728",
|
|
7835
|
+
"1296x3168",
|
|
7836
|
+
"3168x1296",
|
|
7837
|
+
"1152x2944",
|
|
7838
|
+
"2944x1152",
|
|
7839
|
+
"1248x3328",
|
|
7840
|
+
"3328x1248",
|
|
7841
|
+
"1280x3072",
|
|
7842
|
+
"3072x1280",
|
|
7843
|
+
"1024x3072",
|
|
7844
|
+
"3072x1024",
|
|
7845
|
+
"1024x1024",
|
|
7846
|
+
"896x1120",
|
|
7847
|
+
"1120x896",
|
|
7848
|
+
"864x1152",
|
|
7849
|
+
"1152x864",
|
|
7850
|
+
"832x1248",
|
|
7851
|
+
"1248x832",
|
|
7852
|
+
"800x1280",
|
|
7853
|
+
"1280x800",
|
|
7854
|
+
"720x1280",
|
|
7855
|
+
"1280x720",
|
|
7856
|
+
"720x1440",
|
|
7857
|
+
"1440x720",
|
|
7858
|
+
"512x1536",
|
|
7859
|
+
"1536x512"
|
|
7860
|
+
];
|
|
7861
|
+
var ideogram45MaskParam = p.file("mask", "image", {
|
|
7862
|
+
label: "Mask",
|
|
7863
|
+
category: "asset",
|
|
7864
|
+
...IDEOGRAM_45_IMAGE_BOUNDS
|
|
7865
|
+
});
|
|
7866
|
+
var ideogram45MagicPromptParam = {
|
|
7867
|
+
magicPrompt: {
|
|
7868
|
+
label: "Magic Prompt",
|
|
7869
|
+
descriptor: {
|
|
7870
|
+
kind: "enum",
|
|
7871
|
+
valueType: "string",
|
|
7872
|
+
options: [
|
|
7873
|
+
{ id: "auto", label: "Auto" },
|
|
7874
|
+
{ id: "on", label: "On" },
|
|
7875
|
+
{ id: "off", label: "Off (verbatim)" }
|
|
7876
|
+
],
|
|
7877
|
+
default: "auto"
|
|
7878
|
+
}
|
|
7879
|
+
}
|
|
7880
|
+
};
|
|
7881
|
+
var IDEOGRAM_45_COUNTS = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
7882
|
+
var ideogram45Constraints = [
|
|
7883
|
+
{ when: { imageUrls: { exists: false } }, then: {
|
|
7884
|
+
size: { allowed: ["auto", ...IDEOGRAM_45_T2I_SIZES] },
|
|
7885
|
+
mask: { disabled: true, reason: "A mask needs a source image." }
|
|
7886
|
+
} },
|
|
7887
|
+
{ when: { imageUrls: { exists: true } }, then: {
|
|
7888
|
+
size: { allowed: ["auto", "source"], reason: 'With input images the size is "auto" or the source image size.' }
|
|
7889
|
+
} },
|
|
7890
|
+
{ when: { mask: { exists: true } }, then: {
|
|
7891
|
+
size: { disabled: true, reason: "A masked edit keeps the source image size." }
|
|
7892
|
+
} }
|
|
7893
|
+
];
|
|
7894
|
+
var ideogram45PreciseEditConstraints = [
|
|
7895
|
+
{ when: { quality: { is: "very_high" } }, then: {
|
|
7896
|
+
count: { allowed: [1, 2, 3, 4], reason: "Very high quality returns at most 4 images." }
|
|
7897
|
+
} }
|
|
7898
|
+
];
|
|
7805
7899
|
var { MODELS: MODELS26 } = defineModels("ideogram", [
|
|
7900
|
+
{
|
|
7901
|
+
id: "ideogram-4-5",
|
|
7902
|
+
name: "Ideogram 4.5",
|
|
7903
|
+
addedAt: "2026-09-28",
|
|
7904
|
+
release: "preview",
|
|
7905
|
+
workflow: "ideogram/v4.5/generate",
|
|
7906
|
+
estimatedTime: 30,
|
|
7907
|
+
mode: "image",
|
|
7908
|
+
inputType: "t2i",
|
|
7909
|
+
description: "Ideogram 4.5 \u2014 text-to-image and drift-free iterative editing with up to 4 reference images and an optional mask.",
|
|
7910
|
+
features: [feat("Reference Images", "input"), feat("Masked Edit", "input"), feat("2K", "resolution")],
|
|
7911
|
+
constraints: ideogram45Constraints,
|
|
7912
|
+
paramConfig: {
|
|
7913
|
+
...params.prompt({ maxLength: 1e4 }),
|
|
7914
|
+
// imageUrls[0] is the source image to edit; the rest are references ("image 2", "image 3"…).
|
|
7915
|
+
// With a mask the vendor allows at most 4 images.
|
|
7916
|
+
...params.imageInput(5, "Images", false, "reference", IDEOGRAM_45_IMAGE_BOUNDS),
|
|
7917
|
+
...ideogram45MaskParam,
|
|
7918
|
+
...p.size(["auto", "source", ...IDEOGRAM_45_T2I_SIZES], "auto"),
|
|
7919
|
+
...ideogram45MagicPromptParam,
|
|
7920
|
+
...p.quality(["low", "medium", "high"], "high"),
|
|
7921
|
+
...params.count(IDEOGRAM_45_COUNTS, 1),
|
|
7922
|
+
...params.seed()
|
|
7923
|
+
}
|
|
7924
|
+
},
|
|
7925
|
+
{
|
|
7926
|
+
id: "ideogram-4-5-precise-edit",
|
|
7927
|
+
name: "Ideogram 4.5 Precise Edit",
|
|
7928
|
+
addedAt: "2026-09-28",
|
|
7929
|
+
release: "preview",
|
|
7930
|
+
workflow: "ideogram/v4.5/precise-edit",
|
|
7931
|
+
estimatedTime: 40,
|
|
7932
|
+
mode: "image",
|
|
7933
|
+
inputType: "i2i",
|
|
7934
|
+
description: "Ideogram 4.5 precise edit \u2014 change one area and keep the rest of the image pixel-intact, optionally with a mask and reference images.",
|
|
7935
|
+
features: [feat("Precise Edit", "input"), feat("Masked Edit", "input"), feat("Reference Images", "input")],
|
|
7936
|
+
constraints: ideogram45PreciseEditConstraints,
|
|
7937
|
+
paramConfig: {
|
|
7938
|
+
...params.prompt({ maxLength: 1e4 }),
|
|
7939
|
+
...params.startFrame("Source Image", true, IDEOGRAM_45_IMAGE_BOUNDS),
|
|
7940
|
+
...ideogram45MaskParam,
|
|
7941
|
+
// With a mask the vendor allows at most 3 references.
|
|
7942
|
+
...params.imageInput(4, "Reference Images", false, "reference", IDEOGRAM_45_IMAGE_BOUNDS),
|
|
7943
|
+
...p.quality(["low", "medium", "high", "very_high"], "high"),
|
|
7944
|
+
...params.count(IDEOGRAM_45_COUNTS, 1),
|
|
7945
|
+
...params.seed()
|
|
7946
|
+
}
|
|
7947
|
+
},
|
|
7806
7948
|
{
|
|
7807
7949
|
id: "ideogram-v4",
|
|
7808
7950
|
name: "Ideogram 4.0",
|
|
@@ -7999,6 +8141,69 @@ var { MODELS: MODELS26 } = defineModels("ideogram", [
|
|
|
7999
8141
|
}
|
|
8000
8142
|
]);
|
|
8001
8143
|
|
|
8144
|
+
// src/vendors/catalog/ideogram.payloads.ts
|
|
8145
|
+
var GENERATE_MAX_IMAGES_WITH_MASK = 4;
|
|
8146
|
+
var PRECISE_EDIT_MAX_REFERENCES_WITH_MASK = 3;
|
|
8147
|
+
var VERY_HIGH_MAX_COUNT = 4;
|
|
8148
|
+
function assertMaskedImageLimit(model, count, max, what) {
|
|
8149
|
+
if (count > max) {
|
|
8150
|
+
throw new ApiError(`${model}: with a mask, use at most ${max} ${what} (got ${count}).`, {
|
|
8151
|
+
status: 400,
|
|
8152
|
+
code: "validation_error"
|
|
8153
|
+
});
|
|
8154
|
+
}
|
|
8155
|
+
}
|
|
8156
|
+
function ideogram45Size(size, hasImages, hasMask) {
|
|
8157
|
+
if (!size || hasMask) return void 0;
|
|
8158
|
+
if (hasImages) return size === "auto" || size === "source" ? size : void 0;
|
|
8159
|
+
return size === "source" ? void 0 : size;
|
|
8160
|
+
}
|
|
8161
|
+
var buildIdeogram45Payload = (input) => {
|
|
8162
|
+
const images = input.imageUrls?.length ? input.imageUrls : void 0;
|
|
8163
|
+
const mask = images && input.mask ? input.mask : void 0;
|
|
8164
|
+
if (mask) assertMaskedImageLimit("Ideogram 4.5", images.length, GENERATE_MAX_IMAGES_WITH_MASK, "images");
|
|
8165
|
+
const size = ideogram45Size(input.size, !!images, !!mask);
|
|
8166
|
+
return {
|
|
8167
|
+
prompt: input.prompt,
|
|
8168
|
+
...images ? { images } : {},
|
|
8169
|
+
...mask ? { mask } : {},
|
|
8170
|
+
...size ? { size } : {},
|
|
8171
|
+
...input.magicPrompt ? { magic_prompt: input.magicPrompt } : {},
|
|
8172
|
+
quality: input.quality ?? "high",
|
|
8173
|
+
num_images: input.count ?? 1,
|
|
8174
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
8175
|
+
};
|
|
8176
|
+
};
|
|
8177
|
+
var buildIdeogram45PreciseEditPayload = (input) => {
|
|
8178
|
+
if (input.mask) {
|
|
8179
|
+
assertMaskedImageLimit(
|
|
8180
|
+
"Ideogram 4.5 Precise Edit",
|
|
8181
|
+
input.imageUrls?.length ?? 0,
|
|
8182
|
+
PRECISE_EDIT_MAX_REFERENCES_WITH_MASK,
|
|
8183
|
+
"reference images"
|
|
8184
|
+
);
|
|
8185
|
+
}
|
|
8186
|
+
if (input.quality === "very_high" && (input.count ?? 1) > VERY_HIGH_MAX_COUNT) {
|
|
8187
|
+
throw new ApiError(
|
|
8188
|
+
`Ideogram 4.5 Precise Edit: very_high quality returns at most ${VERY_HIGH_MAX_COUNT} images (got ${input.count}).`,
|
|
8189
|
+
{ status: 400, code: "validation_error" }
|
|
8190
|
+
);
|
|
8191
|
+
}
|
|
8192
|
+
return {
|
|
8193
|
+
image: input.startFrame,
|
|
8194
|
+
prompt: input.prompt,
|
|
8195
|
+
...input.mask ? { mask: input.mask } : {},
|
|
8196
|
+
...input.imageUrls?.length ? { reference_images: input.imageUrls } : {},
|
|
8197
|
+
quality: input.quality ?? "high",
|
|
8198
|
+
num_images: input.count ?? 1,
|
|
8199
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
8200
|
+
};
|
|
8201
|
+
};
|
|
8202
|
+
registerPayloads(MODELS26, {
|
|
8203
|
+
"ideogram-4-5": buildIdeogram45Payload,
|
|
8204
|
+
"ideogram-4-5-precise-edit": buildIdeogram45PreciseEditPayload
|
|
8205
|
+
});
|
|
8206
|
+
|
|
8002
8207
|
// src/vendors/catalog/qwen.ts
|
|
8003
8208
|
var QWEN_V1_SIZES = [
|
|
8004
8209
|
"2048x2048",
|
|
@@ -13113,6 +13318,8 @@ var Happyhorse11T2v = "happyhorse-1.1-t2v";
|
|
|
13113
13318
|
var HeygenTalkingPhoto = "heygen-talking-photo";
|
|
13114
13319
|
var HeygenVideoAvatar = "heygen-video-avatar";
|
|
13115
13320
|
var HunyuanV3 = "hunyuan-v3";
|
|
13321
|
+
var Ideogram45 = "ideogram-4-5";
|
|
13322
|
+
var Ideogram45PreciseEdit = "ideogram-4-5-precise-edit";
|
|
13116
13323
|
var IdeogramCharacter = "ideogram-character";
|
|
13117
13324
|
var IdeogramPImage = "ideogram-p-image";
|
|
13118
13325
|
var IdeogramV3 = "ideogram-v3";
|
|
@@ -13366,6 +13573,8 @@ var Models = {
|
|
|
13366
13573
|
HeygenTalkingPhoto,
|
|
13367
13574
|
HeygenVideoAvatar,
|
|
13368
13575
|
HunyuanV3,
|
|
13576
|
+
Ideogram45,
|
|
13577
|
+
Ideogram45PreciseEdit,
|
|
13369
13578
|
IdeogramCharacter,
|
|
13370
13579
|
IdeogramPImage,
|
|
13371
13580
|
IdeogramV3,
|