@picsart/ai-sdk 6.38.0 → 6.40.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 +19 -1
  2. package/index.js +88 -1
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -517,6 +517,12 @@ type ModelInputById = {
517
517
  voiceName: string;
518
518
  }>;
519
519
  };
520
+ "gemini-4-argon": {
521
+ prompt: string;
522
+ imageUrls?: string[];
523
+ videoUrl?: string;
524
+ thinking?: "off" | "low" | "high";
525
+ };
520
526
  "gemini-nano-banana-2.1": {
521
527
  prompt: string;
522
528
  aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9" | "auto";
@@ -1183,6 +1189,16 @@ type ModelInputById = {
1183
1189
  duration?: number;
1184
1190
  aspectRatio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
1185
1191
  };
1192
+ "minimax-h3-context-ir": {
1193
+ prompt: string;
1194
+ startFrame?: string;
1195
+ endFrame?: string;
1196
+ imageUrls?: string[];
1197
+ videoUrls?: string[];
1198
+ audioUrls?: string[];
1199
+ duration?: number;
1200
+ aspectRatio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
1201
+ };
1186
1202
  "minimax-h3-max": {
1187
1203
  prompt: string;
1188
1204
  startFrame?: string;
@@ -2098,7 +2114,7 @@ type ModelInputById = {
2098
2114
  type TypedModelId = keyof ModelInputById;
2099
2115
  type ModelInput<M extends TypedModelId> = ModelInputById[M];
2100
2116
  /** IDs of text-generation (LLM) models — narrows generateText(). */
2101
- type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol" | "grok-4.7" | "kimi-k3";
2117
+ type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gemini-4-argon" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol" | "grok-4.7" | "kimi-k3" | "minimax-h3-context-ir";
2102
2118
  type TextModelInputById = Pick<ModelInputById, TextModelId>;
2103
2119
  /** IDs of structured-output (json-mode) models — narrows run()'s result type. */
2104
2120
  type JsonModelId = "typesafe-evaluate";
@@ -3515,6 +3531,7 @@ declare const Models: {
3515
3531
  readonly Gemini38Flash: "gemini-3.8-flash";
3516
3532
  readonly Gemini38FlashLiteTts: "gemini-3.8-flash-lite-tts";
3517
3533
  readonly Gemini38FlashTts: "gemini-3.8-flash-tts";
3534
+ readonly Gemini4Argon: "gemini-4-argon";
3518
3535
  readonly GeminiNanoBanana21: "gemini-nano-banana-2.1";
3519
3536
  readonly GeminiOmni11FlashPreview: "gemini-omni-1.1-flash-preview";
3520
3537
  readonly GeminiOmniFlashPreview: "gemini-omni-flash-preview";
@@ -3605,6 +3622,7 @@ declare const Models: {
3605
3622
  readonly Lyria3Pro: "lyria-3-pro";
3606
3623
  readonly Lyria35: "lyria-3.5";
3607
3624
  readonly MinimaxH3: "minimax-h3";
3625
+ readonly MinimaxH3ContextIr: "minimax-h3-context-ir";
3608
3626
  readonly MinimaxH3Max: "minimax-h3-max";
3609
3627
  readonly MinimaxH3MaxCameraControls: "minimax-h3-max-camera-controls";
3610
3628
  readonly MinimaxH3MaxExtend: "minimax-h3-max-extend";
package/index.js CHANGED
@@ -10502,6 +10502,24 @@ var { MODELS: OPENAI_LLM } = defineModels("openai", [
10502
10502
  }
10503
10503
  ]);
10504
10504
  var { MODELS: GEMINI_LLM } = defineModels("google", [
10505
+ {
10506
+ id: "gemini-4-argon",
10507
+ name: "Gemini 4 Argon",
10508
+ workflow: "gemini",
10509
+ addedAt: "2026-10-14",
10510
+ estimatedTime: 8,
10511
+ mode: "text",
10512
+ inputType: "v2t",
10513
+ badge: ["premium"],
10514
+ description: "Google\u2019s flagship Gemini 4 reasoning model \u2014 text, image, and video with deep reasoning and 1M-token context.",
10515
+ features: [feat("Vision", "input"), feat("Video Input", "input"), feat("Thinking", "characteristic")],
10516
+ paramConfig: {
10517
+ ...params.prompt(),
10518
+ ...params.imageInput(8, "Images"),
10519
+ ...params.videoInput("Video", "reference", false),
10520
+ ...thinkingParam(["low", "high"])
10521
+ }
10522
+ },
10505
10523
  {
10506
10524
  id: "gemini-3-pro",
10507
10525
  name: "Gemini 3 Pro",
@@ -10646,7 +10664,56 @@ var { MODELS: GROK_LLM } = defineModels("grok", [
10646
10664
  }
10647
10665
  }
10648
10666
  ]);
10649
- var MODELS35 = [...ANTHROPIC, ...OPENAI_LLM, ...GEMINI_LLM, ...KIMI_LLM, ...GROK_LLM];
10667
+ var H3_FRAME_REF_EXCLUSIVE = "References and start/end frames cannot be combined.";
10668
+ var H3_FRAME_EXCLUDES_REFERENCES = {
10669
+ imageUrls: { disabled: true, reason: H3_FRAME_REF_EXCLUSIVE },
10670
+ videoUrls: { disabled: true, reason: H3_FRAME_REF_EXCLUSIVE },
10671
+ audioUrls: { disabled: true, reason: H3_FRAME_REF_EXCLUSIVE }
10672
+ };
10673
+ var H3_REFERENCE_EXCLUDES_FRAMES = {
10674
+ startFrame: { disabled: true, reason: H3_FRAME_REF_EXCLUSIVE },
10675
+ endFrame: { disabled: true, reason: H3_FRAME_REF_EXCLUSIVE }
10676
+ };
10677
+ var h3ContextIrConstraints = [
10678
+ { when: { startFrame: { exists: true } }, then: H3_FRAME_EXCLUDES_REFERENCES },
10679
+ { when: { endFrame: { exists: true } }, then: H3_FRAME_EXCLUDES_REFERENCES },
10680
+ { when: { imageUrls: { exists: true } }, then: H3_REFERENCE_EXCLUDES_FRAMES },
10681
+ { when: { videoUrls: { exists: true } }, then: H3_REFERENCE_EXCLUDES_FRAMES },
10682
+ { when: { audioUrls: { exists: true } }, then: H3_REFERENCE_EXCLUDES_FRAMES }
10683
+ ];
10684
+ var { MODELS: MINIMAX_LLM } = defineModels("minimax", [
10685
+ {
10686
+ id: "minimax-h3-context-ir",
10687
+ name: "MiniMax H3 Context IR",
10688
+ workflow: "minimax/v2/h3-context-ir",
10689
+ addedAt: "2026-10-14",
10690
+ estimatedTime: 8,
10691
+ mode: "text",
10692
+ inputType: "v2t",
10693
+ badge: ["new"],
10694
+ description: "MiniMax H3 Context IR \u2014 enhances a video prompt from text plus optional first/last frame, reference images, videos, and audio. Returns an enhanced prompt, not a video.",
10695
+ features: [
10696
+ feat("Vision", "input"),
10697
+ feat("Video Input", "input"),
10698
+ feat("Audio Input", "input"),
10699
+ feat("Start/End Frame", "frame")
10700
+ ],
10701
+ paramConfig: {
10702
+ ...params.prompt(),
10703
+ ...params.startFrame("Start Frame", false),
10704
+ ...params.endFrame("End Frame"),
10705
+ ...params.imageInput(9, "Reference Images", false, "reference"),
10706
+ ...params.videoInputs(3, "Reference Videos", false),
10707
+ ...params.audioInputs(3, "Reference Audios", false),
10708
+ // Target video shape the enhancement is written towards (4-15s; the
10709
+ // ratio defaults to 'adaptive' — follow the references).
10710
+ ...params.durationRange(4, 15, 5),
10711
+ ...params.aspectRatio(["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "adaptive")
10712
+ },
10713
+ constraints: h3ContextIrConstraints
10714
+ }
10715
+ ]);
10716
+ var MODELS35 = [...ANTHROPIC, ...OPENAI_LLM, ...GEMINI_LLM, ...KIMI_LLM, ...GROK_LLM, ...MINIMAX_LLM];
10650
10717
 
10651
10718
  // src/vendors/catalog/llm.payloads.ts
10652
10719
  var CLAUDE_MAX_TOKENS = 8192;
@@ -10697,7 +10764,22 @@ var buildGeminiPayload = (modelId) => (input) => {
10697
10764
  ...level ? { generationConfig: { thinkingConfig: { thinkingLevel: level } } } : {}
10698
10765
  };
10699
10766
  };
10767
+ var buildMinimaxH3ContextIrPayload = (input) => {
10768
+ const content = [{ type: "text", text: input.prompt }];
10769
+ if (input.startFrame) content.push({ type: "image_url", image_url: { url: input.startFrame }, role: "first_frame" });
10770
+ if (input.endFrame) content.push({ type: "image_url", image_url: { url: input.endFrame }, role: "last_frame" });
10771
+ for (const url of input.imageUrls ?? []) content.push({ type: "image_url", image_url: { url }, role: "reference_image" });
10772
+ for (const url of input.videoUrls ?? []) content.push({ type: "video_url", video_url: { url }, role: "reference_video" });
10773
+ for (const url of input.audioUrls ?? []) content.push({ type: "audio_url", audio_url: { url }, role: "reference_audio" });
10774
+ return {
10775
+ model: "MiniMax-H3",
10776
+ content,
10777
+ duration: input.duration ?? 5,
10778
+ ...input.aspectRatio ? { ratio: input.aspectRatio } : {}
10779
+ };
10780
+ };
10700
10781
  registerPayloads(MODELS35, {
10782
+ "minimax-h3-context-ir": buildMinimaxH3ContextIrPayload,
10701
10783
  "claude-fable-5-1": buildClaudePayload("claude-fable-5-1"),
10702
10784
  "claude-fable-5": buildClaudePayload("claude-fable-5"),
10703
10785
  "claude-opus-5": buildClaudePayload("claude-opus-5"),
@@ -10722,6 +10804,7 @@ registerPayloads(MODELS35, {
10722
10804
  "gpt-4o-mini": buildOpenAiPayload("gpt-4o-mini"),
10723
10805
  "gpt-4.1-mini": buildOpenAiPayload("gpt-4.1-mini"),
10724
10806
  "gpt-4.1-nano": buildOpenAiPayload("gpt-4.1-nano"),
10807
+ "gemini-4-argon": buildGeminiPayload("gemini-4-argon"),
10725
10808
  "gemini-3-pro": buildGeminiPayload("gemini-3-pro-preview"),
10726
10809
  // Flash models route through chat-completions (OpenAI-shaped), not the
10727
10810
  // native `gemini` workflow.
@@ -14753,6 +14836,7 @@ var Gemini37Flash = "gemini-3.7-flash";
14753
14836
  var Gemini38Flash = "gemini-3.8-flash";
14754
14837
  var Gemini38FlashLiteTts = "gemini-3.8-flash-lite-tts";
14755
14838
  var Gemini38FlashTts = "gemini-3.8-flash-tts";
14839
+ var Gemini4Argon = "gemini-4-argon";
14756
14840
  var GeminiNanoBanana21 = "gemini-nano-banana-2.1";
14757
14841
  var GeminiOmni11FlashPreview = "gemini-omni-1.1-flash-preview";
14758
14842
  var GeminiOmniFlashPreview = "gemini-omni-flash-preview";
@@ -14843,6 +14927,7 @@ var Lyria3Clip = "lyria-3-clip";
14843
14927
  var Lyria3Pro = "lyria-3-pro";
14844
14928
  var Lyria35 = "lyria-3.5";
14845
14929
  var MinimaxH3 = "minimax-h3";
14930
+ var MinimaxH3ContextIr = "minimax-h3-context-ir";
14846
14931
  var MinimaxH3Max = "minimax-h3-max";
14847
14932
  var MinimaxH3MaxCameraControls = "minimax-h3-max-camera-controls";
14848
14933
  var MinimaxH3MaxExtend = "minimax-h3-max-extend";
@@ -15017,6 +15102,7 @@ var Models = {
15017
15102
  Gemini38Flash,
15018
15103
  Gemini38FlashLiteTts,
15019
15104
  Gemini38FlashTts,
15105
+ Gemini4Argon,
15020
15106
  GeminiNanoBanana21,
15021
15107
  GeminiOmni11FlashPreview,
15022
15108
  GeminiOmniFlashPreview,
@@ -15107,6 +15193,7 @@ var Models = {
15107
15193
  Lyria3Pro,
15108
15194
  Lyria35,
15109
15195
  MinimaxH3,
15196
+ MinimaxH3ContextIr,
15110
15197
  MinimaxH3Max,
15111
15198
  MinimaxH3MaxCameraControls,
15112
15199
  MinimaxH3MaxExtend,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.38.0",
3
+ "version": "6.40.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",