@picsart/ai-sdk 6.48.2 → 6.49.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 +13 -0
- package/index.js +53 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1234,6 +1234,18 @@ type ModelInputById = {
|
|
|
1234
1234
|
prompt: string;
|
|
1235
1235
|
imageUrls?: string[];
|
|
1236
1236
|
};
|
|
1237
|
+
"macaron-cookie": {
|
|
1238
|
+
prompt: string;
|
|
1239
|
+
aspectRatio?: "16:9" | "9:16";
|
|
1240
|
+
resolution?: "360p" | "720p" | "1080p" | "4k";
|
|
1241
|
+
duration?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
1242
|
+
startFrame?: string;
|
|
1243
|
+
endFrame?: string;
|
|
1244
|
+
imageUrls?: string[];
|
|
1245
|
+
videoUrl?: string;
|
|
1246
|
+
videoUrls?: string[];
|
|
1247
|
+
task?: "edit" | "extend";
|
|
1248
|
+
};
|
|
1237
1249
|
"minimax-h3": {
|
|
1238
1250
|
prompt: string;
|
|
1239
1251
|
startFrame?: string;
|
|
@@ -3720,6 +3732,7 @@ declare const Models: {
|
|
|
3720
3732
|
readonly Lyria3Clip: "lyria-3-clip";
|
|
3721
3733
|
readonly Lyria3Pro: "lyria-3-pro";
|
|
3722
3734
|
readonly Lyria35: "lyria-3.5";
|
|
3735
|
+
readonly MacaronCookie: "macaron-cookie";
|
|
3723
3736
|
readonly MinimaxH3: "minimax-h3";
|
|
3724
3737
|
readonly MinimaxH3ContextIr: "minimax-h3-context-ir";
|
|
3725
3738
|
readonly MinimaxH3Max: "minimax-h3-max";
|
package/index.js
CHANGED
|
@@ -7252,6 +7252,41 @@ var { MODELS: MODELS22 } = defineModels("google", [
|
|
|
7252
7252
|
...params.videoInput("Source Video", "asset", false, 30),
|
|
7253
7253
|
...params.videoInputs(3, "Reference Videos")
|
|
7254
7254
|
}
|
|
7255
|
+
},
|
|
7256
|
+
{
|
|
7257
|
+
id: "macaron-cookie",
|
|
7258
|
+
name: "Gemini Omni (Macaron)",
|
|
7259
|
+
addedAt: "2026-10-19",
|
|
7260
|
+
release: "preview",
|
|
7261
|
+
workflow: "gemini-omni/video",
|
|
7262
|
+
estimatedTime: { "360p": 30, "720p": 40, "1080p": 60, "4k": 90 },
|
|
7263
|
+
mode: "video",
|
|
7264
|
+
inputType: "t2v",
|
|
7265
|
+
description: "Gemini Omni (Macaron) \u2014 multimodal video with frame interpolation, extension, reference-guided generation, and up to 4K output.",
|
|
7266
|
+
features: [feat("Start/End Frame", "input"), feat("Reference Images & Videos", "input"), feat("Video Extension", "input"), feat("4K", "resolution"), feat("3\u201310 sec", "duration")],
|
|
7267
|
+
paramConfig: {
|
|
7268
|
+
...params.prompt(),
|
|
7269
|
+
...params.aspectRatio(["16:9", "9:16"], "16:9"),
|
|
7270
|
+
...params.resolution(["360p", "720p", "1080p", "4k"], "720p"),
|
|
7271
|
+
...params.duration([3, 4, 5, 6, 7, 8, 9, 10], 8),
|
|
7272
|
+
...params.startFrame("Start Frame"),
|
|
7273
|
+
...params.endFrame("End Frame"),
|
|
7274
|
+
...params.imageInput(5, "Reference Images", false, "reference"),
|
|
7275
|
+
// Source video drives the edit/extend tasks; input must be under 30s.
|
|
7276
|
+
...params.videoInput("Source Video", "asset", false, 30),
|
|
7277
|
+
...params.videoInputs(3, "Reference Videos"),
|
|
7278
|
+
// With a source video the worker auto-derives `extend`; this toggle lets
|
|
7279
|
+
// the caller choose video editing instead. Only sent when a video is present.
|
|
7280
|
+
...p.enum("task", ["edit", "extend"], "edit", { label: "Mode" })
|
|
7281
|
+
},
|
|
7282
|
+
// edit/extend only apply to a source video — disable the toggle until one
|
|
7283
|
+
// is provided (matches the payload builder, which omits `task` without it).
|
|
7284
|
+
constraints: [
|
|
7285
|
+
{
|
|
7286
|
+
when: { videoUrl: { exists: false } },
|
|
7287
|
+
then: { task: { disabled: true, reason: "Add a source video to choose edit or extend." } }
|
|
7288
|
+
}
|
|
7289
|
+
]
|
|
7255
7290
|
}
|
|
7256
7291
|
]);
|
|
7257
7292
|
|
|
@@ -7274,6 +7309,21 @@ var buildOmniFlash11Payload = (input) => ({
|
|
|
7274
7309
|
...input.videoUrl ? { video: { url: input.videoUrl } } : {},
|
|
7275
7310
|
...input.videoUrls?.length ? { referenceVideos: input.videoUrls.map((url) => ({ url })) } : {}
|
|
7276
7311
|
});
|
|
7312
|
+
var buildMacaronCookiePayload = (input) => ({
|
|
7313
|
+
prompt: input.prompt,
|
|
7314
|
+
model: "macaron-cookie",
|
|
7315
|
+
aspectRatio: input.aspectRatio ?? "16:9",
|
|
7316
|
+
durationSeconds: input.duration ?? 8,
|
|
7317
|
+
resolution: input.resolution ?? "720p",
|
|
7318
|
+
...input.startFrame ? { image: toImage(input.startFrame) } : {},
|
|
7319
|
+
...input.endFrame ? { lastFrame: toImage(input.endFrame) } : {},
|
|
7320
|
+
...input.imageUrls?.length ? { referenceImages: input.imageUrls.map(toImage) } : {},
|
|
7321
|
+
// A source video runs edit or extend; the worker auto-derives `extend`, so
|
|
7322
|
+
// forward the explicit task (default 'edit') to pick editing. Omitted without
|
|
7323
|
+
// a video so text/image/reference inputs keep their own derived tasks.
|
|
7324
|
+
...input.videoUrl ? { video: { url: input.videoUrl }, task: input.task ?? "edit" } : {},
|
|
7325
|
+
...input.videoUrls?.length ? { referenceVideos: input.videoUrls.map((url) => ({ url })) } : {}
|
|
7326
|
+
});
|
|
7277
7327
|
var STYLE_MAX = 500;
|
|
7278
7328
|
var TEXT_MAX = 6e3;
|
|
7279
7329
|
var invalid = (message) => new ApiError(message, { status: 400, code: "validation_error" });
|
|
@@ -7359,6 +7409,7 @@ var buildTts38Payload = (model) => (input) => {
|
|
|
7359
7409
|
};
|
|
7360
7410
|
registerPayloads(MODELS22, {
|
|
7361
7411
|
"gemini-omni-1.1-flash-preview": buildOmniFlash11Payload,
|
|
7412
|
+
"macaron-cookie": buildMacaronCookiePayload,
|
|
7362
7413
|
"gemini-2.5-flash-tts": buildTts25Payload("gemini-2.5-flash-tts"),
|
|
7363
7414
|
"gemini-2.5-pro-tts": buildTts25Payload("gemini-2.5-pro-tts"),
|
|
7364
7415
|
"gemini-3.8-flash-tts": buildTts38Payload("gemini-3.8-flash-tts"),
|
|
@@ -15431,6 +15482,7 @@ var LumaUni1Max = "luma-uni-1-max";
|
|
|
15431
15482
|
var Lyria3Clip = "lyria-3-clip";
|
|
15432
15483
|
var Lyria3Pro = "lyria-3-pro";
|
|
15433
15484
|
var Lyria35 = "lyria-3.5";
|
|
15485
|
+
var MacaronCookie = "macaron-cookie";
|
|
15434
15486
|
var MinimaxH3 = "minimax-h3";
|
|
15435
15487
|
var MinimaxH3ContextIr = "minimax-h3-context-ir";
|
|
15436
15488
|
var MinimaxH3Max = "minimax-h3-max";
|
|
@@ -15705,6 +15757,7 @@ var Models = {
|
|
|
15705
15757
|
Lyria3Clip,
|
|
15706
15758
|
Lyria3Pro,
|
|
15707
15759
|
Lyria35,
|
|
15760
|
+
MacaronCookie,
|
|
15708
15761
|
MinimaxH3,
|
|
15709
15762
|
MinimaxH3ContextIr,
|
|
15710
15763
|
MinimaxH3Max,
|