@picsart/ai-sdk 5.28.7 → 5.28.8

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 (2) hide show
  1. package/index.js +49 -37
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2293,6 +2293,7 @@ var FAST_DURATIONS = [6, 8, 10, 12, 14, 16, 18, 20];
2293
2293
  var LTX_RESOLUTIONS = ["1080p", "1440p", "2160p"];
2294
2294
  var LTX_23_AR = ["16:9", "9:16"];
2295
2295
  var LTX_23_FPS = [24, 25, 48, 50];
2296
+ var LTX_PROMPT_MAX = 5e3;
2296
2297
  var FAST_LONG = "Videos longer than 10s render at 1080p / 25 fps.";
2297
2298
  var ltxFastLongConstraints = [12, 14, 16, 18, 20].map((d) => ({
2298
2299
  when: { duration: { is: d } },
@@ -2390,7 +2391,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2390
2391
  description: "4K output with audio \u2014 streamlined for fast, production-ready results.",
2391
2392
  features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("Audio", "audio"), feat("4K", "resolution"), feat("6/8/10 sec", "duration")],
2392
2393
  paramConfig: {
2393
- ...params.prompt(),
2394
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2394
2395
  ...params.duration(PRO_DURATIONS, 6),
2395
2396
  ...params.resolution([...LTX_RESOLUTIONS]),
2396
2397
  ...params.generateAudio(),
@@ -2414,7 +2415,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2414
2415
  description: "Fast with long video support \u2014 up to 20s at 1080p, ideal for drafts and extended scenes.",
2415
2416
  features: [feat("Image Input", "input"), feat("Fast", "duration"), feat("Up to 20s", "duration"), feat("Audio", "audio"), feat("4K", "resolution")],
2416
2417
  paramConfig: {
2417
- ...params.prompt(),
2418
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2418
2419
  ...params.duration(FAST_DURATIONS, 6),
2419
2420
  ...params.resolution([...LTX_RESOLUTIONS]),
2420
2421
  ...params.generateAudio(),
@@ -2435,7 +2436,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2435
2436
  description: "Reinterpret existing footage with a new visual direction \u2014 up to 20s segments.",
2436
2437
  features: [feat("Video Input", "input"), feat("Up to 20s", "duration")],
2437
2438
  paramConfig: {
2438
- ...params.prompt(),
2439
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2439
2440
  ...params.duration([5, 10, 15, 20], 5),
2440
2441
  ...params.videoInput("Source Video")
2441
2442
  }
@@ -2456,7 +2457,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2456
2457
  description: "4K output with audio and aspect ratio control \u2014 production-ready v2.3.",
2457
2458
  features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("Audio", "audio"), feat("4K", "resolution"), feat("16:9 / 9:16", "characteristic"), feat("6/8/10 sec", "duration")],
2458
2459
  paramConfig: {
2459
- ...params.prompt(),
2460
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2460
2461
  ...params.duration(PRO_DURATIONS, 6),
2461
2462
  ...params.resolution([...LTX_RESOLUTIONS]),
2462
2463
  ...params.aspectRatio(LTX_23_AR),
@@ -2487,7 +2488,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2487
2488
  description: "Fast 2.3 with long video support \u2014 up to 20s at 1080p with aspect ratio control.",
2488
2489
  features: [feat("Image Input", "input"), feat("Fast", "duration"), feat("Up to 20s", "duration"), feat("Audio", "audio"), feat("4K", "resolution"), feat("16:9 / 9:16", "characteristic")],
2489
2490
  paramConfig: {
2490
- ...params.prompt(),
2491
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2491
2492
  ...params.duration(FAST_DURATIONS, 6),
2492
2493
  ...params.resolution([...LTX_RESOLUTIONS]),
2493
2494
  ...params.aspectRatio(LTX_23_AR),
@@ -2517,7 +2518,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2517
2518
  description: "Generate video driven by an audio track \u2014 2-20s, optional image for first frame.",
2518
2519
  features: [feat("Audio Input", "audio"), feat("Image Input", "input"), feat("2\u201320 sec", "duration")],
2519
2520
  paramConfig: {
2520
- ...params.prompt({ required: false }),
2521
+ ...params.prompt({ required: false, maxLength: LTX_PROMPT_MAX }),
2521
2522
  ...params.audioInput("Audio Track", true),
2522
2523
  ...params.imageInput(1, "First Frame Image", false),
2523
2524
  ...params.aspectRatio(["auto", ...LTX_23_AR]),
@@ -2541,7 +2542,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2541
2542
  description: "Seamlessly extend an existing video forward or backward \u2014 up to 20s.",
2542
2543
  features: [feat("Video Input", "input"), feat("Up to 20s", "duration")],
2543
2544
  paramConfig: {
2544
- ...params.prompt({ required: false }),
2545
+ ...params.prompt({ required: false, maxLength: LTX_PROMPT_MAX }),
2545
2546
  ...params.durationRange(2, 20, 5, 1),
2546
2547
  ...p.enum("mode", ["end", "start"], "end", { label: "Extend Direction" }),
2547
2548
  ...params.videoInput("Source Video")
@@ -2559,7 +2560,7 @@ var { MODELS: MODELS2 } = defineModels("ltx", [
2559
2560
  description: "Retake video with new direction \u2014 replace audio, video, or both.",
2560
2561
  features: [feat("Video Input", "input"), feat("Up to 20s", "duration")],
2561
2562
  paramConfig: {
2562
- ...params.prompt(),
2563
+ ...params.prompt({ maxLength: LTX_PROMPT_MAX }),
2563
2564
  ...params.durationRange(2, 20, 5, 1),
2564
2565
  ...p.enum("retakeMode", ["replace_audio_and_video", "replace_audio", "replace_video"], "replace_audio_and_video", { label: "Retake Mode" }),
2565
2566
  // Default-less: when unset the retake starts at 0 (vendor default).
@@ -2741,7 +2742,8 @@ var { MODELS: MODELS6 } = defineModels("bytedance", [
2741
2742
  feat("1080p", "resolution")
2742
2743
  ],
2743
2744
  paramConfig: {
2744
- ...params.prompt({ required: false }),
2745
+ // BytePlus OmniHuman 1.5 API: the optional prompt is capped at 300 characters.
2746
+ ...params.prompt({ required: false, maxLength: 300 }),
2745
2747
  ...params.imageInput(1, "Portrait Image", true),
2746
2748
  ...params.audioInput("Audio Track", true),
2747
2749
  ...params.resolution([...BYTEDANCE_OMNIHUMAN_RESOLUTION_OPTIONS], "1080p"),
@@ -3224,7 +3226,7 @@ var { MODELS: MODELS10 } = defineModels("wan", [
3224
3226
  description: "Painterly artistic look with audio \u2014 up to 15s at 1080p.",
3225
3227
  features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("5/10/15 sec", "duration")],
3226
3228
  paramConfig: {
3227
- ...params.prompt(),
3229
+ ...params.prompt({ maxLength: 5e3 }),
3228
3230
  ...params.duration([5, 10, 15], 5),
3229
3231
  ...params.resolution(["480p", "720p", "1080p"], "720p"),
3230
3232
  ...params.aspectRatio(["16:9", "9:16", "1:1", "4:3", "3:4"]),
@@ -3247,7 +3249,7 @@ var { MODELS: MODELS10 } = defineModels("wan", [
3247
3249
  description: "Regenerate video from a reference clip with new stylistic direction.",
3248
3250
  features: [feat("Video Input", "input"), feat("1080p", "resolution"), feat("5/10 sec", "duration")],
3249
3251
  paramConfig: {
3250
- ...params.prompt(),
3252
+ ...params.prompt({ maxLength: 5e3 }),
3251
3253
  ...params.duration([5, 10], 5),
3252
3254
  ...params.resolution(["720p", "1080p"], "720p"),
3253
3255
  ...params.videoInput("Reference Video")
@@ -3267,7 +3269,8 @@ var { MODELS: MODELS10 } = defineModels("wan", [
3267
3269
  description: "Diverse, stylized images for visual exploration and animation.",
3268
3270
  features: [feat("Multi-Image Input", "input")],
3269
3271
  paramConfig: {
3270
- ...params.prompt(),
3272
+ // pa-alibaba worker: @MaxLength(1500) on the wan-images prompt (video tasks take 5000).
3273
+ ...params.prompt({ maxLength: 1500 }),
3271
3274
  ...params.count(),
3272
3275
  ...params.negativePrompt()
3273
3276
  }
@@ -3499,8 +3502,9 @@ var buildLumaRay2ReframeVideoPayload = makeReframeVideoPayload("ray-2");
3499
3502
  var buildLumaRayFlash2ReframeVideoPayload = makeReframeVideoPayload("ray-flash-2");
3500
3503
  var LUMA_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "9:21"];
3501
3504
  var LUMA_RESOLUTIONS = ["540p", "720p", "1080p", "4k"];
3505
+ var LUMA_PROMPT_MAX = 5e3;
3502
3506
  var lumaParamConfig = {
3503
- ...params.prompt(),
3507
+ ...params.prompt({ maxLength: LUMA_PROMPT_MAX }),
3504
3508
  ...params.aspectRatio(LUMA_AR),
3505
3509
  ...params.resolution(LUMA_RESOLUTIONS, "720p"),
3506
3510
  ...params.duration([5, 9], 5)
@@ -3534,7 +3538,7 @@ var buildLumaUni1I2IPayload = makeUni1I2IPayload("uni-1");
3534
3538
  var buildLumaUni1MaxT2IPayload = makeUni1T2IPayload("uni-1-max");
3535
3539
  var buildLumaUni1MaxI2IPayload = makeUni1I2IPayload("uni-1-max");
3536
3540
  var lumaUni1ParamConfig = {
3537
- ...params.prompt({ maxLength: 6e3 }),
3541
+ ...params.prompt({ maxLength: LUMA_PROMPT_MAX }),
3538
3542
  ...params.aspectRatio(LUMA_UNI1_AR, "1:1"),
3539
3543
  ...params.style(LUMA_UNI1_STYLES, "auto"),
3540
3544
  ...params.imageInput(9, "Reference Images", false)
@@ -3645,7 +3649,7 @@ var { MODELS: MODELS11 } = defineModels("luma", [
3645
3649
  description: "Reframe a video to a new aspect ratio using Luma Ray 2.",
3646
3650
  features: [feat("Video Input", "input"), feat("Reframe", "characteristic")],
3647
3651
  paramConfig: {
3648
- ...params.prompt({ required: false }),
3652
+ ...params.prompt({ required: false, maxLength: LUMA_PROMPT_MAX }),
3649
3653
  ...params.aspectRatio(LUMA_AR, "16:9"),
3650
3654
  ...params.videoInput("Source Video")
3651
3655
  }
@@ -3663,7 +3667,7 @@ var { MODELS: MODELS11 } = defineModels("luma", [
3663
3667
  description: "Reframe a video to a new aspect ratio using Luma Flash 2.",
3664
3668
  features: [feat("Video Input", "input"), feat("Reframe", "characteristic")],
3665
3669
  paramConfig: {
3666
- ...params.prompt({ required: false }),
3670
+ ...params.prompt({ required: false, maxLength: LUMA_PROMPT_MAX }),
3667
3671
  ...params.aspectRatio(LUMA_AR, "16:9"),
3668
3672
  ...params.videoInput("Source Video")
3669
3673
  }
@@ -3711,7 +3715,7 @@ var { MODELS: MODELS11 } = defineModels("luma", [
3711
3715
  description: "Luma Ray 3.2 \u2014 high-fidelity video generation with start/end frames, HDR, and looping (early access).",
3712
3716
  features: [feat("Image Input", "input"), feat("Start/End Frame", "frame"), feat("HDR", "characteristic"), feat("5/10 sec", "duration")],
3713
3717
  paramConfig: {
3714
- ...params.prompt({ maxLength: 6e3 }),
3718
+ ...params.prompt({ maxLength: LUMA_PROMPT_MAX }),
3715
3719
  ...params.aspectRatio(RAY32_AR, "16:9"),
3716
3720
  ...params.resolution(RAY32_RESOLUTIONS, "720p"),
3717
3721
  ...params.duration([5, 10], 5),
@@ -3735,7 +3739,7 @@ var { MODELS: MODELS11 } = defineModels("luma", [
3735
3739
  description: "Edit a prior video from a prompt using Luma Ray 3.2 \u2014 preservation-vs-reimagination presets (early access).",
3736
3740
  features: [feat("Video Input", "input"), feat("Edit", "characteristic"), feat("HDR", "characteristic"), feat("5/10 sec", "duration")],
3737
3741
  paramConfig: {
3738
- ...params.prompt({ maxLength: 6e3 }),
3742
+ ...params.prompt({ maxLength: LUMA_PROMPT_MAX }),
3739
3743
  // Source clip capped at 30s — video_edit rejects longer at ingest (422).
3740
3744
  ...params.videoInput("Source Video", "reference", true, 30),
3741
3745
  ...params.resolution(RAY32_RESOLUTIONS, "720p"),
@@ -3758,7 +3762,7 @@ var { MODELS: MODELS11 } = defineModels("luma", [
3758
3762
  description: "Reframe a video to a new aspect ratio using Luma Ray 3.2 (early access).",
3759
3763
  features: [feat("Video Input", "input"), feat("Reframe", "characteristic")],
3760
3764
  paramConfig: {
3761
- ...params.prompt({ maxLength: 6e3 }),
3765
+ ...params.prompt({ maxLength: LUMA_PROMPT_MAX }),
3762
3766
  ...params.aspectRatio(RAY32_AR, "16:9"),
3763
3767
  // Source clip capped at 30s — video_reframe rejects longer at ingest (422).
3764
3768
  ...params.videoInput("Source Video", "reference", true, 30),
@@ -4532,6 +4536,7 @@ var buildSora2ExtendPayload = (ctx) => ({
4532
4536
  });
4533
4537
  var SORA_DURATIONS = [4, 8, 12, 16, 20];
4534
4538
  var SORA_AR = ["16:9", "9:16"];
4539
+ var SORA_PROMPT_MAX = 5e3;
4535
4540
  var { MODELS: MODELS13 } = defineModels("openai", [
4536
4541
  {
4537
4542
  id: "sora-2-pro",
@@ -4548,7 +4553,7 @@ var { MODELS: MODELS13 } = defineModels("openai", [
4548
4553
  description: "Up to 1080p with strong physical realism and optional reference image.",
4549
4554
  features: [feat("Image Input", "input"), feat("Audio", "audio"), feat("Up to 1080p", "resolution"), feat("4\u201320 sec", "duration")],
4550
4555
  paramConfig: {
4551
- ...params.prompt(),
4556
+ ...params.prompt({ maxLength: SORA_PROMPT_MAX }),
4552
4557
  ...params.imageInput(1, "Reference Image"),
4553
4558
  ...params.aspectRatio(SORA_AR),
4554
4559
  ...params.resolution(["720p", "1024p", "1080p"]),
@@ -4569,7 +4574,7 @@ var { MODELS: MODELS13 } = defineModels("openai", [
4569
4574
  description: "Naturalistic 720p video with lifelike motion and character detail.",
4570
4575
  features: [feat("Image Input", "input"), feat("Audio", "audio"), feat("720p", "resolution"), feat("4\u201320 sec", "duration")],
4571
4576
  paramConfig: {
4572
- ...params.prompt(),
4577
+ ...params.prompt({ maxLength: SORA_PROMPT_MAX }),
4573
4578
  ...params.imageInput(1, "Reference Image"),
4574
4579
  ...params.aspectRatio(SORA_AR),
4575
4580
  ...params.duration(SORA_DURATIONS, 4)
@@ -4588,7 +4593,7 @@ var { MODELS: MODELS13 } = defineModels("openai", [
4588
4593
  description: "Seamlessly continue a previously generated Sora video with matching style and pacing.",
4589
4594
  features: [feat("Continue Video", "input"), feat("4\u201320 sec", "duration")],
4590
4595
  paramConfig: {
4591
- ...params.prompt(),
4596
+ ...params.prompt({ maxLength: SORA_PROMPT_MAX }),
4592
4597
  // video_id is chained from the source Sora asset (declaring the param lets
4593
4598
  // the store seed ctx.videoId); no aspectRatio/size — extend keeps source geometry.
4594
4599
  ...params.videoId([], ""),
@@ -4936,6 +4941,7 @@ var buildGrokTTSPayload = (ctx) => ({
4936
4941
  voice_id: ctx.voiceId ?? DEFAULT_GROK_VOICE_ID
4937
4942
  });
4938
4943
  var GROK_VIDEO_PROMPT_MAX = 4096;
4944
+ var GROK_IMAGE_PROMPT_MAX = 8e3;
4939
4945
  var GROK_VIDEO_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3"];
4940
4946
  var GROK_IMAGE_AR = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "2:1", "1:2", "19.5:9", "9:19.5", "20:9", "9:20"];
4941
4947
  var GROK_DURATIONS = [3, 5, 6, 8, 10, 12, 15];
@@ -5039,7 +5045,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
5039
5045
  description: "Rapid image creation with wide aspect-ratio selection and image input.",
5040
5046
  features: [feat("Image Input", "input")],
5041
5047
  paramConfig: {
5042
- ...params.prompt(),
5048
+ ...params.prompt({ maxLength: GROK_IMAGE_PROMPT_MAX }),
5043
5049
  ...params.aspectRatio(GROK_IMAGE_AR, "1:1"),
5044
5050
  ...params.resolution(GROK_IMAGE_RESOLUTIONS, "1k"),
5045
5051
  ...params.count([1, 2, 4]),
@@ -5061,7 +5067,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
5061
5067
  description: "Higher-fidelity Grok Imagine variant for production-grade images.",
5062
5068
  features: [feat("Image Input", "input"), feat("2k", "resolution")],
5063
5069
  paramConfig: {
5064
- ...params.prompt({ maxLength: 8e3 }),
5070
+ ...params.prompt({ maxLength: GROK_IMAGE_PROMPT_MAX }),
5065
5071
  ...params.aspectRatio(GROK_IMAGE_AR, "1:1"),
5066
5072
  ...params.resolution(GROK_IMAGE_RESOLUTIONS, "2k"),
5067
5073
  ...params.count([1, 2, 4]),
@@ -5080,7 +5086,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
5080
5086
  description: "Latest Grok Imagine generation \u2014 sharper detail with a low/medium quality tier.",
5081
5087
  features: [feat("Image Input", "input"), feat("2k", "resolution")],
5082
5088
  paramConfig: {
5083
- ...params.prompt(),
5089
+ ...params.prompt({ maxLength: GROK_IMAGE_PROMPT_MAX }),
5084
5090
  ...params.aspectRatio(GROK_IMAGE_AR, "1:1"),
5085
5091
  ...params.resolution(GROK_IMAGE_RESOLUTIONS, "1k"),
5086
5092
  // Vendor-side default is medium; only supported by grok-imagine-image-2.0
@@ -5266,8 +5272,9 @@ var buildVeoPayload = (modelId, opts = {}) => (ctx) => {
5266
5272
  }
5267
5273
  };
5268
5274
  };
5275
+ var VEO_PROMPT_MAX = 4e3;
5269
5276
  var veoParamConfig = {
5270
- ...params.prompt(),
5277
+ ...params.prompt({ maxLength: VEO_PROMPT_MAX }),
5271
5278
  ...params.aspectRatio(["16:9", "9:16"]),
5272
5279
  ...params.duration([4, 6, 8], 8),
5273
5280
  ...params.resolution(["720p", "1080p", "4k"]),
@@ -5290,7 +5297,7 @@ var veoConstraints = [
5290
5297
  } }
5291
5298
  ];
5292
5299
  var veoLiteParamConfig = {
5293
- ...params.prompt(),
5300
+ ...params.prompt({ maxLength: VEO_PROMPT_MAX }),
5294
5301
  ...params.aspectRatio(["16:9", "9:16"]),
5295
5302
  ...params.duration([4, 6, 8], 8),
5296
5303
  ...params.resolution(["720p", "1080p"]),
@@ -6155,6 +6162,7 @@ var buildGptImage2EditPayload = (ctx) => ({
6155
6162
  ...ctx.background ? { background: ctx.background } : {},
6156
6163
  ...ctx.outputFormat ? { output_format: ctx.outputFormat } : {}
6157
6164
  });
6165
+ var GPT_IMAGE_PROMPT_MAX = 32e3;
6158
6166
  var gptImage2Constraints = [
6159
6167
  {
6160
6168
  when: { imageUrls: { exists: true } },
@@ -6188,7 +6196,7 @@ var { MODELS: MODELS23 } = defineModels("openai", [
6188
6196
  description: "Next-gen GPT image model with arbitrary output dimensions and multi-image input.",
6189
6197
  features: [feat("Multi-Image Input", "input"), feat("High Quality", "quality")],
6190
6198
  paramConfig: {
6191
- ...params.prompt(),
6199
+ ...params.prompt({ maxLength: GPT_IMAGE_PROMPT_MAX }),
6192
6200
  ...params.aspectRatio(["1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4", "auto"], "1:1"),
6193
6201
  ...p.quality(["high", "medium", "low"], "high"),
6194
6202
  // gpt-image-2 supports only an opaque background — the API rejects
@@ -6214,7 +6222,7 @@ var { MODELS: MODELS23 } = defineModels("openai", [
6214
6222
  description: "Strong text-in-image and infographic rendering with multi-image input.",
6215
6223
  features: [feat("Multi-Image Input", "input"), feat("High Quality", "quality")],
6216
6224
  paramConfig: {
6217
- ...params.prompt(),
6225
+ ...params.prompt({ maxLength: GPT_IMAGE_PROMPT_MAX }),
6218
6226
  ...params.aspectRatio(["1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4"], "1:1"),
6219
6227
  ...p.quality(["high", "medium", "low"], "high"),
6220
6228
  ...p.enum("background", ["opaque", "transparent"], "opaque", { label: "Background" }),
@@ -6241,7 +6249,7 @@ var { MODELS: MODELS23 } = defineModels("openai", [
6241
6249
  description: "Original GPT image model with quality-tiered generation.",
6242
6250
  features: [feat("Multi-Image Input", "input")],
6243
6251
  paramConfig: {
6244
- ...params.prompt(),
6252
+ ...params.prompt({ maxLength: GPT_IMAGE_PROMPT_MAX }),
6245
6253
  ...params.aspectRatio(["1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4"], "1:1"),
6246
6254
  ...p.quality(["high", "medium", "low"], "high"),
6247
6255
  ...p.enum("background", ["opaque", "transparent"], "opaque", { label: "Background" }),
@@ -6347,7 +6355,8 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6347
6355
  badge: ["popular"],
6348
6356
  description: "Create custom sound effects from a text description \u2014 up to 30 seconds.",
6349
6357
  features: [feat("Sound Effects", "characteristic")],
6350
- paramConfig: { ...params.prompt(), ...params.durationRange(0.5, 30, 5, 0.5) }
6358
+ // ElevenLabs sound-generation reference: "The maximum length of the prompt is 450 characters."
6359
+ paramConfig: { ...params.prompt({ maxLength: 450 }), ...params.durationRange(0.5, 30, 5, 0.5) }
6351
6360
  },
6352
6361
  // ── Music ─────────────────────────────────────────────────────────
6353
6362
  {
@@ -6362,7 +6371,8 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6362
6371
  description: "Generate music with vocals or instrumental from a text prompt.",
6363
6372
  features: [feat("Vocal & Instrumental", "characteristic")],
6364
6373
  paramConfig: {
6365
- ...params.prompt(),
6374
+ // ElevenLabs music docs state no cap; fal's `elevenlabs/music` schema declares maxLength 4100.
6375
+ ...params.prompt({ maxLength: 4100 }),
6366
6376
  ...params.duration([10, 20, 30, 60, 120, 180, 300, 600], 30),
6367
6377
  ...p.boolean("isInstrumental", false, "Instrumental Only")
6368
6378
  }
@@ -6609,6 +6619,7 @@ var buildMinimaxMusicPayload = (ctx) => ({
6609
6619
  format: ctx.format ?? "mp3"
6610
6620
  }
6611
6621
  });
6622
+ var MINIMAX_H3_PROMPT_MAX = 7e3;
6612
6623
  var { MODELS: MODELS26 } = defineModels("minimax", [
6613
6624
  {
6614
6625
  id: "minimax-02-hd",
@@ -6699,7 +6710,7 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
6699
6710
  feat("5-15 sec", "duration")
6700
6711
  ],
6701
6712
  paramConfig: {
6702
- ...params.prompt(),
6713
+ ...params.prompt({ maxLength: MINIMAX_H3_PROMPT_MAX }),
6703
6714
  ...params.startFrame(),
6704
6715
  ...params.endFrame(),
6705
6716
  // Lowercase on purpose: the worker uppercases for the fal wire ('768P')
@@ -6746,7 +6757,7 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
6746
6757
  feat("5-15 sec", "duration")
6747
6758
  ],
6748
6759
  paramConfig: {
6749
- ...params.prompt(),
6760
+ ...params.prompt({ maxLength: MINIMAX_H3_PROMPT_MAX }),
6750
6761
  ...params.startFrame(),
6751
6762
  ...params.endFrame(),
6752
6763
  // Lowercase on purpose: the worker uppercases for the fal wire ('768P')
@@ -6795,7 +6806,7 @@ var { MODELS: MODELS26 } = defineModels("minimax", [
6795
6806
  feat("5-15 sec", "duration")
6796
6807
  ],
6797
6808
  paramConfig: {
6798
- ...params.prompt({ placeholder: "Image 1 is the protagonist. Keep her consistent with the reference while she walks through a sunlit garden..." }),
6809
+ ...params.prompt({ maxLength: MINIMAX_H3_PROMPT_MAX, placeholder: "Image 1 is the protagonist. Keep her consistent with the reference while she walks through a sunlit garden..." }),
6799
6810
  ...params.imageInput(9, "Reference Images"),
6800
6811
  ...params.videoInputs(3, "Reference Videos"),
6801
6812
  ...params.audioInputs(3, "Reference Audios"),
@@ -8231,6 +8242,7 @@ var buildLyria3Payload = (apiModelId) => (ctx) => ({
8231
8242
  ...ctx.imageUrls?.length === 1 ? { image: imagePart(ctx.imageUrls[0]) } : {},
8232
8243
  ...(ctx.imageUrls?.length ?? 0) > 1 ? { images: ctx.imageUrls.slice(0, 10).map(imagePart) } : {}
8233
8244
  });
8245
+ var LYRIA_PROMPT_MAX = 5e3;
8234
8246
  var { MODELS: MODELS32 } = defineModels("google", [
8235
8247
  {
8236
8248
  id: "lyria-3-clip",
@@ -8245,7 +8257,7 @@ var { MODELS: MODELS32 } = defineModels("google", [
8245
8257
  description: "Fast music clips from text and image prompts using Google Lyria 3.",
8246
8258
  features: [feat("Image Input", "input"), feat("Vocal & Instrumental", "characteristic")],
8247
8259
  paramConfig: {
8248
- ...params.prompt(),
8260
+ ...params.prompt({ maxLength: LYRIA_PROMPT_MAX }),
8249
8261
  ...params.imageInput(10, "Mood Images")
8250
8262
  }
8251
8263
  },
@@ -8263,7 +8275,7 @@ var { MODELS: MODELS32 } = defineModels("google", [
8263
8275
  description: "Extended music generation up to 184s with vocals, powered by Google Lyria 3 Pro.",
8264
8276
  features: [feat("Image Input", "input"), feat("Vocal & Instrumental", "characteristic"), feat("Up to 184s", "duration")],
8265
8277
  paramConfig: {
8266
- ...params.prompt({ placeholder: "Generate voiceover, music and sound effects" }),
8278
+ ...params.prompt({ maxLength: LYRIA_PROMPT_MAX, placeholder: "Generate voiceover, music and sound effects" }),
8267
8279
  ...params.imageInput(10, "Mood Images")
8268
8280
  }
8269
8281
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.28.7",
3
+ "version": "5.28.8",
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",