@picsart/ai-sdk 5.33.0 → 5.34.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.
- package/index.d.ts +37 -0
- package/index.js +110 -10
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -857,6 +857,7 @@ type ModelInputById = {
|
|
|
857
857
|
imageUrls?: string[];
|
|
858
858
|
videoUrls?: string[];
|
|
859
859
|
audioUrls?: string[];
|
|
860
|
+
resolution?: "768P" | "2K";
|
|
860
861
|
duration?: number;
|
|
861
862
|
aspectRatio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
862
863
|
};
|
|
@@ -1470,6 +1471,39 @@ type ModelInputById = {
|
|
|
1470
1471
|
outputFormat?: "mp4" | "mov";
|
|
1471
1472
|
videoUrls: [string, ...string[]];
|
|
1472
1473
|
};
|
|
1474
|
+
"seedance-2.5-without-moderation": {
|
|
1475
|
+
prompt: string;
|
|
1476
|
+
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1477
|
+
resolution?: "480p" | "720p" | "1080p";
|
|
1478
|
+
duration?: number;
|
|
1479
|
+
generateAudio?: boolean;
|
|
1480
|
+
returnLastFrame?: boolean;
|
|
1481
|
+
outputFormat?: "mp4" | "mov";
|
|
1482
|
+
imageUrls?: string[];
|
|
1483
|
+
videoUrls?: string[];
|
|
1484
|
+
audioUrls?: string[];
|
|
1485
|
+
startFrame?: string;
|
|
1486
|
+
endFrame?: string;
|
|
1487
|
+
};
|
|
1488
|
+
"seedance-2.5-without-moderation-video-edit": {
|
|
1489
|
+
prompt: string;
|
|
1490
|
+
aspectRatio?: "adaptive";
|
|
1491
|
+
resolution?: "480p" | "720p" | "1080p";
|
|
1492
|
+
generateAudio?: boolean;
|
|
1493
|
+
returnLastFrame?: boolean;
|
|
1494
|
+
outputFormat?: "mp4" | "mov";
|
|
1495
|
+
videoUrl: string;
|
|
1496
|
+
imageUrls?: string[];
|
|
1497
|
+
};
|
|
1498
|
+
"seedance-2.5-without-moderation-video-extend": {
|
|
1499
|
+
prompt: string;
|
|
1500
|
+
aspectRatio?: "adaptive";
|
|
1501
|
+
resolution?: "480p" | "720p" | "1080p";
|
|
1502
|
+
duration?: number;
|
|
1503
|
+
generateAudio?: boolean;
|
|
1504
|
+
outputFormat?: "mp4" | "mov";
|
|
1505
|
+
videoUrls: [string, ...string[]];
|
|
1506
|
+
};
|
|
1473
1507
|
"seedance-i2v": {
|
|
1474
1508
|
prompt: string;
|
|
1475
1509
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
@@ -2857,6 +2891,9 @@ declare const Models: {
|
|
|
2857
2891
|
readonly Seedance25: "seedance-2.5";
|
|
2858
2892
|
readonly Seedance25VideoEdit: "seedance-2.5-video-edit";
|
|
2859
2893
|
readonly Seedance25VideoExtend: "seedance-2.5-video-extend";
|
|
2894
|
+
readonly Seedance25WithoutModeration: "seedance-2.5-without-moderation";
|
|
2895
|
+
readonly Seedance25WithoutModerationVideoEdit: "seedance-2.5-without-moderation-video-edit";
|
|
2896
|
+
readonly Seedance25WithoutModerationVideoExtend: "seedance-2.5-without-moderation-video-extend";
|
|
2860
2897
|
readonly SeedanceI2v: "seedance-i2v";
|
|
2861
2898
|
readonly Seedream40: "seedream-4.0";
|
|
2862
2899
|
readonly Seedream45: "seedream-4.5";
|
package/index.js
CHANGED
|
@@ -2900,7 +2900,7 @@ var buildMinimaxH3 = (ctx) => {
|
|
|
2900
2900
|
return {
|
|
2901
2901
|
model: "MiniMax-H3",
|
|
2902
2902
|
content,
|
|
2903
|
-
resolution: "2K",
|
|
2903
|
+
resolution: ctx.resolution ?? "2K",
|
|
2904
2904
|
duration: ctx.duration ?? 5,
|
|
2905
2905
|
...ctx.aspectRatio ? { ratio: ctx.aspectRatio } : {}
|
|
2906
2906
|
};
|
|
@@ -3048,6 +3048,9 @@ var { MODELS: MODELS9 } = defineModels("minimax", [
|
|
|
3048
3048
|
...params.imageInput(9, "Reference Images", false),
|
|
3049
3049
|
...params.videoInputs(3, "Reference Videos", false),
|
|
3050
3050
|
...params.audioInputs(3, "Reference Audios", false),
|
|
3051
|
+
// Backend enum is case-insensitive (['768P','2K','768p','2k']); the
|
|
3052
|
+
// uppercase forms are canonical.
|
|
3053
|
+
...params.resolution(["768P", "2K"], "2K"),
|
|
3051
3054
|
...params.durationRange(5, 15, 5),
|
|
3052
3055
|
...p.aspectRatio(["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "adaptive")
|
|
3053
3056
|
},
|
|
@@ -3980,13 +3983,13 @@ var seedance25Constraints = [
|
|
|
3980
3983
|
then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_FRAME_ADAPTIVE_REASON } }
|
|
3981
3984
|
}
|
|
3982
3985
|
];
|
|
3983
|
-
var
|
|
3986
|
+
var buildSeedance25PayloadFor = (modelAlias) => (ctx) => {
|
|
3984
3987
|
const refImages = ctx.imageUrls ?? [];
|
|
3985
3988
|
const refVideos = ctx.videoUrls ?? [];
|
|
3986
3989
|
const refAudios = ctx.audioUrls ?? [];
|
|
3987
3990
|
const usesFrame = Boolean(ctx.startFrame || ctx.endFrame);
|
|
3988
3991
|
return {
|
|
3989
|
-
model:
|
|
3992
|
+
model: modelAlias,
|
|
3990
3993
|
content: [
|
|
3991
3994
|
...ctx.startFrame ? [{ type: "image_url", image_url: { url: ctx.startFrame }, role: "first_frame" }] : [],
|
|
3992
3995
|
...refImages.slice(0, 30).map((url) => ({
|
|
@@ -4015,8 +4018,8 @@ var buildSeedance25Payload = (ctx) => {
|
|
|
4015
4018
|
...ctx.returnLastFrame ? { return_last_frame: true } : {}
|
|
4016
4019
|
};
|
|
4017
4020
|
};
|
|
4018
|
-
var
|
|
4019
|
-
model:
|
|
4021
|
+
var buildSeedance25VideoEditPayloadFor = (modelAlias) => (ctx) => ({
|
|
4022
|
+
model: modelAlias,
|
|
4020
4023
|
content: [
|
|
4021
4024
|
{ type: "text", text: ctx.prompt },
|
|
4022
4025
|
{ type: "video_url", video_url: { url: ctx.videoUrl }, role: "reference_video" },
|
|
@@ -4033,8 +4036,8 @@ var buildSeedance25VideoEditPayload = (ctx) => ({
|
|
|
4033
4036
|
output_format: ctx.outputFormat ?? "mp4",
|
|
4034
4037
|
...ctx.returnLastFrame ? { return_last_frame: true } : {}
|
|
4035
4038
|
});
|
|
4036
|
-
var
|
|
4037
|
-
model:
|
|
4039
|
+
var buildSeedance25VideoExtendPayloadFor = (modelAlias) => (ctx) => ({
|
|
4040
|
+
model: modelAlias,
|
|
4038
4041
|
content: [
|
|
4039
4042
|
{ type: "text", text: ctx.prompt },
|
|
4040
4043
|
...(ctx.videoUrls ?? []).slice(0, 10).map((url) => ({
|
|
@@ -4059,7 +4062,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4059
4062
|
modelId: "seedance-2.5",
|
|
4060
4063
|
addedAt: "2026-08-06",
|
|
4061
4064
|
workflow: "seedance",
|
|
4062
|
-
buildPayload:
|
|
4065
|
+
buildPayload: buildSeedance25PayloadFor("seedance_2_5"),
|
|
4063
4066
|
constraints: seedance25Constraints,
|
|
4064
4067
|
estimatedTime: 20,
|
|
4065
4068
|
mode: "video",
|
|
@@ -4087,13 +4090,51 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4087
4090
|
...params.endFrame()
|
|
4088
4091
|
}
|
|
4089
4092
|
},
|
|
4093
|
+
{
|
|
4094
|
+
// Same model as seedance-2.5 on a vendor endpoint with moderation
|
|
4095
|
+
// disabled — full capability parity, bills under the seedance-2.5
|
|
4096
|
+
// pricing key (hence the shared modelId).
|
|
4097
|
+
id: "seedance-2.5-without-moderation",
|
|
4098
|
+
name: "Seedance 2.5 Without Moderation",
|
|
4099
|
+
modelId: "seedance-2.5",
|
|
4100
|
+
addedAt: "2026-09-09",
|
|
4101
|
+
release: "preview",
|
|
4102
|
+
workflow: "seedance",
|
|
4103
|
+
buildPayload: buildSeedance25PayloadFor("seedance_2_5_without_moderation"),
|
|
4104
|
+
constraints: seedance25Constraints,
|
|
4105
|
+
estimatedTime: 20,
|
|
4106
|
+
mode: "video",
|
|
4107
|
+
inputType: "t2v",
|
|
4108
|
+
badge: ["new", "premium", "hot"],
|
|
4109
|
+
description: "Seedance 2.5 with vendor moderation disabled \u2014 cinematic video with audio, multi-reference input, and mp4/mov output. Up to 30s.",
|
|
4110
|
+
features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
|
|
4111
|
+
paramConfig: {
|
|
4112
|
+
...params.prompt(),
|
|
4113
|
+
...params.aspectRatio(SEEDANCE_AR),
|
|
4114
|
+
...params.resolution(["480p", "720p", "1080p"], "1080p"),
|
|
4115
|
+
...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 5),
|
|
4116
|
+
...params.generateAudio(),
|
|
4117
|
+
...params.returnLastFrame(),
|
|
4118
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4119
|
+
// 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
|
|
4120
|
+
...params.imageInput(30, "Reference Images", false, "reference", { minSidePixels: SEEDANCE_MIN_SIDE_PIXELS }),
|
|
4121
|
+
...params.videoInputs(10, "Reference Videos", false, {
|
|
4122
|
+
minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
|
|
4123
|
+
minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
|
|
4124
|
+
maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES
|
|
4125
|
+
}),
|
|
4126
|
+
...params.audioInputs(10, "Reference Audios"),
|
|
4127
|
+
...params.startFrame(),
|
|
4128
|
+
...params.endFrame()
|
|
4129
|
+
}
|
|
4130
|
+
},
|
|
4090
4131
|
{
|
|
4091
4132
|
id: "seedance-2.5-video-edit",
|
|
4092
4133
|
name: "Seedance 2.5 Video Edit",
|
|
4093
4134
|
modelId: "seedance-2.5",
|
|
4094
4135
|
addedAt: "2026-08-06",
|
|
4095
4136
|
workflow: "seedance",
|
|
4096
|
-
buildPayload:
|
|
4137
|
+
buildPayload: buildSeedance25VideoEditPayloadFor("seedance_2_5"),
|
|
4097
4138
|
estimatedTime: 60,
|
|
4098
4139
|
mode: "video",
|
|
4099
4140
|
inputType: "v2v",
|
|
@@ -4113,13 +4154,40 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4113
4154
|
...params.imageInput(30, "Reference Images")
|
|
4114
4155
|
}
|
|
4115
4156
|
},
|
|
4157
|
+
{
|
|
4158
|
+
id: "seedance-2.5-without-moderation-video-edit",
|
|
4159
|
+
name: "Seedance 2.5 Without Moderation Video Edit",
|
|
4160
|
+
modelId: "seedance-2.5",
|
|
4161
|
+
addedAt: "2026-09-09",
|
|
4162
|
+
release: "preview",
|
|
4163
|
+
workflow: "seedance",
|
|
4164
|
+
buildPayload: buildSeedance25VideoEditPayloadFor("seedance_2_5_without_moderation"),
|
|
4165
|
+
estimatedTime: 60,
|
|
4166
|
+
mode: "video",
|
|
4167
|
+
inputType: "v2v",
|
|
4168
|
+
badge: ["new", "premium", "hot"],
|
|
4169
|
+
description: "Moderation-free video edit \u2014 replace subjects, add or remove objects, restyle scenes with reference images.",
|
|
4170
|
+
features: [feat("Video Input", "input"), feat("Multi-Image Input", "input"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("Source length", "duration")],
|
|
4171
|
+
paramConfig: {
|
|
4172
|
+
...params.prompt(),
|
|
4173
|
+
// Editing mode: aspect ratio is fixed to 'adaptive' and duration is
|
|
4174
|
+
// source-driven ('-1'), so neither is user-selectable (vendor rule).
|
|
4175
|
+
...params.aspectRatio(["adaptive"]),
|
|
4176
|
+
...params.resolution(["480p", "720p", "1080p"], "1080p"),
|
|
4177
|
+
...params.generateAudio(),
|
|
4178
|
+
...params.returnLastFrame(),
|
|
4179
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4180
|
+
...params.videoInput("Source Video", "reference", true, void 0, void 0, SEEDANCE_25_MAX_VIDEO_BYTES),
|
|
4181
|
+
...params.imageInput(30, "Reference Images")
|
|
4182
|
+
}
|
|
4183
|
+
},
|
|
4116
4184
|
{
|
|
4117
4185
|
id: "seedance-2.5-video-extend",
|
|
4118
4186
|
name: "Seedance 2.5 Video Extend",
|
|
4119
4187
|
modelId: "seedance-2.5",
|
|
4120
4188
|
addedAt: "2026-08-06",
|
|
4121
4189
|
workflow: "seedance",
|
|
4122
|
-
buildPayload:
|
|
4190
|
+
buildPayload: buildSeedance25VideoExtendPayloadFor("seedance_2_5"),
|
|
4123
4191
|
estimatedTime: 200,
|
|
4124
4192
|
mode: "video",
|
|
4125
4193
|
inputType: "v2v",
|
|
@@ -4138,6 +4206,32 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4138
4206
|
...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
|
|
4139
4207
|
}
|
|
4140
4208
|
},
|
|
4209
|
+
{
|
|
4210
|
+
id: "seedance-2.5-without-moderation-video-extend",
|
|
4211
|
+
name: "Seedance 2.5 Without Moderation Video Extend",
|
|
4212
|
+
modelId: "seedance-2.5",
|
|
4213
|
+
addedAt: "2026-09-09",
|
|
4214
|
+
release: "preview",
|
|
4215
|
+
workflow: "seedance",
|
|
4216
|
+
buildPayload: buildSeedance25VideoExtendPayloadFor("seedance_2_5_without_moderation"),
|
|
4217
|
+
estimatedTime: 200,
|
|
4218
|
+
mode: "video",
|
|
4219
|
+
inputType: "v2v",
|
|
4220
|
+
badge: ["new", "premium", "hot"],
|
|
4221
|
+
description: "Moderation-free: stitch up to 10 clips into one continuous, extended video.",
|
|
4222
|
+
features: [feat("Multi-Video Input", "input"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("4-30 sec", "duration")],
|
|
4223
|
+
paramConfig: {
|
|
4224
|
+
...params.prompt(),
|
|
4225
|
+
// Extension mode: aspect ratio is locked to 'adaptive' (vendor rule);
|
|
4226
|
+
// duration stays user-selectable.
|
|
4227
|
+
...params.aspectRatio(["adaptive"]),
|
|
4228
|
+
...params.resolution(["480p", "720p", "1080p"], "1080p"),
|
|
4229
|
+
...params.durationRange(SEEDANCE_25_DURATION.min, SEEDANCE_25_DURATION.max, 15),
|
|
4230
|
+
...params.generateAudio(),
|
|
4231
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4232
|
+
...params.videoInputs(10, "Source Videos", true, { maxBytes: SEEDANCE_25_MAX_VIDEO_BYTES })
|
|
4233
|
+
}
|
|
4234
|
+
},
|
|
4141
4235
|
{
|
|
4142
4236
|
id: "seedance-2.0",
|
|
4143
4237
|
name: "Seedance 2.0",
|
|
@@ -11642,6 +11736,9 @@ var Seedance20WithoutModerationVideoExtend = "seedance-2.0-without-moderation-vi
|
|
|
11642
11736
|
var Seedance25 = "seedance-2.5";
|
|
11643
11737
|
var Seedance25VideoEdit = "seedance-2.5-video-edit";
|
|
11644
11738
|
var Seedance25VideoExtend = "seedance-2.5-video-extend";
|
|
11739
|
+
var Seedance25WithoutModeration = "seedance-2.5-without-moderation";
|
|
11740
|
+
var Seedance25WithoutModerationVideoEdit = "seedance-2.5-without-moderation-video-edit";
|
|
11741
|
+
var Seedance25WithoutModerationVideoExtend = "seedance-2.5-without-moderation-video-extend";
|
|
11645
11742
|
var SeedanceI2v = "seedance-i2v";
|
|
11646
11743
|
var Seedream40 = "seedream-4.0";
|
|
11647
11744
|
var Seedream45 = "seedream-4.5";
|
|
@@ -11868,6 +11965,9 @@ var Models = {
|
|
|
11868
11965
|
Seedance25,
|
|
11869
11966
|
Seedance25VideoEdit,
|
|
11870
11967
|
Seedance25VideoExtend,
|
|
11968
|
+
Seedance25WithoutModeration,
|
|
11969
|
+
Seedance25WithoutModerationVideoEdit,
|
|
11970
|
+
Seedance25WithoutModerationVideoExtend,
|
|
11871
11971
|
SeedanceI2v,
|
|
11872
11972
|
Seedream40,
|
|
11873
11973
|
Seedream45,
|