@picsart/ai-sdk 3.28.0 → 3.29.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 +13 -2
  2. package/index.js +54 -7
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -334,6 +334,16 @@ type ModelInputById = {
334
334
  prompt: string;
335
335
  voiceId?: "eve" | "ara" | "rex" | "sal" | "leo";
336
336
  };
337
+ "hailuo-03": {
338
+ prompt: string;
339
+ startFrame?: string;
340
+ endFrame?: string;
341
+ imageUrls?: string[];
342
+ videoUrls?: string[];
343
+ audioUrls?: string[];
344
+ duration?: 5 | 10 | 15;
345
+ aspectRatio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
346
+ };
337
347
  "hailuo-2.3": {
338
348
  prompt: string;
339
349
  enhancePrompt?: boolean;
@@ -1854,7 +1864,7 @@ interface ModelMeta {
1854
1864
  readonly features: ModelFeature[];
1855
1865
  readonly badges: BadgeType[];
1856
1866
  readonly provider: ProviderInfo;
1857
- /** Release / availability tier (EAI-3). Absent on the definition ⇒ `'production'`. */
1867
+ /** Release / availability tier. Absent on the definition ⇒ `'production'`. */
1858
1868
  readonly release: ReleaseTag;
1859
1869
  }
1860
1870
  /** Parameter operations — fluent access to model params, schemas, defaults. */
@@ -2190,6 +2200,7 @@ declare const Models: {
2190
2200
  readonly GrokImagineVideo: "grok-imagine-video";
2191
2201
  readonly GrokImagineVideo15: "grok-imagine-video-1.5";
2192
2202
  readonly GrokTts: "grok-tts";
2203
+ readonly Hailuo03: "hailuo-03";
2193
2204
  readonly Hailuo23: "hailuo-2.3";
2194
2205
  readonly Hailuo23Fast: "hailuo-2.3-fast";
2195
2206
  readonly Hailuo23FastPro: "hailuo-2.3-fast-pro";
@@ -2470,7 +2481,7 @@ declare const releaseOf: (m: ModelDefinition) => ReleaseTag;
2470
2481
  * `disabled` and `deprecated` are hard hides layered on top of `release`: a
2471
2482
  * model carrying either is never visible, regardless of its release tag or the
2472
2483
  * requested set. (`disabled` is being phased out in favour of
2473
- * `release: 'preview'` — EAI-3 — but is still honoured during the migration.)
2484
+ * `release: 'preview'`, but is still honoured during the migration.)
2474
2485
  */
2475
2486
  declare function isVisibleForReleases(m: ModelDefinition, releases?: readonly ReleaseTag[]): boolean;
2476
2487
 
package/index.js CHANGED
@@ -2842,6 +2842,21 @@ var buildI2V = (withDuration) => (ctx) => ({
2842
2842
  ...ctx.enhancePrompt !== void 0 ? { prompt_optimizer: ctx.enhancePrompt } : {},
2843
2843
  ...withDuration && ctx.duration ? { duration: String(ctx.duration) } : {}
2844
2844
  });
2845
+ var buildMinimaxH3 = (ctx) => {
2846
+ const content = [{ type: "text", text: ctx.prompt }];
2847
+ if (ctx.startFrame) content.push({ type: "image_url", image_url: { url: ctx.startFrame }, role: "first_frame" });
2848
+ if (ctx.endFrame) content.push({ type: "image_url", image_url: { url: ctx.endFrame }, role: "last_frame" });
2849
+ for (const url of ctx.imageUrls ?? []) content.push({ type: "image_url", image_url: { url }, role: "reference_image" });
2850
+ for (const url of ctx.videoUrls ?? []) content.push({ type: "video_url", video_url: { url }, role: "reference_video" });
2851
+ for (const url of ctx.audioUrls ?? []) content.push({ type: "audio_url", audio_url: { url }, role: "reference_audio" });
2852
+ return {
2853
+ model: "MiniMax-H3",
2854
+ content,
2855
+ resolution: "2K",
2856
+ ...ctx.duration ? { duration: ctx.duration } : {},
2857
+ ...ctx.aspectRatio ? { ratio: ctx.aspectRatio } : {}
2858
+ };
2859
+ };
2845
2860
  var base = {
2846
2861
  mode: "video"
2847
2862
  };
@@ -2923,6 +2938,36 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
2923
2938
  ...params.enhancePrompt(),
2924
2939
  ...params.imageInput(1, "Start Image", true)
2925
2940
  }
2941
+ },
2942
+ {
2943
+ ...base,
2944
+ id: "hailuo-03",
2945
+ name: "Hailuo 03",
2946
+ modelId: "minimax-h3",
2947
+ addedAt: "2026-07-30",
2948
+ inputType: "t2v",
2949
+ workflow: "minimax/v2/video-generation",
2950
+ buildPayload: buildMinimaxH3,
2951
+ estimatedTime: 300,
2952
+ release: "preview",
2953
+ description: "MiniMax H3 2K video from text, start/last frame, or image/video/audio references.",
2954
+ features: [
2955
+ feat("Start Frame", "frame"),
2956
+ feat("End Frame", "frame"),
2957
+ feat("Reference Video", "input"),
2958
+ feat("2K", "resolution"),
2959
+ feat("15 sec", "duration")
2960
+ ],
2961
+ paramConfig: {
2962
+ ...params.prompt(),
2963
+ ...params.startFrame(),
2964
+ ...params.endFrame(),
2965
+ ...params.imageInput(3, "Reference Images", false),
2966
+ ...params.videoInputs(1, "Reference Videos", false),
2967
+ ...params.audioInputs(1, "Reference Audios", false),
2968
+ ...params.duration([5, 10, 15]),
2969
+ ...p.aspectRatio(["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "adaptive")
2970
+ }
2926
2971
  }
2927
2972
  ]);
2928
2973
 
@@ -3422,7 +3467,7 @@ var { MODELS: MODELS11 } = defineModels("luma", [
3422
3467
  },
3423
3468
  // ── Ray 3.2 (early access) — buildPayload registered in luma.payloads.ts ──
3424
3469
  {
3425
- // modelId defaults to id ('luma-ray-3.2') — matches the pricing-service key.
3470
+ // modelId defaults to id ('luma-ray-3.2') — matches the backend pricing key.
3426
3471
  id: "luma-ray-3.2",
3427
3472
  name: "Luma Ray 3.2",
3428
3473
  addedAt: "2026-06-11",
@@ -4079,9 +4124,9 @@ var { MODELS: MODELS14 } = defineModels("seedream", [
4079
4124
  estimatedTime: { "1K": 20, "2K": 35 },
4080
4125
  mode: "image",
4081
4126
  inputType: "t2i",
4082
- // Backend (pa-bytedance-pluggable-worker) gates 5.0-pro to 1K/2K — it
4083
- // rejects 3K/4K ("not supported by model seedream_5_0_pro"). Single-image
4084
- // only (no group/sequential), up to 10 reference images.
4127
+ // The backend gates 5.0-pro to 1K/2K — it rejects 3K/4K ("not supported by
4128
+ // model seedream_5_0_pro"). Single-image only (no group/sequential), up to
4129
+ // 10 reference images.
4085
4130
  description: "Top-tier single-image generation with up to 10 reference images and 2K detail.",
4086
4131
  features: [feat("Multi-Image Input", "input"), feat("2K", "resolution")],
4087
4132
  // Single-image only (no sequential/batch) → no `count` param, unlike the V2 models.
@@ -4105,9 +4150,9 @@ var { MODELS: MODELS14 } = defineModels("seedream", [
4105
4150
  mode: "image",
4106
4151
  inputType: "t2i",
4107
4152
  badge: ["popular"],
4108
- // Backend (pa-bytedance-pluggable-worker) gates 5.0-lite to 2K/3K — it
4109
- // rejects 4K ("not supported by model seedream_5_0_lite") even though the
4110
- // SeedreamResolution enum defines a 4K member. Boundary-verified 2026-05-25.
4153
+ // The backend gates 5.0-lite to 2K/3K — it rejects 4K ("not supported by
4154
+ // model seedream_5_0_lite") even though the SeedreamResolution enum defines
4155
+ // a 4K member. Boundary-verified 2026-05-25.
4111
4156
  description: "Speedy 3K output with negative prompt and dual-image input support.",
4112
4157
  features: [feat("Multi-Image Input", "input"), feat("3K", "resolution")],
4113
4158
  paramConfig: {
@@ -10409,6 +10454,7 @@ var GrokImagineImageQuality = "grok-imagine-image-quality";
10409
10454
  var GrokImagineVideo = "grok-imagine-video";
10410
10455
  var GrokImagineVideo15 = "grok-imagine-video-1.5";
10411
10456
  var GrokTts = "grok-tts";
10457
+ var Hailuo03 = "hailuo-03";
10412
10458
  var Hailuo23 = "hailuo-2.3";
10413
10459
  var Hailuo23Fast = "hailuo-2.3-fast";
10414
10460
  var Hailuo23FastPro = "hailuo-2.3-fast-pro";
@@ -10607,6 +10653,7 @@ var Models = {
10607
10653
  GrokImagineVideo,
10608
10654
  GrokImagineVideo15,
10609
10655
  GrokTts,
10656
+ Hailuo03,
10610
10657
  Hailuo23,
10611
10658
  Hailuo23Fast,
10612
10659
  Hailuo23FastPro,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "3.28.0",
3
+ "version": "3.29.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",