@picsart/ai-sdk 6.4.0 → 6.6.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
@@ -249,6 +249,14 @@ type ModelInputById = {
249
249
  count?: 1 | 2 | 4 | 6 | 8 | 10;
250
250
  imageUrls?: string[];
251
251
  };
252
+ "flux-3-image": {
253
+ prompt: string;
254
+ aspectRatio?: "auto" | "21:9" | "2:1" | "16:9" | "3:2" | "7:5" | "4:3" | "5:4" | "1:1" | "4:5" | "3:4" | "5:7" | "2:3" | "9:16" | "1:2";
255
+ resolution?: "512sq" | "768sq" | "1k" | "2k" | "4k";
256
+ count?: 1 | 2 | 4 | 6 | 8 | 10;
257
+ imageUrls?: string[];
258
+ safetyTolerance?: number;
259
+ };
252
260
  "flux-3-video": {
253
261
  prompt: string;
254
262
  aspectRatio?: "auto" | "21:9" | "2:1" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
@@ -960,6 +968,14 @@ type ModelInputById = {
960
968
  seed?: number;
961
969
  enableSafetyChecker?: boolean;
962
970
  };
971
+ "minimax-h3-max-lip-sync": {
972
+ startFrame: string;
973
+ audioUrl: string;
974
+ resolution?: "480p" | "768p" | "1080p" | "2k";
975
+ enableTranscription?: boolean;
976
+ seed?: number;
977
+ enableSafetyChecker?: boolean;
978
+ };
963
979
  "minimax-h3-max-turbo": {
964
980
  prompt: string;
965
981
  startFrame?: string;
@@ -2921,6 +2937,7 @@ declare const Models: {
2921
2937
  readonly Flux2Flex: "flux-2-flex";
2922
2938
  readonly Flux2Max: "flux-2-max";
2923
2939
  readonly Flux2Pro: "flux-2-pro";
2940
+ readonly Flux3Image: "flux-3-image";
2924
2941
  readonly Flux3Video: "flux-3-video";
2925
2942
  readonly FluxKontextMax: "flux-kontext-max";
2926
2943
  readonly FluxKontextPro: "flux-kontext-pro";
@@ -3021,6 +3038,7 @@ declare const Models: {
3021
3038
  readonly MinimaxH3: "minimax-h3";
3022
3039
  readonly MinimaxH3Max: "minimax-h3-max";
3023
3040
  readonly MinimaxH3MaxCameraControls: "minimax-h3-max-camera-controls";
3041
+ readonly MinimaxH3MaxLipSync: "minimax-h3-max-lip-sync";
3024
3042
  readonly MinimaxH3MaxTurbo: "minimax-h3-max-turbo";
3025
3043
  readonly MinimaxMusicV2: "minimax-music-v2";
3026
3044
  readonly MinimaxMusicV3: "minimax-music-v3";
package/index.js CHANGED
@@ -5441,6 +5441,24 @@ var FLUX_AR_TO_SIZE = {
5441
5441
  };
5442
5442
  var fluxAspectRatios = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "9:21"];
5443
5443
  var fluxResolutions = ["1K", "2K", "4K"];
5444
+ var flux3ImageAspectRatios = [
5445
+ "auto",
5446
+ "21:9",
5447
+ "2:1",
5448
+ "16:9",
5449
+ "3:2",
5450
+ "7:5",
5451
+ "4:3",
5452
+ "5:4",
5453
+ "1:1",
5454
+ "4:5",
5455
+ "3:4",
5456
+ "5:7",
5457
+ "2:3",
5458
+ "9:16",
5459
+ "1:2"
5460
+ ];
5461
+ var flux3ImageResolutions = ["512sq", "768sq", "1k", "2k", "4k"];
5444
5462
  var buildFluxV2Payload = (modelId) => (ctx) => ({
5445
5463
  prompt: ctx.prompt,
5446
5464
  model: modelId,
@@ -5584,6 +5602,44 @@ var { MODELS: MODELS20 } = defineModels("flux", [
5584
5602
  ...params.imageInput(1, "Source Image")
5585
5603
  }
5586
5604
  },
5605
+ {
5606
+ // Pure pass-through: every Command field already carries the SDK's own
5607
+ // unified name (prompt, imageUrls, aspectRatio, resolution, count,
5608
+ // safetyTolerance), so no payload builder is needed. Like the flux-2
5609
+ // entries this is one workflow for both directions — supplying imageUrls
5610
+ // switches the vendor into editing mode — hence inputType 't2i'.
5611
+ //
5612
+ // The Command's `version` field pins the endpoint contract version
5613
+ // ('latest' today; the vendor will add dated release tags). It selects a
5614
+ // contract rather than shaping a generation, so it is not surfaced as a
5615
+ // param; the vendor default applies.
5616
+ id: "flux-3-image",
5617
+ name: "Flux 3 Image",
5618
+ workflow: "bfl/v1/flux-3-image",
5619
+ mode: "image",
5620
+ inputType: "t2i",
5621
+ // Early-access at the vendor — stage only until it is cleared for prod.
5622
+ release: "preview",
5623
+ addedAt: "2026-09-22",
5624
+ estimatedTime: 75,
5625
+ description: "Generate and edit images with up to 10 references \u2014 multi-reference composition, precise local edits and text rendering, natively up to 4K.",
5626
+ features: [
5627
+ feat("Multi-Image Input", "input"),
5628
+ feat("4K", "resolution")
5629
+ ],
5630
+ paramConfig: {
5631
+ ...params.prompt(),
5632
+ ...params.aspectRatio(flux3ImageAspectRatios, "auto"),
5633
+ ...params.resolution(flux3ImageResolutions, "1k"),
5634
+ ...params.count(),
5635
+ // Up to 10 references; the first one drives the output ratio while
5636
+ // aspectRatio is 'auto'.
5637
+ ...params.imageInput(10, "Reference Images", false, "reference"),
5638
+ // Moderation level: 0 (strict) … 4 (permissive). Narrower than the 0–6
5639
+ // of the FLUX.2 / Kontext endpoints.
5640
+ ...p.range("safetyTolerance", 0, 4, 2, { label: "Safety Tolerance" })
5641
+ }
5642
+ },
5587
5643
  {
5588
5644
  // Single workflow `flux/v1/video` derives its mode from the input it's
5589
5645
  // given: none → t2v, keyframe images → i2v, a start video → v2v. No
@@ -6851,6 +6907,41 @@ var { MODELS: MODELS25 } = defineModels("minimax", [
6851
6907
  ...p.range("seed", -1, 2147483647, -1),
6852
6908
  ...p.boolean("enableSafetyChecker", true, "Safety Checker")
6853
6909
  }
6910
+ },
6911
+ {
6912
+ // Lip-sync sibling of minimax-h3-max: animates a portrait to a supplied
6913
+ // soundtrack. No prompt and no duration on this wire — the audio drives
6914
+ // both: the vendor requires at least 5s, clips anything past 14.8s, and
6915
+ // the output matches the clipped track. The output follows the image, so
6916
+ // there is no aspect ratio either.
6917
+ id: "minimax-h3-max-lip-sync",
6918
+ name: "MiniMax H3 Max Lip Sync",
6919
+ modelId: "fal-ai-h3-max-lip-sync",
6920
+ addedAt: "2026-09-22",
6921
+ workflow: "minimax/h3-max/lip-sync/image-to-video",
6922
+ estimatedTime: 120,
6923
+ mode: "video",
6924
+ inputType: "i2v",
6925
+ description: "MiniMax H3 Max lip-synced video from a portrait and an audio track \u2014 mouth movements follow the soundtrack, optionally guided by a transcript. 5-14.8s of audio, up to 2K.",
6926
+ features: [
6927
+ feat("Lip Sync", "characteristic"),
6928
+ feat("Image Input", "input"),
6929
+ feat("Audio Input", "audio"),
6930
+ feat("2K", "resolution"),
6931
+ feat("5-15 sec", "duration")
6932
+ ],
6933
+ paramConfig: {
6934
+ ...params.startFrame("Portrait Image", true),
6935
+ ...params.audioInput("Audio Track", true),
6936
+ // Unlike the siblings this one also offers 2K; 1080p and 2K are latent
6937
+ // refinements of a native 768p generation.
6938
+ ...params.resolution(["480p", "768p", "1080p", "2k"], "768p"),
6939
+ // Transcribes the audio to guide the sync; off follows the waveform alone.
6940
+ ...p.boolean("enableTranscription", false, "Transcription"),
6941
+ // -1 (sentinel) means "pick a random seed"; the builder drops it.
6942
+ ...p.range("seed", -1, 2147483647, -1),
6943
+ ...p.boolean("enableSafetyChecker", true, "Safety Checker")
6944
+ }
6854
6945
  }
6855
6946
  ]);
6856
6947
 
@@ -6924,11 +7015,22 @@ var buildMinimaxH3MaxCameraControlsPayload = (input) => ({
6924
7015
  ...input.seed != null && input.seed !== -1 ? { seed: input.seed } : {},
6925
7016
  enable_safety_checker: input.enableSafetyChecker ?? true
6926
7017
  });
7018
+ var buildMinimaxH3MaxLipSyncPayload = (input) => ({
7019
+ image_url: input.startFrame,
7020
+ audio_url: input.audioUrl,
7021
+ // The vendor enum is uppercase; paramConfig keeps the lowercase form.
7022
+ resolution: (input.resolution ?? "768p").toUpperCase(),
7023
+ enable_transcription: input.enableTranscription ?? false,
7024
+ // -1 is the paramConfig sentinel for "random seed" — omit it on the wire.
7025
+ ...input.seed != null && input.seed !== -1 ? { seed: input.seed } : {},
7026
+ enable_safety_checker: input.enableSafetyChecker ?? true
7027
+ });
6927
7028
  registerPayloads(MODELS25, {
6928
7029
  "minimax-music-v3": buildMinimaxMusicV3Payload,
6929
7030
  "minimax-h3-max": buildMinimaxH3MaxPayload,
6930
7031
  "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload,
6931
- "minimax-h3-max-camera-controls": buildMinimaxH3MaxCameraControlsPayload
7032
+ "minimax-h3-max-camera-controls": buildMinimaxH3MaxCameraControlsPayload,
7033
+ "minimax-h3-max-lip-sync": buildMinimaxH3MaxLipSyncPayload
6932
7034
  });
6933
7035
  registerEditPayloads(MODELS25, {
6934
7036
  "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload
@@ -11967,6 +12069,7 @@ var ElevenlabsSfx = "elevenlabs-sfx";
11967
12069
  var Flux2Flex = "flux-2-flex";
11968
12070
  var Flux2Max = "flux-2-max";
11969
12071
  var Flux2Pro = "flux-2-pro";
12072
+ var Flux3Image = "flux-3-image";
11970
12073
  var Flux3Video = "flux-3-video";
11971
12074
  var FluxKontextMax = "flux-kontext-max";
11972
12075
  var FluxKontextPro = "flux-kontext-pro";
@@ -12067,6 +12170,7 @@ var Lyria35 = "lyria-3.5";
12067
12170
  var MinimaxH3 = "minimax-h3";
12068
12171
  var MinimaxH3Max = "minimax-h3-max";
12069
12172
  var MinimaxH3MaxCameraControls = "minimax-h3-max-camera-controls";
12173
+ var MinimaxH3MaxLipSync = "minimax-h3-max-lip-sync";
12070
12174
  var MinimaxH3MaxTurbo = "minimax-h3-max-turbo";
12071
12175
  var MinimaxMusicV2 = "minimax-music-v2";
12072
12176
  var MinimaxMusicV3 = "minimax-music-v3";
@@ -12205,6 +12309,7 @@ var Models = {
12205
12309
  Flux2Flex,
12206
12310
  Flux2Max,
12207
12311
  Flux2Pro,
12312
+ Flux3Image,
12208
12313
  Flux3Video,
12209
12314
  FluxKontextMax,
12210
12315
  FluxKontextPro,
@@ -12305,6 +12410,7 @@ var Models = {
12305
12410
  MinimaxH3,
12306
12411
  MinimaxH3Max,
12307
12412
  MinimaxH3MaxCameraControls,
12413
+ MinimaxH3MaxLipSync,
12308
12414
  MinimaxH3MaxTurbo,
12309
12415
  MinimaxMusicV2,
12310
12416
  MinimaxMusicV3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.4.0",
3
+ "version": "6.6.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",