@picsart/ai-sdk 6.35.1 → 6.37.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/README.md +4 -3
- package/index.d.ts +14 -2
- package/index.js +50 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,7 +194,7 @@ names or catalog model IDs from an arbitrary vendor request.
|
|
|
194
194
|
|
|
195
195
|
## Text Generation (LLMs)
|
|
196
196
|
|
|
197
|
-
Claude, GPT, and
|
|
197
|
+
Claude, GPT, Gemini, Kimi and Grok text models are called with `generateText()`. Single-shot:
|
|
198
198
|
pass a prompt and optional image(s)/video, get text back. They surface in the catalog
|
|
199
199
|
as `mode: 'text'`. Each vendor uses its own native workflow, so capabilities aren't lost
|
|
200
200
|
— Gemini accepts video input, Claude uses the Anthropic-native messages API.
|
|
@@ -227,8 +227,9 @@ await ai.generateText(Models.Gemini3Pro, {
|
|
|
227
227
|
catalog.find({ output: 'text' })
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
> Thinking level maps per vendor: OpenAI → `reasoning_effort`, Gemini →
|
|
231
|
-
> `thinkingConfig.thinkingLevel` (LOW/HIGH).
|
|
230
|
+
> Thinking level maps per vendor: OpenAI, Kimi and Grok → `reasoning_effort`, Gemini →
|
|
231
|
+
> `thinkingConfig.thinkingLevel` (LOW/HIGH). Kimi K3 and Grok 4.7 always reason, so
|
|
232
|
+
> they have no `off`. Claude’s `claude/v1/messages`
|
|
232
233
|
> workflow exposes no thinking knob, so Claude models omit `thinking`.
|
|
233
234
|
|
|
234
235
|
`generateText()` is type-narrowed to text models (`TextModelId`); calling it with an
|
package/index.d.ts
CHANGED
|
@@ -659,6 +659,11 @@ type ModelInputById = {
|
|
|
659
659
|
count?: 1 | 2 | 4 | 6 | 8 | 10;
|
|
660
660
|
imageUrls?: string[];
|
|
661
661
|
};
|
|
662
|
+
"grok-4.7": {
|
|
663
|
+
prompt: string;
|
|
664
|
+
imageUrls?: string[];
|
|
665
|
+
thinking?: "low" | "medium" | "high";
|
|
666
|
+
};
|
|
662
667
|
"grok-edit-video": {
|
|
663
668
|
prompt: string;
|
|
664
669
|
videoUrl: string;
|
|
@@ -866,6 +871,11 @@ type ModelInputById = {
|
|
|
866
871
|
imageUrls?: string[];
|
|
867
872
|
imageWeight?: number;
|
|
868
873
|
};
|
|
874
|
+
"kimi-k3": {
|
|
875
|
+
prompt: string;
|
|
876
|
+
imageUrls?: string[];
|
|
877
|
+
thinking?: "low" | "high";
|
|
878
|
+
};
|
|
869
879
|
"kling-3.0-image": {
|
|
870
880
|
prompt: string;
|
|
871
881
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "21:9" | "4:3" | "3:2" | "2:3" | "3:4";
|
|
@@ -2088,7 +2098,7 @@ type ModelInputById = {
|
|
|
2088
2098
|
type TypedModelId = keyof ModelInputById;
|
|
2089
2099
|
type ModelInput<M extends TypedModelId> = ModelInputById[M];
|
|
2090
2100
|
/** IDs of text-generation (LLM) models — narrows generateText(). */
|
|
2091
|
-
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol";
|
|
2101
|
+
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol" | "grok-4.7" | "kimi-k3";
|
|
2092
2102
|
type TextModelInputById = Pick<ModelInputById, TextModelId>;
|
|
2093
2103
|
/** IDs of structured-output (json-mode) models — narrows run()'s result type. */
|
|
2094
2104
|
type JsonModelId = "typesafe-evaluate";
|
|
@@ -2493,7 +2503,7 @@ interface ModelFilter {
|
|
|
2493
2503
|
release?: ReleaseTag[];
|
|
2494
2504
|
}
|
|
2495
2505
|
|
|
2496
|
-
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';
|
|
2506
|
+
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';
|
|
2497
2507
|
/** Provider used by model definitions. */
|
|
2498
2508
|
type Provider = AppProvider;
|
|
2499
2509
|
/** App generation modes. `json` marks structured-output models (judges,
|
|
@@ -3528,6 +3538,7 @@ declare const Models: {
|
|
|
3528
3538
|
readonly GptImage2: "gpt-image-2";
|
|
3529
3539
|
readonly GptImage25Flare: "gpt-image-2.5-flare";
|
|
3530
3540
|
readonly GptImage25Sunburst: "gpt-image-2.5-sunburst";
|
|
3541
|
+
readonly Grok47: "grok-4.7";
|
|
3531
3542
|
readonly GrokEditVideo: "grok-edit-video";
|
|
3532
3543
|
readonly GrokExtendVideo: "grok-extend-video";
|
|
3533
3544
|
readonly GrokImagineImage: "grok-imagine-image";
|
|
@@ -3556,6 +3567,7 @@ declare const Models: {
|
|
|
3556
3567
|
readonly IdeogramPImage: "ideogram-p-image";
|
|
3557
3568
|
readonly IdeogramV3: "ideogram-v3";
|
|
3558
3569
|
readonly IdeogramV4: "ideogram-v4";
|
|
3570
|
+
readonly KimiK3: "kimi-k3";
|
|
3559
3571
|
readonly Kling30Image: "kling-3.0-image";
|
|
3560
3572
|
readonly KlingAvatar: "kling-avatar";
|
|
3561
3573
|
readonly KlingElements: "kling-elements";
|
package/index.js
CHANGED
|
@@ -796,7 +796,8 @@ var providers = {
|
|
|
796
796
|
captionsai: { color: "#1D1F20", label: "MR", name: "Mirage" },
|
|
797
797
|
meta: { color: "#0081FB", label: "MT", name: "Meta" },
|
|
798
798
|
typesafe: { color: "#3E6B8F", label: "TS", name: "TypeSafe" },
|
|
799
|
-
"depth-anything": { color: "#0EA5E9", label: "DA", name: "Depth Anything" }
|
|
799
|
+
"depth-anything": { color: "#0EA5E9", label: "DA", name: "Depth Anything" },
|
|
800
|
+
kimi: { color: "#1A1A2E", label: "KM", name: "Kimi" }
|
|
800
801
|
};
|
|
801
802
|
|
|
802
803
|
// src/core/descriptors/presets.ts
|
|
@@ -10558,7 +10559,47 @@ var { MODELS: GEMINI_LLM } = defineModels("google", [
|
|
|
10558
10559
|
}
|
|
10559
10560
|
}
|
|
10560
10561
|
]);
|
|
10561
|
-
var
|
|
10562
|
+
var kimiThinkingParam = () => p.enum("thinking", ["low", "high"], "high", { label: "Thinking" });
|
|
10563
|
+
var { MODELS: KIMI_LLM } = defineModels("kimi", [
|
|
10564
|
+
{
|
|
10565
|
+
id: "kimi-k3",
|
|
10566
|
+
name: "Kimi K3",
|
|
10567
|
+
workflow: "chat-completions",
|
|
10568
|
+
addedAt: "2026-10-13",
|
|
10569
|
+
estimatedTime: 10,
|
|
10570
|
+
mode: "text",
|
|
10571
|
+
inputType: "i2t",
|
|
10572
|
+
badge: ["new"],
|
|
10573
|
+
description: "Moonshot\u2019s flagship Kimi model \u2014 deep reasoning with a 1M-token context.",
|
|
10574
|
+
features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
|
|
10575
|
+
paramConfig: {
|
|
10576
|
+
...params.prompt(),
|
|
10577
|
+
...params.imageInput(8, "Images"),
|
|
10578
|
+
...kimiThinkingParam()
|
|
10579
|
+
}
|
|
10580
|
+
}
|
|
10581
|
+
]);
|
|
10582
|
+
var grokThinkingParam = () => p.enum("thinking", ["low", "medium", "high"], "high", { label: "Thinking" });
|
|
10583
|
+
var { MODELS: GROK_LLM } = defineModels("grok", [
|
|
10584
|
+
{
|
|
10585
|
+
id: "grok-4.7",
|
|
10586
|
+
name: "Grok 4.7",
|
|
10587
|
+
workflow: "chat-completions",
|
|
10588
|
+
addedAt: "2026-10-14",
|
|
10589
|
+
estimatedTime: 10,
|
|
10590
|
+
mode: "text",
|
|
10591
|
+
inputType: "i2t",
|
|
10592
|
+
badge: ["new"],
|
|
10593
|
+
description: "xAI\u2019s flagship Grok model \u2014 always-on reasoning with a 500K-token context.",
|
|
10594
|
+
features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
|
|
10595
|
+
paramConfig: {
|
|
10596
|
+
...params.prompt(),
|
|
10597
|
+
...params.imageInput(8, "Images"),
|
|
10598
|
+
...grokThinkingParam()
|
|
10599
|
+
}
|
|
10600
|
+
}
|
|
10601
|
+
]);
|
|
10602
|
+
var MODELS35 = [...ANTHROPIC, ...OPENAI_LLM, ...GEMINI_LLM, ...KIMI_LLM, ...GROK_LLM];
|
|
10562
10603
|
|
|
10563
10604
|
// src/vendors/catalog/llm.payloads.ts
|
|
10564
10605
|
var CLAUDE_MAX_TOKENS = 8192;
|
|
@@ -10641,7 +10682,9 @@ registerPayloads(MODELS35, {
|
|
|
10641
10682
|
"gemini-3.7-flash": buildOpenAiPayload("gemini-3.7-flash"),
|
|
10642
10683
|
"gemini-3.6-flash": buildOpenAiPayload("gemini-3.6-flash"),
|
|
10643
10684
|
"gemini-3.5-flash-lite": buildOpenAiPayload("gemini-3.5-flash-lite"),
|
|
10644
|
-
"gemini-2.5-flash": buildOpenAiPayload("gemini-2.5-flash")
|
|
10685
|
+
"gemini-2.5-flash": buildOpenAiPayload("gemini-2.5-flash"),
|
|
10686
|
+
"kimi-k3": buildOpenAiPayload("kimi-k3"),
|
|
10687
|
+
"grok-4.7": buildOpenAiPayload("grok-4.7")
|
|
10645
10688
|
});
|
|
10646
10689
|
|
|
10647
10690
|
// src/vendors/catalog/captionsai.ts
|
|
@@ -14677,6 +14720,7 @@ var GptImage15 = "gpt-image-1.5";
|
|
|
14677
14720
|
var GptImage2 = "gpt-image-2";
|
|
14678
14721
|
var GptImage25Flare = "gpt-image-2.5-flare";
|
|
14679
14722
|
var GptImage25Sunburst = "gpt-image-2.5-sunburst";
|
|
14723
|
+
var Grok47 = "grok-4.7";
|
|
14680
14724
|
var GrokEditVideo = "grok-edit-video";
|
|
14681
14725
|
var GrokExtendVideo = "grok-extend-video";
|
|
14682
14726
|
var GrokImagineImage = "grok-imagine-image";
|
|
@@ -14705,6 +14749,7 @@ var IdeogramCharacter = "ideogram-character";
|
|
|
14705
14749
|
var IdeogramPImage = "ideogram-p-image";
|
|
14706
14750
|
var IdeogramV3 = "ideogram-v3";
|
|
14707
14751
|
var IdeogramV4 = "ideogram-v4";
|
|
14752
|
+
var KimiK3 = "kimi-k3";
|
|
14708
14753
|
var Kling30Image = "kling-3.0-image";
|
|
14709
14754
|
var KlingAvatar = "kling-avatar";
|
|
14710
14755
|
var KlingElements = "kling-elements";
|
|
@@ -14939,6 +14984,7 @@ var Models = {
|
|
|
14939
14984
|
GptImage2,
|
|
14940
14985
|
GptImage25Flare,
|
|
14941
14986
|
GptImage25Sunburst,
|
|
14987
|
+
Grok47,
|
|
14942
14988
|
GrokEditVideo,
|
|
14943
14989
|
GrokExtendVideo,
|
|
14944
14990
|
GrokImagineImage,
|
|
@@ -14967,6 +15013,7 @@ var Models = {
|
|
|
14967
15013
|
IdeogramPImage,
|
|
14968
15014
|
IdeogramV3,
|
|
14969
15015
|
IdeogramV4,
|
|
15016
|
+
KimiK3,
|
|
14970
15017
|
Kling30Image,
|
|
14971
15018
|
KlingAvatar,
|
|
14972
15019
|
KlingElements,
|