@picsart/ai-sdk 6.8.0 → 6.9.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
@@ -879,6 +879,28 @@ type ModelInputById = {
879
879
  startTime?: number;
880
880
  videoUrl: string;
881
881
  };
882
+ "ltx-v2.5-fast": {
883
+ prompt: string;
884
+ duration?: 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20;
885
+ resolution?: "720p" | "1080p" | "1440p" | "2160p";
886
+ aspectRatio?: "16:9" | "9:16";
887
+ fps?: 24 | 25 | 48 | 50;
888
+ cameraMotion?: "none" | "static" | "dolly_in" | "dolly_out" | "dolly_left" | "dolly_right" | "jib_up" | "jib_down" | "focus_shift";
889
+ generateAudio?: boolean;
890
+ startFrame?: string;
891
+ endFrame?: string;
892
+ };
893
+ "ltx-v2.5-pro": {
894
+ prompt: string;
895
+ duration?: 6 | 8 | 10;
896
+ resolution?: "720p" | "1080p";
897
+ aspectRatio?: "16:9" | "9:16";
898
+ fps?: 24 | 25 | 50;
899
+ cameraMotion?: "none" | "static" | "dolly_in" | "dolly_out" | "dolly_left" | "dolly_right" | "jib_up" | "jib_down" | "focus_shift";
900
+ generateAudio?: boolean;
901
+ startFrame?: string;
902
+ endFrame?: string;
903
+ };
882
904
  "luma-ray-2": {
883
905
  prompt: string;
884
906
  aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
@@ -3101,6 +3123,8 @@ declare const Models: {
3101
3123
  readonly LtxV23Fast: "ltx-v2.3-fast";
3102
3124
  readonly LtxV23Pro: "ltx-v2.3-pro";
3103
3125
  readonly LtxV23Retake: "ltx-v2.3-retake";
3126
+ readonly LtxV25Fast: "ltx-v2.5-fast";
3127
+ readonly LtxV25Pro: "ltx-v2.5-pro";
3104
3128
  readonly LumaRay2: "luma-ray-2";
3105
3129
  readonly LumaRay2ReframeVideo: "luma-ray-2-reframe-video";
3106
3130
  readonly LumaRay32: "luma-ray-3.2";
package/index.js CHANGED
@@ -2111,6 +2111,30 @@ var LTX_RESOLUTIONS = ["1080p", "1440p", "2160p"];
2111
2111
  var LTX_23_AR = ["16:9", "9:16"];
2112
2112
  var LTX_23_FPS = [24, 25, 48, 50];
2113
2113
  var LTX_PROMPT_MAX = 5e3;
2114
+ var LTX_25_AR = ["16:9", "9:16"];
2115
+ var LTX_25_PRO_RESOLUTIONS = ["720p", "1080p"];
2116
+ var LTX_25_FAST_RESOLUTIONS = ["720p", "1080p", "1440p", "2160p"];
2117
+ var LTX_25_PRO_FPS = [24, 25, 50];
2118
+ var LTX_25_FAST_FPS = [24, 25, 48, 50];
2119
+ var LTX_25_CAMERA_MOTIONS = [
2120
+ { id: "none", label: "None" },
2121
+ { id: "static", label: "Static" },
2122
+ { id: "dolly_in", label: "Dolly In" },
2123
+ { id: "dolly_out", label: "Dolly Out" },
2124
+ { id: "dolly_left", label: "Dolly Left" },
2125
+ { id: "dolly_right", label: "Dolly Right" },
2126
+ { id: "jib_up", label: "Jib Up" },
2127
+ { id: "jib_down", label: "Jib Down" },
2128
+ { id: "focus_shift", label: "Focus Shift" }
2129
+ ];
2130
+ var LTX_25_FAST_LONG = "Videos longer than 10s render at 720p/1080p and 24 or 25 fps.";
2131
+ var ltx25FastLongConstraints = [12, 14, 16, 18, 20].map((d) => ({
2132
+ when: { duration: { is: d } },
2133
+ then: {
2134
+ resolution: { allowed: ["720p", "1080p"], reason: LTX_25_FAST_LONG },
2135
+ fps: { allowed: [24, 25], reason: LTX_25_FAST_LONG }
2136
+ }
2137
+ }));
2114
2138
  var FAST_LONG = "Videos longer than 10s render at 1080p / 25 fps.";
2115
2139
  var ltxFastLongConstraints = [12, 14, 16, 18, 20].map((d) => ({
2116
2140
  when: { duration: { is: d } },
@@ -2387,6 +2411,74 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2387
2411
  },
2388
2412
  ...params.videoInput("Source Video")
2389
2413
  }
2414
+ },
2415
+ // ── LTX 2.5 ──────────────────────────────────────────────────────
2416
+ // One entry per tier: text-to-video on `workflow`, image-to-video on
2417
+ // `editWorkflow`. A start or end frame is what routes a call to the image
2418
+ // side (see `resolvePayloadBuild`), and `end_image_url` — a transition from
2419
+ // the start frame to the end one — exists only there.
2420
+ {
2421
+ id: "ltx-v2.5-pro",
2422
+ name: "LTX 2.5 Pro",
2423
+ modelId: "fal-ai-ltx-2.5-pro",
2424
+ addedAt: "2026-09-23",
2425
+ workflow: "lightricks/ltx-2.5/text-to-video/pro",
2426
+ editWorkflow: "lightricks/ltx-2.5/image-to-video/pro",
2427
+ estimatedTime: 75,
2428
+ editEstimatedTime: 78,
2429
+ mode: "video",
2430
+ inputType: "t2v",
2431
+ description: "Quality-optimized 2.5 with synchronized native audio in a single pass \u2014 720p/1080p, 6-10s, with camera motion control.",
2432
+ features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("End Frame", "frame"), feat("Audio", "audio"), feat("Camera Motion", "characteristic"), feat("6/8/10 sec", "duration")],
2433
+ paramConfig: {
2434
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2435
+ ...params.duration(PRO_DURATIONS, 6),
2436
+ ...params.resolution(LTX_25_PRO_RESOLUTIONS, "1080p"),
2437
+ ...params.aspectRatio(LTX_25_AR),
2438
+ ...p.enum("fps", LTX_25_PRO_FPS, 25, { label: "FPS" }),
2439
+ ...p.enum("cameraMotion", LTX_25_CAMERA_MOTIONS, "none", { label: "Camera Motion" }),
2440
+ ...params.generateAudio(),
2441
+ ...params.startFrame("Start Frame"),
2442
+ ...params.endFrame()
2443
+ },
2444
+ constraints: [
2445
+ // end_image_url exists only on the I2V route, which a start frame triggers.
2446
+ { when: { startFrame: { exists: false } }, then: {
2447
+ endFrame: { disabled: true, reason: "An end frame requires a start image." }
2448
+ } }
2449
+ ]
2450
+ },
2451
+ {
2452
+ id: "ltx-v2.5-fast",
2453
+ name: "LTX 2.5 Fast",
2454
+ modelId: "fal-ai-ltx-2.5-fast",
2455
+ addedAt: "2026-09-23",
2456
+ workflow: "lightricks/ltx-2.5/text-to-video/fast",
2457
+ editWorkflow: "lightricks/ltx-2.5/image-to-video/fast",
2458
+ estimatedTime: 38,
2459
+ editEstimatedTime: 40,
2460
+ mode: "video",
2461
+ inputType: "t2v",
2462
+ description: "Speed-optimized 2.5 with synchronized native audio \u2014 up to 4K, up to 20s, with camera motion control.",
2463
+ features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("End Frame", "frame"), feat("Fast", "duration"), feat("Up to 20s", "duration"), feat("Audio", "audio"), feat("4K", "resolution"), feat("Camera Motion", "characteristic")],
2464
+ paramConfig: {
2465
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2466
+ ...params.duration(FAST_DURATIONS, 6),
2467
+ ...params.resolution(LTX_25_FAST_RESOLUTIONS, "1080p"),
2468
+ ...params.aspectRatio(LTX_25_AR),
2469
+ ...p.enum("fps", LTX_25_FAST_FPS, 25, { label: "FPS" }),
2470
+ ...p.enum("cameraMotion", LTX_25_CAMERA_MOTIONS, "none", { label: "Camera Motion" }),
2471
+ ...params.generateAudio(),
2472
+ ...params.startFrame("Start Frame"),
2473
+ ...params.endFrame()
2474
+ },
2475
+ constraints: [
2476
+ ...ltx25FastLongConstraints,
2477
+ // end_image_url exists only on the I2V route, which a start frame triggers.
2478
+ { when: { startFrame: { exists: false } }, then: {
2479
+ endFrame: { disabled: true, reason: "An end frame requires a start image." }
2480
+ } }
2481
+ ]
2390
2482
  }
2391
2483
  ]);
2392
2484
 
@@ -9642,6 +9734,81 @@ registerPayloads(MODELS3, {
9642
9734
  "creatify-boreal": buildCreatifyBorealPayload
9643
9735
  });
9644
9736
 
9737
+ // src/vendors/catalog/ltx.payloads.ts
9738
+ function requireStartFrame(input) {
9739
+ if (!input.startFrame) {
9740
+ throw new ApiError("LTX 2.5: an end frame requires a start image.", {
9741
+ status: 400,
9742
+ code: "validation_error"
9743
+ });
9744
+ }
9745
+ return input.startFrame;
9746
+ }
9747
+ var buildLtx25ProT2VPayload = (input) => ({
9748
+ prompt: input.prompt,
9749
+ ...input.duration != null ? { duration: input.duration } : {},
9750
+ ...input.resolution ? { resolution: input.resolution } : {},
9751
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9752
+ ...input.fps != null ? { fps: input.fps } : {},
9753
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9754
+ // has no such value and omitting the field is the vendor's default. Spelled
9755
+ // out per builder rather than shared, so the check narrows the literal union
9756
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9757
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9758
+ generate_audio: input.generateAudio ?? true
9759
+ });
9760
+ var buildLtx25ProI2VPayload = (input) => ({
9761
+ prompt: input.prompt,
9762
+ image_url: requireStartFrame(input),
9763
+ ...input.endFrame ? { end_image_url: input.endFrame } : {},
9764
+ ...input.duration != null ? { duration: input.duration } : {},
9765
+ ...input.resolution ? { resolution: input.resolution } : {},
9766
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9767
+ ...input.fps != null ? { fps: input.fps } : {},
9768
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9769
+ // has no such value and omitting the field is the vendor's default. Spelled
9770
+ // out per builder rather than shared, so the check narrows the literal union
9771
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9772
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9773
+ generate_audio: input.generateAudio ?? true
9774
+ });
9775
+ var buildLtx25FastT2VPayload = (input) => ({
9776
+ prompt: input.prompt,
9777
+ ...input.duration != null ? { duration: input.duration } : {},
9778
+ ...input.resolution ? { resolution: input.resolution } : {},
9779
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9780
+ ...input.fps != null ? { fps: input.fps } : {},
9781
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9782
+ // has no such value and omitting the field is the vendor's default. Spelled
9783
+ // out per builder rather than shared, so the check narrows the literal union
9784
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9785
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9786
+ generate_audio: input.generateAudio ?? true
9787
+ });
9788
+ var buildLtx25FastI2VPayload = (input) => ({
9789
+ prompt: input.prompt,
9790
+ image_url: requireStartFrame(input),
9791
+ ...input.endFrame ? { end_image_url: input.endFrame } : {},
9792
+ ...input.duration != null ? { duration: input.duration } : {},
9793
+ ...input.resolution ? { resolution: input.resolution } : {},
9794
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9795
+ ...input.fps != null ? { fps: input.fps } : {},
9796
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9797
+ // has no such value and omitting the field is the vendor's default. Spelled
9798
+ // out per builder rather than shared, so the check narrows the literal union
9799
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9800
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9801
+ generate_audio: input.generateAudio ?? true
9802
+ });
9803
+ registerPayloads(MODELS2, {
9804
+ "ltx-v2.5-pro": buildLtx25ProT2VPayload,
9805
+ "ltx-v2.5-fast": buildLtx25FastT2VPayload
9806
+ });
9807
+ registerEditPayloads(MODELS2, {
9808
+ "ltx-v2.5-pro": buildLtx25ProI2VPayload,
9809
+ "ltx-v2.5-fast": buildLtx25FastI2VPayload
9810
+ });
9811
+
9645
9812
  // src/vendors/catalog/index.ts
9646
9813
  var ALL_MODELS = [
9647
9814
  ...MODELS,
@@ -12307,6 +12474,8 @@ var LtxV23Extend = "ltx-v2.3-extend";
12307
12474
  var LtxV23Fast = "ltx-v2.3-fast";
12308
12475
  var LtxV23Pro = "ltx-v2.3-pro";
12309
12476
  var LtxV23Retake = "ltx-v2.3-retake";
12477
+ var LtxV25Fast = "ltx-v2.5-fast";
12478
+ var LtxV25Pro = "ltx-v2.5-pro";
12310
12479
  var LumaRay2 = "luma-ray-2";
12311
12480
  var LumaRay2ReframeVideo = "luma-ray-2-reframe-video";
12312
12481
  var LumaRay32 = "luma-ray-3.2";
@@ -12548,6 +12717,8 @@ var Models = {
12548
12717
  LtxV23Fast,
12549
12718
  LtxV23Pro,
12550
12719
  LtxV23Retake,
12720
+ LtxV25Fast,
12721
+ LtxV25Pro,
12551
12722
  LumaRay2,
12552
12723
  LumaRay2ReframeVideo,
12553
12724
  LumaRay32,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.8.0",
3
+ "version": "6.9.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",