@picsart/ai-sdk 6.23.0 → 6.24.1

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 +2 -32
  2. package/index.js +3 -120
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -342,8 +342,8 @@ type ModelInputById = {
342
342
  };
343
343
  "flux-3-image": {
344
344
  prompt: string;
345
- 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";
346
- resolution?: "512sq" | "768sq" | "1k" | "2k" | "4k";
345
+ 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" | "9:21" | "1:2";
346
+ resolution?: "768sq" | "1k" | "1.5k" | "2k" | "4k";
347
347
  count?: 1 | 2 | 4 | 6 | 8 | 10;
348
348
  imageUrls?: string[];
349
349
  safetyTolerance?: number;
@@ -1073,19 +1073,6 @@ type ModelInputById = {
1073
1073
  startFrame?: string;
1074
1074
  endFrame?: string;
1075
1075
  };
1076
- "luma-ray-2": {
1077
- prompt: string;
1078
- aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
1079
- resolution?: "540p" | "720p" | "1080p" | "4k";
1080
- duration?: 5 | 9;
1081
- startFrame?: string;
1082
- endFrame?: string;
1083
- };
1084
- "luma-ray-2-reframe-video": {
1085
- prompt?: string;
1086
- aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
1087
- videoUrl: string;
1088
- };
1089
1076
  "luma-ray-3.2": {
1090
1077
  prompt: string;
1091
1078
  aspectRatio?: "9:16" | "3:4" | "1:1" | "4:3" | "16:9" | "21:9";
@@ -1112,19 +1099,6 @@ type ModelInputById = {
1112
1099
  videoUrl: string;
1113
1100
  resolution?: "540p" | "720p" | "1080p";
1114
1101
  };
1115
- "luma-ray-flash-2": {
1116
- prompt: string;
1117
- aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
1118
- resolution?: "540p" | "720p" | "1080p" | "4k";
1119
- duration?: 5 | 9;
1120
- startFrame: string;
1121
- endFrame?: string;
1122
- };
1123
- "luma-ray-flash-2-reframe-video": {
1124
- prompt?: string;
1125
- aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
1126
- videoUrl: string;
1127
- };
1128
1102
  "luma-uni-1": {
1129
1103
  prompt: string;
1130
1104
  aspectRatio?: "3:1" | "2:1" | "16:9" | "3:2" | "1:1" | "2:3" | "9:16" | "1:2" | "1:3";
@@ -3423,13 +3397,9 @@ declare const Models: {
3423
3397
  readonly LtxV23Retake: "ltx-v2.3-retake";
3424
3398
  readonly LtxV25Fast: "ltx-v2.5-fast";
3425
3399
  readonly LtxV25Pro: "ltx-v2.5-pro";
3426
- readonly LumaRay2: "luma-ray-2";
3427
- readonly LumaRay2ReframeVideo: "luma-ray-2-reframe-video";
3428
3400
  readonly LumaRay32: "luma-ray-3.2";
3429
3401
  readonly LumaRay32Edit: "luma-ray-3.2-edit";
3430
3402
  readonly LumaRay32ReframeVideo: "luma-ray-3.2-reframe-video";
3431
- readonly LumaRayFlash2: "luma-ray-flash-2";
3432
- readonly LumaRayFlash2ReframeVideo: "luma-ray-flash-2-reframe-video";
3433
3403
  readonly LumaUni1: "luma-uni-1";
3434
3404
  readonly LumaUni1Max: "luma-uni-1-max";
3435
3405
  readonly Lyria3Clip: "lyria-3-clip";
package/index.js CHANGED
@@ -3881,52 +3881,7 @@ registerPayloads(MODELS11, {
3881
3881
  });
3882
3882
 
3883
3883
  // src/vendors/catalog/luma.ts
3884
- var buildLumaRay2Payload = (ctx) => {
3885
- const keyframes = {};
3886
- if (ctx.startFrame) keyframes.frame0 = { type: "image", url: ctx.startFrame };
3887
- if (ctx.endFrame) keyframes.frame1 = { type: "image", url: ctx.endFrame };
3888
- return {
3889
- prompt: ctx.prompt,
3890
- model: "ray-2",
3891
- ...Object.keys(keyframes).length ? { keyframes } : {},
3892
- aspect_ratio: ctx.aspectRatio ?? "16:9",
3893
- resolution: ctx.resolution ?? "720p",
3894
- duration: `${ctx.duration ?? 5}s`
3895
- };
3896
- };
3897
- var buildLumaFlash2I2VPayload = (ctx) => {
3898
- const keyframes = {};
3899
- if (ctx.startFrame) keyframes.frame0 = { type: "image", url: ctx.startFrame };
3900
- if (ctx.endFrame) keyframes.frame1 = { type: "image", url: ctx.endFrame };
3901
- return {
3902
- prompt: ctx.prompt,
3903
- model: "ray-flash-2",
3904
- ...Object.keys(keyframes).length ? { keyframes } : {},
3905
- aspect_ratio: ctx.aspectRatio ?? "16:9",
3906
- resolution: ctx.resolution ?? "720p",
3907
- duration: `${ctx.duration ?? 5}s`
3908
- };
3909
- };
3910
- var WORKFLOW = "luma-image-to-video-generation";
3911
- var REFRAME_WORKFLOW = "luma-media-reframe";
3912
- var makeReframeVideoPayload = (model) => (ctx) => ({
3913
- generation_type: "reframe_video",
3914
- model,
3915
- media: { url: ctx.videoUrl ?? "" },
3916
- aspect_ratio: ctx.aspectRatio ?? "16:9",
3917
- ...ctx.prompt ? { prompt: ctx.prompt } : {}
3918
- });
3919
- var buildLumaRay2ReframeVideoPayload = makeReframeVideoPayload("ray-2");
3920
- var buildLumaRayFlash2ReframeVideoPayload = makeReframeVideoPayload("ray-flash-2");
3921
- var LUMA_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "9:21"];
3922
- var LUMA_RESOLUTIONS = ["540p", "720p", "1080p", "4k"];
3923
3884
  var LUMA_PROMPT_MAX = 5e3;
3924
- var lumaParamConfig = {
3925
- ...params.prompt({ maxLength: LUMA_PROMPT_MAX }),
3926
- ...params.aspectRatio(LUMA_AR),
3927
- ...params.resolution(LUMA_RESOLUTIONS, "720p"),
3928
- ...params.duration([5, 9], 5)
3929
- };
3930
3885
  var LUMA_UNI1_AR = ["3:1", "2:1", "16:9", "3:2", "1:1", "2:3", "9:16", "1:2", "1:3"];
3931
3886
  var LUMA_UNI1_STYLES = [
3932
3887
  { id: "auto", label: "Auto" },
@@ -4025,71 +3980,6 @@ var ray32EditConstraints = [
4025
3980
  } }
4026
3981
  ];
4027
3982
  var { MODELS: MODELS12 } = defineModels("luma", [
4028
- {
4029
- id: "luma-ray-2",
4030
- name: "Luma Ray 2",
4031
- addedAt: "2026-02-06",
4032
- workflow: WORKFLOW,
4033
- editWorkflow: WORKFLOW,
4034
- buildPayload: buildLumaRay2Payload,
4035
- estimatedTime: 18,
4036
- editEstimatedTime: 24,
4037
- mode: "video",
4038
- inputType: "t2v",
4039
- description: "Smooth video with a dreamy, polished aesthetic \u2014 up to 4K resolution.",
4040
- features: [feat("Image Input", "input"), feat("Start/End Frame", "frame"), feat("Up to 4K", "resolution"), feat("5/9 sec", "duration")],
4041
- paramConfig: { ...lumaParamConfig, ...params.startFrame(), ...params.endFrame() }
4042
- },
4043
- {
4044
- id: "luma-ray-flash-2",
4045
- name: "Luma Flash 2",
4046
- addedAt: "2026-02-06",
4047
- workflow: WORKFLOW,
4048
- buildPayload: buildLumaFlash2I2VPayload,
4049
- estimatedTime: 9,
4050
- mode: "video",
4051
- inputType: "i2v",
4052
- description: "Quick image-to-video with smooth, stylized motion \u2014 up to 4K.",
4053
- features: [feat("Image Input", "input"), feat("Start/End Frame", "frame"), feat("Up to 4K", "resolution"), feat("5/9 sec", "duration")],
4054
- paramConfig: { ...lumaParamConfig, ...params.startFrame("Start Frame", true), ...params.endFrame() }
4055
- },
4056
- // ── Reframe video (ray-2 + ray-flash-2; image reframe not supported) ──
4057
- {
4058
- id: "luma-ray-2-reframe-video",
4059
- name: "Luma Ray 2 Reframe",
4060
- modelId: "luma-ray-2",
4061
- addedAt: "2026-05-21",
4062
- workflow: REFRAME_WORKFLOW,
4063
- buildPayload: buildLumaRay2ReframeVideoPayload,
4064
- estimatedTime: 20,
4065
- mode: "video",
4066
- inputType: "v2v",
4067
- description: "Reframe a video to a new aspect ratio using Luma Ray 2.",
4068
- features: [feat("Video Input", "input"), feat("Reframe", "characteristic")],
4069
- paramConfig: {
4070
- ...params.prompt({ required: false, maxLength: LUMA_PROMPT_MAX }),
4071
- ...params.aspectRatio(LUMA_AR, "16:9"),
4072
- ...params.videoInput("Source Video")
4073
- }
4074
- },
4075
- {
4076
- id: "luma-ray-flash-2-reframe-video",
4077
- name: "Luma Flash 2 Reframe",
4078
- modelId: "luma-ray-flash-2",
4079
- addedAt: "2026-05-21",
4080
- workflow: REFRAME_WORKFLOW,
4081
- buildPayload: buildLumaRayFlash2ReframeVideoPayload,
4082
- estimatedTime: 12,
4083
- mode: "video",
4084
- inputType: "v2v",
4085
- description: "Reframe a video to a new aspect ratio using Luma Flash 2.",
4086
- features: [feat("Video Input", "input"), feat("Reframe", "characteristic")],
4087
- paramConfig: {
4088
- ...params.prompt({ required: false, maxLength: LUMA_PROMPT_MAX }),
4089
- ...params.aspectRatio(LUMA_AR, "16:9"),
4090
- ...params.videoInput("Source Video")
4091
- }
4092
- },
4093
3983
  {
4094
3984
  id: "luma-uni-1",
4095
3985
  name: "Luma UNI-1",
@@ -6231,9 +6121,10 @@ var flux3ImageAspectRatios = [
6231
6121
  "5:7",
6232
6122
  "2:3",
6233
6123
  "9:16",
6124
+ "9:21",
6234
6125
  "1:2"
6235
6126
  ];
6236
- var flux3ImageResolutions = ["512sq", "768sq", "1k", "2k", "4k"];
6127
+ var flux3ImageResolutions = ["768sq", "1k", "1.5k", "2k", "4k"];
6237
6128
  var buildFluxV2Payload = (modelId) => (ctx) => ({
6238
6129
  prompt: ctx.prompt,
6239
6130
  model: modelId,
@@ -6402,7 +6293,7 @@ var { MODELS: MODELS21 } = defineModels("flux", [
6402
6293
  // count (up to 10) samples further into the tail. Stage has seen 4+ minutes,
6403
6294
  // and one 512sq run took 287s. Over-estimating only makes the bar finish
6404
6295
  // early; under-estimating parks it at 99%.
6405
- estimatedTime: { "512sq": 90, "768sq": 110, "1k": 150, "2k": 240, "4k": 360 },
6296
+ estimatedTime: { "768sq": 110, "1k": 150, "1.5k": 195, "2k": 240, "4k": 360 },
6406
6297
  description: "Generate and edit images with up to 10 references \u2014 multi-reference composition, precise local edits and text rendering, natively up to 4K.",
6407
6298
  features: [
6408
6299
  feat("Multi-Image Input", "input"),
@@ -13615,13 +13506,9 @@ var LtxV23Reframe = "ltx-v2.3-reframe";
13615
13506
  var LtxV23Retake = "ltx-v2.3-retake";
13616
13507
  var LtxV25Fast = "ltx-v2.5-fast";
13617
13508
  var LtxV25Pro = "ltx-v2.5-pro";
13618
- var LumaRay2 = "luma-ray-2";
13619
- var LumaRay2ReframeVideo = "luma-ray-2-reframe-video";
13620
13509
  var LumaRay32 = "luma-ray-3.2";
13621
13510
  var LumaRay32Edit = "luma-ray-3.2-edit";
13622
13511
  var LumaRay32ReframeVideo = "luma-ray-3.2-reframe-video";
13623
- var LumaRayFlash2 = "luma-ray-flash-2";
13624
- var LumaRayFlash2ReframeVideo = "luma-ray-flash-2-reframe-video";
13625
13512
  var LumaUni1 = "luma-uni-1";
13626
13513
  var LumaUni1Max = "luma-uni-1-max";
13627
13514
  var Lyria3Clip = "lyria-3-clip";
@@ -13874,13 +13761,9 @@ var Models = {
13874
13761
  LtxV23Retake,
13875
13762
  LtxV25Fast,
13876
13763
  LtxV25Pro,
13877
- LumaRay2,
13878
- LumaRay2ReframeVideo,
13879
13764
  LumaRay32,
13880
13765
  LumaRay32Edit,
13881
13766
  LumaRay32ReframeVideo,
13882
- LumaRayFlash2,
13883
- LumaRayFlash2ReframeVideo,
13884
13767
  LumaUni1,
13885
13768
  LumaUni1Max,
13886
13769
  Lyria3Clip,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "6.23.0",
3
+ "version": "6.24.1",
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",