@picsart/ai-sdk 5.22.0 → 5.22.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 +15 -1
- package/index.js +28 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -968,6 +968,17 @@ type ModelInputById = {
|
|
|
968
968
|
enhancePrompt?: boolean;
|
|
969
969
|
imageUrls?: string[];
|
|
970
970
|
promptExtendMode?: "direct" | "agent";
|
|
971
|
+
enableThinking?: boolean;
|
|
972
|
+
};
|
|
973
|
+
"qwen-image-3.0-pro": {
|
|
974
|
+
prompt: string;
|
|
975
|
+
negativePrompt?: string;
|
|
976
|
+
resolution?: "2048x2048" | "2688x1536" | "1536x2688" | "2368x1728" | "1728x2368";
|
|
977
|
+
count?: 1 | 2 | 4 | 6;
|
|
978
|
+
enhancePrompt?: boolean;
|
|
979
|
+
imageUrls?: string[];
|
|
980
|
+
promptExtendMode?: "direct" | "agent";
|
|
981
|
+
enableThinking?: boolean;
|
|
971
982
|
};
|
|
972
983
|
"recraft-creative-upscale": {
|
|
973
984
|
imageUrls: [string, ...string[]];
|
|
@@ -2100,8 +2111,10 @@ interface GenerationContext {
|
|
|
2100
2111
|
substyle?: string;
|
|
2101
2112
|
thinkingLevel?: 'minimal' | 'high';
|
|
2102
2113
|
thinkingBudget?: number;
|
|
2103
|
-
/** Qwen 3.0 — prompt-rewrite strategy (`direct`/`agent`), sent as `prompt_extend_mode`. */
|
|
2114
|
+
/** Qwen 3.0 family — prompt-rewrite strategy (`direct`/`agent`), sent as `prompt_extend_mode`. */
|
|
2104
2115
|
promptExtendMode?: 'direct' | 'agent';
|
|
2116
|
+
/** Qwen 3.0 family — thinking mode (requires prompt_extend), sent as `enable_thinking`. */
|
|
2117
|
+
enableThinking?: boolean;
|
|
2105
2118
|
}
|
|
2106
2119
|
type PayloadBuilder<TContext extends GenerationContext = GenerationContext> = (ctx: TContext) => object;
|
|
2107
2120
|
/** Lightweight runtime schema contract used by SDK integrations. */
|
|
@@ -2630,6 +2643,7 @@ declare const Models: {
|
|
|
2630
2643
|
readonly QwenImage2: "qwen-image-2";
|
|
2631
2644
|
readonly QwenImage2Pro: "qwen-image-2-pro";
|
|
2632
2645
|
readonly QwenImage30: "qwen-image-3.0";
|
|
2646
|
+
readonly QwenImage30Pro: "qwen-image-3.0-pro";
|
|
2633
2647
|
readonly RecraftCreativeUpscale: "recraft-creative-upscale";
|
|
2634
2648
|
readonly RecraftCrispUpscale: "recraft-crisp-upscale";
|
|
2635
2649
|
readonly RecraftExplore: "recraft-explore";
|
package/index.js
CHANGED
|
@@ -6735,6 +6735,7 @@ var buildQwen2Payload = (ctx) => {
|
|
|
6735
6735
|
};
|
|
6736
6736
|
var buildQwenV1 = (model) => (ctx) => {
|
|
6737
6737
|
const hasImages = Array.isArray(ctx.imageUrls) && ctx.imageUrls.length > 0;
|
|
6738
|
+
const promptExtendMode = ctx.promptExtendMode === "agent" && hasImages && model === "qwen-image-3.0-pro" ? void 0 : ctx.promptExtendMode;
|
|
6738
6739
|
return {
|
|
6739
6740
|
prompt: ctx.prompt,
|
|
6740
6741
|
model,
|
|
@@ -6743,8 +6744,10 @@ var buildQwenV1 = (model) => (ctx) => {
|
|
|
6743
6744
|
size: (ctx.resolution ?? "2048x2048").replace("x", "*"),
|
|
6744
6745
|
n: ctx.count ?? 1,
|
|
6745
6746
|
prompt_extend: ctx.enhancePrompt ?? true,
|
|
6746
|
-
// Qwen 3.0 only — prompt-rewrite strategy (direct/agent); 2.x ignores it.
|
|
6747
|
-
...
|
|
6747
|
+
// Qwen 3.0 family only — prompt-rewrite strategy (direct/agent); 2.x ignores it.
|
|
6748
|
+
...promptExtendMode ? { prompt_extend_mode: promptExtendMode } : {},
|
|
6749
|
+
// Qwen 3.0 family only — thinking mode (requires prompt_extend).
|
|
6750
|
+
...ctx.enableThinking != null ? { enable_thinking: ctx.enableThinking } : {},
|
|
6748
6751
|
watermark: false,
|
|
6749
6752
|
...ctx.seed != null ? { seed: ctx.seed } : {}
|
|
6750
6753
|
};
|
|
@@ -6759,7 +6762,8 @@ var qwenV1Params = {
|
|
|
6759
6762
|
};
|
|
6760
6763
|
var qwenV1Params3 = {
|
|
6761
6764
|
...qwenV1Params,
|
|
6762
|
-
...p.enum("promptExtendMode", ["direct", "agent"], "direct")
|
|
6765
|
+
...p.enum("promptExtendMode", ["direct", "agent"], "direct"),
|
|
6766
|
+
...p.boolean("enableThinking", true, "Deep Thinking")
|
|
6763
6767
|
};
|
|
6764
6768
|
var { MODELS: MODELS28 } = defineModels("qwen", [
|
|
6765
6769
|
{
|
|
@@ -6837,6 +6841,25 @@ var { MODELS: MODELS28 } = defineModels("qwen", [
|
|
|
6837
6841
|
feat("2K", "resolution")
|
|
6838
6842
|
],
|
|
6839
6843
|
paramConfig: qwenV1Params3
|
|
6844
|
+
},
|
|
6845
|
+
{
|
|
6846
|
+
id: "qwen-image-3.0-pro",
|
|
6847
|
+
name: "Qwen 3.0 Pro",
|
|
6848
|
+
addedAt: "2026-08-31",
|
|
6849
|
+
workflow: "qwen/v1/text-to-image",
|
|
6850
|
+
editWorkflow: "qwen/v1/image-to-image",
|
|
6851
|
+
buildPayload: buildQwenV1("qwen-image-3.0-pro"),
|
|
6852
|
+
estimatedTime: 90,
|
|
6853
|
+
mode: "image",
|
|
6854
|
+
inputType: "t2i",
|
|
6855
|
+
badge: ["premium"],
|
|
6856
|
+
description: "Qwen-Image 3.0 Pro (GA) \u2014 flagship text-to-image and image editing with prompt-rewrite modes and thinking mode.",
|
|
6857
|
+
features: [
|
|
6858
|
+
feat("Image Input", "input"),
|
|
6859
|
+
feat("Negative Prompt", "characteristic"),
|
|
6860
|
+
feat("2K", "resolution")
|
|
6861
|
+
],
|
|
6862
|
+
paramConfig: qwenV1Params3
|
|
6840
6863
|
}
|
|
6841
6864
|
]);
|
|
6842
6865
|
|
|
@@ -10716,6 +10739,7 @@ var Qwen = "qwen";
|
|
|
10716
10739
|
var QwenImage2 = "qwen-image-2";
|
|
10717
10740
|
var QwenImage2Pro = "qwen-image-2-pro";
|
|
10718
10741
|
var QwenImage30 = "qwen-image-3.0";
|
|
10742
|
+
var QwenImage30Pro = "qwen-image-3.0-pro";
|
|
10719
10743
|
var RecraftCreativeUpscale = "recraft-creative-upscale";
|
|
10720
10744
|
var RecraftCrispUpscale = "recraft-crisp-upscale";
|
|
10721
10745
|
var RecraftExplore = "recraft-explore";
|
|
@@ -10926,6 +10950,7 @@ var Models = {
|
|
|
10926
10950
|
QwenImage2,
|
|
10927
10951
|
QwenImage2Pro,
|
|
10928
10952
|
QwenImage30,
|
|
10953
|
+
QwenImage30Pro,
|
|
10929
10954
|
RecraftCreativeUpscale,
|
|
10930
10955
|
RecraftCrispUpscale,
|
|
10931
10956
|
RecraftExplore,
|