@picsart/ai-sdk 5.37.1 → 5.39.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
@@ -876,6 +876,21 @@ type ModelInputById = {
876
876
  seed?: number;
877
877
  enableSafetyChecker?: boolean;
878
878
  };
879
+ "minimax-h3-max-camera-controls": {
880
+ prompt?: string;
881
+ startFrame: string;
882
+ resolution?: "480p" | "768p" | "1080p";
883
+ duration?: number;
884
+ cameraTrajectory?: Array<{
885
+ time: number;
886
+ azimuth: number;
887
+ elevation: number;
888
+ distance: number;
889
+ }>;
890
+ promptExpansionMode?: "balanced" | "quality";
891
+ seed?: number;
892
+ enableSafetyChecker?: boolean;
893
+ };
879
894
  "minimax-h3-max-turbo": {
880
895
  prompt: string;
881
896
  startFrame?: string;
@@ -1540,24 +1555,6 @@ type ModelInputById = {
1540
1555
  imageUrls?: string[];
1541
1556
  negativePrompt?: string;
1542
1557
  };
1543
- "sora-2": {
1544
- prompt: string;
1545
- imageUrls?: string[];
1546
- aspectRatio?: "16:9" | "9:16";
1547
- duration?: 4 | 8 | 12 | 16 | 20;
1548
- };
1549
- "sora-2-extend": {
1550
- prompt: string;
1551
- videoId?: string;
1552
- duration?: 4 | 8 | 12 | 16 | 20;
1553
- };
1554
- "sora-2-pro": {
1555
- prompt: string;
1556
- imageUrls?: string[];
1557
- aspectRatio?: "16:9" | "9:16";
1558
- resolution?: "720p" | "1024p" | "1080p";
1559
- duration?: 4 | 8 | 12 | 16 | 20;
1560
- };
1561
1558
  "topaz-upscale-image": {
1562
1559
  imageUrls: [string, ...string[]];
1563
1560
  model?: "Standard V2" | "Standard MAX" | "Low Resolution V2" | "High Fidelity V2" | "CGI" | "Text Refine" | "Redefine" | "Recovery" | "Recovery V2" | "Wonder" | "Wonder 3";
@@ -2799,6 +2796,7 @@ declare const Models: {
2799
2796
  readonly Minimax02Hd: "minimax-02-hd";
2800
2797
  readonly MinimaxH3: "minimax-h3";
2801
2798
  readonly MinimaxH3Max: "minimax-h3-max";
2799
+ readonly MinimaxH3MaxCameraControls: "minimax-h3-max-camera-controls";
2802
2800
  readonly MinimaxH3MaxTurbo: "minimax-h3-max-turbo";
2803
2801
  readonly MinimaxMusicV2: "minimax-music-v2";
2804
2802
  readonly MinimaxMusicV3: "minimax-music-v3";
@@ -2889,9 +2887,6 @@ declare const Models: {
2889
2887
  readonly Seedream47: "seedream-4.7";
2890
2888
  readonly Seedream50Lite: "seedream-5.0-lite";
2891
2889
  readonly Seedream50Pro: "seedream-5.0-pro";
2892
- readonly Sora2: "sora-2";
2893
- readonly Sora2Extend: "sora-2-extend";
2894
- readonly Sora2Pro: "sora-2-pro";
2895
2890
  readonly TopazUpscaleImage: "topaz-upscale-image";
2896
2891
  readonly TopazUpscaleVideo: "topaz-upscale-video";
2897
2892
  readonly VeedFabricV1: "veed-fabric-v1";
package/index.js CHANGED
@@ -1261,7 +1261,7 @@ var passthroughPayload = (paramConfig) => (ctx) => {
1261
1261
  return payload;
1262
1262
  };
1263
1263
  function defineModels(provider, configs) {
1264
- const MODELS39 = [];
1264
+ const MODELS38 = [];
1265
1265
  for (const c of configs) {
1266
1266
  const prov = c.provider ?? provider;
1267
1267
  const resolvedPayload = c.buildPayload ?? passthroughPayload(c.paramConfig);
@@ -1297,19 +1297,19 @@ function defineModels(provider, configs) {
1297
1297
  if (c.constraints !== void 0) model.constraints = c.constraints;
1298
1298
  const contract = createModelContract(model);
1299
1299
  model.outputSchema = c.outputSchema ?? contract.output;
1300
- MODELS39.push(model);
1300
+ MODELS38.push(model);
1301
1301
  }
1302
- return { MODELS: MODELS39 };
1302
+ return { MODELS: MODELS38 };
1303
1303
  }
1304
- function registerPayloads(MODELS39, payloads) {
1304
+ function registerPayloads(MODELS38, payloads) {
1305
1305
  for (const [id, builder] of Object.entries(payloads)) {
1306
- const model = MODELS39.find((m) => m.id === id);
1306
+ const model = MODELS38.find((m) => m.id === id);
1307
1307
  if (model) model.buildPayload = builder;
1308
1308
  }
1309
1309
  }
1310
- function registerEditPayloads(MODELS39, payloads) {
1310
+ function registerEditPayloads(MODELS38, payloads) {
1311
1311
  for (const [id, builder] of Object.entries(payloads)) {
1312
- const model = MODELS39.find((m) => m.id === id);
1312
+ const model = MODELS38.find((m) => m.id === id);
1313
1313
  if (model) model.buildEditPayload = builder;
1314
1314
  }
1315
1315
  }
@@ -4602,100 +4602,6 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
4602
4602
  }
4603
4603
  ]);
4604
4604
 
4605
- // src/vendors/catalog/sora.ts
4606
- var SORA_SIZE_MAP = {
4607
- "720p": { "16:9": "1280x720", "9:16": "720x1280" },
4608
- "1024p": { "16:9": "1792x1024", "9:16": "1024x1792" },
4609
- "1080p": { "16:9": "1920x1080", "9:16": "1080x1920" }
4610
- };
4611
- var getSoraSize = (aspectRatio, resolution) => SORA_SIZE_MAP[resolution ?? "720p"]?.[aspectRatio ?? "16:9"] ?? "1280x720";
4612
- var buildSora2ProPayload = (ctx) => ({
4613
- model: "sora-2-pro",
4614
- prompt: ctx.prompt,
4615
- seconds: ctx.duration ?? 4,
4616
- size: getSoraSize(ctx.aspectRatio, ctx.resolution),
4617
- ...ctx.imageUrls?.[0] ? { input_reference_url: ctx.imageUrls[0], adjust_input_image_ratio: true } : {}
4618
- });
4619
- var buildSora2Payload = (ctx) => ({
4620
- model: "sora-2",
4621
- prompt: ctx.prompt,
4622
- seconds: ctx.duration ?? 4,
4623
- size: getSoraSize(ctx.aspectRatio),
4624
- ...ctx.imageUrls?.[0] ? { input_reference_url: ctx.imageUrls[0], adjust_input_image_ratio: true } : {}
4625
- });
4626
- var buildSora2ExtendPayload = (ctx) => ({
4627
- video_id: ctx.videoId,
4628
- prompt: ctx.prompt,
4629
- seconds: ctx.duration ?? 8
4630
- });
4631
- var SORA_DURATIONS = [4, 8, 12, 16, 20];
4632
- var SORA_AR = ["16:9", "9:16"];
4633
- var SORA_PROMPT_MAX = 5e3;
4634
- var { MODELS: MODELS13 } = defineModels("openai", [
4635
- {
4636
- id: "sora-2-pro",
4637
- name: "Sora 2 Pro",
4638
- modelId: "sora-2-pro",
4639
- addedAt: "2026-02-06",
4640
- workflow: "openai/v1/videos",
4641
- buildPayload: buildSora2ProPayload,
4642
- estimatedTime: { "720p": 100, "1024p": 100, "1080p": 100 },
4643
- testTimeout: 700,
4644
- mode: "video",
4645
- inputType: "t2v",
4646
- badge: ["popular", "premium"],
4647
- description: "Up to 1080p with strong physical realism and optional reference image.",
4648
- features: [feat("Image Input", "input"), feat("Audio", "audio"), feat("Up to 1080p", "resolution"), feat("4\u201320 sec", "duration")],
4649
- paramConfig: {
4650
- ...params.prompt({ maxLength: SORA_PROMPT_MAX }),
4651
- ...params.imageInput(1, "Reference Image"),
4652
- ...params.aspectRatio(SORA_AR),
4653
- ...params.resolution(["720p", "1024p", "1080p"]),
4654
- ...params.duration(SORA_DURATIONS, 4)
4655
- }
4656
- },
4657
- {
4658
- id: "sora-2",
4659
- name: "Sora 2",
4660
- modelId: "sora-2",
4661
- addedAt: "2026-02-06",
4662
- workflow: "openai/v1/videos",
4663
- buildPayload: buildSora2Payload,
4664
- estimatedTime: 100,
4665
- mode: "video",
4666
- inputType: "t2v",
4667
- badge: ["popular"],
4668
- description: "Naturalistic 720p video with lifelike motion and character detail.",
4669
- features: [feat("Image Input", "input"), feat("Audio", "audio"), feat("720p", "resolution"), feat("4\u201320 sec", "duration")],
4670
- paramConfig: {
4671
- ...params.prompt({ maxLength: SORA_PROMPT_MAX }),
4672
- ...params.imageInput(1, "Reference Image"),
4673
- ...params.aspectRatio(SORA_AR),
4674
- ...params.duration(SORA_DURATIONS, 4)
4675
- }
4676
- },
4677
- {
4678
- id: "sora-2-extend",
4679
- name: "Sora 2 Extend",
4680
- modelId: "sora-2",
4681
- addedAt: "2026-02-10",
4682
- workflow: "openai/v1/videos/extensions",
4683
- buildPayload: buildSora2ExtendPayload,
4684
- estimatedTime: 17,
4685
- mode: "video",
4686
- inputType: "v2v",
4687
- description: "Seamlessly continue a previously generated Sora video with matching style and pacing.",
4688
- features: [feat("Continue Video", "input"), feat("4\u201320 sec", "duration")],
4689
- paramConfig: {
4690
- ...params.prompt({ maxLength: SORA_PROMPT_MAX }),
4691
- // video_id is chained from the source Sora asset (declaring the param lets
4692
- // the store seed ctx.videoId); no aspectRatio/size — extend keeps source geometry.
4693
- ...params.videoId([], ""),
4694
- ...params.duration(SORA_DURATIONS, 8)
4695
- }
4696
- }
4697
- ]);
4698
-
4699
4605
  // src/vendors/catalog/seedream.ts
4700
4606
  function buildSeedreamV2(modelId) {
4701
4607
  return (ctx) => ({
@@ -4720,7 +4626,7 @@ var seedreamV2Params = {
4720
4626
  ...params.imageInput(2, "Source Images"),
4721
4627
  ...params.negativePrompt()
4722
4628
  };
4723
- var { MODELS: MODELS14 } = defineModels("seedream", [
4629
+ var { MODELS: MODELS13 } = defineModels("seedream", [
4724
4630
  {
4725
4631
  id: "seedream-5.0-pro",
4726
4632
  name: "Seedream 5.0 Pro",
@@ -4864,7 +4770,7 @@ var refMutexConstraints = [
4864
4770
  imageUrls: { disabled: true, reason: REF_MUTEX_REASON }
4865
4771
  } }
4866
4772
  ];
4867
- var { MODELS: MODELS15 } = defineModels("seedaudio", [
4773
+ var { MODELS: MODELS14 } = defineModels("seedaudio", [
4868
4774
  {
4869
4775
  id: "seed-audio-1.0-multilingual",
4870
4776
  name: "Seed Audio Multilingual",
@@ -4930,7 +4836,7 @@ var buildSeedAudioPayload = (model) => (input) => {
4930
4836
  ...references ? { references } : {}
4931
4837
  };
4932
4838
  };
4933
- registerPayloads(MODELS15, {
4839
+ registerPayloads(MODELS14, {
4934
4840
  "seed-audio-1.0": buildSeedAudioPayload("seed-audio-1.0"),
4935
4841
  "seed-audio-1.0-multilingual": buildSeedAudioPayload("seed-audio-1.0-multilingual")
4936
4842
  });
@@ -4946,7 +4852,7 @@ var buildRevePayload = (ctx) => {
4946
4852
  ...hasImages ? { image_url: ctx.imageUrls[0] } : {}
4947
4853
  };
4948
4854
  };
4949
- var { MODELS: MODELS16 } = defineModels("reve", [
4855
+ var { MODELS: MODELS15 } = defineModels("reve", [
4950
4856
  {
4951
4857
  id: "reve",
4952
4858
  name: "Reve",
@@ -5042,7 +4948,7 @@ var GROK_DURATIONS = [3, 5, 6, 8, 10, 12, 15];
5042
4948
  var GROK_VIDEO_RESOLUTIONS = ["480p", "720p"];
5043
4949
  var GROK_VIDEO_RESOLUTIONS_15 = ["480p", "720p", "1080p"];
5044
4950
  var GROK_IMAGE_RESOLUTIONS = ["1k", "2k"];
5045
- var { MODELS: MODELS17 } = defineModels("grok", [
4951
+ var { MODELS: MODELS16 } = defineModels("grok", [
5046
4952
  // ── Video ─────────────────────────────────────────
5047
4953
  {
5048
4954
  id: "grok-imagine-video",
@@ -5231,10 +5137,10 @@ var buildGrokImage2EditPayload = (input) => {
5231
5137
  ...imagePart2
5232
5138
  };
5233
5139
  };
5234
- registerPayloads(MODELS17, {
5140
+ registerPayloads(MODELS16, {
5235
5141
  "grok-imagine-image-2.0": buildGrokImage2Payload
5236
5142
  });
5237
- registerEditPayloads(MODELS17, {
5143
+ registerEditPayloads(MODELS16, {
5238
5144
  "grok-imagine-image-2.0": buildGrokImage2EditPayload
5239
5145
  });
5240
5146
 
@@ -5272,7 +5178,7 @@ var buildPikaFramesPayload = (ctx) => ({
5272
5178
  var PIKA_DURATIONS = [5, 10];
5273
5179
  var PIKA_AR = ["16:9", "9:16", "1:1", "4:5", "5:4", "3:2", "2:3"];
5274
5180
  var PIKA_RESOLUTIONS = ["720p", "1080p"];
5275
- var { MODELS: MODELS18 } = defineModels("pika", [
5181
+ var { MODELS: MODELS17 } = defineModels("pika", [
5276
5182
  {
5277
5183
  id: "pika-2.2",
5278
5184
  name: "Pika",
@@ -5401,7 +5307,7 @@ var veoLiteParamConfig = {
5401
5307
  var veoLiteConstraints = [
5402
5308
  { when: { resolution: { is: "1080p" } }, then: { duration: { allowed: [8], reason: "1080p supports 8s only" } } }
5403
5309
  ];
5404
- var { MODELS: MODELS19 } = defineModels("google", [
5310
+ var { MODELS: MODELS18 } = defineModels("google", [
5405
5311
  {
5406
5312
  id: "veo-3.1",
5407
5313
  name: "Veo 3.1",
@@ -5537,7 +5443,7 @@ var buildRunwayGen3aTurboPayload = (ctx) => ({
5537
5443
  ratio: RUNWAY_GEN3A_RATIO_MAP[ctx.aspectRatio ?? "16:9"] ?? "1280:768",
5538
5444
  duration: ctx.duration ?? 5
5539
5445
  });
5540
- var { MODELS: MODELS20 } = defineModels("runway", [
5446
+ var { MODELS: MODELS19 } = defineModels("runway", [
5541
5447
  {
5542
5448
  id: "runway-avatar-video",
5543
5449
  name: "Runway Avatar",
@@ -5714,7 +5620,7 @@ var flux3VideoConstraints = [
5714
5620
  resolution: { allowed: ["hd"], reason: "Draft mode only supports HD resolution." }
5715
5621
  } }
5716
5622
  ];
5717
- var { MODELS: MODELS21 } = defineModels("flux", [
5623
+ var { MODELS: MODELS20 } = defineModels("flux", [
5718
5624
  {
5719
5625
  ...fluxV2Base,
5720
5626
  id: "flux-2-pro",
@@ -5917,7 +5823,7 @@ var buildFlux3VideoPayload = (input) => {
5917
5823
  ...input.draft ? { draft: input.draft } : {}
5918
5824
  };
5919
5825
  };
5920
- registerPayloads(MODELS21, {
5826
+ registerPayloads(MODELS20, {
5921
5827
  "flux-3-video": buildFlux3VideoPayload
5922
5828
  });
5923
5829
 
@@ -5999,7 +5905,7 @@ var thinkingBudgetParam = {
5999
5905
  descriptor: { kind: "range", min: 128, max: 24576, step: 128, default: 128 }
6000
5906
  }
6001
5907
  };
6002
- var { MODELS: MODELS22 } = defineModels("google", [
5908
+ var { MODELS: MODELS21 } = defineModels("google", [
6003
5909
  // ── Image ─────────────────────────────────────────────────────────
6004
5910
  {
6005
5911
  id: "gemini-3.1-flash-image",
@@ -6197,7 +6103,7 @@ var buildOmniFlash11Payload = (input) => ({
6197
6103
  ...input.videoUrl ? { video: { url: input.videoUrl } } : {},
6198
6104
  ...input.videoUrls?.length ? { referenceVideos: input.videoUrls.map((url) => ({ url })) } : {}
6199
6105
  });
6200
- registerPayloads(MODELS22, {
6106
+ registerPayloads(MODELS21, {
6201
6107
  "gemini-omni-1.1-flash-preview": buildOmniFlash11Payload
6202
6108
  });
6203
6109
 
@@ -6303,7 +6209,7 @@ var gptImageBgConstraints = [
6303
6209
  then: { outputFormat: { allowed: ["png", "webp"], reason: "Transparent background needs PNG or WEBP \u2014 JPEG has no alpha channel." } }
6304
6210
  }
6305
6211
  ];
6306
- var { MODELS: MODELS23 } = defineModels("openai", [
6212
+ var { MODELS: MODELS22 } = defineModels("openai", [
6307
6213
  // ── Image ─────────────────────────────────────────
6308
6214
  {
6309
6215
  id: "gpt-image-2.5-sunburst",
@@ -6450,11 +6356,11 @@ var editFor = (model) => (input) => ({
6450
6356
  ...input.background ? { background: input.background } : {},
6451
6357
  ...input.outputFormat ? { output_format: input.outputFormat } : {}
6452
6358
  });
6453
- registerPayloads(MODELS23, {
6359
+ registerPayloads(MODELS22, {
6454
6360
  "gpt-image-2.5-flare": generateFor("gpt-image-2.5-flare"),
6455
6361
  "gpt-image-2.5-sunburst": generateFor("gpt-image-2.5-sunburst")
6456
6362
  });
6457
- registerEditPayloads(MODELS23, {
6363
+ registerEditPayloads(MODELS22, {
6458
6364
  "gpt-image-2.5-flare": editFor("gpt-image-2.5-flare"),
6459
6365
  "gpt-image-2.5-sunburst": editFor("gpt-image-2.5-sunburst")
6460
6366
  });
@@ -6507,7 +6413,7 @@ var ttsParamConfig = (promptMaxLength, withLanguage) => ({
6507
6413
  ...params.prompt({ maxLength: promptMaxLength }),
6508
6414
  ...params.voiceId([], DEFAULT_VOICE_ID, { catalog: { workflow: "elevenlabs/v1/catalog/voices" } })
6509
6415
  });
6510
- var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6416
+ var { MODELS: MODELS23 } = defineModels("elevenlabs", [
6511
6417
  // ── TTS ───────────────────────────────────────────────────────────
6512
6418
  {
6513
6419
  id: "eleven-v3",
@@ -6727,7 +6633,7 @@ var buildElevenLabsMusicPayload = (input) => ({
6727
6633
  model_id: "music_v2",
6728
6634
  force_instrumental: input.isInstrumental ?? false
6729
6635
  });
6730
- registerPayloads(MODELS24, {
6636
+ registerPayloads(MODELS23, {
6731
6637
  "elevenlabs-music-v2": buildElevenLabsMusicPayload
6732
6638
  });
6733
6639
 
@@ -6771,7 +6677,7 @@ var dynamicVoiceConfig = {
6771
6677
  catalog: { workflow: "heygen/v1/catalog/voices" }
6772
6678
  })
6773
6679
  };
6774
- var { MODELS: MODELS25 } = defineModels("heygen", [
6680
+ var { MODELS: MODELS24 } = defineModels("heygen", [
6775
6681
  // ── Photo Avatar (i2v) ────────────────────────────────────────────
6776
6682
  {
6777
6683
  id: "heygen-talking-photo",
@@ -6881,7 +6787,7 @@ var h3MaxConstraints = [
6881
6787
  audioUrls: { disabled: true, reason: AUDIO_NEEDS_VISUAL2 }
6882
6788
  } }
6883
6789
  ];
6884
- var { MODELS: MODELS26 } = defineModels("minimax", [
6790
+ var { MODELS: MODELS25 } = defineModels("minimax", [
6885
6791
  {
6886
6792
  id: "minimax-02-hd",
6887
6793
  name: "MiniMax 02 HD",
@@ -7036,6 +6942,60 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
7036
6942
  aspectRatio: { disabled: true, reason: "Aspect ratio follows the frame image." }
7037
6943
  } }
7038
6944
  ]
6945
+ },
6946
+ {
6947
+ // Camera-controls sibling of minimax-h3-max: animates a single start
6948
+ // frame along scripted camera keyframes. The prompt is optional — blank
6949
+ // freezes the scene and moves only the camera. No aspect ratio on this
6950
+ // wire; the output follows the frame image.
6951
+ id: "minimax-h3-max-camera-controls",
6952
+ name: "MiniMax H3 Max Camera Controls",
6953
+ modelId: "fal-ai-h3-max-camera-controls",
6954
+ addedAt: "2026-09-14",
6955
+ workflow: "minimax/h3-max/camera-controls",
6956
+ estimatedTime: 5,
6957
+ mode: "video",
6958
+ inputType: "i2v",
6959
+ description: "MiniMax H3 Max video from a start frame with scripted camera motion \u2014 2-12 keyframes set the camera angle, height, and distance over time. Leave the prompt blank to freeze the scene and move only the camera. Up to 15s at 1080p.",
6960
+ features: [
6961
+ feat("Camera Controls", "characteristic"),
6962
+ feat("Image Input", "input"),
6963
+ feat("1080p", "resolution"),
6964
+ feat("5-15 sec", "duration")
6965
+ ],
6966
+ paramConfig: {
6967
+ ...params.prompt({
6968
+ maxLength: H3_MAX_PROMPT_MAX,
6969
+ required: false,
6970
+ placeholder: "Optional \u2014 leave blank to freeze the scene and move only the camera..."
6971
+ }),
6972
+ ...params.startFrame("Start Frame", true),
6973
+ // Native 480p default here (the siblings default to 768p); 1080p is a
6974
+ // latent refinement of a native 768p generation.
6975
+ ...params.resolution(["480p", "768p", "1080p"], "480p"),
6976
+ ...params.durationRange(5, 15, 5),
6977
+ // Ordered camera keyframes: the first pose is held before its time and
6978
+ // the final pose for the remainder. Azimuth keeps signed full turns,
6979
+ // capped at ±32 turns of total travel; distance is in normalized scene
6980
+ // units and must stay above zero (the wire has no upper bound).
6981
+ cameraTrajectory: {
6982
+ label: "Camera Trajectory",
6983
+ descriptor: {
6984
+ kind: "object",
6985
+ array: { min: 2, max: 12 },
6986
+ fields: {
6987
+ time: { kind: "range", min: 0, max: 1, step: 0.01, default: 0 },
6988
+ azimuth: { kind: "range", min: -11520, max: 11520, default: 0 },
6989
+ elevation: { kind: "range", min: -90, max: 90, default: 0 },
6990
+ distance: { kind: "range", min: 0.01, max: 100, default: 1 }
6991
+ }
6992
+ }
6993
+ },
6994
+ ...p.enum("promptExpansionMode", ["balanced", "quality"], "balanced", { label: "Prompt Expansion" }),
6995
+ // -1 (sentinel) means "pick a random seed"; the builder drops it.
6996
+ ...p.range("seed", -1, 2147483647, -1),
6997
+ ...p.boolean("enableSafetyChecker", true, "Safety Checker")
6998
+ }
7039
6999
  }
7040
7000
  ]);
7041
7001
 
@@ -7095,12 +7055,27 @@ var buildMinimaxH3MaxTurboPayload = (input) => ({
7095
7055
  ...input.seed != null && input.seed !== -1 ? { seed: input.seed } : {},
7096
7056
  enable_safety_checker: input.enableSafetyChecker ?? true
7097
7057
  });
7098
- registerPayloads(MODELS26, {
7058
+ var buildMinimaxH3MaxCameraControlsPayload = (input) => ({
7059
+ // Blank prompt is meaningful upstream — fal substitutes its frozen-scene
7060
+ // default — so it is omitted rather than sent empty.
7061
+ ...input.prompt ? { prompt: input.prompt } : {},
7062
+ image_url: input.startFrame,
7063
+ ...input.cameraTrajectory?.length ? { camera_trajectory: input.cameraTrajectory } : {},
7064
+ prompt_expansion_mode: input.promptExpansionMode ?? "balanced",
7065
+ duration: input.duration ?? 5,
7066
+ // The vendor enum is uppercase; paramConfig keeps the lowercase form.
7067
+ resolution: (input.resolution ?? "480p").toUpperCase(),
7068
+ // -1 is the paramConfig sentinel for "random seed" — omit it on the wire.
7069
+ ...input.seed != null && input.seed !== -1 ? { seed: input.seed } : {},
7070
+ enable_safety_checker: input.enableSafetyChecker ?? true
7071
+ });
7072
+ registerPayloads(MODELS25, {
7099
7073
  "minimax-music-v3": buildMinimaxMusicV3Payload,
7100
7074
  "minimax-h3-max": buildMinimaxH3MaxPayload,
7101
- "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload
7075
+ "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload,
7076
+ "minimax-h3-max-camera-controls": buildMinimaxH3MaxCameraControlsPayload
7102
7077
  });
7103
- registerEditPayloads(MODELS26, {
7078
+ registerEditPayloads(MODELS25, {
7104
7079
  "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload
7105
7080
  });
7106
7081
 
@@ -7145,7 +7120,7 @@ var buildIdeogramPImagePayload = (ctx) => ({
7145
7120
  resolution: ctx.resolution ?? "1024x1024",
7146
7121
  rendering_speed: ctx.renderingSpeed ?? "medium"
7147
7122
  });
7148
- var { MODELS: MODELS27 } = defineModels("ideogram", [
7123
+ var { MODELS: MODELS26 } = defineModels("ideogram", [
7149
7124
  {
7150
7125
  id: "ideogram-v4",
7151
7126
  name: "Ideogram 4.0",
@@ -7376,7 +7351,7 @@ var qwenV1Params3 = {
7376
7351
  ...p.enum("promptExtendMode", ["direct", "agent"], "direct"),
7377
7352
  ...p.boolean("enableThinking", true, "Deep Thinking")
7378
7353
  };
7379
- var { MODELS: MODELS28 } = defineModels("qwen", [
7354
+ var { MODELS: MODELS27 } = defineModels("qwen", [
7380
7355
  {
7381
7356
  id: "qwen",
7382
7357
  name: "Qwen",
@@ -7546,7 +7521,7 @@ var v4StylesParams = p.file("imageUrls", "image", {
7546
7521
  category: "reference",
7547
7522
  maxBytes: 10 * 1024 * 1024
7548
7523
  });
7549
- var { MODELS: MODELS29 } = defineModels("recraft", [
7524
+ var { MODELS: MODELS28 } = defineModels("recraft", [
7550
7525
  // ── V4.1 family (raster only — vector variants exist in API but not exposed here) ─
7551
7526
  {
7552
7527
  id: "recraftv4_1",
@@ -8086,7 +8061,7 @@ var TOPAZ_VIDEO_MODEL_OPTIONS = [
8086
8061
  "Starlight Sharp",
8087
8062
  "Starlight Fast 2"
8088
8063
  ];
8089
- var { MODELS: MODELS30 } = defineModels("topaz", [
8064
+ var { MODELS: MODELS29 } = defineModels("topaz", [
8090
8065
  {
8091
8066
  id: "topaz-upscale-image",
8092
8067
  name: "Topaz Image Upscale",
@@ -8137,7 +8112,7 @@ var buildTopazVideoPayload = (input) => ({
8137
8112
  upscale_factor: 2,
8138
8113
  H264_output: false
8139
8114
  });
8140
- registerPayloads(MODELS30, {
8115
+ registerPayloads(MODELS29, {
8141
8116
  "topaz-upscale-image": buildTopazImagePayload,
8142
8117
  "topaz-upscale-video": buildTopazVideoPayload
8143
8118
  });
@@ -8222,7 +8197,7 @@ var buildPcpSanaSprintPayload = (ctx) => {
8222
8197
  height: h
8223
8198
  };
8224
8199
  };
8225
- var { MODELS: MODELS31 } = defineModels("picsart", [
8200
+ var { MODELS: MODELS30 } = defineModels("picsart", [
8226
8201
  {
8227
8202
  id: "picsart-change-bg",
8228
8203
  name: "Picsart Change Background",
@@ -8413,7 +8388,7 @@ var buildLyria3Payload = (apiModelId) => (ctx) => ({
8413
8388
  ...(ctx.imageUrls?.length ?? 0) > 1 ? { images: ctx.imageUrls.slice(0, 10).map(imagePart) } : {}
8414
8389
  });
8415
8390
  var LYRIA_PROMPT_MAX = 5e3;
8416
- var { MODELS: MODELS32 } = defineModels("google", [
8391
+ var { MODELS: MODELS31 } = defineModels("google", [
8417
8392
  {
8418
8393
  id: "lyria-3-clip",
8419
8394
  addedAt: "2026-03-26",
@@ -8551,7 +8526,7 @@ var buildHH11R2VPayload = (ctx) => {
8551
8526
  };
8552
8527
  var HH_AR = ["16:9", "9:16", "1:1", "4:3", "3:4"];
8553
8528
  var HH_RES = ["720P", "1080P"];
8554
- var { MODELS: MODELS33 } = defineModels("happyhorse", [
8529
+ var { MODELS: MODELS32 } = defineModels("happyhorse", [
8555
8530
  {
8556
8531
  id: "happyhorse-1.0-t2v",
8557
8532
  name: "Happy Horse 1.0",
@@ -8705,7 +8680,7 @@ var baseFeatures = [
8705
8680
  feat("Up to 1080p", "resolution"),
8706
8681
  feat("5-15 sec", "duration")
8707
8682
  ];
8708
- var { MODELS: MODELS34 } = defineModels("pixverse", [
8683
+ var { MODELS: MODELS33 } = defineModels("pixverse", [
8709
8684
  // ── V6 ─────────────────────────────────────────────────────────────
8710
8685
  {
8711
8686
  id: "pixverse-v6",
@@ -8823,7 +8798,7 @@ var buildReferenceToVideoPayload = (model) => (input) => ({
8823
8798
  aspect_ratio: input.aspectRatio ?? "16:9",
8824
8799
  image_references: (input.imageUrls ?? []).map((url) => ({ url }))
8825
8800
  });
8826
- registerPayloads(MODELS34, {
8801
+ registerPayloads(MODELS33, {
8827
8802
  "pixverse-v6": buildTextToVideoPayload("v6"),
8828
8803
  "pixverse-v6-image": buildImageToVideoPayload("v6"),
8829
8804
  "pixverse-v6-fusion": buildReferenceToVideoPayload("v6"),
@@ -8833,7 +8808,7 @@ registerPayloads(MODELS34, {
8833
8808
  });
8834
8809
 
8835
8810
  // src/vendors/catalog/async-ai.ts
8836
- var { MODELS: MODELS35 } = defineModels("async", [
8811
+ var { MODELS: MODELS34 } = defineModels("async", [
8837
8812
  {
8838
8813
  id: "async-flash-v1",
8839
8814
  name: "Async Flash v1.0",
@@ -8873,7 +8848,7 @@ var buildAsyncTtsPayload = (input) => {
8873
8848
  }
8874
8849
  };
8875
8850
  };
8876
- registerPayloads(MODELS35, { "async-flash-v1": buildAsyncTtsPayload });
8851
+ registerPayloads(MODELS34, { "async-flash-v1": buildAsyncTtsPayload });
8877
8852
 
8878
8853
  // src/vendors/catalog/llm.ts
8879
8854
  var ADDED = "2026-06-16";
@@ -9136,7 +9111,7 @@ var { MODELS: GEMINI_LLM } = defineModels("google", [
9136
9111
  }
9137
9112
  }
9138
9113
  ]);
9139
- var MODELS36 = [...ANTHROPIC, ...OPENAI_LLM, ...GEMINI_LLM];
9114
+ var MODELS35 = [...ANTHROPIC, ...OPENAI_LLM, ...GEMINI_LLM];
9140
9115
 
9141
9116
  // src/vendors/catalog/llm.payloads.ts
9142
9117
  var CLAUDE_MAX_TOKENS = 8192;
@@ -9187,7 +9162,7 @@ var buildGeminiPayload = (modelId) => (input) => {
9187
9162
  ...level ? { generationConfig: { thinkingConfig: { thinkingLevel: level } } } : {}
9188
9163
  };
9189
9164
  };
9190
- registerPayloads(MODELS36, {
9165
+ registerPayloads(MODELS35, {
9191
9166
  "claude-fable-5-1": buildClaudePayload("claude-fable-5-1"),
9192
9167
  "claude-fable-5": buildClaudePayload("claude-fable-5"),
9193
9168
  "claude-opus-5": buildClaudePayload("claude-opus-5"),
@@ -9212,7 +9187,7 @@ registerPayloads(MODELS36, {
9212
9187
  var CAPTIONS_MAX_DURATION_SEC = 300;
9213
9188
  var CAPTIONS_MAX_BYTES = 50 * 1024 * 1024;
9214
9189
  var DEFAULT_CAPTION_TEMPLATE_ID = "ctpl_DxflLOnuKkb198FNdI9E";
9215
- var { MODELS: MODELS37 } = defineModels("captionsai", [
9190
+ var { MODELS: MODELS36 } = defineModels("captionsai", [
9216
9191
  {
9217
9192
  id: "captionsai-video-captions",
9218
9193
  name: "Captions",
@@ -9252,12 +9227,12 @@ var buildCaptionsPayload = (input) => ({
9252
9227
  video: { url: input.videoUrl },
9253
9228
  caption_template_id: input.templateId ?? DEFAULT_CAPTION_TEMPLATE_ID
9254
9229
  });
9255
- registerPayloads(MODELS37, {
9230
+ registerPayloads(MODELS36, {
9256
9231
  "captionsai-video-captions": buildCaptionsPayload
9257
9232
  });
9258
9233
 
9259
9234
  // src/vendors/catalog/meta.ts
9260
- var { MODELS: MODELS38 } = defineModels("meta", [
9235
+ var { MODELS: MODELS37 } = defineModels("meta", [
9261
9236
  // ── Image ─────────────────────────────────────────
9262
9237
  {
9263
9238
  id: "muse-image-1.0",
@@ -9317,10 +9292,10 @@ var buildMuseImageEditPayload = (input) => ({
9317
9292
  ...buildMuseCommonPayload(input),
9318
9293
  images: input.imageUrls ?? []
9319
9294
  });
9320
- registerPayloads(MODELS38, {
9295
+ registerPayloads(MODELS37, {
9321
9296
  "muse-image-1.0": buildMuseImagePayload
9322
9297
  });
9323
- registerEditPayloads(MODELS38, {
9298
+ registerEditPayloads(MODELS37, {
9324
9299
  "muse-image-1.0": buildMuseImageEditPayload
9325
9300
  });
9326
9301
 
@@ -9352,18 +9327,17 @@ var ALL_MODELS = [
9352
9327
  ...MODELS24,
9353
9328
  ...MODELS25,
9354
9329
  ...MODELS26,
9330
+ ...MODELS31,
9355
9331
  ...MODELS27,
9356
- ...MODELS32,
9357
9332
  ...MODELS28,
9358
9333
  ...MODELS29,
9359
9334
  ...MODELS30,
9360
- ...MODELS31,
9335
+ ...MODELS32,
9361
9336
  ...MODELS33,
9362
9337
  ...MODELS34,
9363
9338
  ...MODELS35,
9364
9339
  ...MODELS36,
9365
- ...MODELS37,
9366
- ...MODELS38
9340
+ ...MODELS37
9367
9341
  ];
9368
9342
  var getModelsByMode = (mode, includeDisabled = false) => ALL_MODELS.filter((m) => m.mode === mode && (includeDisabled || isVisibleForReleases(m)));
9369
9343
 
@@ -11640,6 +11614,7 @@ var Lyria35 = "lyria-3.5";
11640
11614
  var Minimax02Hd = "minimax-02-hd";
11641
11615
  var MinimaxH3 = "minimax-h3";
11642
11616
  var MinimaxH3Max = "minimax-h3-max";
11617
+ var MinimaxH3MaxCameraControls = "minimax-h3-max-camera-controls";
11643
11618
  var MinimaxH3MaxTurbo = "minimax-h3-max-turbo";
11644
11619
  var MinimaxMusicV2 = "minimax-music-v2";
11645
11620
  var MinimaxMusicV3 = "minimax-music-v3";
@@ -11730,9 +11705,6 @@ var Seedream45 = "seedream-4.5";
11730
11705
  var Seedream47 = "seedream-4.7";
11731
11706
  var Seedream50Lite = "seedream-5.0-lite";
11732
11707
  var Seedream50Pro = "seedream-5.0-pro";
11733
- var Sora2 = "sora-2";
11734
- var Sora2Extend = "sora-2-extend";
11735
- var Sora2Pro = "sora-2-pro";
11736
11708
  var TopazUpscaleImage = "topaz-upscale-image";
11737
11709
  var TopazUpscaleVideo = "topaz-upscale-video";
11738
11710
  var VeedFabricV1 = "veed-fabric-v1";
@@ -11868,6 +11840,7 @@ var Models = {
11868
11840
  Minimax02Hd,
11869
11841
  MinimaxH3,
11870
11842
  MinimaxH3Max,
11843
+ MinimaxH3MaxCameraControls,
11871
11844
  MinimaxH3MaxTurbo,
11872
11845
  MinimaxMusicV2,
11873
11846
  MinimaxMusicV3,
@@ -11958,9 +11931,6 @@ var Models = {
11958
11931
  Seedream47,
11959
11932
  Seedream50Lite,
11960
11933
  Seedream50Pro,
11961
- Sora2,
11962
- Sora2Extend,
11963
- Sora2Pro,
11964
11934
  TopazUpscaleImage,
11965
11935
  TopazUpscaleVideo,
11966
11936
  VeedFabricV1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.37.1",
3
+ "version": "5.39.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",