@picsart/ai-sdk 6.8.0 → 6.10.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
@@ -862,6 +862,25 @@ type ModelInputById = {
862
862
  imageUrls?: string[];
863
863
  endFrame?: string;
864
864
  };
865
+ "ltx-v2.3-outpaint": {
866
+ prompt: string;
867
+ videoUrl: string;
868
+ negativePrompt?: string;
869
+ aspectRatio?: "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "9:21";
870
+ resolution?: "480p" | "720p" | "1080p";
871
+ numFrames?: number;
872
+ fps?: number;
873
+ sourceScale?: number;
874
+ videoStrength?: number;
875
+ cfgScale?: number;
876
+ numInferenceSteps?: number;
877
+ videoQuality?: "low" | "medium" | "high" | "maximum";
878
+ videoWriteMode?: "fast" | "balanced" | "small";
879
+ enhancePrompt?: boolean;
880
+ generateAudio?: boolean;
881
+ enableSafetyChecker?: boolean;
882
+ seed?: number;
883
+ };
865
884
  "ltx-v2.3-pro": {
866
885
  prompt: string;
867
886
  duration?: 6 | 8 | 10;
@@ -872,6 +891,11 @@ type ModelInputById = {
872
891
  imageUrls?: string[];
873
892
  endFrame?: string;
874
893
  };
894
+ "ltx-v2.3-reframe": {
895
+ videoUrl: string;
896
+ resolution?: "720p" | "1080p";
897
+ aspectRatio?: "16:9" | "9:16" | "1:1" | "4:5" | "5:4";
898
+ };
875
899
  "ltx-v2.3-retake": {
876
900
  prompt: string;
877
901
  duration?: number;
@@ -879,6 +903,28 @@ type ModelInputById = {
879
903
  startTime?: number;
880
904
  videoUrl: string;
881
905
  };
906
+ "ltx-v2.5-fast": {
907
+ prompt: string;
908
+ duration?: 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20;
909
+ resolution?: "720p" | "1080p" | "1440p" | "2160p";
910
+ aspectRatio?: "16:9" | "9:16";
911
+ fps?: 24 | 25 | 48 | 50;
912
+ cameraMotion?: "none" | "static" | "dolly_in" | "dolly_out" | "dolly_left" | "dolly_right" | "jib_up" | "jib_down" | "focus_shift";
913
+ generateAudio?: boolean;
914
+ startFrame?: string;
915
+ endFrame?: string;
916
+ };
917
+ "ltx-v2.5-pro": {
918
+ prompt: string;
919
+ duration?: 6 | 8 | 10;
920
+ resolution?: "720p" | "1080p";
921
+ aspectRatio?: "16:9" | "9:16";
922
+ fps?: 24 | 25 | 50;
923
+ cameraMotion?: "none" | "static" | "dolly_in" | "dolly_out" | "dolly_left" | "dolly_right" | "jib_up" | "jib_down" | "focus_shift";
924
+ generateAudio?: boolean;
925
+ startFrame?: string;
926
+ endFrame?: string;
927
+ };
882
928
  "luma-ray-2": {
883
929
  prompt: string;
884
930
  aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
@@ -3099,8 +3145,12 @@ declare const Models: {
3099
3145
  readonly LtxV2Retake: "ltx-v2-retake";
3100
3146
  readonly LtxV23Extend: "ltx-v2.3-extend";
3101
3147
  readonly LtxV23Fast: "ltx-v2.3-fast";
3148
+ readonly LtxV23Outpaint: "ltx-v2.3-outpaint";
3102
3149
  readonly LtxV23Pro: "ltx-v2.3-pro";
3150
+ readonly LtxV23Reframe: "ltx-v2.3-reframe";
3103
3151
  readonly LtxV23Retake: "ltx-v2.3-retake";
3152
+ readonly LtxV25Fast: "ltx-v2.5-fast";
3153
+ readonly LtxV25Pro: "ltx-v2.5-pro";
3104
3154
  readonly LumaRay2: "luma-ray-2";
3105
3155
  readonly LumaRay2ReframeVideo: "luma-ray-2-reframe-video";
3106
3156
  readonly LumaRay32: "luma-ray-3.2";
package/index.js CHANGED
@@ -2111,6 +2111,34 @@ 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_23_REFRAME_RESOLUTIONS = ["720p", "1080p"];
2115
+ var LTX_23_REFRAME_AR = ["16:9", "9:16", "1:1", "4:5", "5:4"];
2116
+ var LTX_23_OUTPAINT_RESOLUTIONS = ["480p", "720p", "1080p"];
2117
+ var LTX_23_OUTPAINT_AR = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16", "9:21"];
2118
+ var LTX_25_AR = ["16:9", "9:16"];
2119
+ var LTX_25_PRO_RESOLUTIONS = ["720p", "1080p"];
2120
+ var LTX_25_FAST_RESOLUTIONS = ["720p", "1080p", "1440p", "2160p"];
2121
+ var LTX_25_PRO_FPS = [24, 25, 50];
2122
+ var LTX_25_FAST_FPS = [24, 25, 48, 50];
2123
+ var LTX_25_CAMERA_MOTIONS = [
2124
+ { id: "none", label: "None" },
2125
+ { id: "static", label: "Static" },
2126
+ { id: "dolly_in", label: "Dolly In" },
2127
+ { id: "dolly_out", label: "Dolly Out" },
2128
+ { id: "dolly_left", label: "Dolly Left" },
2129
+ { id: "dolly_right", label: "Dolly Right" },
2130
+ { id: "jib_up", label: "Jib Up" },
2131
+ { id: "jib_down", label: "Jib Down" },
2132
+ { id: "focus_shift", label: "Focus Shift" }
2133
+ ];
2134
+ var LTX_25_FAST_LONG = "Videos longer than 10s render at 720p/1080p and 24 or 25 fps.";
2135
+ var ltx25FastLongConstraints = [12, 14, 16, 18, 20].map((d) => ({
2136
+ when: { duration: { is: d } },
2137
+ then: {
2138
+ resolution: { allowed: ["720p", "1080p"], reason: LTX_25_FAST_LONG },
2139
+ fps: { allowed: [24, 25], reason: LTX_25_FAST_LONG }
2140
+ }
2141
+ }));
2114
2142
  var FAST_LONG = "Videos longer than 10s render at 1080p / 25 fps.";
2115
2143
  var ltxFastLongConstraints = [12, 14, 16, 18, 20].map((d) => ({
2116
2144
  when: { duration: { is: d } },
@@ -2387,6 +2415,128 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2387
2415
  },
2388
2416
  ...params.videoInput("Source Video")
2389
2417
  }
2418
+ },
2419
+ {
2420
+ id: "ltx-v2.3-reframe",
2421
+ name: "LTX 2.3 Reframe",
2422
+ modelId: "fal-ai-ltx-2.3-reframe",
2423
+ addedAt: "2026-09-23",
2424
+ workflow: "ltx-2.3/reframe",
2425
+ estimatedTime: 45,
2426
+ mode: "video",
2427
+ inputType: "v2v",
2428
+ description: "Reframe a video into a new aspect ratio \u2014 the source is re-cropped and the newly exposed edges are generated to match. Takes no prompt.",
2429
+ features: [feat("Video Input", "input"), feat("Aspect Ratio", "characteristic"), feat("Up to 1080p", "resolution")],
2430
+ paramConfig: {
2431
+ ...params.videoInput("Source Video", "asset", true),
2432
+ ...params.resolution(LTX_23_REFRAME_RESOLUTIONS, "1080p"),
2433
+ ...params.aspectRatio(LTX_23_REFRAME_AR)
2434
+ }
2435
+ },
2436
+ {
2437
+ // fal serves this one from the `ltx-2.3-quality` model id, hence the
2438
+ // workflow path; `modelId` mirrors it so the pricing key reads the same.
2439
+ id: "ltx-v2.3-outpaint",
2440
+ name: "LTX 2.3 Outpaint",
2441
+ modelId: "fal-ai-ltx-2.3-quality-outpaint",
2442
+ addedAt: "2026-09-23",
2443
+ workflow: "ltx-2.3-quality/outpaint",
2444
+ estimatedTime: 180,
2445
+ mode: "video",
2446
+ inputType: "v2v",
2447
+ description: "Expand a video past its original frame \u2014 the source stays put inside a wider canvas and the surrounding region is generated to match.",
2448
+ features: [feat("Video Input", "input"), feat("Outpaint", "characteristic"), feat("Audio", "audio"), feat("Up to 1080p", "resolution")],
2449
+ paramConfig: {
2450
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2451
+ ...params.videoInput("Source Video", "asset", true),
2452
+ ...params.negativePrompt(),
2453
+ ...params.aspectRatio(LTX_23_OUTPAINT_AR),
2454
+ ...params.resolution(LTX_23_OUTPAINT_RESOLUTIONS, "720p"),
2455
+ ...p.range("numFrames", 9, 481, 121, { label: "Frames" }),
2456
+ ...p.range("fps", 1, 60, 24, { label: "FPS" }),
2457
+ // 1.0 fits the source as large as the canvas allows; lower values zoom it
2458
+ // out and leave a wider generated border, which the vendor calls less stable.
2459
+ ...p.range("sourceScale", 0.25, 1, 1, { step: 0.05, label: "Source Scale" }),
2460
+ // How strongly the original content is preserved inside the new canvas.
2461
+ ...p.range("videoStrength", 0, 1, 1, { step: 0.05, label: "Source Strength" }),
2462
+ ...params.cfgScale(1, 20, 1),
2463
+ ...p.range("numInferenceSteps", 8, 30, 15, { label: "Inference Steps" }),
2464
+ ...p.enum("videoQuality", ["low", "medium", "high", "maximum"], "high", { label: "Video Quality" }),
2465
+ ...p.enum("videoWriteMode", ["fast", "balanced", "small"], "balanced", { label: "Write Mode" }),
2466
+ ...params.enhancePrompt(),
2467
+ ...params.generateAudio(),
2468
+ ...p.boolean("enableSafetyChecker", true, "Safety Checker"),
2469
+ // Default-less on purpose: unset means the vendor picks a random seed.
2470
+ ...params.seed()
2471
+ }
2472
+ },
2473
+ // ── LTX 2.5 ──────────────────────────────────────────────────────
2474
+ // One entry per tier: text-to-video on `workflow`, image-to-video on
2475
+ // `editWorkflow`. A start or end frame is what routes a call to the image
2476
+ // side (see `resolvePayloadBuild`), and `end_image_url` — a transition from
2477
+ // the start frame to the end one — exists only there.
2478
+ {
2479
+ id: "ltx-v2.5-pro",
2480
+ name: "LTX 2.5 Pro",
2481
+ modelId: "fal-ai-ltx-2.5-pro",
2482
+ addedAt: "2026-09-23",
2483
+ workflow: "lightricks/ltx-2.5/text-to-video/pro",
2484
+ editWorkflow: "lightricks/ltx-2.5/image-to-video/pro",
2485
+ estimatedTime: 75,
2486
+ editEstimatedTime: 78,
2487
+ mode: "video",
2488
+ inputType: "t2v",
2489
+ description: "Quality-optimized 2.5 with synchronized native audio in a single pass \u2014 720p/1080p, 6-10s, with camera motion control.",
2490
+ 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")],
2491
+ paramConfig: {
2492
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2493
+ ...params.duration(PRO_DURATIONS, 6),
2494
+ ...params.resolution(LTX_25_PRO_RESOLUTIONS, "1080p"),
2495
+ ...params.aspectRatio(LTX_25_AR),
2496
+ ...p.enum("fps", LTX_25_PRO_FPS, 25, { label: "FPS" }),
2497
+ ...p.enum("cameraMotion", LTX_25_CAMERA_MOTIONS, "none", { label: "Camera Motion" }),
2498
+ ...params.generateAudio(),
2499
+ ...params.startFrame("Start Frame"),
2500
+ ...params.endFrame()
2501
+ },
2502
+ constraints: [
2503
+ // end_image_url exists only on the I2V route, which a start frame triggers.
2504
+ { when: { startFrame: { exists: false } }, then: {
2505
+ endFrame: { disabled: true, reason: "An end frame requires a start image." }
2506
+ } }
2507
+ ]
2508
+ },
2509
+ {
2510
+ id: "ltx-v2.5-fast",
2511
+ name: "LTX 2.5 Fast",
2512
+ modelId: "fal-ai-ltx-2.5-fast",
2513
+ addedAt: "2026-09-23",
2514
+ workflow: "lightricks/ltx-2.5/text-to-video/fast",
2515
+ editWorkflow: "lightricks/ltx-2.5/image-to-video/fast",
2516
+ estimatedTime: 38,
2517
+ editEstimatedTime: 40,
2518
+ mode: "video",
2519
+ inputType: "t2v",
2520
+ description: "Speed-optimized 2.5 with synchronized native audio \u2014 up to 4K, up to 20s, with camera motion control.",
2521
+ 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")],
2522
+ paramConfig: {
2523
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2524
+ ...params.duration(FAST_DURATIONS, 6),
2525
+ ...params.resolution(LTX_25_FAST_RESOLUTIONS, "1080p"),
2526
+ ...params.aspectRatio(LTX_25_AR),
2527
+ ...p.enum("fps", LTX_25_FAST_FPS, 25, { label: "FPS" }),
2528
+ ...p.enum("cameraMotion", LTX_25_CAMERA_MOTIONS, "none", { label: "Camera Motion" }),
2529
+ ...params.generateAudio(),
2530
+ ...params.startFrame("Start Frame"),
2531
+ ...params.endFrame()
2532
+ },
2533
+ constraints: [
2534
+ ...ltx25FastLongConstraints,
2535
+ // end_image_url exists only on the I2V route, which a start frame triggers.
2536
+ { when: { startFrame: { exists: false } }, then: {
2537
+ endFrame: { disabled: true, reason: "An end frame requires a start image." }
2538
+ } }
2539
+ ]
2390
2540
  }
2391
2541
  ]);
2392
2542
 
@@ -9642,6 +9792,107 @@ registerPayloads(MODELS3, {
9642
9792
  "creatify-boreal": buildCreatifyBorealPayload
9643
9793
  });
9644
9794
 
9795
+ // src/vendors/catalog/ltx.payloads.ts
9796
+ function requireStartFrame(input) {
9797
+ if (!input.startFrame) {
9798
+ throw new ApiError("LTX 2.5: an end frame requires a start image.", {
9799
+ status: 400,
9800
+ code: "validation_error"
9801
+ });
9802
+ }
9803
+ return input.startFrame;
9804
+ }
9805
+ var buildLtx25ProT2VPayload = (input) => ({
9806
+ prompt: input.prompt,
9807
+ ...input.duration != null ? { duration: input.duration } : {},
9808
+ ...input.resolution ? { resolution: input.resolution } : {},
9809
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9810
+ ...input.fps != null ? { fps: input.fps } : {},
9811
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9812
+ // has no such value and omitting the field is the vendor's default. Spelled
9813
+ // out per builder rather than shared, so the check narrows the literal union
9814
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9815
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9816
+ generate_audio: input.generateAudio ?? true
9817
+ });
9818
+ var buildLtx25ProI2VPayload = (input) => ({
9819
+ prompt: input.prompt,
9820
+ image_url: requireStartFrame(input),
9821
+ ...input.endFrame ? { end_image_url: input.endFrame } : {},
9822
+ ...input.duration != null ? { duration: input.duration } : {},
9823
+ ...input.resolution ? { resolution: input.resolution } : {},
9824
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9825
+ ...input.fps != null ? { fps: input.fps } : {},
9826
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9827
+ // has no such value and omitting the field is the vendor's default. Spelled
9828
+ // out per builder rather than shared, so the check narrows the literal union
9829
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9830
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9831
+ generate_audio: input.generateAudio ?? true
9832
+ });
9833
+ var buildLtx25FastT2VPayload = (input) => ({
9834
+ prompt: input.prompt,
9835
+ ...input.duration != null ? { duration: input.duration } : {},
9836
+ ...input.resolution ? { resolution: input.resolution } : {},
9837
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9838
+ ...input.fps != null ? { fps: input.fps } : {},
9839
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9840
+ // has no such value and omitting the field is the vendor's default. Spelled
9841
+ // out per builder rather than shared, so the check narrows the literal union
9842
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9843
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9844
+ generate_audio: input.generateAudio ?? true
9845
+ });
9846
+ var buildLtx25FastI2VPayload = (input) => ({
9847
+ prompt: input.prompt,
9848
+ image_url: requireStartFrame(input),
9849
+ ...input.endFrame ? { end_image_url: input.endFrame } : {},
9850
+ ...input.duration != null ? { duration: input.duration } : {},
9851
+ ...input.resolution ? { resolution: input.resolution } : {},
9852
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9853
+ ...input.fps != null ? { fps: input.fps } : {},
9854
+ // `none` is the paramConfig sentinel for "leave the camera alone": the wire
9855
+ // has no such value and omitting the field is the vendor's default. Spelled
9856
+ // out per builder rather than shared, so the check narrows the literal union
9857
+ // instead of widening it to `string`. (`static` is a real, locked-off camera.)
9858
+ ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9859
+ generate_audio: input.generateAudio ?? true
9860
+ });
9861
+ var buildLtx23ReframePayload = (input) => ({
9862
+ video_url: input.videoUrl,
9863
+ ...input.resolution ? { resolution: input.resolution } : {},
9864
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {}
9865
+ });
9866
+ var buildLtx23OutpaintPayload = (input) => ({
9867
+ prompt: input.prompt,
9868
+ video_url: input.videoUrl,
9869
+ ...input.negativePrompt ? { negative_prompt: input.negativePrompt } : {},
9870
+ ...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
9871
+ ...input.resolution ? { output_resolution: input.resolution } : {},
9872
+ ...input.numFrames != null ? { num_frames: input.numFrames } : {},
9873
+ ...input.fps != null ? { frames_per_second: input.fps } : {},
9874
+ ...input.sourceScale != null ? { source_scale: input.sourceScale } : {},
9875
+ ...input.videoStrength != null ? { video_strength: input.videoStrength } : {},
9876
+ ...input.cfgScale != null ? { guidance_scale: input.cfgScale } : {},
9877
+ ...input.numInferenceSteps != null ? { num_inference_steps: input.numInferenceSteps } : {},
9878
+ ...input.videoQuality ? { video_quality: input.videoQuality } : {},
9879
+ ...input.videoWriteMode ? { video_write_mode: input.videoWriteMode } : {},
9880
+ ...input.seed != null ? { seed: input.seed } : {},
9881
+ enable_prompt_expansion: input.enhancePrompt ?? true,
9882
+ generate_audio: input.generateAudio ?? true,
9883
+ enable_safety_checker: input.enableSafetyChecker ?? true
9884
+ });
9885
+ registerPayloads(MODELS2, {
9886
+ "ltx-v2.5-pro": buildLtx25ProT2VPayload,
9887
+ "ltx-v2.5-fast": buildLtx25FastT2VPayload,
9888
+ "ltx-v2.3-reframe": buildLtx23ReframePayload,
9889
+ "ltx-v2.3-outpaint": buildLtx23OutpaintPayload
9890
+ });
9891
+ registerEditPayloads(MODELS2, {
9892
+ "ltx-v2.5-pro": buildLtx25ProI2VPayload,
9893
+ "ltx-v2.5-fast": buildLtx25FastI2VPayload
9894
+ });
9895
+
9645
9896
  // src/vendors/catalog/index.ts
9646
9897
  var ALL_MODELS = [
9647
9898
  ...MODELS,
@@ -12305,8 +12556,12 @@ var LtxV2Fast = "ltx-v2-fast";
12305
12556
  var LtxV2Retake = "ltx-v2-retake";
12306
12557
  var LtxV23Extend = "ltx-v2.3-extend";
12307
12558
  var LtxV23Fast = "ltx-v2.3-fast";
12559
+ var LtxV23Outpaint = "ltx-v2.3-outpaint";
12308
12560
  var LtxV23Pro = "ltx-v2.3-pro";
12561
+ var LtxV23Reframe = "ltx-v2.3-reframe";
12309
12562
  var LtxV23Retake = "ltx-v2.3-retake";
12563
+ var LtxV25Fast = "ltx-v2.5-fast";
12564
+ var LtxV25Pro = "ltx-v2.5-pro";
12310
12565
  var LumaRay2 = "luma-ray-2";
12311
12566
  var LumaRay2ReframeVideo = "luma-ray-2-reframe-video";
12312
12567
  var LumaRay32 = "luma-ray-3.2";
@@ -12546,8 +12801,12 @@ var Models = {
12546
12801
  LtxV2Retake,
12547
12802
  LtxV23Extend,
12548
12803
  LtxV23Fast,
12804
+ LtxV23Outpaint,
12549
12805
  LtxV23Pro,
12806
+ LtxV23Reframe,
12550
12807
  LtxV23Retake,
12808
+ LtxV25Fast,
12809
+ LtxV25Pro,
12551
12810
  LumaRay2,
12552
12811
  LumaRay2ReframeVideo,
12553
12812
  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.10.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",