@picsart/ai-sdk 5.2.0 → 5.4.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 +2750 -2083
- package/index.d.ts +10 -0
- package/index.js +49 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -772,6 +772,15 @@ type ModelInputById = {
|
|
|
772
772
|
isInstrumental?: boolean;
|
|
773
773
|
outputFormat?: "url" | "hex";
|
|
774
774
|
};
|
|
775
|
+
"minimax-music-v3": {
|
|
776
|
+
prompt: string;
|
|
777
|
+
lyricsPrompt?: string;
|
|
778
|
+
lyricsOptimizer?: boolean;
|
|
779
|
+
isInstrumental?: boolean;
|
|
780
|
+
sampleRate?: 16000 | 24000 | 32000 | 44100;
|
|
781
|
+
bitrate?: 32000 | 64000 | 128000 | 256000;
|
|
782
|
+
format?: "mp3" | "wav" | "pcm";
|
|
783
|
+
};
|
|
775
784
|
"ovi": {
|
|
776
785
|
prompt: string;
|
|
777
786
|
size?: "9:16" | "16:9" | "1:1" | "9:16+" | "16:9+" | "2:5" | "5:2";
|
|
@@ -2459,6 +2468,7 @@ declare const Models: {
|
|
|
2459
2468
|
readonly Lyria3Pro: "lyria-3-pro";
|
|
2460
2469
|
readonly Minimax02Hd: "minimax-02-hd";
|
|
2461
2470
|
readonly MinimaxMusicV2: "minimax-music-v2";
|
|
2471
|
+
readonly MinimaxMusicV3: "minimax-music-v3";
|
|
2462
2472
|
readonly Ovi: "ovi";
|
|
2463
2473
|
readonly PicsartChangeBg: "picsart-change-bg";
|
|
2464
2474
|
readonly PicsartEnhance: "picsart-enhance";
|
package/index.js
CHANGED
|
@@ -6485,9 +6485,52 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
|
|
|
6485
6485
|
...p.boolean("isInstrumental", false, "Instrumental"),
|
|
6486
6486
|
...p.enum("outputFormat", ["url", "hex"], "url", { label: "Output Format" })
|
|
6487
6487
|
}
|
|
6488
|
+
},
|
|
6489
|
+
{
|
|
6490
|
+
id: "minimax-music-v3",
|
|
6491
|
+
name: "MiniMax Music v3",
|
|
6492
|
+
addedAt: "2026-08-14",
|
|
6493
|
+
workflow: "minimax-music/v3",
|
|
6494
|
+
estimatedTime: 40,
|
|
6495
|
+
mode: "audio",
|
|
6496
|
+
inputType: "music",
|
|
6497
|
+
description: "Text-to-music with vocals or instrumentals from a style prompt and optional lyrics, with configurable audio encoding.",
|
|
6498
|
+
features: [feat("Music", "characteristic"), feat("Vocals", "characteristic")],
|
|
6499
|
+
paramConfig: {
|
|
6500
|
+
...params.prompt({ maxLength: 2e3, placeholder: "Describe the genre, mood, instruments, tempo, and production style..." }),
|
|
6501
|
+
...p.text("lyricsPrompt", {
|
|
6502
|
+
maxLength: 2e3,
|
|
6503
|
+
label: "Lyrics",
|
|
6504
|
+
placeholder: "Write lyrics; \\n separates lines, [Intro]/[Verse]/[Chorus] tags supported. Optional for instrumental or optimizer-generated lyrics."
|
|
6505
|
+
}),
|
|
6506
|
+
...p.boolean("lyricsOptimizer", false, "Lyrics Optimizer"),
|
|
6507
|
+
...p.boolean("isInstrumental", false, "Instrumental"),
|
|
6508
|
+
...p.enum("sampleRate", [16e3, 24e3, 32e3, 44100], 44100, { label: "Sample Rate" }),
|
|
6509
|
+
...p.enum("bitrate", [32e3, 64e3, 128e3, 256e3], 256e3, { label: "Bitrate" }),
|
|
6510
|
+
...p.enum("format", ["mp3", "wav", "pcm"], "mp3", { label: "Format" })
|
|
6511
|
+
}
|
|
6488
6512
|
}
|
|
6489
6513
|
]);
|
|
6490
6514
|
|
|
6515
|
+
// src/vendors/catalog/minimax.payloads.ts
|
|
6516
|
+
var buildMinimaxMusicV3Payload = (input) => ({
|
|
6517
|
+
prompt: input.prompt,
|
|
6518
|
+
...input.lyricsPrompt ? { lyrics: input.lyricsPrompt } : {},
|
|
6519
|
+
lyrics_optimizer: input.lyricsOptimizer ?? false,
|
|
6520
|
+
is_instrumental: input.isInstrumental ?? false,
|
|
6521
|
+
// Apply the paramConfig defaults explicitly — a custom builder (unlike the
|
|
6522
|
+
// pass-through one) doesn't get them for free, and the advertised defaults
|
|
6523
|
+
// must reach the wire instead of whatever the backend would pick.
|
|
6524
|
+
audio_setting: {
|
|
6525
|
+
sample_rate: input.sampleRate ?? 44100,
|
|
6526
|
+
bitrate: input.bitrate ?? 256e3,
|
|
6527
|
+
format: input.format ?? "mp3"
|
|
6528
|
+
}
|
|
6529
|
+
});
|
|
6530
|
+
registerPayloads(MODELS26, {
|
|
6531
|
+
"minimax-music-v3": buildMinimaxMusicV3Payload
|
|
6532
|
+
});
|
|
6533
|
+
|
|
6491
6534
|
// src/vendors/catalog/ideogram.ts
|
|
6492
6535
|
var toIdeogramAr = (ar) => ar.replace(":", "x");
|
|
6493
6536
|
var buildIdeogramGeneratePayload = (ctx) => ({
|
|
@@ -8803,6 +8846,9 @@ function parseTextResult(completed, model) {
|
|
|
8803
8846
|
return { text, model: model.id, handle: completed.handle, raw: completed.raw ?? completed.result };
|
|
8804
8847
|
}
|
|
8805
8848
|
|
|
8849
|
+
// src/core/limits.ts
|
|
8850
|
+
var MAX_DRIVE_PROMPT_LENGTH = 18e3;
|
|
8851
|
+
|
|
8806
8852
|
// src/client/drive.ts
|
|
8807
8853
|
var USER_REACTION_ATTR = "userReaction";
|
|
8808
8854
|
function inferResourceType(mode) {
|
|
@@ -8866,7 +8912,7 @@ function parseJsonAttr(raw) {
|
|
|
8866
8912
|
var asString = (v) => typeof v === "string" && v.trim() ? v : void 0;
|
|
8867
8913
|
var asStringArray = (v) => Array.isArray(v) && v.length && v.every((x) => typeof x === "string") ? v : void 0;
|
|
8868
8914
|
function toSdkPayload(params2) {
|
|
8869
|
-
const p2 = { prompt: String(params2.prompt ?? "") };
|
|
8915
|
+
const p2 = { prompt: String(params2.prompt ?? "").slice(0, MAX_DRIVE_PROMPT_LENGTH) };
|
|
8870
8916
|
for (const [key, value] of Object.entries(params2)) {
|
|
8871
8917
|
if (key === "prompt") continue;
|
|
8872
8918
|
if (value === void 0 || value === null || value === "") continue;
|
|
@@ -10569,6 +10615,7 @@ var Lyria3Clip = "lyria-3-clip";
|
|
|
10569
10615
|
var Lyria3Pro = "lyria-3-pro";
|
|
10570
10616
|
var Minimax02Hd = "minimax-02-hd";
|
|
10571
10617
|
var MinimaxMusicV2 = "minimax-music-v2";
|
|
10618
|
+
var MinimaxMusicV3 = "minimax-music-v3";
|
|
10572
10619
|
var Ovi = "ovi";
|
|
10573
10620
|
var PicsartChangeBg = "picsart-change-bg";
|
|
10574
10621
|
var PicsartEnhance = "picsart-enhance";
|
|
@@ -10771,6 +10818,7 @@ var Models = {
|
|
|
10771
10818
|
Lyria3Pro,
|
|
10772
10819
|
Minimax02Hd,
|
|
10773
10820
|
MinimaxMusicV2,
|
|
10821
|
+
MinimaxMusicV3,
|
|
10774
10822
|
Ovi,
|
|
10775
10823
|
PicsartChangeBg,
|
|
10776
10824
|
PicsartEnhance,
|