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