@picsart/ai-sdk 6.42.0 → 6.43.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/index.d.ts +33 -1
- package/index.js +127 -9
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1297,6 +1297,35 @@ type ModelInputById = {
|
|
|
1297
1297
|
bitrate?: 32000 | 64000 | 128000 | 256000;
|
|
1298
1298
|
format?: "mp3" | "wav" | "pcm";
|
|
1299
1299
|
};
|
|
1300
|
+
"mirelo-sfx-2.0-text-to-audio": {
|
|
1301
|
+
prompt: string;
|
|
1302
|
+
negativePrompt?: string;
|
|
1303
|
+
duration?: number;
|
|
1304
|
+
count?: 1 | 2 | 3 | 4;
|
|
1305
|
+
format?: "wav" | "mp3" | "aac" | "flac";
|
|
1306
|
+
bitrateKbps?: number;
|
|
1307
|
+
seed?: number;
|
|
1308
|
+
};
|
|
1309
|
+
"mirelo-sfx-2.0-video-to-audio": {
|
|
1310
|
+
videoUrl: string;
|
|
1311
|
+
prompt?: string;
|
|
1312
|
+
negativePrompt?: string;
|
|
1313
|
+
preserveSpeech?: boolean;
|
|
1314
|
+
duration?: number;
|
|
1315
|
+
count?: 1 | 2 | 3 | 4;
|
|
1316
|
+
format?: "wav" | "mp3" | "aac" | "flac";
|
|
1317
|
+
bitrateKbps?: number;
|
|
1318
|
+
seed?: number;
|
|
1319
|
+
};
|
|
1320
|
+
"mirelo-sfx-2.0-video-to-video": {
|
|
1321
|
+
videoUrl: string;
|
|
1322
|
+
prompt?: string;
|
|
1323
|
+
negativePrompt?: string;
|
|
1324
|
+
preserveSpeech?: boolean;
|
|
1325
|
+
duration?: number;
|
|
1326
|
+
count?: 1 | 2 | 3 | 4;
|
|
1327
|
+
seed?: number;
|
|
1328
|
+
};
|
|
1300
1329
|
"muse-image-1.0": {
|
|
1301
1330
|
prompt: string;
|
|
1302
1331
|
aspectRatio?: "1:1" | "3:2" | "2:3" | "16:9" | "9:16" | "4:3" | "3:4";
|
|
@@ -2532,7 +2561,7 @@ interface ModelFilter {
|
|
|
2532
2561
|
release?: ReleaseTag[];
|
|
2533
2562
|
}
|
|
2534
2563
|
|
|
2535
|
-
type AppProvider = 'picsart' | 'google' | 'kling' | 'grok' | 'openai' | 'flux' | 'ideogram' | 'elevenlabs' | 'minimax' | 'wan' | 'seedance' | 'ltx' | 'seedream' | 'seedaudio' | 'hunyuan' | 'pika' | 'runway' | 'luma' | 'ovi' | 'creatify' | 'veed' | 'bytedance' | 'qwen' | 'reve' | 'recraft' | 'videography' | 'topaz' | 'heygen' | 'happyhorse' | 'pixverse' | 'anthropic' | 'async' | 'captionsai' | 'meta' | 'typesafe' | 'depth-anything' | 'kimi';
|
|
2564
|
+
type AppProvider = 'picsart' | 'google' | 'kling' | 'grok' | 'openai' | 'flux' | 'ideogram' | 'elevenlabs' | 'minimax' | 'wan' | 'seedance' | 'ltx' | 'seedream' | 'seedaudio' | 'hunyuan' | 'pika' | 'runway' | 'luma' | 'ovi' | 'creatify' | 'veed' | 'bytedance' | 'qwen' | 'reve' | 'recraft' | 'videography' | 'topaz' | 'heygen' | 'happyhorse' | 'pixverse' | 'anthropic' | 'async' | 'captionsai' | 'meta' | 'typesafe' | 'depth-anything' | 'kimi' | 'mirelo';
|
|
2536
2565
|
/** Provider used by model definitions. */
|
|
2537
2566
|
type Provider = AppProvider;
|
|
2538
2567
|
/** App generation modes. `json` marks structured-output models (judges,
|
|
@@ -3654,6 +3683,9 @@ declare const Models: {
|
|
|
3654
3683
|
readonly MinimaxH3MaxTurbo: "minimax-h3-max-turbo";
|
|
3655
3684
|
readonly MinimaxMusicV2: "minimax-music-v2";
|
|
3656
3685
|
readonly MinimaxMusicV3: "minimax-music-v3";
|
|
3686
|
+
readonly MireloSfx20TextToAudio: "mirelo-sfx-2.0-text-to-audio";
|
|
3687
|
+
readonly MireloSfx20VideoToAudio: "mirelo-sfx-2.0-video-to-audio";
|
|
3688
|
+
readonly MireloSfx20VideoToVideo: "mirelo-sfx-2.0-video-to-video";
|
|
3657
3689
|
readonly MuseImage10: "muse-image-1.0";
|
|
3658
3690
|
readonly Ovi: "ovi";
|
|
3659
3691
|
readonly PicsartChangeBg: "picsart-change-bg";
|
package/index.js
CHANGED
|
@@ -798,7 +798,8 @@ var providers = {
|
|
|
798
798
|
meta: { color: "#0081FB", label: "MT", name: "Meta" },
|
|
799
799
|
typesafe: { color: "#3E6B8F", label: "TS", name: "TypeSafe" },
|
|
800
800
|
"depth-anything": { color: "#0EA5E9", label: "DA", name: "Depth Anything" },
|
|
801
|
-
kimi: { color: "#1A1A2E", label: "KM", name: "Kimi" }
|
|
801
|
+
kimi: { color: "#1A1A2E", label: "KM", name: "Kimi" },
|
|
802
|
+
mirelo: { color: "#5C3DF5", label: "ML", name: "Mirelo" }
|
|
802
803
|
};
|
|
803
804
|
|
|
804
805
|
// src/core/descriptors/presets.ts
|
|
@@ -1176,7 +1177,7 @@ var passthroughPayload = (paramConfig) => (ctx) => {
|
|
|
1176
1177
|
return payload;
|
|
1177
1178
|
};
|
|
1178
1179
|
function defineModels(provider, configs) {
|
|
1179
|
-
const
|
|
1180
|
+
const MODELS41 = [];
|
|
1180
1181
|
for (const c of configs) {
|
|
1181
1182
|
const prov = c.provider ?? provider;
|
|
1182
1183
|
const resolvedPayload = c.buildPayload ?? passthroughPayload(c.paramConfig);
|
|
@@ -1213,19 +1214,19 @@ function defineModels(provider, configs) {
|
|
|
1213
1214
|
if (c.validateInput !== void 0) model.validateInput = c.validateInput;
|
|
1214
1215
|
const contract = createModelContract(model);
|
|
1215
1216
|
model.outputSchema = c.outputSchema ?? contract.output;
|
|
1216
|
-
|
|
1217
|
+
MODELS41.push(model);
|
|
1217
1218
|
}
|
|
1218
|
-
return { MODELS:
|
|
1219
|
+
return { MODELS: MODELS41 };
|
|
1219
1220
|
}
|
|
1220
|
-
function registerPayloads(
|
|
1221
|
+
function registerPayloads(MODELS41, payloads) {
|
|
1221
1222
|
for (const [id, builder] of Object.entries(payloads)) {
|
|
1222
|
-
const model =
|
|
1223
|
+
const model = MODELS41.find((m) => m.id === id);
|
|
1223
1224
|
if (model) model.buildPayload = builder;
|
|
1224
1225
|
}
|
|
1225
1226
|
}
|
|
1226
|
-
function registerEditPayloads(
|
|
1227
|
+
function registerEditPayloads(MODELS41, payloads) {
|
|
1227
1228
|
for (const [id, builder] of Object.entries(payloads)) {
|
|
1228
|
-
const model =
|
|
1229
|
+
const model = MODELS41.find((m) => m.id === id);
|
|
1229
1230
|
if (model) model.buildEditPayload = builder;
|
|
1230
1231
|
}
|
|
1231
1232
|
}
|
|
@@ -11247,6 +11248,116 @@ registerPayloads(MODELS39, {
|
|
|
11247
11248
|
"depth-anything-video": buildDepthAnythingVideoPayload
|
|
11248
11249
|
});
|
|
11249
11250
|
|
|
11251
|
+
// src/vendors/catalog/mirelo.ts
|
|
11252
|
+
var FORMAT_OPTIONS = ["wav", "mp3", "aac", "flac"];
|
|
11253
|
+
var SAMPLE_OPTIONS = [1, 2, 3, 4];
|
|
11254
|
+
var bitrateKbps = {
|
|
11255
|
+
bitrateKbps: {
|
|
11256
|
+
label: "Audio Bitrate (kbps)",
|
|
11257
|
+
descriptor: { kind: "range", min: 32, max: 320, step: 1 }
|
|
11258
|
+
}
|
|
11259
|
+
};
|
|
11260
|
+
var { MODELS: MODELS40 } = defineModels("mirelo", [
|
|
11261
|
+
{
|
|
11262
|
+
id: "mirelo-sfx-2.0-text-to-audio",
|
|
11263
|
+
name: "Mirelo SFX 2.0 (Text to Audio)",
|
|
11264
|
+
addedAt: "2026-10-15",
|
|
11265
|
+
workflow: "mirelo-ai/sfx2.0/text-to-audio",
|
|
11266
|
+
estimatedTime: 15,
|
|
11267
|
+
mode: "audio",
|
|
11268
|
+
inputType: "t2a",
|
|
11269
|
+
description: "Generate sound effects and soundscapes from a text prompt with Mirelo SFX 2.0.",
|
|
11270
|
+
features: [feat("Text to Audio", "characteristic"), feat("Sound Effects", "audio")],
|
|
11271
|
+
paramConfig: {
|
|
11272
|
+
...params.prompt({ maxLength: 2e3 }),
|
|
11273
|
+
...params.negativePrompt(void 0, 1e3),
|
|
11274
|
+
...params.durationRange(1, 600, 30),
|
|
11275
|
+
...params.count(SAMPLE_OPTIONS, 2),
|
|
11276
|
+
...p.enum("format", [...FORMAT_OPTIONS], "wav", { label: "Format" }),
|
|
11277
|
+
...bitrateKbps,
|
|
11278
|
+
...params.seed()
|
|
11279
|
+
}
|
|
11280
|
+
},
|
|
11281
|
+
{
|
|
11282
|
+
id: "mirelo-sfx-2.0-video-to-audio",
|
|
11283
|
+
name: "Mirelo SFX 2.0 (Video to Audio)",
|
|
11284
|
+
addedAt: "2026-10-15",
|
|
11285
|
+
workflow: "mirelo-ai/sfx2.0/video-to-audio",
|
|
11286
|
+
estimatedTime: 20,
|
|
11287
|
+
mode: "audio",
|
|
11288
|
+
inputType: "v2a",
|
|
11289
|
+
description: "Generate a soundtrack synced to your video with Mirelo SFX 2.0 \u2014 returns the audio track.",
|
|
11290
|
+
features: [feat("Video to Audio", "characteristic"), feat("Video Required", "input"), feat("Sound Effects", "audio")],
|
|
11291
|
+
paramConfig: {
|
|
11292
|
+
...params.videoInput("Source Video", "asset", true),
|
|
11293
|
+
...params.prompt({ required: false, maxLength: 2e3 }),
|
|
11294
|
+
...params.negativePrompt(void 0, 1e3),
|
|
11295
|
+
...p.boolean("preserveSpeech", true, "Preserve Speech"),
|
|
11296
|
+
...params.durationRange(1, 600, 10),
|
|
11297
|
+
...params.count(SAMPLE_OPTIONS, 2),
|
|
11298
|
+
...p.enum("format", [...FORMAT_OPTIONS], "wav", { label: "Format" }),
|
|
11299
|
+
...bitrateKbps,
|
|
11300
|
+
...params.seed()
|
|
11301
|
+
}
|
|
11302
|
+
},
|
|
11303
|
+
{
|
|
11304
|
+
id: "mirelo-sfx-2.0-video-to-video",
|
|
11305
|
+
name: "Mirelo SFX 2.0 (Video to Video)",
|
|
11306
|
+
addedAt: "2026-10-15",
|
|
11307
|
+
workflow: "mirelo-ai/sfx2.0/video-to-video",
|
|
11308
|
+
estimatedTime: 30,
|
|
11309
|
+
mode: "video",
|
|
11310
|
+
inputType: "v2v",
|
|
11311
|
+
description: "Add a synced soundtrack to your video with Mirelo SFX 2.0 \u2014 returns the video with its new audio.",
|
|
11312
|
+
features: [feat("Video to Video", "characteristic"), feat("Video Required", "input"), feat("Synced Soundtrack", "audio")],
|
|
11313
|
+
paramConfig: {
|
|
11314
|
+
...params.videoInput("Source Video", "asset", true),
|
|
11315
|
+
...params.prompt({ required: false, maxLength: 2e3 }),
|
|
11316
|
+
...params.negativePrompt(void 0, 1e3),
|
|
11317
|
+
...p.boolean("preserveSpeech", true, "Preserve Speech"),
|
|
11318
|
+
...params.durationRange(1, 600, 10),
|
|
11319
|
+
...params.count(SAMPLE_OPTIONS, 2),
|
|
11320
|
+
...params.seed()
|
|
11321
|
+
}
|
|
11322
|
+
}
|
|
11323
|
+
]);
|
|
11324
|
+
|
|
11325
|
+
// src/vendors/catalog/mirelo.payloads.ts
|
|
11326
|
+
var buildTextToAudioPayload = (input) => ({
|
|
11327
|
+
prompt: input.prompt,
|
|
11328
|
+
duration: input.duration ?? 30,
|
|
11329
|
+
num_samples: input.count ?? 2,
|
|
11330
|
+
upload_audio_format: input.format ?? "wav",
|
|
11331
|
+
...input.negativePrompt != null ? { negative_prompt: input.negativePrompt } : {},
|
|
11332
|
+
...input.bitrateKbps != null ? { upload_audio_bitrate_kbps: input.bitrateKbps } : {},
|
|
11333
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
11334
|
+
});
|
|
11335
|
+
var buildVideoToAudioPayload = (input) => ({
|
|
11336
|
+
video_url: input.videoUrl,
|
|
11337
|
+
preserve_speech: input.preserveSpeech ?? true,
|
|
11338
|
+
duration: input.duration ?? 10,
|
|
11339
|
+
num_samples: input.count ?? 2,
|
|
11340
|
+
upload_audio_format: input.format ?? "wav",
|
|
11341
|
+
...input.prompt != null ? { text_prompt: input.prompt } : {},
|
|
11342
|
+
...input.negativePrompt != null ? { negative_prompt: input.negativePrompt } : {},
|
|
11343
|
+
...input.bitrateKbps != null ? { upload_audio_bitrate_kbps: input.bitrateKbps } : {},
|
|
11344
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
11345
|
+
});
|
|
11346
|
+
var buildVideoToVideoPayload = (input) => ({
|
|
11347
|
+
video_url: input.videoUrl,
|
|
11348
|
+
preserve_speech: input.preserveSpeech ?? true,
|
|
11349
|
+
duration: input.duration ?? 10,
|
|
11350
|
+
num_samples: input.count ?? 2,
|
|
11351
|
+
...input.prompt != null ? { text_prompt: input.prompt } : {},
|
|
11352
|
+
...input.negativePrompt != null ? { negative_prompt: input.negativePrompt } : {},
|
|
11353
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
11354
|
+
});
|
|
11355
|
+
registerPayloads(MODELS40, {
|
|
11356
|
+
"mirelo-sfx-2.0-text-to-audio": buildTextToAudioPayload,
|
|
11357
|
+
"mirelo-sfx-2.0-video-to-audio": buildVideoToAudioPayload,
|
|
11358
|
+
"mirelo-sfx-2.0-video-to-video": buildVideoToVideoPayload
|
|
11359
|
+
});
|
|
11360
|
+
|
|
11250
11361
|
// src/vendors/catalog/creatify.payloads.ts
|
|
11251
11362
|
var buildCreatifyBorealPayload = (input) => ({
|
|
11252
11363
|
prompt: input.prompt,
|
|
@@ -11412,7 +11523,8 @@ var ALL_MODELS = [
|
|
|
11412
11523
|
...MODELS36,
|
|
11413
11524
|
...MODELS37,
|
|
11414
11525
|
...MODELS38,
|
|
11415
|
-
...MODELS39
|
|
11526
|
+
...MODELS39,
|
|
11527
|
+
...MODELS40
|
|
11416
11528
|
];
|
|
11417
11529
|
var getModelsByMode = (mode, includeHidden = false) => ALL_MODELS.filter((m) => m.mode === mode && (includeHidden || isVisibleForReleases(m)));
|
|
11418
11530
|
|
|
@@ -15097,6 +15209,9 @@ var MinimaxH3MaxRelight = "minimax-h3-max-relight";
|
|
|
15097
15209
|
var MinimaxH3MaxTurbo = "minimax-h3-max-turbo";
|
|
15098
15210
|
var MinimaxMusicV2 = "minimax-music-v2";
|
|
15099
15211
|
var MinimaxMusicV3 = "minimax-music-v3";
|
|
15212
|
+
var MireloSfx20TextToAudio = "mirelo-sfx-2.0-text-to-audio";
|
|
15213
|
+
var MireloSfx20VideoToAudio = "mirelo-sfx-2.0-video-to-audio";
|
|
15214
|
+
var MireloSfx20VideoToVideo = "mirelo-sfx-2.0-video-to-video";
|
|
15100
15215
|
var MuseImage10 = "muse-image-1.0";
|
|
15101
15216
|
var Ovi = "ovi";
|
|
15102
15217
|
var PicsartChangeBg = "picsart-change-bg";
|
|
@@ -15364,6 +15479,9 @@ var Models = {
|
|
|
15364
15479
|
MinimaxH3MaxTurbo,
|
|
15365
15480
|
MinimaxMusicV2,
|
|
15366
15481
|
MinimaxMusicV3,
|
|
15482
|
+
MireloSfx20TextToAudio,
|
|
15483
|
+
MireloSfx20VideoToAudio,
|
|
15484
|
+
MireloSfx20VideoToVideo,
|
|
15367
15485
|
MuseImage10,
|
|
15368
15486
|
Ovi,
|
|
15369
15487
|
PicsartChangeBg,
|