@picsart/ai-sdk 6.28.0 → 6.29.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 +10 -9
  2. package/index.js +18 -21
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -506,6 +506,15 @@ type ModelInputById = {
506
506
  voiceName: string;
507
507
  }>;
508
508
  };
509
+ "gemini-nano-banana-2.1": {
510
+ prompt: string;
511
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9" | "auto";
512
+ resolution?: "1K" | "2K" | "4K";
513
+ count?: 1 | 2 | 4 | 6 | 8 | 10;
514
+ seed?: number;
515
+ thinkingLevel?: "minimal" | "medium" | "high";
516
+ imageUrls?: string[];
517
+ };
509
518
  "gemini-omni-1.1-flash-preview": {
510
519
  prompt: string;
511
520
  aspectRatio?: "16:9" | "9:16";
@@ -1894,14 +1903,6 @@ type ModelInputById = {
1894
1903
  imageUrls?: string[];
1895
1904
  negativePrompt?: string;
1896
1905
  };
1897
- "spicy-mayo": {
1898
- prompt: string;
1899
- aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9" | "auto";
1900
- count?: 1 | 2 | 4 | 6 | 8 | 10;
1901
- seed?: number;
1902
- thinkingLevel?: "minimal" | "medium" | "high";
1903
- imageUrls?: string[];
1904
- };
1905
1906
  "topaz-upscale-image": {
1906
1907
  imageUrls: [string, ...string[]];
1907
1908
  model?: "Standard V2" | "Standard MAX" | "Low Resolution V2" | "High Fidelity V2" | "CGI" | "Text Refine" | "Redefine" | "Recovery" | "Recovery V2" | "Wonder" | "Wonder 3";
@@ -3385,6 +3386,7 @@ declare const Models: {
3385
3386
  readonly Gemini38Flash: "gemini-3.8-flash";
3386
3387
  readonly Gemini38FlashLiteTts: "gemini-3.8-flash-lite-tts";
3387
3388
  readonly Gemini38FlashTts: "gemini-3.8-flash-tts";
3389
+ readonly GeminiNanoBanana21: "gemini-nano-banana-2.1";
3388
3390
  readonly GeminiOmni11FlashPreview: "gemini-omni-1.1-flash-preview";
3389
3391
  readonly GeminiOmniFlashPreview: "gemini-omni-flash-preview";
3390
3392
  readonly Gpt41Mini: "gpt-4.1-mini";
@@ -3567,7 +3569,6 @@ declare const Models: {
3567
3569
  readonly Seedream50Flash: "seedream-5.0-flash";
3568
3570
  readonly Seedream50Lite: "seedream-5.0-lite";
3569
3571
  readonly Seedream50Pro: "seedream-5.0-pro";
3570
- readonly SpicyMayo: "spicy-mayo";
3571
3572
  readonly TopazUpscaleImage: "topaz-upscale-image";
3572
3573
  readonly TopazUpscaleVideo: "topaz-upscale-video";
3573
3574
  readonly TypesafeEvaluate: "typesafe-evaluate";
package/index.js CHANGED
@@ -6489,14 +6489,14 @@ var buildGemini31FlashLiteImagePayload = (ctx) => ({
6489
6489
  imageSize: ctx.resolution ?? "1K",
6490
6490
  ...buildThinkingConfig(ctx)
6491
6491
  });
6492
- var buildSpicyMayoPayload = (ctx) => ({
6492
+ var buildNanoBanana21Payload = (ctx) => ({
6493
6493
  prompt: ctx.prompt,
6494
- model: "spicy-mayo",
6494
+ model: "gemini-nano-banana-2.1",
6495
6495
  count: ctx.count ?? 1,
6496
6496
  ...ctx.seed != null ? { seed: ctx.seed } : {},
6497
6497
  ...ctx.imageUrls?.length ? { imageUrls: ctx.imageUrls } : {},
6498
6498
  aspectRatio: ctx.aspectRatio ?? "1:1",
6499
- imageSize: "1K",
6499
+ imageSize: ctx.resolution ?? "1K",
6500
6500
  ...buildThinkingConfig(ctx)
6501
6501
  });
6502
6502
  function inferMimeType2(url) {
@@ -6577,7 +6577,7 @@ var thinkingBudgetParam = {
6577
6577
  descriptor: { kind: "range", min: 128, max: 24576, step: 128, default: 128 }
6578
6578
  }
6579
6579
  };
6580
- var spicyMayoThinkingParam = {
6580
+ var nanoBanana21ThinkingParam = {
6581
6581
  thinkingLevel: {
6582
6582
  label: "Thinking",
6583
6583
  descriptor: {
@@ -6595,31 +6595,28 @@ var spicyMayoThinkingParam = {
6595
6595
  var { MODELS: MODELS22 } = defineModels("google", [
6596
6596
  // ── Image ─────────────────────────────────────────────────────────
6597
6597
  {
6598
- id: "spicy-mayo",
6599
- name: "Spicy Mayo",
6600
- addedAt: "2026-10-02",
6601
- // Confidential early access at the vendor, authorized for named projects
6602
- // only — stage until the co-launch clears it for prod.
6603
- release: "preview",
6598
+ id: "gemini-nano-banana-2.1",
6599
+ name: "Nano Banana 2.1",
6600
+ addedAt: "2026-10-06",
6604
6601
  workflow: "gemini/v2/images",
6605
- buildPayload: buildSpicyMayoPayload,
6606
- // Measured end-to-end against stage at 1K/1:1: 9s to generate, 13s to edit
6607
- // with two reference images. Rounded up — vendor testing capacity is capped.
6608
- estimatedTime: 15,
6602
+ buildPayload: buildNanoBanana21Payload,
6603
+ // Measured end-to-end through the worker (generation plus the CDN upload a caller
6604
+ // waits on), two runs per tier: 1K 15-17s, 2K 28-29s, 4K 45-50s. Rounded up.
6605
+ estimatedTime: { "1K": 18, "2K": 30, "4K": 50 },
6609
6606
  mode: "image",
6610
6607
  inputType: "t2i",
6611
- modelId: "spicy-mayo",
6608
+ modelId: "gemini-nano-banana-2.1",
6612
6609
  badge: ["fast"],
6613
6610
  description: "Fast Google image generation and editing with multi-image references.",
6614
- // Only the 1K tier is priced, so no `resolution` param: the builder pins
6615
- // imageSize and anything else is a 400 from the worker.
6616
- features: [feat("Multi-Image Input", "input"), feat("1K", "resolution")],
6611
+ features: [feat("Multi-Image Input", "input"), feat("4K", "resolution")],
6617
6612
  paramConfig: {
6618
6613
  ...params.prompt(),
6619
6614
  ...params.aspectRatio([...GEMINI_AR_WIDE], "1:1"),
6615
+ // 0.5K is rejected by the vendor; 1K/2K/4K each genuinely scale the output.
6616
+ ...params.resolution(["1K", "2K", "4K"], "1K"),
6620
6617
  ...params.count(),
6621
6618
  ...params.seed(),
6622
- ...spicyMayoThinkingParam,
6619
+ ...nanoBanana21ThinkingParam,
6623
6620
  ...params.imageInput(14, "Source Images")
6624
6621
  }
6625
6622
  },
@@ -13646,6 +13643,7 @@ var Gemini37Flash = "gemini-3.7-flash";
13646
13643
  var Gemini38Flash = "gemini-3.8-flash";
13647
13644
  var Gemini38FlashLiteTts = "gemini-3.8-flash-lite-tts";
13648
13645
  var Gemini38FlashTts = "gemini-3.8-flash-tts";
13646
+ var GeminiNanoBanana21 = "gemini-nano-banana-2.1";
13649
13647
  var GeminiOmni11FlashPreview = "gemini-omni-1.1-flash-preview";
13650
13648
  var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
13651
13649
  var Gpt41Mini = "gpt-4.1-mini";
@@ -13828,7 +13826,6 @@ var Seedream47 = "seedream-4.7";
13828
13826
  var Seedream50Flash = "seedream-5.0-flash";
13829
13827
  var Seedream50Lite = "seedream-5.0-lite";
13830
13828
  var Seedream50Pro = "seedream-5.0-pro";
13831
- var SpicyMayo = "spicy-mayo";
13832
13829
  var TopazUpscaleImage = "topaz-upscale-image";
13833
13830
  var TopazUpscaleVideo = "topaz-upscale-video";
13834
13831
  var TypesafeEvaluate = "typesafe-evaluate";
@@ -13903,6 +13900,7 @@ var Models = {
13903
13900
  Gemini38Flash,
13904
13901
  Gemini38FlashLiteTts,
13905
13902
  Gemini38FlashTts,
13903
+ GeminiNanoBanana21,
13906
13904
  GeminiOmni11FlashPreview,
13907
13905
  GeminiOmniFlashPreview,
13908
13906
  Gpt41Mini,
@@ -14085,7 +14083,6 @@ var Models = {
14085
14083
  Seedream50Flash,
14086
14084
  Seedream50Lite,
14087
14085
  Seedream50Pro,
14088
- SpicyMayo,
14089
14086
  TopazUpscaleImage,
14090
14087
  TopazUpscaleVideo,
14091
14088
  TypesafeEvaluate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.28.0",
3
+ "version": "6.29.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",