@picsart/ai-sdk 6.28.0 → 6.30.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/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";
@@ -1194,6 +1203,14 @@ type ModelInputById = {
1194
1203
  seed?: number;
1195
1204
  enableSafetyChecker?: boolean;
1196
1205
  };
1206
+ "minimax-h3-max-relight": {
1207
+ videoUrl: string;
1208
+ imageUrls: [string, ...string[]];
1209
+ resolution?: "480p" | "768p" | "1080p" | "2k";
1210
+ aspectRatio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
1211
+ seed?: number;
1212
+ enableSafetyChecker?: boolean;
1213
+ };
1197
1214
  "minimax-h3-max-turbo": {
1198
1215
  prompt: string;
1199
1216
  startFrame?: string;
@@ -1894,14 +1911,6 @@ type ModelInputById = {
1894
1911
  imageUrls?: string[];
1895
1912
  negativePrompt?: string;
1896
1913
  };
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
1914
  "topaz-upscale-image": {
1906
1915
  imageUrls: [string, ...string[]];
1907
1916
  model?: "Standard V2" | "Standard MAX" | "Low Resolution V2" | "High Fidelity V2" | "CGI" | "Text Refine" | "Redefine" | "Recovery" | "Recovery V2" | "Wonder" | "Wonder 3";
@@ -3385,6 +3394,7 @@ declare const Models: {
3385
3394
  readonly Gemini38Flash: "gemini-3.8-flash";
3386
3395
  readonly Gemini38FlashLiteTts: "gemini-3.8-flash-lite-tts";
3387
3396
  readonly Gemini38FlashTts: "gemini-3.8-flash-tts";
3397
+ readonly GeminiNanoBanana21: "gemini-nano-banana-2.1";
3388
3398
  readonly GeminiOmni11FlashPreview: "gemini-omni-1.1-flash-preview";
3389
3399
  readonly GeminiOmniFlashPreview: "gemini-omni-flash-preview";
3390
3400
  readonly Gpt41Mini: "gpt-4.1-mini";
@@ -3475,6 +3485,7 @@ declare const Models: {
3475
3485
  readonly MinimaxH3MaxCameraControls: "minimax-h3-max-camera-controls";
3476
3486
  readonly MinimaxH3MaxExtend: "minimax-h3-max-extend";
3477
3487
  readonly MinimaxH3MaxLipSync: "minimax-h3-max-lip-sync";
3488
+ readonly MinimaxH3MaxRelight: "minimax-h3-max-relight";
3478
3489
  readonly MinimaxH3MaxTurbo: "minimax-h3-max-turbo";
3479
3490
  readonly MinimaxMusicV2: "minimax-music-v2";
3480
3491
  readonly MinimaxMusicV3: "minimax-music-v3";
@@ -3567,7 +3578,6 @@ declare const Models: {
3567
3578
  readonly Seedream50Flash: "seedream-5.0-flash";
3568
3579
  readonly Seedream50Lite: "seedream-5.0-lite";
3569
3580
  readonly Seedream50Pro: "seedream-5.0-pro";
3570
- readonly SpicyMayo: "spicy-mayo";
3571
3581
  readonly TopazUpscaleImage: "topaz-upscale-image";
3572
3582
  readonly TopazUpscaleVideo: "topaz-upscale-video";
3573
3583
  readonly TypesafeEvaluate: "typesafe-evaluate";
package/index.js CHANGED
@@ -3287,6 +3287,41 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
3287
3287
  // Default-less on purpose: unset means the vendor picks a random seed.
3288
3288
  ...params.seed()
3289
3289
  }
3290
+ },
3291
+ {
3292
+ // Relight sibling of minimax-h3-max: re-lights an existing clip to match
3293
+ // a lighting-reference image (a sphere render showing the target light).
3294
+ // No prompt and no duration on this wire — the output keeps the source
3295
+ // clip's length (the source is converted to constant 24 fps and trimmed
3296
+ // to the closest 17n+5 frame count, with at least ~2.33s remaining).
3297
+ id: "minimax-h3-max-relight",
3298
+ name: "MiniMax H3 Max Relight",
3299
+ modelId: "fal-ai-h3-max-relight",
3300
+ addedAt: "2026-10-08",
3301
+ workflow: "minimax/h3-max/relight",
3302
+ estimatedTime: 120,
3303
+ mode: "video",
3304
+ inputType: "v2v",
3305
+ description: "Relight an existing video with MiniMax H3 Max \u2014 a sphere-render reference image sets the target lighting and the output keeps the source clip's length. Sources up to 15s, output up to 2K.",
3306
+ features: [
3307
+ feat("Relight", "characteristic"),
3308
+ feat("Video Input", "input"),
3309
+ feat("Image Input", "input"),
3310
+ feat("2K", "resolution")
3311
+ ],
3312
+ paramConfig: {
3313
+ ...params.videoInput("Source Video", "asset", true, 15),
3314
+ // The target lighting, as a sphere render.
3315
+ ...params.imageInput(1, "Lighting Reference", true, "reference"),
3316
+ // 480p/768p generate natively; 1080p and 2K are latent refinements
3317
+ // of a native 768p generation.
3318
+ ...params.resolution(["480p", "768p", "1080p", "2k"], "768p"),
3319
+ // 'adaptive' follows the source video's ratio.
3320
+ ...params.aspectRatio(["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "16:9"),
3321
+ // Default-less on purpose: unset means the vendor picks a random seed.
3322
+ ...params.seed(),
3323
+ ...p.boolean("enableSafetyChecker", true, "Safety Checker")
3324
+ }
3290
3325
  }
3291
3326
  ]);
3292
3327
 
@@ -6489,14 +6524,14 @@ var buildGemini31FlashLiteImagePayload = (ctx) => ({
6489
6524
  imageSize: ctx.resolution ?? "1K",
6490
6525
  ...buildThinkingConfig(ctx)
6491
6526
  });
6492
- var buildSpicyMayoPayload = (ctx) => ({
6527
+ var buildNanoBanana21Payload = (ctx) => ({
6493
6528
  prompt: ctx.prompt,
6494
- model: "spicy-mayo",
6529
+ model: "gemini-nano-banana-2.1",
6495
6530
  count: ctx.count ?? 1,
6496
6531
  ...ctx.seed != null ? { seed: ctx.seed } : {},
6497
6532
  ...ctx.imageUrls?.length ? { imageUrls: ctx.imageUrls } : {},
6498
6533
  aspectRatio: ctx.aspectRatio ?? "1:1",
6499
- imageSize: "1K",
6534
+ imageSize: ctx.resolution ?? "1K",
6500
6535
  ...buildThinkingConfig(ctx)
6501
6536
  });
6502
6537
  function inferMimeType2(url) {
@@ -6577,7 +6612,7 @@ var thinkingBudgetParam = {
6577
6612
  descriptor: { kind: "range", min: 128, max: 24576, step: 128, default: 128 }
6578
6613
  }
6579
6614
  };
6580
- var spicyMayoThinkingParam = {
6615
+ var nanoBanana21ThinkingParam = {
6581
6616
  thinkingLevel: {
6582
6617
  label: "Thinking",
6583
6618
  descriptor: {
@@ -6595,31 +6630,28 @@ var spicyMayoThinkingParam = {
6595
6630
  var { MODELS: MODELS22 } = defineModels("google", [
6596
6631
  // ── Image ─────────────────────────────────────────────────────────
6597
6632
  {
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",
6633
+ id: "gemini-nano-banana-2.1",
6634
+ name: "Nano Banana 2.1",
6635
+ addedAt: "2026-10-06",
6604
6636
  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,
6637
+ buildPayload: buildNanoBanana21Payload,
6638
+ // Measured end-to-end through the worker (generation plus the CDN upload a caller
6639
+ // waits on), two runs per tier: 1K 15-17s, 2K 28-29s, 4K 45-50s. Rounded up.
6640
+ estimatedTime: { "1K": 18, "2K": 30, "4K": 50 },
6609
6641
  mode: "image",
6610
6642
  inputType: "t2i",
6611
- modelId: "spicy-mayo",
6643
+ modelId: "gemini-nano-banana-2.1",
6612
6644
  badge: ["fast"],
6613
6645
  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")],
6646
+ features: [feat("Multi-Image Input", "input"), feat("4K", "resolution")],
6617
6647
  paramConfig: {
6618
6648
  ...params.prompt(),
6619
6649
  ...params.aspectRatio([...GEMINI_AR_WIDE], "1:1"),
6650
+ // 0.5K is rejected by the vendor; 1K/2K/4K each genuinely scale the output.
6651
+ ...params.resolution(["1K", "2K", "4K"], "1K"),
6620
6652
  ...params.count(),
6621
6653
  ...params.seed(),
6622
- ...spicyMayoThinkingParam,
6654
+ ...nanoBanana21ThinkingParam,
6623
6655
  ...params.imageInput(14, "Source Images")
6624
6656
  }
6625
6657
  },
@@ -8004,13 +8036,24 @@ var buildMinimaxH3MaxExtendPayload = (input) => ({
8004
8036
  enable_prompt_expansion: input.enhancePrompt ?? true,
8005
8037
  enable_safety_checker: input.enableSafetyChecker ?? true
8006
8038
  });
8039
+ var buildMinimaxH3MaxRelightPayload = (input) => ({
8040
+ video_url: input.videoUrl,
8041
+ // The single lighting reference travels as a scalar on the wire.
8042
+ reference_image_url: input.imageUrls?.[0],
8043
+ // The vendor enum is uppercase; paramConfig keeps the lowercase form.
8044
+ resolution: (input.resolution ?? "768p").toUpperCase(),
8045
+ aspect_ratio: input.aspectRatio ?? "16:9",
8046
+ ...input.seed != null ? { seed: input.seed } : {},
8047
+ enable_safety_checker: input.enableSafetyChecker ?? true
8048
+ });
8007
8049
  registerPayloads(MODELS9, {
8008
8050
  "minimax-music-v3": buildMinimaxMusicV3Payload,
8009
8051
  "minimax-h3-max": buildMinimaxH3MaxPayload,
8010
8052
  "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload,
8011
8053
  "minimax-h3-max-camera-controls": buildMinimaxH3MaxCameraControlsPayload,
8012
8054
  "minimax-h3-max-lip-sync": buildMinimaxH3MaxLipSyncPayload,
8013
- "minimax-h3-max-extend": buildMinimaxH3MaxExtendPayload
8055
+ "minimax-h3-max-extend": buildMinimaxH3MaxExtendPayload,
8056
+ "minimax-h3-max-relight": buildMinimaxH3MaxRelightPayload
8014
8057
  });
8015
8058
  registerEditPayloads(MODELS9, {
8016
8059
  "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload
@@ -13646,6 +13689,7 @@ var Gemini37Flash = "gemini-3.7-flash";
13646
13689
  var Gemini38Flash = "gemini-3.8-flash";
13647
13690
  var Gemini38FlashLiteTts = "gemini-3.8-flash-lite-tts";
13648
13691
  var Gemini38FlashTts = "gemini-3.8-flash-tts";
13692
+ var GeminiNanoBanana21 = "gemini-nano-banana-2.1";
13649
13693
  var GeminiOmni11FlashPreview = "gemini-omni-1.1-flash-preview";
13650
13694
  var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
13651
13695
  var Gpt41Mini = "gpt-4.1-mini";
@@ -13736,6 +13780,7 @@ var MinimaxH3Max = "minimax-h3-max";
13736
13780
  var MinimaxH3MaxCameraControls = "minimax-h3-max-camera-controls";
13737
13781
  var MinimaxH3MaxExtend = "minimax-h3-max-extend";
13738
13782
  var MinimaxH3MaxLipSync = "minimax-h3-max-lip-sync";
13783
+ var MinimaxH3MaxRelight = "minimax-h3-max-relight";
13739
13784
  var MinimaxH3MaxTurbo = "minimax-h3-max-turbo";
13740
13785
  var MinimaxMusicV2 = "minimax-music-v2";
13741
13786
  var MinimaxMusicV3 = "minimax-music-v3";
@@ -13828,7 +13873,6 @@ var Seedream47 = "seedream-4.7";
13828
13873
  var Seedream50Flash = "seedream-5.0-flash";
13829
13874
  var Seedream50Lite = "seedream-5.0-lite";
13830
13875
  var Seedream50Pro = "seedream-5.0-pro";
13831
- var SpicyMayo = "spicy-mayo";
13832
13876
  var TopazUpscaleImage = "topaz-upscale-image";
13833
13877
  var TopazUpscaleVideo = "topaz-upscale-video";
13834
13878
  var TypesafeEvaluate = "typesafe-evaluate";
@@ -13903,6 +13947,7 @@ var Models = {
13903
13947
  Gemini38Flash,
13904
13948
  Gemini38FlashLiteTts,
13905
13949
  Gemini38FlashTts,
13950
+ GeminiNanoBanana21,
13906
13951
  GeminiOmni11FlashPreview,
13907
13952
  GeminiOmniFlashPreview,
13908
13953
  Gpt41Mini,
@@ -13993,6 +14038,7 @@ var Models = {
13993
14038
  MinimaxH3MaxCameraControls,
13994
14039
  MinimaxH3MaxExtend,
13995
14040
  MinimaxH3MaxLipSync,
14041
+ MinimaxH3MaxRelight,
13996
14042
  MinimaxH3MaxTurbo,
13997
14043
  MinimaxMusicV2,
13998
14044
  MinimaxMusicV3,
@@ -14085,7 +14131,6 @@ var Models = {
14085
14131
  Seedream50Flash,
14086
14132
  Seedream50Lite,
14087
14133
  Seedream50Pro,
14088
- SpicyMayo,
14089
14134
  TopazUpscaleImage,
14090
14135
  TopazUpscaleVideo,
14091
14136
  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.30.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",