@picsart/ai-sdk 5.27.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 +36 -8
- package/index.js +124 -45
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -297,6 +297,11 @@ type ModelInputById = {
|
|
|
297
297
|
imageUrls?: string[];
|
|
298
298
|
thinking?: "off" | "low" | "medium" | "high";
|
|
299
299
|
};
|
|
300
|
+
"gemini-3.8-flash": {
|
|
301
|
+
prompt: string;
|
|
302
|
+
imageUrls?: string[];
|
|
303
|
+
thinking?: "off" | "low" | "medium" | "high";
|
|
304
|
+
};
|
|
300
305
|
"gemini-omni-1.1-flash-preview": {
|
|
301
306
|
prompt: string;
|
|
302
307
|
aspectRatio?: "16:9" | "9:16";
|
|
@@ -654,6 +659,7 @@ type ModelInputById = {
|
|
|
654
659
|
prompt?: string;
|
|
655
660
|
audioUrl: string;
|
|
656
661
|
imageUrls?: string[];
|
|
662
|
+
aspectRatio?: "auto" | "16:9" | "9:16";
|
|
657
663
|
cfgScale?: number;
|
|
658
664
|
};
|
|
659
665
|
"ltx-pro-t2v": {
|
|
@@ -677,7 +683,8 @@ type ModelInputById = {
|
|
|
677
683
|
};
|
|
678
684
|
"ltx-v2.3-extend": {
|
|
679
685
|
prompt?: string;
|
|
680
|
-
duration?:
|
|
686
|
+
duration?: number;
|
|
687
|
+
mode?: "end" | "start";
|
|
681
688
|
videoUrl: string;
|
|
682
689
|
};
|
|
683
690
|
"ltx-v2.3-fast": {
|
|
@@ -685,20 +692,26 @@ type ModelInputById = {
|
|
|
685
692
|
duration?: 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20;
|
|
686
693
|
resolution?: "1080p" | "1440p" | "2160p";
|
|
687
694
|
aspectRatio?: "16:9" | "9:16";
|
|
695
|
+
fps?: 24 | 25 | 48 | 50;
|
|
688
696
|
generateAudio?: boolean;
|
|
689
697
|
imageUrls?: string[];
|
|
698
|
+
endFrame?: string;
|
|
690
699
|
};
|
|
691
700
|
"ltx-v2.3-pro": {
|
|
692
701
|
prompt: string;
|
|
693
702
|
duration?: 6 | 8 | 10;
|
|
694
703
|
resolution?: "1080p" | "1440p" | "2160p";
|
|
695
704
|
aspectRatio?: "16:9" | "9:16";
|
|
705
|
+
fps?: 24 | 25 | 48 | 50;
|
|
696
706
|
generateAudio?: boolean;
|
|
697
707
|
imageUrls?: string[];
|
|
708
|
+
endFrame?: string;
|
|
698
709
|
};
|
|
699
710
|
"ltx-v2.3-retake": {
|
|
700
711
|
prompt: string;
|
|
701
|
-
duration?:
|
|
712
|
+
duration?: number;
|
|
713
|
+
retakeMode?: "replace_audio_and_video" | "replace_audio" | "replace_video";
|
|
714
|
+
startTime?: number;
|
|
702
715
|
videoUrl: string;
|
|
703
716
|
};
|
|
704
717
|
"luma-ray-2": {
|
|
@@ -785,7 +798,7 @@ type ModelInputById = {
|
|
|
785
798
|
imageUrls?: string[];
|
|
786
799
|
videoUrls?: string[];
|
|
787
800
|
audioUrls?: string[];
|
|
788
|
-
duration?:
|
|
801
|
+
duration?: number;
|
|
789
802
|
aspectRatio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
790
803
|
};
|
|
791
804
|
"minimax-h3-max": {
|
|
@@ -827,7 +840,9 @@ type ModelInputById = {
|
|
|
827
840
|
lyricsPrompt?: string;
|
|
828
841
|
lyricsOptimizer?: boolean;
|
|
829
842
|
isInstrumental?: boolean;
|
|
830
|
-
|
|
843
|
+
sampleRate?: 16000 | 24000 | 32000 | 44100;
|
|
844
|
+
bitrate?: 32000 | 64000 | 128000 | 256000;
|
|
845
|
+
format?: "mp3" | "wav" | "pcm";
|
|
831
846
|
};
|
|
832
847
|
"minimax-music-v3": {
|
|
833
848
|
prompt: string;
|
|
@@ -1178,7 +1193,7 @@ type ModelInputById = {
|
|
|
1178
1193
|
"reve": {
|
|
1179
1194
|
prompt: string;
|
|
1180
1195
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "3:2" | "2:3";
|
|
1181
|
-
count?: 1 | 2 | 4
|
|
1196
|
+
count?: 1 | 2 | 4;
|
|
1182
1197
|
imageUrls?: string[];
|
|
1183
1198
|
};
|
|
1184
1199
|
"runway-aleph2": {
|
|
@@ -1475,7 +1490,7 @@ type ModelInputById = {
|
|
|
1475
1490
|
};
|
|
1476
1491
|
"topaz-upscale-video": {
|
|
1477
1492
|
videoUrl: string;
|
|
1478
|
-
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";
|
|
1479
1494
|
};
|
|
1480
1495
|
"veed-fabric-v1": {
|
|
1481
1496
|
prompt?: string;
|
|
@@ -1614,7 +1629,7 @@ type ModelInputById = {
|
|
|
1614
1629
|
type TypedModelId = keyof ModelInputById;
|
|
1615
1630
|
type ModelInput<M extends TypedModelId> = ModelInputById[M];
|
|
1616
1631
|
/** IDs of text-generation (LLM) models — narrows generateText(). */
|
|
1617
|
-
type TextModelId = "claude-haiku-4-5" | "claude-opus-4-8" | "claude-sonnet-4-6" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gpt-5.5";
|
|
1632
|
+
type TextModelId = "claude-haiku-4-5" | "claude-opus-4-8" | "claude-sonnet-4-6" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-5.5";
|
|
1618
1633
|
type TextModelInputById = Pick<ModelInputById, TextModelId>;
|
|
1619
1634
|
|
|
1620
1635
|
/**
|
|
@@ -2119,10 +2134,18 @@ interface GenerationContext {
|
|
|
2119
2134
|
videoId?: string;
|
|
2120
2135
|
modelId?: string;
|
|
2121
2136
|
removeBackgroundNoise?: boolean;
|
|
2122
|
-
/** MiniMax Music
|
|
2137
|
+
/** MiniMax Music — user lyrics, sent as the worker `lyrics` field. */
|
|
2123
2138
|
lyricsPrompt?: string;
|
|
2124
2139
|
lyricsOptimizer?: boolean;
|
|
2125
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;
|
|
2126
2149
|
language?: string;
|
|
2127
2150
|
accent?: string;
|
|
2128
2151
|
style?: string;
|
|
@@ -2152,6 +2175,10 @@ interface GenerationContext {
|
|
|
2152
2175
|
sourceImageUrl?: string;
|
|
2153
2176
|
similarity?: number;
|
|
2154
2177
|
audioSetting?: 'auto' | 'origin';
|
|
2178
|
+
/** MiniMax Music — audio_setting knobs. */
|
|
2179
|
+
sampleRate?: number;
|
|
2180
|
+
bitrate?: number;
|
|
2181
|
+
format?: string;
|
|
2155
2182
|
returnLastFrame?: boolean;
|
|
2156
2183
|
background?: string;
|
|
2157
2184
|
outputFormat?: string;
|
|
@@ -2597,6 +2624,7 @@ declare const Models: {
|
|
|
2597
2624
|
readonly Gemini35FlashLite: "gemini-3.5-flash-lite";
|
|
2598
2625
|
readonly Gemini36Flash: "gemini-3.6-flash";
|
|
2599
2626
|
readonly Gemini37Flash: "gemini-3.7-flash";
|
|
2627
|
+
readonly Gemini38Flash: "gemini-3.8-flash";
|
|
2600
2628
|
readonly GeminiOmni11FlashPreview: "gemini-omni-1.1-flash-preview";
|
|
2601
2629
|
readonly GeminiOmniFlashPreview: "gemini-omni-flash-preview";
|
|
2602
2630
|
readonly Gpt55: "gpt-5.5";
|
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", [
|
|
@@ -8703,6 +8762,23 @@ var { MODELS: GEMINI_LLM } = defineModels("google", [
|
|
|
8703
8762
|
...thinkingParam(["low", "high"])
|
|
8704
8763
|
}
|
|
8705
8764
|
},
|
|
8765
|
+
{
|
|
8766
|
+
id: "gemini-3.8-flash",
|
|
8767
|
+
name: "Gemini 3.8 Flash",
|
|
8768
|
+
workflow: "chat-completions",
|
|
8769
|
+
addedAt: "2026-09-03",
|
|
8770
|
+
estimatedTime: 5,
|
|
8771
|
+
mode: "text",
|
|
8772
|
+
inputType: "i2t",
|
|
8773
|
+
badge: ["fast"],
|
|
8774
|
+
description: "Latest fast Gemini model \u2014 low-latency multimodal text generation.",
|
|
8775
|
+
features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
|
|
8776
|
+
paramConfig: {
|
|
8777
|
+
...params.prompt(),
|
|
8778
|
+
...params.imageInput(8, "Images"),
|
|
8779
|
+
...thinkingParam(["low", "medium", "high"])
|
|
8780
|
+
}
|
|
8781
|
+
},
|
|
8706
8782
|
{
|
|
8707
8783
|
id: "gemini-3.7-flash",
|
|
8708
8784
|
name: "Gemini 3.7 Flash",
|
|
@@ -8712,7 +8788,7 @@ var { MODELS: GEMINI_LLM } = defineModels("google", [
|
|
|
8712
8788
|
mode: "text",
|
|
8713
8789
|
inputType: "i2t",
|
|
8714
8790
|
badge: ["fast"],
|
|
8715
|
-
description: "
|
|
8791
|
+
description: "Fast Gemini model \u2014 low-latency multimodal text generation.",
|
|
8716
8792
|
features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
|
|
8717
8793
|
paramConfig: {
|
|
8718
8794
|
...params.prompt(),
|
|
@@ -8813,6 +8889,7 @@ registerPayloads(MODELS36, {
|
|
|
8813
8889
|
"gemini-3-pro": buildGeminiPayload("gemini-3-pro-preview"),
|
|
8814
8890
|
// Flash models route through chat-completions (OpenAI-shaped), not the
|
|
8815
8891
|
// native `gemini` workflow. flash-lite has no thinking param → reasoning_effort omitted.
|
|
8892
|
+
"gemini-3.8-flash": buildOpenAiPayload("gemini-3.8-flash"),
|
|
8816
8893
|
"gemini-3.7-flash": buildOpenAiPayload("gemini-3.7-flash"),
|
|
8817
8894
|
"gemini-3.6-flash": buildOpenAiPayload("gemini-3.6-flash"),
|
|
8818
8895
|
"gemini-3.5-flash-lite": buildOpenAiPayload("gemini-3.5-flash-lite")
|
|
@@ -11159,6 +11236,7 @@ var Gemini31FlashLiteImage = "gemini-3.1-flash-lite-image";
|
|
|
11159
11236
|
var Gemini35FlashLite = "gemini-3.5-flash-lite";
|
|
11160
11237
|
var Gemini36Flash = "gemini-3.6-flash";
|
|
11161
11238
|
var Gemini37Flash = "gemini-3.7-flash";
|
|
11239
|
+
var Gemini38Flash = "gemini-3.8-flash";
|
|
11162
11240
|
var GeminiOmni11FlashPreview = "gemini-omni-1.1-flash-preview";
|
|
11163
11241
|
var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
|
|
11164
11242
|
var Gpt55 = "gpt-5.5";
|
|
@@ -11374,6 +11452,7 @@ var Models = {
|
|
|
11374
11452
|
Gemini35FlashLite,
|
|
11375
11453
|
Gemini36Flash,
|
|
11376
11454
|
Gemini37Flash,
|
|
11455
|
+
Gemini38Flash,
|
|
11377
11456
|
GeminiOmni11FlashPreview,
|
|
11378
11457
|
GeminiOmniFlashPreview,
|
|
11379
11458
|
Gpt55,
|