@picsart/ai-sdk 5.38.0 → 5.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.
package/index.d.ts CHANGED
@@ -566,9 +566,11 @@ type ModelInputById = {
566
566
  };
567
567
  "ideogram-v4": {
568
568
  prompt: string;
569
- resolution?: "2048x2048" | "1440x2880" | "2880x1440" | "1664x2496" | "2496x1664" | "1792x2240" | "2240x1792" | "1440x2560" | "2560x1440" | "1600x2560" | "2560x1600" | "1728x2304" | "2304x1728" | "1296x3168" | "3168x1296" | "1152x2944" | "2944x1152" | "1248x3328" | "3328x1248" | "1280x3072" | "3072x1280";
569
+ resolution?: "2048x2048" | "1440x2880" | "2880x1440" | "1664x2496" | "2496x1664" | "1792x2240" | "2240x1792" | "1440x2560" | "2560x1440" | "1600x2560" | "2560x1600" | "1728x2304" | "2304x1728" | "1296x3168" | "3168x1296" | "1152x2944" | "2944x1152" | "1248x3328" | "3328x1248" | "1280x3072" | "3072x1280" | "1024x3072" | "3072x1024" | "1024x1024" | "896x1120" | "1120x896" | "864x1152" | "1152x864" | "832x1248" | "1248x832" | "800x1280" | "1280x800" | "720x1280" | "1280x720" | "720x1440" | "1440x720" | "512x1536" | "1536x512";
570
570
  renderingSpeed?: "TURBO" | "DEFAULT" | "QUALITY";
571
571
  enableCopyrightDetection?: boolean;
572
+ imageUrls?: string[];
573
+ imageWeight?: number;
572
574
  };
573
575
  "kling-3.0-image": {
574
576
  prompt: string;
@@ -876,6 +878,21 @@ type ModelInputById = {
876
878
  seed?: number;
877
879
  enableSafetyChecker?: boolean;
878
880
  };
881
+ "minimax-h3-max-camera-controls": {
882
+ prompt?: string;
883
+ startFrame: string;
884
+ resolution?: "480p" | "768p" | "1080p";
885
+ duration?: number;
886
+ cameraTrajectory?: Array<{
887
+ time: number;
888
+ azimuth: number;
889
+ elevation: number;
890
+ distance: number;
891
+ }>;
892
+ promptExpansionMode?: "balanced" | "quality";
893
+ seed?: number;
894
+ enableSafetyChecker?: boolean;
895
+ };
879
896
  "minimax-h3-max-turbo": {
880
897
  prompt: string;
881
898
  startFrame?: string;
@@ -2781,6 +2798,7 @@ declare const Models: {
2781
2798
  readonly Minimax02Hd: "minimax-02-hd";
2782
2799
  readonly MinimaxH3: "minimax-h3";
2783
2800
  readonly MinimaxH3Max: "minimax-h3-max";
2801
+ readonly MinimaxH3MaxCameraControls: "minimax-h3-max-camera-controls";
2784
2802
  readonly MinimaxH3MaxTurbo: "minimax-h3-max-turbo";
2785
2803
  readonly MinimaxMusicV2: "minimax-music-v2";
2786
2804
  readonly MinimaxMusicV3: "minimax-music-v3";
package/index.js CHANGED
@@ -6942,6 +6942,60 @@ var { MODELS: MODELS25 } = defineModels("minimax", [
6942
6942
  aspectRatio: { disabled: true, reason: "Aspect ratio follows the frame image." }
6943
6943
  } }
6944
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
+ }
6945
6999
  }
6946
7000
  ]);
6947
7001
 
@@ -7001,10 +7055,25 @@ var buildMinimaxH3MaxTurboPayload = (input) => ({
7001
7055
  ...input.seed != null && input.seed !== -1 ? { seed: input.seed } : {},
7002
7056
  enable_safety_checker: input.enableSafetyChecker ?? true
7003
7057
  });
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
+ });
7004
7072
  registerPayloads(MODELS25, {
7005
7073
  "minimax-music-v3": buildMinimaxMusicV3Payload,
7006
7074
  "minimax-h3-max": buildMinimaxH3MaxPayload,
7007
- "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload
7075
+ "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload,
7076
+ "minimax-h3-max-camera-controls": buildMinimaxH3MaxCameraControlsPayload
7008
7077
  });
7009
7078
  registerEditPayloads(MODELS25, {
7010
7079
  "minimax-h3-max-turbo": buildMinimaxH3MaxTurboPayload
@@ -7046,6 +7115,13 @@ var buildIdeogramV4GeneratePayload = (ctx) => ({
7046
7115
  ...ctx.renderingSpeed ? { rendering_speed: ctx.renderingSpeed } : {},
7047
7116
  ...ctx.enableCopyrightDetection ? { enable_copyright_detection: true } : {}
7048
7117
  });
7118
+ var buildIdeogramV4RemixPayload = (ctx) => ({
7119
+ text_prompt: ctx.prompt,
7120
+ image: ctx.startFrame ?? ctx.imageUrls?.[0],
7121
+ ...ctx.imageWeight != null ? { image_weight: ctx.imageWeight } : {},
7122
+ ...ctx.renderingSpeed ? { rendering_speed: ctx.renderingSpeed } : {},
7123
+ ...ctx.enableCopyrightDetection ? { enable_copyright_detection: true } : {}
7124
+ });
7049
7125
  var buildIdeogramPImagePayload = (ctx) => ({
7050
7126
  prompt: ctx.prompt,
7051
7127
  resolution: ctx.resolution ?? "1024x1024",
@@ -7057,15 +7133,18 @@ var { MODELS: MODELS26 } = defineModels("ideogram", [
7057
7133
  name: "Ideogram 4.0",
7058
7134
  addedAt: "2026-06-03",
7059
7135
  workflow: "ideogram/v4/generate",
7136
+ editWorkflow: "ideogram/v4/remix",
7060
7137
  buildPayload: buildIdeogramV4GeneratePayload,
7138
+ buildEditPayload: buildIdeogramV4RemixPayload,
7061
7139
  estimatedTime: 20,
7062
7140
  mode: "image",
7063
7141
  inputType: "t2i",
7064
7142
  description: "Ideogram's latest model \u2014 class-leading text rendering at up to ~3K resolution.",
7065
- features: [feat("Text Rendering", "style"), feat("Up to 3K", "resolution")],
7143
+ features: [feat("Text Rendering", "style"), feat("Up to 3K", "resolution"), feat("Image Remix", "input")],
7066
7144
  paramConfig: {
7067
7145
  ...params.prompt(),
7068
7146
  ...params.resolution([
7147
+ // 2K bucket (~3–4 MP)
7069
7148
  "2048x2048",
7070
7149
  "1440x2880",
7071
7150
  "2880x1440",
@@ -7086,14 +7165,36 @@ var { MODELS: MODELS26 } = defineModels("ideogram", [
7086
7165
  "1248x3328",
7087
7166
  "3328x1248",
7088
7167
  "1280x3072",
7089
- "3072x1280"
7168
+ "3072x1280",
7169
+ "1024x3072",
7170
+ "3072x1024",
7171
+ // 1K bucket (~1 MP)
7172
+ "1024x1024",
7173
+ "896x1120",
7174
+ "1120x896",
7175
+ "864x1152",
7176
+ "1152x864",
7177
+ "832x1248",
7178
+ "1248x832",
7179
+ "800x1280",
7180
+ "1280x800",
7181
+ "720x1280",
7182
+ "1280x720",
7183
+ "720x1440",
7184
+ "1440x720",
7185
+ "512x1536",
7186
+ "1536x512"
7090
7187
  ], "2048x2048"),
7091
7188
  ...params.renderingSpeed([
7092
7189
  { id: "TURBO", label: "Turbo" },
7093
7190
  { id: "DEFAULT", label: "Balanced" },
7094
7191
  { id: "QUALITY", label: "Quality" }
7095
7192
  ], "DEFAULT"),
7096
- ...p.boolean("enableCopyrightDetection", false, "Copyright Detection")
7193
+ ...p.boolean("enableCopyrightDetection", false, "Copyright Detection"),
7194
+ // Remix (editWorkflow) inputs — an image switches the request to
7195
+ // ideogram/v4/remix. Weight minimum is 1; the API rejects 0.
7196
+ ...params.imageInput(1, "Source Image"),
7197
+ ...params.imageWeight(1, 100, 50, 5)
7097
7198
  }
7098
7199
  },
7099
7200
  {
@@ -11545,6 +11646,7 @@ var Lyria35 = "lyria-3.5";
11545
11646
  var Minimax02Hd = "minimax-02-hd";
11546
11647
  var MinimaxH3 = "minimax-h3";
11547
11648
  var MinimaxH3Max = "minimax-h3-max";
11649
+ var MinimaxH3MaxCameraControls = "minimax-h3-max-camera-controls";
11548
11650
  var MinimaxH3MaxTurbo = "minimax-h3-max-turbo";
11549
11651
  var MinimaxMusicV2 = "minimax-music-v2";
11550
11652
  var MinimaxMusicV3 = "minimax-music-v3";
@@ -11770,6 +11872,7 @@ var Models = {
11770
11872
  Minimax02Hd,
11771
11873
  MinimaxH3,
11772
11874
  MinimaxH3Max,
11875
+ MinimaxH3MaxCameraControls,
11773
11876
  MinimaxH3MaxTurbo,
11774
11877
  MinimaxMusicV2,
11775
11878
  MinimaxMusicV3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.38.0",
3
+ "version": "5.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",