@picsart/ai-sdk 6.34.0 → 6.35.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 +8 -0
- package/index.js +41 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -704,6 +704,13 @@ type ModelInputById = {
|
|
|
704
704
|
duration?: 3 | 5 | 6 | 8 | 10 | 12 | 15;
|
|
705
705
|
imageUrls?: string[];
|
|
706
706
|
};
|
|
707
|
+
"grok-imagine-video-1.5-lite": {
|
|
708
|
+
prompt: string;
|
|
709
|
+
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "3:2" | "2:3";
|
|
710
|
+
resolution?: "480p" | "720p" | "1080p";
|
|
711
|
+
duration?: 3 | 5 | 6 | 8 | 10 | 12 | 15;
|
|
712
|
+
imageUrls?: string[];
|
|
713
|
+
};
|
|
707
714
|
"grok-tts": {
|
|
708
715
|
language?: string;
|
|
709
716
|
accent?: string;
|
|
@@ -3528,6 +3535,7 @@ declare const Models: {
|
|
|
3528
3535
|
readonly GrokImagineImageQuality: "grok-imagine-image-quality";
|
|
3529
3536
|
readonly GrokImagineVideo: "grok-imagine-video";
|
|
3530
3537
|
readonly GrokImagineVideo15: "grok-imagine-video-1.5";
|
|
3538
|
+
readonly GrokImagineVideo15Lite: "grok-imagine-video-1.5-lite";
|
|
3531
3539
|
readonly GrokTts: "grok-tts";
|
|
3532
3540
|
readonly Hailuo23: "hailuo-2.3";
|
|
3533
3541
|
readonly Hailuo23Fast: "hailuo-2.3-fast";
|
package/index.js
CHANGED
|
@@ -5584,6 +5584,25 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5584
5584
|
...params.imageInput(1, "Input Image", false)
|
|
5585
5585
|
}
|
|
5586
5586
|
},
|
|
5587
|
+
{
|
|
5588
|
+
id: "grok-imagine-video-1.5-lite",
|
|
5589
|
+
name: "Grok Imagine 1.5 Lite",
|
|
5590
|
+
addedAt: "2026-10-13",
|
|
5591
|
+
workflow: "x-ai/v1/videos/generations",
|
|
5592
|
+
editWorkflow: "x-ai/v1/videos/generations",
|
|
5593
|
+
estimatedTime: 20,
|
|
5594
|
+
mode: "video",
|
|
5595
|
+
inputType: "t2v",
|
|
5596
|
+
description: "Lightweight Grok 1.5 tier \u2014 faster, lower-cost video with audio, up to 15s.",
|
|
5597
|
+
features: [feat("Image Input", "input"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("15 sec", "duration")],
|
|
5598
|
+
paramConfig: {
|
|
5599
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5600
|
+
...params.aspectRatio(GROK_VIDEO_AR),
|
|
5601
|
+
...params.resolution(GROK_VIDEO_RESOLUTIONS_15, "720p"),
|
|
5602
|
+
...params.duration(GROK_DURATIONS, 8),
|
|
5603
|
+
...params.imageInput(1, "Input Image", false)
|
|
5604
|
+
}
|
|
5605
|
+
},
|
|
5587
5606
|
{
|
|
5588
5607
|
id: "grok-edit-video",
|
|
5589
5608
|
name: "Grok Edit Video",
|
|
@@ -5727,11 +5746,28 @@ var buildGrokImage2EditPayload = (input) => {
|
|
|
5727
5746
|
...imagePart2
|
|
5728
5747
|
};
|
|
5729
5748
|
};
|
|
5749
|
+
var buildGrokVideo15LitePayload = (input) => ({
|
|
5750
|
+
model: "grok-imagine-video-1.5-lite",
|
|
5751
|
+
prompt: input.prompt,
|
|
5752
|
+
duration: input.duration ?? 8,
|
|
5753
|
+
...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
|
|
5754
|
+
...input.resolution ? { resolution: input.resolution } : {},
|
|
5755
|
+
...input.imageUrls?.[0] ? { image: { url: input.imageUrls[0] } } : {}
|
|
5756
|
+
});
|
|
5757
|
+
var buildGrokVideo15LiteEditPayload = (input) => ({
|
|
5758
|
+
model: "grok-imagine-video-1.5-lite",
|
|
5759
|
+
prompt: input.prompt,
|
|
5760
|
+
...input.imageUrls?.[0] ? { image: { url: input.imageUrls[0] } } : {},
|
|
5761
|
+
duration: input.duration ?? 8,
|
|
5762
|
+
...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {}
|
|
5763
|
+
});
|
|
5730
5764
|
registerPayloads(MODELS17, {
|
|
5731
|
-
"grok-imagine-image-2.0": buildGrokImage2Payload
|
|
5765
|
+
"grok-imagine-image-2.0": buildGrokImage2Payload,
|
|
5766
|
+
"grok-imagine-video-1.5-lite": buildGrokVideo15LitePayload
|
|
5732
5767
|
});
|
|
5733
5768
|
registerEditPayloads(MODELS17, {
|
|
5734
|
-
"grok-imagine-image-2.0": buildGrokImage2EditPayload
|
|
5769
|
+
"grok-imagine-image-2.0": buildGrokImage2EditPayload,
|
|
5770
|
+
"grok-imagine-video-1.5-lite": buildGrokVideo15LiteEditPayload
|
|
5735
5771
|
});
|
|
5736
5772
|
|
|
5737
5773
|
// src/vendors/catalog/pika.ts
|
|
@@ -9337,8 +9373,7 @@ var buildChangeBgPayload = (ctx) => ({
|
|
|
9337
9373
|
});
|
|
9338
9374
|
var buildRemoveBgPayload = (ctx) => ({
|
|
9339
9375
|
photo: ctx.imageUrls?.[0] ?? "",
|
|
9340
|
-
postprocess_image: true
|
|
9341
|
-
model: "model-sod-v8-2"
|
|
9376
|
+
postprocess_image: true
|
|
9342
9377
|
});
|
|
9343
9378
|
var sodOutputSchema = {
|
|
9344
9379
|
parse(output) {
|
|
@@ -14649,6 +14684,7 @@ var GrokImagineImage20 = "grok-imagine-image-2.0";
|
|
|
14649
14684
|
var GrokImagineImageQuality = "grok-imagine-image-quality";
|
|
14650
14685
|
var GrokImagineVideo = "grok-imagine-video";
|
|
14651
14686
|
var GrokImagineVideo15 = "grok-imagine-video-1.5";
|
|
14687
|
+
var GrokImagineVideo15Lite = "grok-imagine-video-1.5-lite";
|
|
14652
14688
|
var GrokTts = "grok-tts";
|
|
14653
14689
|
var Hailuo23 = "hailuo-2.3";
|
|
14654
14690
|
var Hailuo23Fast = "hailuo-2.3-fast";
|
|
@@ -14910,6 +14946,7 @@ var Models = {
|
|
|
14910
14946
|
GrokImagineImageQuality,
|
|
14911
14947
|
GrokImagineVideo,
|
|
14912
14948
|
GrokImagineVideo15,
|
|
14949
|
+
GrokImagineVideo15Lite,
|
|
14913
14950
|
GrokTts,
|
|
14914
14951
|
Hailuo23,
|
|
14915
14952
|
Hailuo23Fast,
|