@picsart/ai-sdk 5.26.2 → 5.27.0
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/_vendor/workflows-types/index.d.ts +1073 -914
- package/index.d.ts +36 -11
- package/index.js +177 -45
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -421,20 +421,23 @@ type ModelInputById = {
|
|
|
421
421
|
};
|
|
422
422
|
"happyhorse-1.0-r2v": {
|
|
423
423
|
prompt: string;
|
|
424
|
+
seed?: number;
|
|
424
425
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4";
|
|
425
426
|
resolution?: "720P" | "1080P";
|
|
426
|
-
duration?:
|
|
427
|
+
duration?: number;
|
|
427
428
|
imageUrls: [string, ...string[]];
|
|
428
429
|
};
|
|
429
430
|
"happyhorse-1.0-t2v": {
|
|
430
431
|
prompt: string;
|
|
432
|
+
seed?: number;
|
|
431
433
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4";
|
|
432
434
|
resolution?: "720P" | "1080P";
|
|
433
|
-
duration?:
|
|
435
|
+
duration?: number;
|
|
434
436
|
startFrame?: string;
|
|
435
437
|
};
|
|
436
438
|
"happyhorse-1.0-video-edit": {
|
|
437
439
|
prompt: string;
|
|
440
|
+
seed?: number;
|
|
438
441
|
resolution?: "720P" | "1080P";
|
|
439
442
|
audioSetting?: "auto" | "origin";
|
|
440
443
|
videoUrl: string;
|
|
@@ -442,16 +445,18 @@ type ModelInputById = {
|
|
|
442
445
|
};
|
|
443
446
|
"happyhorse-1.1-r2v": {
|
|
444
447
|
prompt: string;
|
|
448
|
+
seed?: number;
|
|
445
449
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4";
|
|
446
450
|
resolution?: "720P" | "1080P";
|
|
447
|
-
duration?:
|
|
451
|
+
duration?: number;
|
|
448
452
|
imageUrls: [string, ...string[]];
|
|
449
453
|
};
|
|
450
454
|
"happyhorse-1.1-t2v": {
|
|
451
455
|
prompt: string;
|
|
456
|
+
seed?: number;
|
|
452
457
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4";
|
|
453
458
|
resolution?: "720P" | "1080P";
|
|
454
|
-
duration?:
|
|
459
|
+
duration?: number;
|
|
455
460
|
startFrame?: string;
|
|
456
461
|
};
|
|
457
462
|
"heygen-talking-photo": {
|
|
@@ -806,6 +811,17 @@ type ModelInputById = {
|
|
|
806
811
|
seed?: number;
|
|
807
812
|
enableSafetyChecker?: boolean;
|
|
808
813
|
};
|
|
814
|
+
"minimax-h3-max-turbo": {
|
|
815
|
+
prompt: string;
|
|
816
|
+
startFrame?: string;
|
|
817
|
+
endFrame?: string;
|
|
818
|
+
resolution?: "480p" | "768p";
|
|
819
|
+
duration?: number;
|
|
820
|
+
aspectRatio?: "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
821
|
+
promptExpansionMode?: "balanced" | "quality";
|
|
822
|
+
seed?: number;
|
|
823
|
+
enableSafetyChecker?: boolean;
|
|
824
|
+
};
|
|
809
825
|
"minimax-music-v2": {
|
|
810
826
|
prompt: string;
|
|
811
827
|
lyricsPrompt?: string;
|
|
@@ -960,7 +976,6 @@ type ModelInputById = {
|
|
|
960
976
|
};
|
|
961
977
|
"qwen": {
|
|
962
978
|
prompt: string;
|
|
963
|
-
count?: 1 | 2 | 4 | 6 | 8 | 10;
|
|
964
979
|
imageUrls?: string[];
|
|
965
980
|
};
|
|
966
981
|
"qwen-image-2": {
|
|
@@ -975,6 +990,7 @@ type ModelInputById = {
|
|
|
975
990
|
count?: 1 | 2 | 4 | 6;
|
|
976
991
|
enhancePrompt?: boolean;
|
|
977
992
|
imageUrls?: string[];
|
|
993
|
+
seed?: number;
|
|
978
994
|
};
|
|
979
995
|
"qwen-image-3.0": {
|
|
980
996
|
prompt: string;
|
|
@@ -983,6 +999,7 @@ type ModelInputById = {
|
|
|
983
999
|
count?: 1 | 2 | 4 | 6;
|
|
984
1000
|
enhancePrompt?: boolean;
|
|
985
1001
|
imageUrls?: string[];
|
|
1002
|
+
seed?: number;
|
|
986
1003
|
promptExtendMode?: "direct" | "agent";
|
|
987
1004
|
enableThinking?: boolean;
|
|
988
1005
|
};
|
|
@@ -993,6 +1010,7 @@ type ModelInputById = {
|
|
|
993
1010
|
count?: 1 | 2 | 4 | 6;
|
|
994
1011
|
enhancePrompt?: boolean;
|
|
995
1012
|
imageUrls?: string[];
|
|
1013
|
+
seed?: number;
|
|
996
1014
|
promptExtendMode?: "direct" | "agent";
|
|
997
1015
|
enableThinking?: boolean;
|
|
998
1016
|
};
|
|
@@ -1517,7 +1535,6 @@ type ModelInputById = {
|
|
|
1517
1535
|
resolution?: "480p" | "720p" | "1080p";
|
|
1518
1536
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4";
|
|
1519
1537
|
negativePrompt?: string;
|
|
1520
|
-
cfgScale?: number;
|
|
1521
1538
|
startFrame?: string;
|
|
1522
1539
|
};
|
|
1523
1540
|
"wan-2.7-i2v": {
|
|
@@ -1529,6 +1546,7 @@ type ModelInputById = {
|
|
|
1529
1546
|
startFrame: string;
|
|
1530
1547
|
endFrame?: string;
|
|
1531
1548
|
audioUrl?: string;
|
|
1549
|
+
seed?: number;
|
|
1532
1550
|
};
|
|
1533
1551
|
"wan-2.7-r2v": {
|
|
1534
1552
|
prompt: string;
|
|
@@ -1538,6 +1556,7 @@ type ModelInputById = {
|
|
|
1538
1556
|
negativePrompt?: string;
|
|
1539
1557
|
imageUrls: [string, ...string[]];
|
|
1540
1558
|
videoUrl: string;
|
|
1559
|
+
seed?: number;
|
|
1541
1560
|
};
|
|
1542
1561
|
"wan-2.7-t2v": {
|
|
1543
1562
|
prompt: string;
|
|
@@ -1548,6 +1567,7 @@ type ModelInputById = {
|
|
|
1548
1567
|
enhancePrompt?: boolean;
|
|
1549
1568
|
audioUrl?: string;
|
|
1550
1569
|
startFrame?: string;
|
|
1570
|
+
seed?: number;
|
|
1551
1571
|
};
|
|
1552
1572
|
"wan-2.7-video-edit": {
|
|
1553
1573
|
prompt?: string;
|
|
@@ -1556,10 +1576,13 @@ type ModelInputById = {
|
|
|
1556
1576
|
negativePrompt?: string;
|
|
1557
1577
|
videoUrl: string;
|
|
1558
1578
|
imageUrls?: string[];
|
|
1579
|
+
audioSetting?: "auto" | "origin";
|
|
1580
|
+
duration?: number;
|
|
1581
|
+
seed?: number;
|
|
1559
1582
|
};
|
|
1560
1583
|
"wan-3.0-video": {
|
|
1561
|
-
prompt
|
|
1562
|
-
duration?: 5 | 10 | 15 | 30;
|
|
1584
|
+
prompt?: string;
|
|
1585
|
+
duration?: -1 | 5 | 10 | 15 | 30;
|
|
1563
1586
|
resolution?: "480P" | "720P" | "1080P";
|
|
1564
1587
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "adaptive";
|
|
1565
1588
|
generateAudio?: boolean;
|
|
@@ -1573,8 +1596,8 @@ type ModelInputById = {
|
|
|
1573
1596
|
seed?: number;
|
|
1574
1597
|
};
|
|
1575
1598
|
"wan-3.0-video-prime": {
|
|
1576
|
-
prompt
|
|
1577
|
-
duration?: 5 | 10 | 15 | 30;
|
|
1599
|
+
prompt?: string;
|
|
1600
|
+
duration?: -1 | 5 | 10 | 15 | 30;
|
|
1578
1601
|
resolution?: "480P" | "720P" | "1080P";
|
|
1579
1602
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "adaptive";
|
|
1580
1603
|
generateAudio?: boolean;
|
|
@@ -1808,7 +1831,8 @@ interface RangeDescriptor {
|
|
|
1808
1831
|
min: number;
|
|
1809
1832
|
max: number;
|
|
1810
1833
|
step?: number;
|
|
1811
|
-
|
|
1834
|
+
/** Optional: default-less ranges (e.g. seed) are sent only when set. */
|
|
1835
|
+
default?: number;
|
|
1812
1836
|
}
|
|
1813
1837
|
interface BooleanDescriptor {
|
|
1814
1838
|
kind: 'boolean';
|
|
@@ -2642,6 +2666,7 @@ declare const Models: {
|
|
|
2642
2666
|
readonly MinimaxH3: "minimax-h3";
|
|
2643
2667
|
readonly MinimaxH3Max: "minimax-h3-max";
|
|
2644
2668
|
readonly MinimaxH3MaxR2v: "minimax-h3-max-r2v";
|
|
2669
|
+
readonly MinimaxH3MaxTurbo: "minimax-h3-max-turbo";
|
|
2645
2670
|
readonly MinimaxMusicV2: "minimax-music-v2";
|
|
2646
2671
|
readonly MinimaxMusicV3: "minimax-music-v3";
|
|
2647
2672
|
readonly MuseImage10: "muse-image-1.0";
|
package/index.js
CHANGED
|
@@ -1052,17 +1052,28 @@ var p = {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
};
|
|
1054
1054
|
},
|
|
1055
|
-
negativePrompt(placeholder) {
|
|
1055
|
+
negativePrompt(placeholder, maxLength) {
|
|
1056
1056
|
return {
|
|
1057
1057
|
negativePrompt: {
|
|
1058
1058
|
label: "Negative Prompt",
|
|
1059
1059
|
descriptor: {
|
|
1060
1060
|
kind: "text",
|
|
1061
|
-
placeholder
|
|
1061
|
+
placeholder,
|
|
1062
|
+
maxLength
|
|
1062
1063
|
}
|
|
1063
1064
|
}
|
|
1064
1065
|
};
|
|
1065
1066
|
},
|
|
1067
|
+
/** Generation seed — optional, no default: sent only when the user sets it,
|
|
1068
|
+
* so the vendor's own randomization applies otherwise. */
|
|
1069
|
+
seed(max = 2147483647) {
|
|
1070
|
+
return {
|
|
1071
|
+
seed: {
|
|
1072
|
+
label: "Seed",
|
|
1073
|
+
descriptor: { kind: "range", min: 0, max, step: 1 }
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
},
|
|
1066
1077
|
cfgScale(min, max, def, step) {
|
|
1067
1078
|
return {
|
|
1068
1079
|
cfgScale: {
|
|
@@ -1310,6 +1321,7 @@ var params = {
|
|
|
1310
1321
|
count: p.count,
|
|
1311
1322
|
resolution: p.resolution,
|
|
1312
1323
|
negativePrompt: p.negativePrompt,
|
|
1324
|
+
seed: p.seed,
|
|
1313
1325
|
generateAudio: p.generateAudio,
|
|
1314
1326
|
returnLastFrame: p.returnLastFrame,
|
|
1315
1327
|
audioSetting: p.audioSetting,
|
|
@@ -3000,15 +3012,15 @@ var buildWanT2VPayload = (ctx) => ({
|
|
|
3000
3012
|
var buildWanI2VPayload = (ctx) => ({
|
|
3001
3013
|
prompt: ctx.prompt,
|
|
3002
3014
|
image_url: ctx.startFrame,
|
|
3003
|
-
resolution: "720p",
|
|
3004
|
-
duration: ctx.duration ?? 5,
|
|
3005
|
-
...ctx.
|
|
3015
|
+
resolution: ctx.resolution === "1080p" ? "1080p" : "720p",
|
|
3016
|
+
duration: String(ctx.duration ?? 5),
|
|
3017
|
+
...ctx.negativePrompt ? { negative_prompt: ctx.negativePrompt } : {}
|
|
3006
3018
|
});
|
|
3007
3019
|
var buildWanR2VPayload = (ctx) => ({
|
|
3008
3020
|
prompt: ctx.prompt,
|
|
3009
3021
|
video_urls: [ctx.videoUrl],
|
|
3010
|
-
resolution: "720p",
|
|
3011
|
-
duration: ctx.duration ?? 5
|
|
3022
|
+
resolution: ctx.resolution === "1080p" ? "1080p" : "720p",
|
|
3023
|
+
duration: String(ctx.duration ?? 5)
|
|
3012
3024
|
});
|
|
3013
3025
|
var buildWanImagePayload = (ctx) => ({
|
|
3014
3026
|
prompt: ctx.prompt,
|
|
@@ -3048,6 +3060,12 @@ var buildWan27R2VPayload = (ctx) => {
|
|
|
3048
3060
|
for (const url of ctx.imageUrls) media.push({ type: "reference_image", url });
|
|
3049
3061
|
}
|
|
3050
3062
|
if (ctx.videoUrl) media.push({ type: "reference_video", url: ctx.videoUrl });
|
|
3063
|
+
if (media.length > 5) {
|
|
3064
|
+
throw new ApiError("Wan 2.7 R2V accepts at most 5 reference items (images + video combined).", {
|
|
3065
|
+
status: 400,
|
|
3066
|
+
code: "validation_error"
|
|
3067
|
+
});
|
|
3068
|
+
}
|
|
3051
3069
|
return {
|
|
3052
3070
|
prompt: ctx.prompt,
|
|
3053
3071
|
media,
|
|
@@ -3062,7 +3080,7 @@ var buildWan27VideoEditPayload = (ctx) => {
|
|
|
3062
3080
|
const media = [];
|
|
3063
3081
|
if (ctx.videoUrl) media.push({ type: "video", url: ctx.videoUrl });
|
|
3064
3082
|
if (ctx.imageUrls?.length) {
|
|
3065
|
-
for (const url of ctx.imageUrls.slice(0,
|
|
3083
|
+
for (const url of ctx.imageUrls.slice(0, 4)) media.push({ type: "reference_image", url });
|
|
3066
3084
|
}
|
|
3067
3085
|
return {
|
|
3068
3086
|
media,
|
|
@@ -3070,6 +3088,9 @@ var buildWan27VideoEditPayload = (ctx) => {
|
|
|
3070
3088
|
...ctx.prompt ? { prompt: ctx.prompt } : {},
|
|
3071
3089
|
...ctx.negativePrompt ? { negative_prompt: ctx.negativePrompt } : {},
|
|
3072
3090
|
...ctx.aspectRatio ? { ratio: ctx.aspectRatio } : {},
|
|
3091
|
+
// duration is truncation-only: unset (vendor default 0) keeps the input length.
|
|
3092
|
+
...ctx.duration ? { duration: ctx.duration } : {},
|
|
3093
|
+
...ctx.audioSetting ? { audio_setting: ctx.audioSetting } : {},
|
|
3073
3094
|
...ctx.seed != null ? { seed: ctx.seed } : {}
|
|
3074
3095
|
};
|
|
3075
3096
|
};
|
|
@@ -3104,10 +3125,21 @@ var wanV3Constraints = [
|
|
|
3104
3125
|
];
|
|
3105
3126
|
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")];
|
|
3106
3127
|
var wanV3ParamConfig = {
|
|
3107
|
-
|
|
3108
|
-
...params.
|
|
3128
|
+
// Vendor: 'either prompt or media' — the builder enforces the cross-field rule.
|
|
3129
|
+
...params.prompt({ required: false, maxLength: 5e3 }),
|
|
3130
|
+
// Vendor: integer 2-30, or -1 = Smart duration mode (model picks the length).
|
|
3131
|
+
duration: {
|
|
3132
|
+
label: "Duration (s)",
|
|
3133
|
+
descriptor: {
|
|
3134
|
+
kind: "enum",
|
|
3135
|
+
valueType: "number",
|
|
3136
|
+
options: [{ id: -1, label: "Auto" }, { id: 5 }, { id: 10 }, { id: 15 }, { id: 30 }],
|
|
3137
|
+
default: 5
|
|
3138
|
+
}
|
|
3139
|
+
},
|
|
3109
3140
|
...params.resolution(["480P", "720P", "1080P"], "1080P"),
|
|
3110
|
-
|
|
3141
|
+
// Vendor default is 'adaptive' (model chooses from intent and input media).
|
|
3142
|
+
...params.aspectRatio(["16:9", "9:16", "1:1", "4:3", "3:4", "adaptive"], "adaptive"),
|
|
3111
3143
|
...params.generateAudio(true),
|
|
3112
3144
|
...params.startFrame(),
|
|
3113
3145
|
...params.endFrame(),
|
|
@@ -3116,7 +3148,8 @@ var wanV3ParamConfig = {
|
|
|
3116
3148
|
...params.audioInputs(5, "Reference Audios"),
|
|
3117
3149
|
...p.boolean("enableThinking", false, "Deep Thinking"),
|
|
3118
3150
|
...p.boolean("watermark", false, "Watermark"),
|
|
3119
|
-
|
|
3151
|
+
// No default: a materialized seed would pin every generation to one value.
|
|
3152
|
+
...params.seed()
|
|
3120
3153
|
};
|
|
3121
3154
|
var { MODELS: MODELS10 } = defineModels("wan", [
|
|
3122
3155
|
// ── Video ─────────────────────────────────────────
|
|
@@ -3135,7 +3168,7 @@ var { MODELS: MODELS10 } = defineModels("wan", [
|
|
|
3135
3168
|
editEstimatedTime: 14,
|
|
3136
3169
|
mode: "video",
|
|
3137
3170
|
inputType: "t2v",
|
|
3138
|
-
description: "Painterly artistic look with audio \u2014 up to 15s at 1080p
|
|
3171
|
+
description: "Painterly artistic look with audio \u2014 up to 15s at 1080p.",
|
|
3139
3172
|
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("5/10/15 sec", "duration")],
|
|
3140
3173
|
paramConfig: {
|
|
3141
3174
|
...params.prompt(),
|
|
@@ -3143,7 +3176,6 @@ var { MODELS: MODELS10 } = defineModels("wan", [
|
|
|
3143
3176
|
...params.resolution(["480p", "720p", "1080p"], "720p"),
|
|
3144
3177
|
...params.aspectRatio(["16:9", "9:16", "1:1", "4:3", "3:4"]),
|
|
3145
3178
|
...params.negativePrompt(),
|
|
3146
|
-
...params.cfgScale(1, 10, 5, 0.5),
|
|
3147
3179
|
...params.startFrame()
|
|
3148
3180
|
}
|
|
3149
3181
|
},
|
|
@@ -3205,14 +3237,15 @@ var { MODELS: MODELS10 } = defineModels("wan", [
|
|
|
3205
3237
|
description: "Wan 2.7 T2V \u2014 up to 15s at 1080p with audio input and prompt enhancement.",
|
|
3206
3238
|
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("Audio", "audio"), feat("1080P", "resolution"), feat("5/10/15 sec", "duration")],
|
|
3207
3239
|
paramConfig: {
|
|
3208
|
-
...params.prompt(),
|
|
3240
|
+
...params.prompt({ maxLength: 5e3 }),
|
|
3209
3241
|
...params.duration([5, 10, 15], 5),
|
|
3210
3242
|
...params.resolution(WAN27_RES, "720P"),
|
|
3211
3243
|
...params.aspectRatio(WAN27_AR),
|
|
3212
|
-
...params.negativePrompt(),
|
|
3244
|
+
...params.negativePrompt(void 0, 500),
|
|
3213
3245
|
...params.enhancePrompt(true),
|
|
3214
3246
|
...params.audioInput("Audio Track"),
|
|
3215
|
-
...params.startFrame()
|
|
3247
|
+
...params.startFrame(),
|
|
3248
|
+
...params.seed()
|
|
3216
3249
|
}
|
|
3217
3250
|
},
|
|
3218
3251
|
{
|
|
@@ -3229,14 +3262,15 @@ var { MODELS: MODELS10 } = defineModels("wan", [
|
|
|
3229
3262
|
description: "Wan 2.7 I2V \u2014 animate images with start/end frame and optional driving audio.",
|
|
3230
3263
|
features: [feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("1080P", "resolution"), feat("5/10/15 sec", "duration")],
|
|
3231
3264
|
paramConfig: {
|
|
3232
|
-
...params.prompt({ required: false }),
|
|
3265
|
+
...params.prompt({ required: false, maxLength: 5e3 }),
|
|
3233
3266
|
...params.duration([5, 10, 15], 5),
|
|
3234
3267
|
...params.resolution(WAN27_RES, "720P"),
|
|
3235
|
-
...params.negativePrompt(),
|
|
3268
|
+
...params.negativePrompt(void 0, 500),
|
|
3236
3269
|
...params.enhancePrompt(true),
|
|
3237
3270
|
...params.startFrame("Start Frame", true),
|
|
3238
3271
|
...params.endFrame(),
|
|
3239
|
-
...params.audioInput("Driving Audio")
|
|
3272
|
+
...params.audioInput("Driving Audio"),
|
|
3273
|
+
...params.seed()
|
|
3240
3274
|
}
|
|
3241
3275
|
},
|
|
3242
3276
|
{
|
|
@@ -3253,13 +3287,16 @@ var { MODELS: MODELS10 } = defineModels("wan", [
|
|
|
3253
3287
|
description: "Wan 2.7 R2V \u2014 generate video from reference images/video with style direction.",
|
|
3254
3288
|
features: [feat("Multi-Image Input", "input"), feat("Video Input", "input"), feat("1080P", "resolution"), feat("5/10 sec", "duration")],
|
|
3255
3289
|
paramConfig: {
|
|
3256
|
-
...params.prompt(),
|
|
3290
|
+
...params.prompt({ maxLength: 5e3 }),
|
|
3257
3291
|
...params.duration([5, 10], 5),
|
|
3258
3292
|
...params.resolution(WAN27_RES, "720P"),
|
|
3259
3293
|
...params.aspectRatio(WAN27_AR),
|
|
3260
|
-
...params.negativePrompt(),
|
|
3294
|
+
...params.negativePrompt(void 0, 500),
|
|
3295
|
+
// Vendor: reference images + reference video combined ≤ 5 (the builder
|
|
3296
|
+
// fails fast when a video pushes the total over the cap).
|
|
3261
3297
|
...params.imageInput(5, "Reference Images", true),
|
|
3262
|
-
...params.videoInput("Reference Video")
|
|
3298
|
+
...params.videoInput("Reference Video"),
|
|
3299
|
+
...params.seed()
|
|
3263
3300
|
}
|
|
3264
3301
|
},
|
|
3265
3302
|
{
|
|
@@ -3276,12 +3313,21 @@ var { MODELS: MODELS10 } = defineModels("wan", [
|
|
|
3276
3313
|
description: "Wan 2.7 Video Edit \u2014 restyle or modify existing video with reference images.",
|
|
3277
3314
|
features: [feat("Video Input", "input"), feat("Image Input", "input"), feat("1080P", "resolution")],
|
|
3278
3315
|
paramConfig: {
|
|
3279
|
-
...params.prompt({ required: false }),
|
|
3316
|
+
...params.prompt({ required: false, maxLength: 5e3 }),
|
|
3280
3317
|
...params.resolution(WAN27_RES, "720P"),
|
|
3281
3318
|
...params.aspectRatio(WAN27_AR),
|
|
3282
|
-
...params.negativePrompt(),
|
|
3319
|
+
...params.negativePrompt(void 0, 500),
|
|
3283
3320
|
...params.videoInput("Source Video"),
|
|
3284
|
-
|
|
3321
|
+
// Vendor: 1 video + up to 4 reference images.
|
|
3322
|
+
...params.imageInput(4, "Reference Images"),
|
|
3323
|
+
...params.audioSetting(),
|
|
3324
|
+
// Optional truncation: unset keeps the input video's length (vendor
|
|
3325
|
+
// default 0); set 2-10 to cut the output.
|
|
3326
|
+
duration: {
|
|
3327
|
+
label: "Output Duration (s)",
|
|
3328
|
+
descriptor: { kind: "range", min: 2, max: 10, step: 1 }
|
|
3329
|
+
},
|
|
3330
|
+
...params.seed()
|
|
3285
3331
|
}
|
|
3286
3332
|
},
|
|
3287
3333
|
// ── Wan 3.0 all-in-one Video ─────────────────────────
|
|
@@ -3335,10 +3381,17 @@ var makeWanV3VideoPayload = (model) => (input) => {
|
|
|
3335
3381
|
if (input.audioUrls?.length) {
|
|
3336
3382
|
for (const url of input.audioUrls) media.push({ type: "reference_audio", url });
|
|
3337
3383
|
}
|
|
3384
|
+
if (!input.prompt && media.length === 0) {
|
|
3385
|
+
throw new ApiError("Wan 3.0: provide a prompt or at least one media input (frames or references).", {
|
|
3386
|
+
status: 400,
|
|
3387
|
+
code: "validation_error"
|
|
3388
|
+
});
|
|
3389
|
+
}
|
|
3338
3390
|
return {
|
|
3339
3391
|
model,
|
|
3340
3392
|
resolution: input.resolution ?? "1080P",
|
|
3341
|
-
|
|
3393
|
+
// Vendor default: adaptive — the model picks the ratio from intent/media.
|
|
3394
|
+
ratio: input.aspectRatio ?? "adaptive",
|
|
3342
3395
|
duration: input.duration ?? 5,
|
|
3343
3396
|
audio: input.generateAudio ?? true,
|
|
3344
3397
|
enable_thinking: input.enableThinking ?? false,
|
|
@@ -6610,6 +6663,54 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
|
|
|
6610
6663
|
} }
|
|
6611
6664
|
]
|
|
6612
6665
|
},
|
|
6666
|
+
{
|
|
6667
|
+
// Turbo sibling of minimax-h3-max — same fal.ai worker, same wire shape,
|
|
6668
|
+
// tuned for speed (faster-than-realtime generation). The only schema
|
|
6669
|
+
// difference: prompt expansion has no 'disabled' mode on this endpoint.
|
|
6670
|
+
id: "minimax-h3-max-turbo",
|
|
6671
|
+
name: "MiniMax H3 Max Turbo",
|
|
6672
|
+
modelId: "fal-ai-h3-max-turbo",
|
|
6673
|
+
addedAt: "2026-09-03",
|
|
6674
|
+
workflow: "minimax/h3-max-turbo/text-to-video",
|
|
6675
|
+
editWorkflow: "minimax/h3-max-turbo/image-to-video",
|
|
6676
|
+
estimatedTime: 5,
|
|
6677
|
+
mode: "video",
|
|
6678
|
+
inputType: "t2v",
|
|
6679
|
+
description: "Faster-than-realtime MiniMax H3 Max Turbo video from text or a start/end frame, with prompt expansion. Up to 15s at 768p.",
|
|
6680
|
+
features: [
|
|
6681
|
+
feat("Fast", "characteristic"),
|
|
6682
|
+
feat("Image Input", "input"),
|
|
6683
|
+
feat("Start/End Frame", "frame"),
|
|
6684
|
+
feat("768p", "resolution"),
|
|
6685
|
+
feat("5-15 sec", "duration")
|
|
6686
|
+
],
|
|
6687
|
+
paramConfig: {
|
|
6688
|
+
...params.prompt(),
|
|
6689
|
+
...params.startFrame(),
|
|
6690
|
+
...params.endFrame(),
|
|
6691
|
+
// Lowercase on purpose: the worker uppercases for the fal wire ('768P')
|
|
6692
|
+
// and the pricing qualities are lowercase, so this casing serves both.
|
|
6693
|
+
...params.resolution(["480p", "768p"], "768p"),
|
|
6694
|
+
...params.durationRange(5, 15, 5),
|
|
6695
|
+
...params.aspectRatio(["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "16:9"),
|
|
6696
|
+
// Unlike minimax-h3-max, the turbo wire has no 'disabled' expansion mode.
|
|
6697
|
+
...p.enum("promptExpansionMode", ["balanced", "quality"], "balanced", { label: "Prompt Expansion" }),
|
|
6698
|
+
// -1 (sentinel) means "pick a random seed"; the builder drops it.
|
|
6699
|
+
...p.range("seed", -1, 2147483647, -1),
|
|
6700
|
+
...p.boolean("enableSafetyChecker", true, "Safety Checker")
|
|
6701
|
+
},
|
|
6702
|
+
constraints: [
|
|
6703
|
+
// The T2V wire has no end_image_url — an end frame only reaches the
|
|
6704
|
+
// vendor on the I2V route, which needs a start frame to trigger.
|
|
6705
|
+
{ when: { startFrame: { exists: false } }, then: {
|
|
6706
|
+
endFrame: { disabled: true, reason: "An end frame requires a start frame." }
|
|
6707
|
+
} },
|
|
6708
|
+
// I2V derives the ratio from the input image (no aspect_ratio on that wire).
|
|
6709
|
+
{ when: { startFrame: { exists: true } }, then: {
|
|
6710
|
+
aspectRatio: { disabled: true, reason: "Aspect ratio follows the start frame image." }
|
|
6711
|
+
} }
|
|
6712
|
+
]
|
|
6713
|
+
},
|
|
6613
6714
|
{
|
|
6614
6715
|
// Reference-to-video sibling of minimax-h3-max (same fal.ai worker).
|
|
6615
6716
|
// The prompt addresses references by modality and order — Image 1,
|
|
@@ -6683,6 +6784,19 @@ var buildMinimaxH3MaxPayload = (input) => ({
|
|
|
6683
6784
|
...input.seed != null && input.seed !== -1 ? { seed: input.seed } : {},
|
|
6684
6785
|
enable_safety_checker: input.enableSafetyChecker ?? true
|
|
6685
6786
|
});
|
|
6787
|
+
var buildMinimaxH3MaxTurboPayload = (input) => ({
|
|
6788
|
+
prompt: input.prompt,
|
|
6789
|
+
prompt_expansion_mode: input.promptExpansionMode ?? "balanced",
|
|
6790
|
+
duration: input.duration ?? 5,
|
|
6791
|
+
resolution: input.resolution ?? "768p",
|
|
6792
|
+
...input.startFrame ? {
|
|
6793
|
+
image_url: input.startFrame,
|
|
6794
|
+
...input.endFrame ? { end_image_url: input.endFrame } : {}
|
|
6795
|
+
} : { aspect_ratio: input.aspectRatio ?? "16:9" },
|
|
6796
|
+
// -1 is the paramConfig sentinel for "random seed" — omit it on the wire.
|
|
6797
|
+
...input.seed != null && input.seed !== -1 ? { seed: input.seed } : {},
|
|
6798
|
+
enable_safety_checker: input.enableSafetyChecker ?? true
|
|
6799
|
+
});
|
|
6686
6800
|
var buildMinimaxH3MaxR2VPayload = (input) => ({
|
|
6687
6801
|
prompt: input.prompt,
|
|
6688
6802
|
prompt_expansion_mode: input.promptExpansionMode ?? "balanced",
|
|
@@ -6699,10 +6813,12 @@ var buildMinimaxH3MaxR2VPayload = (input) => ({
|
|
|
6699
6813
|
registerPayloads(MODELS26, {
|
|
6700
6814
|
"minimax-music-v3": buildMinimaxMusicV3Payload,
|
|
6701
6815
|
"minimax-h3-max": buildMinimaxH3MaxPayload,
|
|
6816
|
+
"minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload,
|
|
6702
6817
|
"minimax-h3-max-r2v": buildMinimaxH3MaxR2VPayload
|
|
6703
6818
|
});
|
|
6704
6819
|
registerEditPayloads(MODELS26, {
|
|
6705
|
-
"minimax-h3-max": buildMinimaxH3MaxPayload
|
|
6820
|
+
"minimax-h3-max": buildMinimaxH3MaxPayload,
|
|
6821
|
+
"minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload
|
|
6706
6822
|
});
|
|
6707
6823
|
|
|
6708
6824
|
// src/vendors/catalog/ideogram.ts
|
|
@@ -6937,35 +7053,40 @@ var buildQwen2Payload = (ctx) => {
|
|
|
6937
7053
|
const hasImages = Array.isArray(ctx.imageUrls) && ctx.imageUrls.length > 0;
|
|
6938
7054
|
return {
|
|
6939
7055
|
prompt: ctx.prompt,
|
|
7056
|
+
num_images: ctx.count ?? 1,
|
|
6940
7057
|
...hasImages ? { image_urls: ctx.imageUrls } : {}
|
|
6941
7058
|
};
|
|
6942
7059
|
};
|
|
6943
7060
|
var buildQwenV1 = (model) => (ctx) => {
|
|
6944
7061
|
const hasImages = Array.isArray(ctx.imageUrls) && ctx.imageUrls.length > 0;
|
|
6945
|
-
const promptExtendMode = ctx.promptExtendMode === "agent" && hasImages && model
|
|
7062
|
+
const promptExtendMode = ctx.promptExtendMode === "agent" && hasImages && model.startsWith("qwen-image-3.0") ? void 0 : ctx.promptExtendMode;
|
|
7063
|
+
const promptExtend = ctx.enhancePrompt ?? true;
|
|
6946
7064
|
return {
|
|
6947
7065
|
prompt: ctx.prompt,
|
|
6948
7066
|
model,
|
|
6949
7067
|
...hasImages ? { image_urls: ctx.imageUrls } : {},
|
|
6950
7068
|
...ctx.negativePrompt ? { negative_prompt: ctx.negativePrompt } : {},
|
|
6951
|
-
|
|
7069
|
+
// I2I: omit size — the vendor auto-matches the input image's aspect ratio,
|
|
7070
|
+
// and the SDK's ~4MP presets exceed the current I2I ceiling.
|
|
7071
|
+
...hasImages ? {} : { size: (ctx.resolution ?? "2048x2048").replace("x", "*") },
|
|
6952
7072
|
n: ctx.count ?? 1,
|
|
6953
|
-
prompt_extend:
|
|
7073
|
+
prompt_extend: promptExtend,
|
|
6954
7074
|
// Qwen 3.0 family only — prompt-rewrite strategy (direct/agent); 2.x ignores it.
|
|
6955
7075
|
...promptExtendMode ? { prompt_extend_mode: promptExtendMode } : {},
|
|
6956
|
-
// Qwen 3.0 family only — thinking mode
|
|
6957
|
-
...ctx.enableThinking != null ? { enable_thinking: ctx.enableThinking } : {},
|
|
7076
|
+
// Qwen 3.0 family only — thinking mode; the vendor requires prompt_extend=true.
|
|
7077
|
+
...ctx.enableThinking != null && promptExtend ? { enable_thinking: ctx.enableThinking } : {},
|
|
6958
7078
|
watermark: false,
|
|
6959
7079
|
...ctx.seed != null ? { seed: ctx.seed } : {}
|
|
6960
7080
|
};
|
|
6961
7081
|
};
|
|
6962
7082
|
var qwenV1Params = {
|
|
6963
7083
|
...params.prompt({ maxLength: 800 }),
|
|
6964
|
-
...params.negativePrompt(),
|
|
7084
|
+
...params.negativePrompt(void 0, 500),
|
|
6965
7085
|
...params.resolution(QWEN_V1_SIZES, "2048x2048"),
|
|
6966
7086
|
...params.count([1, 2, 4, 6]),
|
|
6967
7087
|
...params.enhancePrompt(true),
|
|
6968
|
-
...params.imageInput(3, "Source Images")
|
|
7088
|
+
...params.imageInput(3, "Source Images"),
|
|
7089
|
+
...params.seed()
|
|
6969
7090
|
};
|
|
6970
7091
|
var qwenV1Params3 = {
|
|
6971
7092
|
...qwenV1Params,
|
|
@@ -6989,7 +7110,6 @@ var { MODELS: MODELS28 } = defineModels("qwen", [
|
|
|
6989
7110
|
features: [feat("Image Input", "input"), feat("1K", "resolution")],
|
|
6990
7111
|
paramConfig: {
|
|
6991
7112
|
...params.prompt(),
|
|
6992
|
-
...params.count(),
|
|
6993
7113
|
...params.imageInput(1, "Source Image")
|
|
6994
7114
|
}
|
|
6995
7115
|
},
|
|
@@ -6997,6 +7117,8 @@ var { MODELS: MODELS28 } = defineModels("qwen", [
|
|
|
6997
7117
|
id: "qwen-image-2",
|
|
6998
7118
|
name: "Qwen 2",
|
|
6999
7119
|
addedAt: "2026-03-27",
|
|
7120
|
+
deprecated: true,
|
|
7121
|
+
// fal marks both endpoints 'no longer supported' — use qwen-image-3.0
|
|
7000
7122
|
workflow: "qwen-image-2/text-to-image",
|
|
7001
7123
|
editWorkflow: "qwen-image-2/edit",
|
|
7002
7124
|
buildPayload: buildQwen2Payload,
|
|
@@ -8171,7 +8293,6 @@ var buildHH11R2VPayload = (ctx) => {
|
|
|
8171
8293
|
};
|
|
8172
8294
|
var HH_AR = ["16:9", "9:16", "1:1", "4:3", "3:4"];
|
|
8173
8295
|
var HH_RES = ["720P", "1080P"];
|
|
8174
|
-
var HH_DURATIONS = [5, 10, 15];
|
|
8175
8296
|
var { MODELS: MODELS33 } = defineModels("happyhorse", [
|
|
8176
8297
|
{
|
|
8177
8298
|
id: "happyhorse-1.0-t2v",
|
|
@@ -8189,13 +8310,15 @@ var { MODELS: MODELS33 } = defineModels("happyhorse", [
|
|
|
8189
8310
|
features: [
|
|
8190
8311
|
feat("Start Frame", "frame"),
|
|
8191
8312
|
feat("1080P", "resolution"),
|
|
8192
|
-
feat("
|
|
8313
|
+
feat("3-15 sec", "duration")
|
|
8193
8314
|
],
|
|
8194
8315
|
paramConfig: {
|
|
8195
8316
|
...params.prompt({ maxLength: 2500 }),
|
|
8317
|
+
...params.seed(),
|
|
8196
8318
|
...params.aspectRatio(HH_AR, "16:9"),
|
|
8197
8319
|
...params.resolution(HH_RES, "720P"),
|
|
8198
|
-
|
|
8320
|
+
// Vendor/worker accept any integer 3-15 (docs: default 5).
|
|
8321
|
+
...params.durationRange(3, 15, 5),
|
|
8199
8322
|
...params.startFrame()
|
|
8200
8323
|
}
|
|
8201
8324
|
},
|
|
@@ -8214,13 +8337,15 @@ var { MODELS: MODELS33 } = defineModels("happyhorse", [
|
|
|
8214
8337
|
features: [
|
|
8215
8338
|
feat("Multi-Image Input", "input"),
|
|
8216
8339
|
feat("1080P", "resolution"),
|
|
8217
|
-
feat("
|
|
8340
|
+
feat("3-15 sec", "duration")
|
|
8218
8341
|
],
|
|
8219
8342
|
paramConfig: {
|
|
8220
8343
|
...params.prompt({ maxLength: 2500 }),
|
|
8344
|
+
...params.seed(),
|
|
8221
8345
|
...params.aspectRatio(HH_AR, "16:9"),
|
|
8222
8346
|
...params.resolution(HH_RES, "720P"),
|
|
8223
|
-
|
|
8347
|
+
// Vendor/worker accept any integer 3-15 (docs: default 5).
|
|
8348
|
+
...params.durationRange(3, 15, 5),
|
|
8224
8349
|
...params.imageInput(9, "Reference Images", true)
|
|
8225
8350
|
}
|
|
8226
8351
|
},
|
|
@@ -8243,6 +8368,7 @@ var { MODELS: MODELS33 } = defineModels("happyhorse", [
|
|
|
8243
8368
|
],
|
|
8244
8369
|
paramConfig: {
|
|
8245
8370
|
...params.prompt({ maxLength: 2500 }),
|
|
8371
|
+
...params.seed(),
|
|
8246
8372
|
...params.resolution(HH_RES, "720P"),
|
|
8247
8373
|
...params.audioSetting(),
|
|
8248
8374
|
...params.videoInput("Source Video"),
|
|
@@ -8265,13 +8391,15 @@ var { MODELS: MODELS33 } = defineModels("happyhorse", [
|
|
|
8265
8391
|
features: [
|
|
8266
8392
|
feat("Start Frame", "frame"),
|
|
8267
8393
|
feat("1080P", "resolution"),
|
|
8268
|
-
feat("
|
|
8394
|
+
feat("3-15 sec", "duration")
|
|
8269
8395
|
],
|
|
8270
8396
|
paramConfig: {
|
|
8271
8397
|
...params.prompt({ maxLength: 2500 }),
|
|
8398
|
+
...params.seed(),
|
|
8272
8399
|
...params.aspectRatio(HH_AR, "16:9"),
|
|
8273
8400
|
...params.resolution(HH_RES, "720P"),
|
|
8274
|
-
|
|
8401
|
+
// Vendor/worker accept any integer 3-15 (docs: default 5).
|
|
8402
|
+
...params.durationRange(3, 15, 5),
|
|
8275
8403
|
...params.startFrame()
|
|
8276
8404
|
}
|
|
8277
8405
|
},
|
|
@@ -8289,13 +8417,15 @@ var { MODELS: MODELS33 } = defineModels("happyhorse", [
|
|
|
8289
8417
|
features: [
|
|
8290
8418
|
feat("Multi-Image Input", "input"),
|
|
8291
8419
|
feat("1080P", "resolution"),
|
|
8292
|
-
feat("
|
|
8420
|
+
feat("3-15 sec", "duration")
|
|
8293
8421
|
],
|
|
8294
8422
|
paramConfig: {
|
|
8295
8423
|
...params.prompt({ maxLength: 2500 }),
|
|
8424
|
+
...params.seed(),
|
|
8296
8425
|
...params.aspectRatio(HH_AR, "16:9"),
|
|
8297
8426
|
...params.resolution(HH_RES, "720P"),
|
|
8298
|
-
|
|
8427
|
+
// Vendor/worker accept any integer 3-15 (docs: default 5).
|
|
8428
|
+
...params.durationRange(3, 15, 5),
|
|
8299
8429
|
...params.imageInput(9, "Reference Images", true)
|
|
8300
8430
|
}
|
|
8301
8431
|
}
|
|
@@ -11098,6 +11228,7 @@ var Minimax02Hd = "minimax-02-hd";
|
|
|
11098
11228
|
var MinimaxH3 = "minimax-h3";
|
|
11099
11229
|
var MinimaxH3Max = "minimax-h3-max";
|
|
11100
11230
|
var MinimaxH3MaxR2v = "minimax-h3-max-r2v";
|
|
11231
|
+
var MinimaxH3MaxTurbo = "minimax-h3-max-turbo";
|
|
11101
11232
|
var MinimaxMusicV2 = "minimax-music-v2";
|
|
11102
11233
|
var MinimaxMusicV3 = "minimax-music-v3";
|
|
11103
11234
|
var MuseImage10 = "muse-image-1.0";
|
|
@@ -11312,6 +11443,7 @@ var Models = {
|
|
|
11312
11443
|
MinimaxH3,
|
|
11313
11444
|
MinimaxH3Max,
|
|
11314
11445
|
MinimaxH3MaxR2v,
|
|
11446
|
+
MinimaxH3MaxTurbo,
|
|
11315
11447
|
MinimaxMusicV2,
|
|
11316
11448
|
MinimaxMusicV3,
|
|
11317
11449
|
MuseImage10,
|