@picsart/ai-sdk 5.28.0 → 5.28.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 +29 -7
- package/index.js +103 -44
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -659,6 +659,7 @@ type ModelInputById = {
|
|
|
659
659
|
prompt?: string;
|
|
660
660
|
audioUrl: string;
|
|
661
661
|
imageUrls?: string[];
|
|
662
|
+
aspectRatio?: "auto" | "16:9" | "9:16";
|
|
662
663
|
cfgScale?: number;
|
|
663
664
|
};
|
|
664
665
|
"ltx-pro-t2v": {
|
|
@@ -682,7 +683,8 @@ type ModelInputById = {
|
|
|
682
683
|
};
|
|
683
684
|
"ltx-v2.3-extend": {
|
|
684
685
|
prompt?: string;
|
|
685
|
-
duration?:
|
|
686
|
+
duration?: number;
|
|
687
|
+
mode?: "end" | "start";
|
|
686
688
|
videoUrl: string;
|
|
687
689
|
};
|
|
688
690
|
"ltx-v2.3-fast": {
|
|
@@ -690,20 +692,26 @@ type ModelInputById = {
|
|
|
690
692
|
duration?: 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20;
|
|
691
693
|
resolution?: "1080p" | "1440p" | "2160p";
|
|
692
694
|
aspectRatio?: "16:9" | "9:16";
|
|
695
|
+
fps?: 24 | 25 | 48 | 50;
|
|
693
696
|
generateAudio?: boolean;
|
|
694
697
|
imageUrls?: string[];
|
|
698
|
+
endFrame?: string;
|
|
695
699
|
};
|
|
696
700
|
"ltx-v2.3-pro": {
|
|
697
701
|
prompt: string;
|
|
698
702
|
duration?: 6 | 8 | 10;
|
|
699
703
|
resolution?: "1080p" | "1440p" | "2160p";
|
|
700
704
|
aspectRatio?: "16:9" | "9:16";
|
|
705
|
+
fps?: 24 | 25 | 48 | 50;
|
|
701
706
|
generateAudio?: boolean;
|
|
702
707
|
imageUrls?: string[];
|
|
708
|
+
endFrame?: string;
|
|
703
709
|
};
|
|
704
710
|
"ltx-v2.3-retake": {
|
|
705
711
|
prompt: string;
|
|
706
|
-
duration?:
|
|
712
|
+
duration?: number;
|
|
713
|
+
retakeMode?: "replace_audio_and_video" | "replace_audio" | "replace_video";
|
|
714
|
+
startTime?: number;
|
|
707
715
|
videoUrl: string;
|
|
708
716
|
};
|
|
709
717
|
"luma-ray-2": {
|
|
@@ -790,7 +798,7 @@ type ModelInputById = {
|
|
|
790
798
|
imageUrls?: string[];
|
|
791
799
|
videoUrls?: string[];
|
|
792
800
|
audioUrls?: string[];
|
|
793
|
-
duration?:
|
|
801
|
+
duration?: number;
|
|
794
802
|
aspectRatio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
795
803
|
};
|
|
796
804
|
"minimax-h3-max": {
|
|
@@ -832,7 +840,9 @@ type ModelInputById = {
|
|
|
832
840
|
lyricsPrompt?: string;
|
|
833
841
|
lyricsOptimizer?: boolean;
|
|
834
842
|
isInstrumental?: boolean;
|
|
835
|
-
|
|
843
|
+
sampleRate?: 16000 | 24000 | 32000 | 44100;
|
|
844
|
+
bitrate?: 32000 | 64000 | 128000 | 256000;
|
|
845
|
+
format?: "mp3" | "wav" | "pcm";
|
|
836
846
|
};
|
|
837
847
|
"minimax-music-v3": {
|
|
838
848
|
prompt: string;
|
|
@@ -1183,7 +1193,7 @@ type ModelInputById = {
|
|
|
1183
1193
|
"reve": {
|
|
1184
1194
|
prompt: string;
|
|
1185
1195
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "3:2" | "2:3";
|
|
1186
|
-
count?: 1 | 2 | 4
|
|
1196
|
+
count?: 1 | 2 | 4;
|
|
1187
1197
|
imageUrls?: string[];
|
|
1188
1198
|
};
|
|
1189
1199
|
"runway-aleph2": {
|
|
@@ -1480,7 +1490,7 @@ type ModelInputById = {
|
|
|
1480
1490
|
};
|
|
1481
1491
|
"topaz-upscale-video": {
|
|
1482
1492
|
videoUrl: string;
|
|
1483
|
-
model?: "Proteus" | "Artemis HQ" | "Artemis MQ" | "Artemis LQ" | "Nyx" | "Nyx Fast" | "Nyx XL" | "Nyx HF" | "Gaia HQ" | "Gaia CG" | "Gaia 2" | "Starlight Precise
|
|
1493
|
+
model?: "Proteus" | "Artemis HQ" | "Artemis MQ" | "Artemis LQ" | "Nyx" | "Nyx Fast" | "Nyx XL" | "Nyx HF" | "Gaia HQ" | "Gaia CG" | "Gaia 2" | "Starlight Precise 2.5" | "Starlight HQ" | "Starlight Mini" | "Starlight Sharp" | "Starlight Fast 2";
|
|
1484
1494
|
};
|
|
1485
1495
|
"veed-fabric-v1": {
|
|
1486
1496
|
prompt?: string;
|
|
@@ -2124,10 +2134,18 @@ interface GenerationContext {
|
|
|
2124
2134
|
videoId?: string;
|
|
2125
2135
|
modelId?: string;
|
|
2126
2136
|
removeBackgroundNoise?: boolean;
|
|
2127
|
-
/** MiniMax Music
|
|
2137
|
+
/** MiniMax Music — user lyrics, sent as the worker `lyrics` field. */
|
|
2128
2138
|
lyricsPrompt?: string;
|
|
2129
2139
|
lyricsOptimizer?: boolean;
|
|
2130
2140
|
isInstrumental?: boolean;
|
|
2141
|
+
/** LTX 2.3 — output frame rate (24/25/48/50; >10s Fast videos require 25). */
|
|
2142
|
+
fps?: number;
|
|
2143
|
+
/** LTX 2.3 Extend — direction: 'end' extends forward, 'start' backward. */
|
|
2144
|
+
mode?: string;
|
|
2145
|
+
/** LTX 2.3 Retake — which tracks to regenerate. */
|
|
2146
|
+
retakeMode?: string;
|
|
2147
|
+
/** LTX 2.3 Retake — segment start offset in seconds. */
|
|
2148
|
+
startTime?: number;
|
|
2131
2149
|
language?: string;
|
|
2132
2150
|
accent?: string;
|
|
2133
2151
|
style?: string;
|
|
@@ -2157,6 +2175,10 @@ interface GenerationContext {
|
|
|
2157
2175
|
sourceImageUrl?: string;
|
|
2158
2176
|
similarity?: number;
|
|
2159
2177
|
audioSetting?: 'auto' | 'origin';
|
|
2178
|
+
/** MiniMax Music — audio_setting knobs. */
|
|
2179
|
+
sampleRate?: number;
|
|
2180
|
+
bitrate?: number;
|
|
2181
|
+
format?: string;
|
|
2160
2182
|
returnLastFrame?: boolean;
|
|
2161
2183
|
background?: string;
|
|
2162
2184
|
outputFormat?: string;
|
package/index.js
CHANGED
|
@@ -2292,6 +2292,15 @@ var PRO_DURATIONS = [6, 8, 10];
|
|
|
2292
2292
|
var FAST_DURATIONS = [6, 8, 10, 12, 14, 16, 18, 20];
|
|
2293
2293
|
var LTX_RESOLUTIONS = ["1080p", "1440p", "2160p"];
|
|
2294
2294
|
var LTX_23_AR = ["16:9", "9:16"];
|
|
2295
|
+
var LTX_23_FPS = [24, 25, 48, 50];
|
|
2296
|
+
var FAST_LONG = "Videos longer than 10s render at 1080p / 25 fps.";
|
|
2297
|
+
var ltxFastLongConstraints = [12, 14, 16, 18, 20].map((d) => ({
|
|
2298
|
+
when: { duration: { is: d } },
|
|
2299
|
+
then: {
|
|
2300
|
+
resolution: { allowed: ["1080p"], reason: FAST_LONG },
|
|
2301
|
+
fps: { allowed: [25], reason: FAST_LONG }
|
|
2302
|
+
}
|
|
2303
|
+
}));
|
|
2295
2304
|
var buildLtxT2VPayload = (ctx) => ({
|
|
2296
2305
|
prompt: ctx.prompt,
|
|
2297
2306
|
...ctx.imageUrls?.[0] ? { image_url: ctx.imageUrls[0] } : {},
|
|
@@ -2318,34 +2327,48 @@ var buildLtx23T2VPayload = (ctx) => ({
|
|
|
2318
2327
|
...ctx.duration != null ? { duration: ctx.duration } : {},
|
|
2319
2328
|
...ctx.resolution ? { resolution: ctx.resolution } : {},
|
|
2320
2329
|
...ctx.aspectRatio ? { aspect_ratio: ctx.aspectRatio } : {},
|
|
2330
|
+
...ctx.fps != null ? { fps: ctx.fps } : {},
|
|
2321
2331
|
generate_audio: ctx.generateAudio ?? true
|
|
2322
2332
|
});
|
|
2323
2333
|
var buildLtx23I2VPayload = (ctx) => ({
|
|
2324
2334
|
prompt: ctx.prompt,
|
|
2325
2335
|
image_url: ctx.imageUrls?.[0],
|
|
2336
|
+
...ctx.endFrame ? { end_image_url: ctx.endFrame } : {},
|
|
2326
2337
|
...ctx.duration != null ? { duration: ctx.duration } : {},
|
|
2327
2338
|
...ctx.resolution ? { resolution: ctx.resolution } : {},
|
|
2328
2339
|
...ctx.aspectRatio ? { aspect_ratio: ctx.aspectRatio } : {},
|
|
2340
|
+
...ctx.fps != null ? { fps: ctx.fps } : {},
|
|
2329
2341
|
generate_audio: ctx.generateAudio ?? true
|
|
2330
2342
|
});
|
|
2331
2343
|
var buildLtx23FastPayload = buildLtx23T2VPayload;
|
|
2332
|
-
var buildLtx23A2VPayload = (ctx) =>
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
});
|
|
2344
|
+
var buildLtx23A2VPayload = (ctx) => {
|
|
2345
|
+
if (!ctx.prompt && !ctx.imageUrls?.[0]) {
|
|
2346
|
+
throw new ApiError("LTX 2.3 Audio-to-Video: provide a prompt or a first-frame image.", {
|
|
2347
|
+
status: 400,
|
|
2348
|
+
code: "validation_error"
|
|
2349
|
+
});
|
|
2350
|
+
}
|
|
2351
|
+
return {
|
|
2352
|
+
audio_url: ctx.audioUrl,
|
|
2353
|
+
...ctx.prompt ? { prompt: ctx.prompt } : {},
|
|
2354
|
+
...ctx.imageUrls?.[0] ? { image_url: ctx.imageUrls[0] } : {},
|
|
2355
|
+
...ctx.aspectRatio ? { aspect_ratio: ctx.aspectRatio } : {},
|
|
2356
|
+
// No client default: the vendor picks 5 (with image) / 9 (without) contextually.
|
|
2357
|
+
...ctx.cfgScale != null ? { guidance_scale: ctx.cfgScale } : {}
|
|
2358
|
+
};
|
|
2359
|
+
};
|
|
2338
2360
|
var buildLtx23ExtendPayload = (ctx) => ({
|
|
2339
2361
|
video_url: ctx.videoUrl,
|
|
2340
2362
|
...ctx.prompt ? { prompt: ctx.prompt } : {},
|
|
2341
2363
|
...ctx.duration != null ? { duration: ctx.duration } : {},
|
|
2342
|
-
mode: "end"
|
|
2364
|
+
mode: ctx.mode ?? "end"
|
|
2343
2365
|
});
|
|
2344
2366
|
var buildLtx23RetakePayload = (ctx) => ({
|
|
2345
2367
|
prompt: ctx.prompt,
|
|
2346
2368
|
video_url: ctx.videoUrl,
|
|
2347
2369
|
...ctx.duration != null ? { duration: ctx.duration } : {},
|
|
2348
|
-
retake_mode: "replace_audio_and_video"
|
|
2370
|
+
retake_mode: ctx.retakeMode ?? "replace_audio_and_video",
|
|
2371
|
+
...ctx.startTime != null ? { start_time: ctx.startTime } : {}
|
|
2349
2372
|
});
|
|
2350
2373
|
var { MODELS: MODELS2 } = defineModels("ltx", [
|
|
2351
2374
|
// ── LTX 2.0 ──────────────────────────────────────────────────────
|
|
@@ -2437,9 +2460,17 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
|
|
|
2437
2460
|
...params.duration(PRO_DURATIONS, 6),
|
|
2438
2461
|
...params.resolution([...LTX_RESOLUTIONS]),
|
|
2439
2462
|
...params.aspectRatio(LTX_23_AR),
|
|
2463
|
+
...p.enum("fps", LTX_23_FPS, 25, { label: "FPS" }),
|
|
2440
2464
|
...params.generateAudio(),
|
|
2441
|
-
...params.imageInput()
|
|
2442
|
-
|
|
2465
|
+
...params.imageInput(),
|
|
2466
|
+
...params.endFrame()
|
|
2467
|
+
},
|
|
2468
|
+
constraints: [
|
|
2469
|
+
// end_image_url exists only on the I2V route, which a start image triggers.
|
|
2470
|
+
{ when: { imageUrls: { exists: false } }, then: {
|
|
2471
|
+
endFrame: { disabled: true, reason: "An end frame requires a start image." }
|
|
2472
|
+
} }
|
|
2473
|
+
]
|
|
2443
2474
|
},
|
|
2444
2475
|
{
|
|
2445
2476
|
id: "ltx-v2.3-fast",
|
|
@@ -2460,9 +2491,18 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
|
|
|
2460
2491
|
...params.duration(FAST_DURATIONS, 6),
|
|
2461
2492
|
...params.resolution([...LTX_RESOLUTIONS]),
|
|
2462
2493
|
...params.aspectRatio(LTX_23_AR),
|
|
2494
|
+
...p.enum("fps", LTX_23_FPS, 25, { label: "FPS" }),
|
|
2463
2495
|
...params.generateAudio(),
|
|
2464
|
-
...params.imageInput()
|
|
2465
|
-
|
|
2496
|
+
...params.imageInput(),
|
|
2497
|
+
...params.endFrame()
|
|
2498
|
+
},
|
|
2499
|
+
constraints: [
|
|
2500
|
+
...ltxFastLongConstraints,
|
|
2501
|
+
// end_image_url exists only on the I2V route, which a start image triggers.
|
|
2502
|
+
{ when: { imageUrls: { exists: false } }, then: {
|
|
2503
|
+
endFrame: { disabled: true, reason: "An end frame requires a start image." }
|
|
2504
|
+
} }
|
|
2505
|
+
]
|
|
2466
2506
|
},
|
|
2467
2507
|
{
|
|
2468
2508
|
id: "ltx-2.3-a2v",
|
|
@@ -2480,7 +2520,13 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
|
|
|
2480
2520
|
...params.prompt({ required: false }),
|
|
2481
2521
|
...params.audioInput("Audio Track", true),
|
|
2482
2522
|
...params.imageInput(1, "First Frame Image", false),
|
|
2483
|
-
...params.
|
|
2523
|
+
...params.aspectRatio(["auto", ...LTX_23_AR]),
|
|
2524
|
+
// Default-less on purpose: the vendor default is contextual (5 with an
|
|
2525
|
+
// image, 9 without), so the SDK only sends a user-chosen value.
|
|
2526
|
+
cfgScale: {
|
|
2527
|
+
label: "CFG Scale",
|
|
2528
|
+
descriptor: { kind: "range", min: 1, max: 50, step: 1 }
|
|
2529
|
+
}
|
|
2484
2530
|
}
|
|
2485
2531
|
},
|
|
2486
2532
|
{
|
|
@@ -2496,7 +2542,8 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
|
|
|
2496
2542
|
features: [feat("Video Input", "input"), feat("Up to 20s", "duration")],
|
|
2497
2543
|
paramConfig: {
|
|
2498
2544
|
...params.prompt({ required: false }),
|
|
2499
|
-
...params.
|
|
2545
|
+
...params.durationRange(2, 20, 5, 1),
|
|
2546
|
+
...p.enum("mode", ["end", "start"], "end", { label: "Extend Direction" }),
|
|
2500
2547
|
...params.videoInput("Source Video")
|
|
2501
2548
|
}
|
|
2502
2549
|
},
|
|
@@ -2513,7 +2560,13 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
|
|
|
2513
2560
|
features: [feat("Video Input", "input"), feat("Up to 20s", "duration")],
|
|
2514
2561
|
paramConfig: {
|
|
2515
2562
|
...params.prompt(),
|
|
2516
|
-
...params.
|
|
2563
|
+
...params.durationRange(2, 20, 5, 1),
|
|
2564
|
+
...p.enum("retakeMode", ["replace_audio_and_video", "replace_audio", "replace_video"], "replace_audio_and_video", { label: "Retake Mode" }),
|
|
2565
|
+
// Default-less: when unset the retake starts at 0 (vendor default).
|
|
2566
|
+
startTime: {
|
|
2567
|
+
label: "Start Time (s)",
|
|
2568
|
+
descriptor: { kind: "range", min: 0, max: 20, step: 1 }
|
|
2569
|
+
},
|
|
2517
2570
|
...params.videoInput("Source Video")
|
|
2518
2571
|
}
|
|
2519
2572
|
}
|
|
@@ -2827,13 +2880,13 @@ var { MODELS: MODELS8 } = defineModels("hunyuan", [
|
|
|
2827
2880
|
var buildT2V = (withDuration) => (ctx) => ({
|
|
2828
2881
|
prompt: ctx.prompt,
|
|
2829
2882
|
...ctx.enhancePrompt !== void 0 ? { prompt_optimizer: ctx.enhancePrompt } : {},
|
|
2830
|
-
...withDuration && ctx.duration ? { duration:
|
|
2883
|
+
...withDuration && ctx.duration ? { duration: ctx.duration } : {}
|
|
2831
2884
|
});
|
|
2832
2885
|
var buildI2V = (withDuration) => (ctx) => ({
|
|
2833
2886
|
prompt: ctx.prompt,
|
|
2834
2887
|
image_url: ctx.imageUrls?.[0],
|
|
2835
2888
|
...ctx.enhancePrompt !== void 0 ? { prompt_optimizer: ctx.enhancePrompt } : {},
|
|
2836
|
-
...withDuration && ctx.duration ? { duration:
|
|
2889
|
+
...withDuration && ctx.duration ? { duration: ctx.duration } : {}
|
|
2837
2890
|
});
|
|
2838
2891
|
var buildMinimaxH3 = (ctx) => {
|
|
2839
2892
|
const content = [{ type: "text", text: ctx.prompt }];
|
|
@@ -2846,7 +2899,7 @@ var buildMinimaxH3 = (ctx) => {
|
|
|
2846
2899
|
model: "MiniMax-H3",
|
|
2847
2900
|
content,
|
|
2848
2901
|
resolution: "2K",
|
|
2849
|
-
|
|
2902
|
+
duration: ctx.duration ?? 5,
|
|
2850
2903
|
...ctx.aspectRatio ? { ratio: ctx.aspectRatio } : {}
|
|
2851
2904
|
};
|
|
2852
2905
|
};
|
|
@@ -2902,10 +2955,10 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
|
|
|
2902
2955
|
buildPayload: buildT2V(true),
|
|
2903
2956
|
buildEditPayload: buildI2V(true),
|
|
2904
2957
|
estimatedTime: 150,
|
|
2905
|
-
description: "Stylized
|
|
2906
|
-
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("
|
|
2958
|
+
description: "Stylized 768p animation with strong character expression and emotion.",
|
|
2959
|
+
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("768p", "resolution"), feat("10 sec", "duration")],
|
|
2907
2960
|
paramConfig: {
|
|
2908
|
-
...params.prompt(),
|
|
2961
|
+
...params.prompt({ maxLength: 2e3 }),
|
|
2909
2962
|
...params.enhancePrompt(),
|
|
2910
2963
|
...params.duration([6, 10]),
|
|
2911
2964
|
...params.imageInput()
|
|
@@ -2926,7 +2979,7 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
|
|
|
2926
2979
|
description: "1080p output focused on detailed scenes and polished short-form content.",
|
|
2927
2980
|
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("1080p", "resolution"), feat("6 sec", "duration")],
|
|
2928
2981
|
paramConfig: {
|
|
2929
|
-
...params.prompt(),
|
|
2982
|
+
...params.prompt({ maxLength: 2e3 }),
|
|
2930
2983
|
...params.enhancePrompt(),
|
|
2931
2984
|
...params.imageInput()
|
|
2932
2985
|
}
|
|
@@ -2941,10 +2994,10 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
|
|
|
2941
2994
|
workflow: "minimax/hailuo-2.3-fast/standard/image-to-video",
|
|
2942
2995
|
buildPayload: buildI2V(true),
|
|
2943
2996
|
estimatedTime: 173,
|
|
2944
|
-
description: "Quick
|
|
2945
|
-
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("
|
|
2997
|
+
description: "Quick 768p previews with expressive characters for rapid experimentation.",
|
|
2998
|
+
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("768p", "resolution"), feat("10 sec", "duration")],
|
|
2946
2999
|
paramConfig: {
|
|
2947
|
-
...params.prompt(),
|
|
3000
|
+
...params.prompt({ maxLength: 2e3 }),
|
|
2948
3001
|
...params.enhancePrompt(),
|
|
2949
3002
|
...params.duration([6, 10]),
|
|
2950
3003
|
...params.imageInput(1, "Start Image", true)
|
|
@@ -2963,7 +3016,7 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
|
|
|
2963
3016
|
description: "Fast 1080p output for short, polished clips with varied styles.",
|
|
2964
3017
|
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("1080p", "resolution"), feat("6 sec", "duration")],
|
|
2965
3018
|
paramConfig: {
|
|
2966
|
-
...params.prompt(),
|
|
3019
|
+
...params.prompt({ maxLength: 2e3 }),
|
|
2967
3020
|
...params.enhancePrompt(),
|
|
2968
3021
|
...params.imageInput(1, "Start Image", true)
|
|
2969
3022
|
}
|
|
@@ -2987,13 +3040,13 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
|
|
|
2987
3040
|
feat("15 sec", "duration")
|
|
2988
3041
|
],
|
|
2989
3042
|
paramConfig: {
|
|
2990
|
-
...params.prompt(),
|
|
3043
|
+
...params.prompt({ maxLength: 7e3 }),
|
|
2991
3044
|
...params.startFrame(),
|
|
2992
3045
|
...params.endFrame(),
|
|
2993
|
-
...params.imageInput(
|
|
2994
|
-
...params.videoInputs(
|
|
2995
|
-
...params.audioInputs(
|
|
2996
|
-
...params.
|
|
3046
|
+
...params.imageInput(9, "Reference Images", false),
|
|
3047
|
+
...params.videoInputs(3, "Reference Videos", false),
|
|
3048
|
+
...params.audioInputs(3, "Reference Audios", false),
|
|
3049
|
+
...params.durationRange(5, 15, 5),
|
|
2997
3050
|
...p.aspectRatio(["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "adaptive")
|
|
2998
3051
|
},
|
|
2999
3052
|
constraints: minimaxH3Constraints
|
|
@@ -4790,7 +4843,7 @@ var buildRevePayload = (ctx) => {
|
|
|
4790
4843
|
return {
|
|
4791
4844
|
prompt: ctx.prompt,
|
|
4792
4845
|
num_images: ctx.count ?? 1,
|
|
4793
|
-
...ctx.aspectRatio ? { aspect_ratio: ctx.aspectRatio } : {},
|
|
4846
|
+
...ctx.aspectRatio && !hasImages ? { aspect_ratio: ctx.aspectRatio } : {},
|
|
4794
4847
|
...hasImages ? { image_url: ctx.imageUrls[0] } : {}
|
|
4795
4848
|
};
|
|
4796
4849
|
};
|
|
@@ -4808,9 +4861,10 @@ var { MODELS: MODELS16 } = defineModels("reve", [
|
|
|
4808
4861
|
description: "Stylized 1K images with optional reference input.",
|
|
4809
4862
|
features: [feat("Image Input", "input"), feat("1K", "resolution")],
|
|
4810
4863
|
paramConfig: {
|
|
4811
|
-
|
|
4864
|
+
// fal enforces prompt <= 2560 chars and num_images <= 4 on both routes.
|
|
4865
|
+
...params.prompt({ maxLength: 2560 }),
|
|
4812
4866
|
...params.aspectRatio(REVE_AR),
|
|
4813
|
-
...params.count(),
|
|
4867
|
+
...params.count([1, 2, 4]),
|
|
4814
4868
|
...params.imageInput(1, "Source Image")
|
|
4815
4869
|
}
|
|
4816
4870
|
}
|
|
@@ -6545,10 +6599,14 @@ var buildMinimaxTTSPayload = (ctx) => ({
|
|
|
6545
6599
|
});
|
|
6546
6600
|
var buildMinimaxMusicPayload = (ctx) => ({
|
|
6547
6601
|
prompt: ctx.prompt,
|
|
6548
|
-
|
|
6602
|
+
...ctx.lyricsPrompt ? { lyrics: ctx.lyricsPrompt } : {},
|
|
6549
6603
|
...ctx.lyricsOptimizer != null ? { lyrics_optimizer: ctx.lyricsOptimizer } : {},
|
|
6550
6604
|
...ctx.isInstrumental != null ? { is_instrumental: ctx.isInstrumental } : {},
|
|
6551
|
-
|
|
6605
|
+
audio_setting: {
|
|
6606
|
+
sample_rate: ctx.sampleRate ?? 44100,
|
|
6607
|
+
bitrate: ctx.bitrate ?? 256e3,
|
|
6608
|
+
format: ctx.format ?? "mp3"
|
|
6609
|
+
}
|
|
6552
6610
|
});
|
|
6553
6611
|
var { MODELS: MODELS26 } = defineModels("minimax", [
|
|
6554
6612
|
{
|
|
@@ -6584,13 +6642,15 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
|
|
|
6584
6642
|
paramConfig: {
|
|
6585
6643
|
...params.prompt({ maxLength: 2e3, placeholder: "Describe the genre, mood, instruments, tempo, and production style..." }),
|
|
6586
6644
|
...p.text("lyricsPrompt", {
|
|
6587
|
-
maxLength:
|
|
6588
|
-
label: "Lyrics
|
|
6589
|
-
placeholder: "Write lyrics, or describe the lyrical theme.
|
|
6645
|
+
maxLength: 3500,
|
|
6646
|
+
label: "Lyrics",
|
|
6647
|
+
placeholder: "Write lyrics, or describe the lyrical theme. Optional for instrumental or optimizer-generated lyrics."
|
|
6590
6648
|
}),
|
|
6591
6649
|
...p.boolean("lyricsOptimizer", false, "Lyrics Optimizer"),
|
|
6592
6650
|
...p.boolean("isInstrumental", false, "Instrumental"),
|
|
6593
|
-
...p.enum("
|
|
6651
|
+
...p.enum("sampleRate", [16e3, 24e3, 32e3, 44100], 44100, { label: "Sample Rate" }),
|
|
6652
|
+
...p.enum("bitrate", [32e3, 64e3, 128e3, 256e3], 256e3, { label: "Bitrate" }),
|
|
6653
|
+
...p.enum("format", ["mp3", "wav", "pcm"], "mp3", { label: "Format" })
|
|
6594
6654
|
}
|
|
6595
6655
|
},
|
|
6596
6656
|
{
|
|
@@ -6606,7 +6666,7 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
|
|
|
6606
6666
|
paramConfig: {
|
|
6607
6667
|
...params.prompt({ maxLength: 2e3, placeholder: "Describe the genre, mood, instruments, tempo, and production style..." }),
|
|
6608
6668
|
...p.text("lyricsPrompt", {
|
|
6609
|
-
maxLength:
|
|
6669
|
+
maxLength: 3500,
|
|
6610
6670
|
label: "Lyrics",
|
|
6611
6671
|
placeholder: "Write lyrics; \\n separates lines, [Intro]/[Verse]/[Chorus] tags supported. Optional for instrumental or optimizer-generated lyrics."
|
|
6612
6672
|
}),
|
|
@@ -7795,13 +7855,12 @@ var TOPAZ_VIDEO_MODEL_OPTIONS = [
|
|
|
7795
7855
|
"Gaia HQ",
|
|
7796
7856
|
"Gaia CG",
|
|
7797
7857
|
"Gaia 2",
|
|
7798
|
-
|
|
7799
|
-
|
|
7858
|
+
// 'Starlight Precise 1' / 'Starlight Precise 2' / 'Starlight Fast 1' removed:
|
|
7859
|
+
// deprecated upstream (developer.topazlabs.com) — Precise 2.5 / Fast 2 succeed them.
|
|
7800
7860
|
"Starlight Precise 2.5",
|
|
7801
7861
|
"Starlight HQ",
|
|
7802
7862
|
"Starlight Mini",
|
|
7803
7863
|
"Starlight Sharp",
|
|
7804
|
-
"Starlight Fast 1",
|
|
7805
7864
|
"Starlight Fast 2"
|
|
7806
7865
|
];
|
|
7807
7866
|
var { MODELS: MODELS30 } = defineModels("topaz", [
|