@picsart/ai-sdk 6.9.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.
Files changed (3) hide show
  1. package/index.d.ts +26 -0
  2. package/index.js +89 -1
  3. package/package.json +1 -1
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;
@@ -3121,7 +3145,9 @@ declare const Models: {
3121
3145
  readonly LtxV2Retake: "ltx-v2-retake";
3122
3146
  readonly LtxV23Extend: "ltx-v2.3-extend";
3123
3147
  readonly LtxV23Fast: "ltx-v2.3-fast";
3148
+ readonly LtxV23Outpaint: "ltx-v2.3-outpaint";
3124
3149
  readonly LtxV23Pro: "ltx-v2.3-pro";
3150
+ readonly LtxV23Reframe: "ltx-v2.3-reframe";
3125
3151
  readonly LtxV23Retake: "ltx-v2.3-retake";
3126
3152
  readonly LtxV25Fast: "ltx-v2.5-fast";
3127
3153
  readonly LtxV25Pro: "ltx-v2.5-pro";
package/index.js CHANGED
@@ -2111,6 +2111,10 @@ 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"];
2114
2118
  var LTX_25_AR = ["16:9", "9:16"];
2115
2119
  var LTX_25_PRO_RESOLUTIONS = ["720p", "1080p"];
2116
2120
  var LTX_25_FAST_RESOLUTIONS = ["720p", "1080p", "1440p", "2160p"];
@@ -2412,6 +2416,60 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2412
2416
  ...params.videoInput("Source Video")
2413
2417
  }
2414
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
+ },
2415
2473
  // ── LTX 2.5 ──────────────────────────────────────────────────────
2416
2474
  // One entry per tier: text-to-video on `workflow`, image-to-video on
2417
2475
  // `editWorkflow`. A start or end frame is what routes a call to the image
@@ -9800,9 +9858,35 @@ var buildLtx25FastI2VPayload = (input) => ({
9800
9858
  ...input.cameraMotion && input.cameraMotion !== "none" ? { camera_motion: input.cameraMotion } : {},
9801
9859
  generate_audio: input.generateAudio ?? true
9802
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
+ });
9803
9885
  registerPayloads(MODELS2, {
9804
9886
  "ltx-v2.5-pro": buildLtx25ProT2VPayload,
9805
- "ltx-v2.5-fast": buildLtx25FastT2VPayload
9887
+ "ltx-v2.5-fast": buildLtx25FastT2VPayload,
9888
+ "ltx-v2.3-reframe": buildLtx23ReframePayload,
9889
+ "ltx-v2.3-outpaint": buildLtx23OutpaintPayload
9806
9890
  });
9807
9891
  registerEditPayloads(MODELS2, {
9808
9892
  "ltx-v2.5-pro": buildLtx25ProI2VPayload,
@@ -12472,7 +12556,9 @@ var LtxV2Fast = "ltx-v2-fast";
12472
12556
  var LtxV2Retake = "ltx-v2-retake";
12473
12557
  var LtxV23Extend = "ltx-v2.3-extend";
12474
12558
  var LtxV23Fast = "ltx-v2.3-fast";
12559
+ var LtxV23Outpaint = "ltx-v2.3-outpaint";
12475
12560
  var LtxV23Pro = "ltx-v2.3-pro";
12561
+ var LtxV23Reframe = "ltx-v2.3-reframe";
12476
12562
  var LtxV23Retake = "ltx-v2.3-retake";
12477
12563
  var LtxV25Fast = "ltx-v2.5-fast";
12478
12564
  var LtxV25Pro = "ltx-v2.5-pro";
@@ -12715,7 +12801,9 @@ var Models = {
12715
12801
  LtxV2Retake,
12716
12802
  LtxV23Extend,
12717
12803
  LtxV23Fast,
12804
+ LtxV23Outpaint,
12718
12805
  LtxV23Pro,
12806
+ LtxV23Reframe,
12719
12807
  LtxV23Retake,
12720
12808
  LtxV25Fast,
12721
12809
  LtxV25Pro,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.9.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",