@picsart/ai-sdk 3.19.0 → 3.21.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.
@@ -5942,6 +5942,8 @@ interface PikaTextToVideoResponse {
5942
5942
  }
5943
5943
  interface PikaVideoResult$3 {
5944
5944
  url: string;
5945
+ mimeType?: string;
5946
+ driveFile?: Record<string, unknown>;
5945
5947
  }
5946
5948
 
5947
5949
  interface PikaImageToVideoCommand {
@@ -5978,6 +5980,8 @@ interface PikaImageToVideoResponse {
5978
5980
  }
5979
5981
  interface PikaVideoResult$2 {
5980
5982
  url: string;
5983
+ mimeType?: string;
5984
+ driveFile?: Record<string, unknown>;
5981
5985
  }
5982
5986
 
5983
5987
  interface PikaScenesCommand {
@@ -6017,6 +6021,8 @@ interface PikaScenesResponse {
6017
6021
  }
6018
6022
  interface PikaVideoResult$1 {
6019
6023
  url: string;
6024
+ mimeType?: string;
6025
+ driveFile?: Record<string, unknown>;
6020
6026
  }
6021
6027
 
6022
6028
  interface PikaFramesCommand {
@@ -6054,6 +6060,8 @@ interface PikaFramesResponse {
6054
6060
  }
6055
6061
  interface PikaVideoResult {
6056
6062
  url: string;
6063
+ mimeType?: string;
6064
+ driveFile?: Record<string, unknown>;
6057
6065
  }
6058
6066
 
6059
6067
  interface IdeogramV3GenerateCommand {
package/index.d.ts CHANGED
@@ -220,6 +220,15 @@ type ModelInputById = {
220
220
  thinkingLevel?: "minimal" | "high";
221
221
  imageUrls?: string[];
222
222
  };
223
+ "gemini-3.5-flash-lite": {
224
+ prompt: string;
225
+ imageUrls?: string[];
226
+ };
227
+ "gemini-3.6-flash": {
228
+ prompt: string;
229
+ imageUrls?: string[];
230
+ thinking?: "off" | "low" | "medium" | "high";
231
+ };
223
232
  "gemini-omni-flash-preview": {
224
233
  prompt: string;
225
234
  aspectRatio?: "16:9" | "9:16";
@@ -885,6 +894,15 @@ type ModelInputById = {
885
894
  enhancePrompt?: boolean;
886
895
  imageUrls?: string[];
887
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
+ };
888
906
  "qwen-image-edit-plus": {
889
907
  prompt: string;
890
908
  imageUrls: [string, ...string[]];
@@ -1333,7 +1351,7 @@ type ModelInputById = {
1333
1351
  type TypedModelId = keyof ModelInputById;
1334
1352
  type ModelInput<M extends TypedModelId> = ModelInputById[M];
1335
1353
  /** IDs of text-generation (LLM) models — narrows generateText(). */
1336
- type TextModelId = "claude-haiku-4-5" | "claude-opus-4-8" | "claude-sonnet-4-6" | "gemini-3-pro" | "gpt-5.5";
1354
+ type TextModelId = "claude-haiku-4-5" | "claude-opus-4-8" | "claude-sonnet-4-6" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gpt-5.5";
1337
1355
  type TextModelInputById = Pick<ModelInputById, TextModelId>;
1338
1356
 
1339
1357
  /**
@@ -1955,6 +1973,8 @@ interface GenerationContext {
1955
1973
  substyle?: string;
1956
1974
  thinkingLevel?: 'minimal' | 'high';
1957
1975
  thinkingBudget?: number;
1976
+ /** Qwen 3.0 — prompt-rewrite strategy (`direct`/`agent`), sent as `prompt_extend_mode`. */
1977
+ promptExtendMode?: 'direct' | 'agent';
1958
1978
  }
1959
1979
  type PayloadBuilder<TContext extends GenerationContext = GenerationContext> = (ctx: TContext) => object;
1960
1980
  /** Lightweight runtime schema contract used by SDK integrations. */
@@ -2097,6 +2117,8 @@ declare const Models: {
2097
2117
  readonly Gemini3ProImage: "gemini-3-pro-image";
2098
2118
  readonly Gemini31FlashImage: "gemini-3.1-flash-image";
2099
2119
  readonly Gemini31FlashLiteImage: "gemini-3.1-flash-lite-image";
2120
+ readonly Gemini35FlashLite: "gemini-3.5-flash-lite";
2121
+ readonly Gemini36Flash: "gemini-3.6-flash";
2100
2122
  readonly GeminiOmniFlashPreview: "gemini-omni-flash-preview";
2101
2123
  readonly Gpt55: "gpt-5.5";
2102
2124
  readonly GptImage1: "gpt-image-1";
@@ -2192,6 +2214,7 @@ declare const Models: {
2192
2214
  readonly Qwen: "qwen";
2193
2215
  readonly QwenImage2: "qwen-image-2";
2194
2216
  readonly QwenImage2Pro: "qwen-image-2-pro";
2217
+ readonly QwenImage30: "qwen-image-3.0";
2195
2218
  readonly QwenImageEditPlus: "qwen-image-edit-plus";
2196
2219
  readonly RecraftCreativeUpscale: "recraft-creative-upscale";
2197
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,24 @@ 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
+ workflow: "qwen/v1/text-to-image",
6429
+ editWorkflow: "qwen/v1/image-to-image",
6430
+ buildPayload: buildQwenV1("qwen-image-3.0"),
6431
+ estimatedTime: 90,
6432
+ mode: "image",
6433
+ inputType: "t2i",
6434
+ description: "Qwen-Image 3.0 \u2014 highest-fidelity text-to-image and image editing with a selectable prompt-rewrite mode.",
6435
+ features: [
6436
+ feat("Image Input", "input"),
6437
+ feat("Negative Prompt", "characteristic"),
6438
+ feat("2K", "resolution")
6439
+ ],
6440
+ paramConfig: qwenV1Params3
6441
+ },
6418
6442
  {
6419
6443
  id: "qwen-image-edit-plus",
6420
6444
  name: "Qwen Edit Plus",
@@ -7768,6 +7792,39 @@ var { MODELS: GEMINI_LLM } = defineModels("google", [
7768
7792
  ...params.videoInput("Video", "reference", false),
7769
7793
  ...thinkingParam(["low", "high"])
7770
7794
  }
7795
+ },
7796
+ {
7797
+ id: "gemini-3.6-flash",
7798
+ name: "Gemini 3.6 Flash",
7799
+ workflow: "chat-completions",
7800
+ addedAt: "2026-07-22",
7801
+ estimatedTime: 5,
7802
+ mode: "text",
7803
+ inputType: "i2t",
7804
+ badge: ["fast"],
7805
+ description: "Fast Gemini model \u2014 low-latency multimodal text generation.",
7806
+ features: [feat("Vision", "input"), feat("Thinking", "characteristic")],
7807
+ paramConfig: {
7808
+ ...params.prompt(),
7809
+ ...params.imageInput(8, "Images"),
7810
+ ...thinkingParam(["low", "medium", "high"])
7811
+ }
7812
+ },
7813
+ {
7814
+ id: "gemini-3.5-flash-lite",
7815
+ name: "Gemini 3.5 Flash Lite",
7816
+ workflow: "chat-completions",
7817
+ addedAt: "2026-07-22",
7818
+ estimatedTime: 4,
7819
+ mode: "text",
7820
+ inputType: "i2t",
7821
+ badge: ["fast"],
7822
+ description: "Lightweight Gemini model \u2014 the fastest, most cost-efficient tier.",
7823
+ features: [feat("Vision", "input")],
7824
+ paramConfig: {
7825
+ ...params.prompt(),
7826
+ ...params.imageInput(8, "Images")
7827
+ }
7771
7828
  }
7772
7829
  ]);
7773
7830
  var MODELS36 = [...ANTHROPIC, ...OPENAI_LLM, ...GEMINI_LLM];
@@ -7826,7 +7883,11 @@ registerPayloads(MODELS36, {
7826
7883
  "claude-sonnet-4-6": buildClaudePayload("claude-sonnet-4-6"),
7827
7884
  "claude-haiku-4-5": buildClaudePayload("claude-haiku-4-5"),
7828
7885
  "gpt-5.5": buildOpenAiPayload("gpt-5.5"),
7829
- "gemini-3-pro": buildGeminiPayload("gemini-3-pro-preview")
7886
+ "gemini-3-pro": buildGeminiPayload("gemini-3-pro-preview"),
7887
+ // Flash models route through chat-completions (OpenAI-shaped), not the
7888
+ // native `gemini` workflow. flash-lite has no thinking param → reasoning_effort omitted.
7889
+ "gemini-3.6-flash": buildOpenAiPayload("gemini-3.6-flash"),
7890
+ "gemini-3.5-flash-lite": buildOpenAiPayload("gemini-3.5-flash-lite")
7830
7891
  });
7831
7892
 
7832
7893
  // src/vendors/catalog/index.ts
@@ -9786,6 +9847,8 @@ var Gemini3Pro = "gemini-3-pro";
9786
9847
  var Gemini3ProImage = "gemini-3-pro-image";
9787
9848
  var Gemini31FlashImage = "gemini-3.1-flash-image";
9788
9849
  var Gemini31FlashLiteImage = "gemini-3.1-flash-lite-image";
9850
+ var Gemini35FlashLite = "gemini-3.5-flash-lite";
9851
+ var Gemini36Flash = "gemini-3.6-flash";
9789
9852
  var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
9790
9853
  var Gpt55 = "gpt-5.5";
9791
9854
  var GptImage1 = "gpt-image-1";
@@ -9881,6 +9944,7 @@ var PixverseV6Image = "pixverse-v6-image";
9881
9944
  var Qwen = "qwen";
9882
9945
  var QwenImage2 = "qwen-image-2";
9883
9946
  var QwenImage2Pro = "qwen-image-2-pro";
9947
+ var QwenImage30 = "qwen-image-3.0";
9884
9948
  var QwenImageEditPlus = "qwen-image-edit-plus";
9885
9949
  var RecraftCreativeUpscale = "recraft-creative-upscale";
9886
9950
  var RecraftCrispUpscale = "recraft-crisp-upscale";
@@ -9975,6 +10039,8 @@ var Models = {
9975
10039
  Gemini3ProImage,
9976
10040
  Gemini31FlashImage,
9977
10041
  Gemini31FlashLiteImage,
10042
+ Gemini35FlashLite,
10043
+ Gemini36Flash,
9978
10044
  GeminiOmniFlashPreview,
9979
10045
  Gpt55,
9980
10046
  GptImage1,
@@ -10070,6 +10136,7 @@ var Models = {
10070
10136
  Qwen,
10071
10137
  QwenImage2,
10072
10138
  QwenImage2Pro,
10139
+ QwenImage30,
10073
10140
  QwenImageEditPlus,
10074
10141
  RecraftCreativeUpscale,
10075
10142
  RecraftCrispUpscale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "3.19.0",
3
+ "version": "3.21.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",