@picsart/ai-sdk 3.27.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.
- package/index.d.ts +18 -2
- package/index.js +77 -7
- 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;
|
|
@@ -810,6 +820,10 @@ type ModelInputById = {
|
|
|
810
820
|
aspectRatio?: "1:1" | "5:3" | "3:5" | "4:3" | "3:4";
|
|
811
821
|
imageUrls?: string[];
|
|
812
822
|
};
|
|
823
|
+
"picsart-hidream-t2i": {
|
|
824
|
+
prompt: string;
|
|
825
|
+
aspectRatio?: "1:1" | "5:3" | "3:5" | "4:3" | "3:4";
|
|
826
|
+
};
|
|
813
827
|
"picsart-qwen-image-edit": {
|
|
814
828
|
imageUrls: [string, ...string[]];
|
|
815
829
|
prompt: string;
|
|
@@ -1850,7 +1864,7 @@ interface ModelMeta {
|
|
|
1850
1864
|
readonly features: ModelFeature[];
|
|
1851
1865
|
readonly badges: BadgeType[];
|
|
1852
1866
|
readonly provider: ProviderInfo;
|
|
1853
|
-
/** Release / availability tier
|
|
1867
|
+
/** Release / availability tier. Absent on the definition ⇒ `'production'`. */
|
|
1854
1868
|
readonly release: ReleaseTag;
|
|
1855
1869
|
}
|
|
1856
1870
|
/** Parameter operations — fluent access to model params, schemas, defaults. */
|
|
@@ -2186,6 +2200,7 @@ declare const Models: {
|
|
|
2186
2200
|
readonly GrokImagineVideo: "grok-imagine-video";
|
|
2187
2201
|
readonly GrokImagineVideo15: "grok-imagine-video-1.5";
|
|
2188
2202
|
readonly GrokTts: "grok-tts";
|
|
2203
|
+
readonly Hailuo03: "hailuo-03";
|
|
2189
2204
|
readonly Hailuo23: "hailuo-2.3";
|
|
2190
2205
|
readonly Hailuo23Fast: "hailuo-2.3-fast";
|
|
2191
2206
|
readonly Hailuo23FastPro: "hailuo-2.3-fast-pro";
|
|
@@ -2252,6 +2267,7 @@ declare const Models: {
|
|
|
2252
2267
|
readonly PicsartChangeBg: "picsart-change-bg";
|
|
2253
2268
|
readonly PicsartEnhance: "picsart-enhance";
|
|
2254
2269
|
readonly PicsartFlux2Klein: "picsart-flux-2-klein";
|
|
2270
|
+
readonly PicsartHidreamT2i: "picsart-hidream-t2i";
|
|
2255
2271
|
readonly PicsartQwenImageEdit: "picsart-qwen-image-edit";
|
|
2256
2272
|
readonly PicsartQwenImageEditAngle: "picsart-qwen-image-edit-angle";
|
|
2257
2273
|
readonly PicsartQwenMakeup: "picsart-qwen-makeup";
|
|
@@ -2465,7 +2481,7 @@ declare const releaseOf: (m: ModelDefinition) => ReleaseTag;
|
|
|
2465
2481
|
* `disabled` and `deprecated` are hard hides layered on top of `release`: a
|
|
2466
2482
|
* model carrying either is never visible, regardless of its release tag or the
|
|
2467
2483
|
* requested set. (`disabled` is being phased out in favour of
|
|
2468
|
-
* `release: 'preview'
|
|
2484
|
+
* `release: 'preview'`, but is still honoured during the migration.)
|
|
2469
2485
|
*/
|
|
2470
2486
|
declare function isVisibleForReleases(m: ModelDefinition, releases?: readonly ReleaseTag[]): boolean;
|
|
2471
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
|
|
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
|
-
//
|
|
4083
|
-
//
|
|
4084
|
-
//
|
|
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
|
-
//
|
|
4109
|
-
//
|
|
4110
|
-
//
|
|
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: {
|
|
@@ -7775,6 +7820,27 @@ var { MODELS: MODELS32 } = defineModels("picsart", [
|
|
|
7775
7820
|
...params.prompt(),
|
|
7776
7821
|
...params.aspectRatio(Object.keys(SANA_AR_TO_SIZE), "1:1")
|
|
7777
7822
|
}
|
|
7823
|
+
},
|
|
7824
|
+
{
|
|
7825
|
+
id: "picsart-hidream-t2i",
|
|
7826
|
+
name: "Picsart HiDream T2I",
|
|
7827
|
+
addedAt: "2026-07-29",
|
|
7828
|
+
workflow: "pcp/v1/hidream-t2i",
|
|
7829
|
+
estimatedTime: 7,
|
|
7830
|
+
// measured on the backend service; p95 ~6.5s
|
|
7831
|
+
mode: "image",
|
|
7832
|
+
inputType: "t2i",
|
|
7833
|
+
release: "preview",
|
|
7834
|
+
description: "Fast text-to-image generation powered by HiDream-Image-O1",
|
|
7835
|
+
features: [feat("Text-to-Image", "input")],
|
|
7836
|
+
paramConfig: {
|
|
7837
|
+
...params.prompt(),
|
|
7838
|
+
// The worker accepts any "W:H"; this list mirrors what Flux 2 Pro exposes.
|
|
7839
|
+
// Deliberately not derived from FLUX_AR_TO_SIZE: HiDream passes the ratio
|
|
7840
|
+
// straight through to the task, so its options must not drift with changes
|
|
7841
|
+
// to Flux's ratio-to-size map.
|
|
7842
|
+
...params.aspectRatio(["1:1", "5:3", "3:5", "4:3", "3:4"], "1:1")
|
|
7843
|
+
}
|
|
7778
7844
|
}
|
|
7779
7845
|
]);
|
|
7780
7846
|
|
|
@@ -10388,6 +10454,7 @@ var GrokImagineImageQuality = "grok-imagine-image-quality";
|
|
|
10388
10454
|
var GrokImagineVideo = "grok-imagine-video";
|
|
10389
10455
|
var GrokImagineVideo15 = "grok-imagine-video-1.5";
|
|
10390
10456
|
var GrokTts = "grok-tts";
|
|
10457
|
+
var Hailuo03 = "hailuo-03";
|
|
10391
10458
|
var Hailuo23 = "hailuo-2.3";
|
|
10392
10459
|
var Hailuo23Fast = "hailuo-2.3-fast";
|
|
10393
10460
|
var Hailuo23FastPro = "hailuo-2.3-fast-pro";
|
|
@@ -10454,6 +10521,7 @@ var Ovi = "ovi";
|
|
|
10454
10521
|
var PicsartChangeBg = "picsart-change-bg";
|
|
10455
10522
|
var PicsartEnhance = "picsart-enhance";
|
|
10456
10523
|
var PicsartFlux2Klein = "picsart-flux-2-klein";
|
|
10524
|
+
var PicsartHidreamT2i = "picsart-hidream-t2i";
|
|
10457
10525
|
var PicsartQwenImageEdit = "picsart-qwen-image-edit";
|
|
10458
10526
|
var PicsartQwenImageEditAngle = "picsart-qwen-image-edit-angle";
|
|
10459
10527
|
var PicsartQwenMakeup = "picsart-qwen-makeup";
|
|
@@ -10585,6 +10653,7 @@ var Models = {
|
|
|
10585
10653
|
GrokImagineVideo,
|
|
10586
10654
|
GrokImagineVideo15,
|
|
10587
10655
|
GrokTts,
|
|
10656
|
+
Hailuo03,
|
|
10588
10657
|
Hailuo23,
|
|
10589
10658
|
Hailuo23Fast,
|
|
10590
10659
|
Hailuo23FastPro,
|
|
@@ -10651,6 +10720,7 @@ var Models = {
|
|
|
10651
10720
|
PicsartChangeBg,
|
|
10652
10721
|
PicsartEnhance,
|
|
10653
10722
|
PicsartFlux2Klein,
|
|
10723
|
+
PicsartHidreamT2i,
|
|
10654
10724
|
PicsartQwenImageEdit,
|
|
10655
10725
|
PicsartQwenImageEditAngle,
|
|
10656
10726
|
PicsartQwenMakeup,
|