@picsart/ai-sdk 3.20.0 → 3.22.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.
Files changed (3) hide show
  1. package/index.d.ts +12 -0
  2. package/index.js +27 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -894,6 +894,15 @@ type ModelInputById = {
894
894
  enhancePrompt?: boolean;
895
895
  imageUrls?: string[];
896
896
  };
897
+ "qwen-image-3.0": {
898
+ prompt: string;
899
+ negativePrompt?: string;
900
+ resolution?: "2048x2048" | "2688x1536" | "1536x2688" | "2368x1728" | "1728x2368";
901
+ count?: 1 | 2 | 4 | 6;
902
+ enhancePrompt?: boolean;
903
+ imageUrls?: string[];
904
+ promptExtendMode?: "direct" | "agent";
905
+ };
897
906
  "qwen-image-edit-plus": {
898
907
  prompt: string;
899
908
  imageUrls: [string, ...string[]];
@@ -1964,6 +1973,8 @@ interface GenerationContext {
1964
1973
  substyle?: string;
1965
1974
  thinkingLevel?: 'minimal' | 'high';
1966
1975
  thinkingBudget?: number;
1976
+ /** Qwen 3.0 — prompt-rewrite strategy (`direct`/`agent`), sent as `prompt_extend_mode`. */
1977
+ promptExtendMode?: 'direct' | 'agent';
1967
1978
  }
1968
1979
  type PayloadBuilder<TContext extends GenerationContext = GenerationContext> = (ctx: TContext) => object;
1969
1980
  /** Lightweight runtime schema contract used by SDK integrations. */
@@ -2203,6 +2214,7 @@ declare const Models: {
2203
2214
  readonly Qwen: "qwen";
2204
2215
  readonly QwenImage2: "qwen-image-2";
2205
2216
  readonly QwenImage2Pro: "qwen-image-2-pro";
2217
+ readonly QwenImage30: "qwen-image-3.0";
2206
2218
  readonly QwenImageEditPlus: "qwen-image-edit-plus";
2207
2219
  readonly RecraftCreativeUpscale: "recraft-creative-upscale";
2208
2220
  readonly RecraftCrispUpscale: "recraft-crisp-upscale";
package/index.js CHANGED
@@ -6345,6 +6345,8 @@ var buildQwenV1 = (model) => (ctx) => {
6345
6345
  size: (ctx.resolution ?? "2048x2048").replace("x", "*"),
6346
6346
  n: ctx.count ?? 1,
6347
6347
  prompt_extend: ctx.enhancePrompt ?? true,
6348
+ // Qwen 3.0 only — prompt-rewrite strategy (direct/agent); 2.x ignores it.
6349
+ ...ctx.promptExtendMode ? { prompt_extend_mode: ctx.promptExtendMode } : {},
6348
6350
  watermark: false,
6349
6351
  ...ctx.seed != null ? { seed: ctx.seed } : {}
6350
6352
  };
@@ -6357,6 +6359,10 @@ var qwenV1Params = {
6357
6359
  ...params.enhancePrompt(true),
6358
6360
  ...params.imageInput(3, "Source Images")
6359
6361
  };
6362
+ var qwenV1Params3 = {
6363
+ ...qwenV1Params,
6364
+ ...p.enum("promptExtendMode", ["direct", "agent"], "direct")
6365
+ };
6360
6366
  var { MODELS: MODELS28 } = defineModels("qwen", [
6361
6367
  {
6362
6368
  id: "qwen",
@@ -6415,6 +6421,25 @@ var { MODELS: MODELS28 } = defineModels("qwen", [
6415
6421
  ],
6416
6422
  paramConfig: qwenV1Params
6417
6423
  },
6424
+ {
6425
+ id: "qwen-image-3.0",
6426
+ name: "Qwen 3.0",
6427
+ addedAt: "2026-07-27",
6428
+ release: "preview",
6429
+ workflow: "qwen/v1/text-to-image",
6430
+ editWorkflow: "qwen/v1/image-to-image",
6431
+ buildPayload: buildQwenV1("qwen-image-3.0"),
6432
+ estimatedTime: 90,
6433
+ mode: "image",
6434
+ inputType: "t2i",
6435
+ description: "Qwen-Image 3.0 \u2014 highest-fidelity text-to-image and image editing with a selectable prompt-rewrite mode.",
6436
+ features: [
6437
+ feat("Image Input", "input"),
6438
+ feat("Negative Prompt", "characteristic"),
6439
+ feat("2K", "resolution")
6440
+ ],
6441
+ paramConfig: qwenV1Params3
6442
+ },
6418
6443
  {
6419
6444
  id: "qwen-image-edit-plus",
6420
6445
  name: "Qwen Edit Plus",
@@ -9920,6 +9945,7 @@ var PixverseV6Image = "pixverse-v6-image";
9920
9945
  var Qwen = "qwen";
9921
9946
  var QwenImage2 = "qwen-image-2";
9922
9947
  var QwenImage2Pro = "qwen-image-2-pro";
9948
+ var QwenImage30 = "qwen-image-3.0";
9923
9949
  var QwenImageEditPlus = "qwen-image-edit-plus";
9924
9950
  var RecraftCreativeUpscale = "recraft-creative-upscale";
9925
9951
  var RecraftCrispUpscale = "recraft-crisp-upscale";
@@ -10111,6 +10137,7 @@ var Models = {
10111
10137
  Qwen,
10112
10138
  QwenImage2,
10113
10139
  QwenImage2Pro,
10140
+ QwenImage30,
10114
10141
  QwenImageEditPlus,
10115
10142
  RecraftCreativeUpscale,
10116
10143
  RecraftCrispUpscale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "3.20.0",
3
+ "version": "3.22.0",
4
4
  "type": "module",
5
5
  "description": "Type-safe SDK for 100+ AI models — image, video, audio, and text generation with Picsart",
6
6
  "license": "MIT",