@picsart/ai-sdk 3.32.1 → 3.35.6
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 +49 -9
- package/index.js +232 -49
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -171,19 +171,14 @@ type ModelInputById = {
|
|
|
171
171
|
};
|
|
172
172
|
"flux-3-video": {
|
|
173
173
|
prompt: string;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
resolution?: "480p" | "720p";
|
|
174
|
+
aspectRatio?: "auto" | "21:9" | "2:1" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
175
|
+
resolution?: "hd" | "fhd";
|
|
177
176
|
duration?: "auto" | "5" | "10" | "15" | "20";
|
|
178
|
-
startFrame?: string;
|
|
179
|
-
endFrame?: string;
|
|
180
177
|
imageUrls?: string[];
|
|
181
178
|
videoUrl?: string;
|
|
182
|
-
videoUrls?: string[];
|
|
183
179
|
generateAudio?: boolean;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
version?: string;
|
|
180
|
+
safetyTolerance?: number;
|
|
181
|
+
draft?: boolean;
|
|
187
182
|
};
|
|
188
183
|
"flux-kontext-max": {
|
|
189
184
|
prompt: string;
|
|
@@ -1256,6 +1251,39 @@ type ModelInputById = {
|
|
|
1256
1251
|
generateAudio?: boolean;
|
|
1257
1252
|
videoUrls: [string, ...string[]];
|
|
1258
1253
|
};
|
|
1254
|
+
"seedance-2.5": {
|
|
1255
|
+
prompt: string;
|
|
1256
|
+
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
1257
|
+
resolution?: "480p" | "720p";
|
|
1258
|
+
duration?: 4 | 5 | 6 | 8 | 10 | 12 | 15 | 20 | 25 | 30;
|
|
1259
|
+
generateAudio?: boolean;
|
|
1260
|
+
returnLastFrame?: boolean;
|
|
1261
|
+
outputFormat?: "mp4" | "mov";
|
|
1262
|
+
imageUrls?: string[];
|
|
1263
|
+
videoUrls?: string[];
|
|
1264
|
+
audioUrls?: string[];
|
|
1265
|
+
startFrame?: string;
|
|
1266
|
+
endFrame?: string;
|
|
1267
|
+
};
|
|
1268
|
+
"seedance-2.5-video-edit": {
|
|
1269
|
+
prompt: string;
|
|
1270
|
+
aspectRatio?: "adaptive";
|
|
1271
|
+
resolution?: "480p" | "720p";
|
|
1272
|
+
generateAudio?: boolean;
|
|
1273
|
+
returnLastFrame?: boolean;
|
|
1274
|
+
outputFormat?: "mp4" | "mov";
|
|
1275
|
+
videoUrl: string;
|
|
1276
|
+
imageUrls?: string[];
|
|
1277
|
+
};
|
|
1278
|
+
"seedance-2.5-video-extend": {
|
|
1279
|
+
prompt: string;
|
|
1280
|
+
aspectRatio?: "adaptive";
|
|
1281
|
+
resolution?: "480p" | "720p";
|
|
1282
|
+
duration?: 4 | 5 | 6 | 8 | 10 | 12 | 15 | 20 | 25 | 30;
|
|
1283
|
+
generateAudio?: boolean;
|
|
1284
|
+
outputFormat?: "mp4" | "mov";
|
|
1285
|
+
videoUrls: [string, ...string[]];
|
|
1286
|
+
};
|
|
1259
1287
|
"seedance-i2v": {
|
|
1260
1288
|
prompt: string;
|
|
1261
1289
|
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "adaptive";
|
|
@@ -1279,6 +1307,14 @@ type ModelInputById = {
|
|
|
1279
1307
|
imageUrls?: string[];
|
|
1280
1308
|
negativePrompt?: string;
|
|
1281
1309
|
};
|
|
1310
|
+
"seedream-4.7": {
|
|
1311
|
+
resolution?: "1K" | "2K" | "4K";
|
|
1312
|
+
prompt: string;
|
|
1313
|
+
aspectRatio?: "1:1" | "4:3" | "3:4" | "16:9" | "9:16" | "3:2" | "2:3" | "21:9";
|
|
1314
|
+
count?: 1 | 2 | 4 | 6 | 8 | 10;
|
|
1315
|
+
imageUrls?: string[];
|
|
1316
|
+
negativePrompt?: string;
|
|
1317
|
+
};
|
|
1282
1318
|
"seedream-5.0-lite": {
|
|
1283
1319
|
resolution?: "2K" | "3K";
|
|
1284
1320
|
prompt: string;
|
|
@@ -2348,9 +2384,13 @@ declare const Models: {
|
|
|
2348
2384
|
readonly Seedance20MiniVideoExtend: "seedance-2.0-mini-video-extend";
|
|
2349
2385
|
readonly Seedance20VideoEdit: "seedance-2.0-video-edit";
|
|
2350
2386
|
readonly Seedance20VideoExtend: "seedance-2.0-video-extend";
|
|
2387
|
+
readonly Seedance25: "seedance-2.5";
|
|
2388
|
+
readonly Seedance25VideoEdit: "seedance-2.5-video-edit";
|
|
2389
|
+
readonly Seedance25VideoExtend: "seedance-2.5-video-extend";
|
|
2351
2390
|
readonly SeedanceI2v: "seedance-i2v";
|
|
2352
2391
|
readonly Seedream40: "seedream-4.0";
|
|
2353
2392
|
readonly Seedream45: "seedream-4.5";
|
|
2393
|
+
readonly Seedream47: "seedream-4.7";
|
|
2354
2394
|
readonly Seedream50Lite: "seedream-5.0-lite";
|
|
2355
2395
|
readonly Seedream50Pro: "seedream-5.0-pro";
|
|
2356
2396
|
readonly Sora2: "sora-2";
|
package/index.js
CHANGED
|
@@ -3968,9 +3968,183 @@ var buildSeedance20VideoExtendPayloadFor = (modelAlias) => (ctx) => ({
|
|
|
3968
3968
|
resolution: ctx.resolution ?? "720p",
|
|
3969
3969
|
generate_audio: ctx.generateAudio ?? false
|
|
3970
3970
|
});
|
|
3971
|
+
var SEEDANCE_25_FRAME_ADAPTIVE_REASON = "First/Last Frame mode requires an adaptive aspect ratio \u2014 the vendor rejects any fixed ratio.";
|
|
3972
|
+
var seedance25Constraints = [
|
|
3973
|
+
...seedance20Constraints.slice(1),
|
|
3974
|
+
{
|
|
3975
|
+
when: { startFrame: { exists: false } },
|
|
3976
|
+
then: {
|
|
3977
|
+
endFrame: {
|
|
3978
|
+
disabled: true,
|
|
3979
|
+
reason: "End frame needs a start frame \u2014 a last frame on its own is rejected."
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3982
|
+
},
|
|
3983
|
+
// First/Last Frame mode: aspect ratio is locked to 'adaptive' (vendor errors
|
|
3984
|
+
// on any fixed ratio when a first_frame/last_frame is supplied).
|
|
3985
|
+
{
|
|
3986
|
+
when: { startFrame: { exists: true } },
|
|
3987
|
+
then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_FRAME_ADAPTIVE_REASON } }
|
|
3988
|
+
},
|
|
3989
|
+
{
|
|
3990
|
+
when: { endFrame: { exists: true } },
|
|
3991
|
+
then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_FRAME_ADAPTIVE_REASON } }
|
|
3992
|
+
}
|
|
3993
|
+
];
|
|
3994
|
+
var buildSeedance25Payload = (ctx) => {
|
|
3995
|
+
const refImages = ctx.imageUrls ?? [];
|
|
3996
|
+
const refVideos = ctx.videoUrls ?? [];
|
|
3997
|
+
const refAudios = ctx.audioUrls ?? [];
|
|
3998
|
+
const usesFrame = Boolean(ctx.startFrame || ctx.endFrame);
|
|
3999
|
+
return {
|
|
4000
|
+
model: "seedance_2_5",
|
|
4001
|
+
content: [
|
|
4002
|
+
...ctx.startFrame ? [{ type: "image_url", image_url: { url: ctx.startFrame }, role: "first_frame" }] : [],
|
|
4003
|
+
...refImages.slice(0, 30).map((url) => ({
|
|
4004
|
+
type: "image_url",
|
|
4005
|
+
image_url: { url },
|
|
4006
|
+
role: "reference_image"
|
|
4007
|
+
})),
|
|
4008
|
+
...refVideos.slice(0, 10).map((url) => ({
|
|
4009
|
+
type: "video_url",
|
|
4010
|
+
video_url: { url },
|
|
4011
|
+
role: "reference_video"
|
|
4012
|
+
})),
|
|
4013
|
+
...refAudios.slice(0, 10).map((url) => ({
|
|
4014
|
+
type: "audio_url",
|
|
4015
|
+
audio_url: { url },
|
|
4016
|
+
role: "reference_audio"
|
|
4017
|
+
})),
|
|
4018
|
+
...ctx.endFrame ? [{ type: "image_url", image_url: { url: ctx.endFrame }, role: "last_frame" }] : [],
|
|
4019
|
+
{ type: "text", text: ctx.prompt }
|
|
4020
|
+
],
|
|
4021
|
+
ratio: usesFrame ? "adaptive" : ctx.aspectRatio ?? "16:9",
|
|
4022
|
+
duration: ctx.duration ?? 5,
|
|
4023
|
+
resolution: ctx.resolution ?? "720p",
|
|
4024
|
+
generate_audio: ctx.generateAudio ?? false,
|
|
4025
|
+
output_format: ctx.outputFormat ?? "mp4",
|
|
4026
|
+
...ctx.returnLastFrame ? { return_last_frame: true } : {}
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
var buildSeedance25VideoEditPayload = (ctx) => ({
|
|
4030
|
+
model: "seedance_2_5",
|
|
4031
|
+
content: [
|
|
4032
|
+
{ type: "text", text: ctx.prompt },
|
|
4033
|
+
{ type: "video_url", video_url: { url: ctx.videoUrl }, role: "reference_video" },
|
|
4034
|
+
...(ctx.imageUrls ?? []).slice(0, 30).map((url) => ({
|
|
4035
|
+
type: "image_url",
|
|
4036
|
+
image_url: { url },
|
|
4037
|
+
role: "reference_image"
|
|
4038
|
+
}))
|
|
4039
|
+
],
|
|
4040
|
+
ratio: "adaptive",
|
|
4041
|
+
duration: -1,
|
|
4042
|
+
resolution: ctx.resolution ?? "720p",
|
|
4043
|
+
generate_audio: ctx.generateAudio ?? false,
|
|
4044
|
+
output_format: ctx.outputFormat ?? "mp4",
|
|
4045
|
+
...ctx.returnLastFrame ? { return_last_frame: true } : {}
|
|
4046
|
+
});
|
|
4047
|
+
var buildSeedance25VideoExtendPayload = (ctx) => ({
|
|
4048
|
+
model: "seedance_2_5",
|
|
4049
|
+
content: [
|
|
4050
|
+
{ type: "text", text: ctx.prompt },
|
|
4051
|
+
...(ctx.videoUrls ?? []).slice(0, 10).map((url) => ({
|
|
4052
|
+
type: "video_url",
|
|
4053
|
+
video_url: { url },
|
|
4054
|
+
role: "reference_video"
|
|
4055
|
+
}))
|
|
4056
|
+
],
|
|
4057
|
+
ratio: "adaptive",
|
|
4058
|
+
duration: ctx.duration ?? 15,
|
|
4059
|
+
resolution: ctx.resolution ?? "720p",
|
|
4060
|
+
generate_audio: ctx.generateAudio ?? false,
|
|
4061
|
+
output_format: ctx.outputFormat ?? "mp4"
|
|
4062
|
+
});
|
|
3971
4063
|
var SEEDANCE_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"];
|
|
3972
4064
|
var SEEDANCE_V2_DURATIONS = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
|
|
4065
|
+
var SEEDANCE_25_DURATIONS = [4, 5, 6, 8, 10, 12, 15, 20, 25, 30];
|
|
3973
4066
|
var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
4067
|
+
{
|
|
4068
|
+
id: "seedance-2.5",
|
|
4069
|
+
name: "Seedance 2.5",
|
|
4070
|
+
modelId: "seedance-2.5",
|
|
4071
|
+
addedAt: "2026-08-06",
|
|
4072
|
+
workflow: "seedance",
|
|
4073
|
+
buildPayload: buildSeedance25Payload,
|
|
4074
|
+
constraints: seedance25Constraints,
|
|
4075
|
+
estimatedTime: 20,
|
|
4076
|
+
mode: "video",
|
|
4077
|
+
inputType: "t2v",
|
|
4078
|
+
badge: ["new", "premium", "hot"],
|
|
4079
|
+
description: "Latest cinematic video with audio, multi-reference input, and mp4/mov output. Up to 30s.",
|
|
4080
|
+
features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("720p", "resolution"), feat("4-30 sec", "duration")],
|
|
4081
|
+
paramConfig: {
|
|
4082
|
+
...params.prompt(),
|
|
4083
|
+
...params.aspectRatio(SEEDANCE_AR),
|
|
4084
|
+
...params.resolution(["480p", "720p"], "720p"),
|
|
4085
|
+
...params.duration(SEEDANCE_25_DURATIONS, 5),
|
|
4086
|
+
...params.generateAudio(false),
|
|
4087
|
+
...params.returnLastFrame(),
|
|
4088
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4089
|
+
// 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
|
|
4090
|
+
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_MIN_PIXELS),
|
|
4091
|
+
...params.videoInputs(10, "Reference Videos", false, SEEDANCE_MIN_PIXELS),
|
|
4092
|
+
...params.audioInputs(10, "Reference Audios"),
|
|
4093
|
+
...params.startFrame(),
|
|
4094
|
+
...params.endFrame()
|
|
4095
|
+
}
|
|
4096
|
+
},
|
|
4097
|
+
{
|
|
4098
|
+
id: "seedance-2.5-video-edit",
|
|
4099
|
+
name: "Seedance 2.5 Video Edit",
|
|
4100
|
+
modelId: "seedance-2.5",
|
|
4101
|
+
addedAt: "2026-08-06",
|
|
4102
|
+
workflow: "seedance",
|
|
4103
|
+
buildPayload: buildSeedance25VideoEditPayload,
|
|
4104
|
+
estimatedTime: 60,
|
|
4105
|
+
mode: "video",
|
|
4106
|
+
inputType: "v2v",
|
|
4107
|
+
badge: ["new", "premium", "hot"],
|
|
4108
|
+
description: "Edit video \u2014 replace subjects, add or remove objects, restyle scenes with reference images.",
|
|
4109
|
+
features: [feat("Video Input", "input"), feat("Multi-Image Input", "input"), feat("Audio", "audio"), feat("720p", "resolution"), feat("Source length", "duration")],
|
|
4110
|
+
paramConfig: {
|
|
4111
|
+
...params.prompt(),
|
|
4112
|
+
// Editing mode: aspect ratio is fixed to 'adaptive' and duration is
|
|
4113
|
+
// source-driven ('-1'), so neither is user-selectable (vendor rule).
|
|
4114
|
+
...params.aspectRatio(["adaptive"]),
|
|
4115
|
+
...params.resolution(["480p", "720p"], "720p"),
|
|
4116
|
+
...params.generateAudio(false),
|
|
4117
|
+
...params.returnLastFrame(),
|
|
4118
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4119
|
+
...params.videoInput("Source Video"),
|
|
4120
|
+
...params.imageInput(30, "Reference Images")
|
|
4121
|
+
}
|
|
4122
|
+
},
|
|
4123
|
+
{
|
|
4124
|
+
id: "seedance-2.5-video-extend",
|
|
4125
|
+
name: "Seedance 2.5 Video Extend",
|
|
4126
|
+
modelId: "seedance-2.5",
|
|
4127
|
+
addedAt: "2026-08-06",
|
|
4128
|
+
workflow: "seedance",
|
|
4129
|
+
buildPayload: buildSeedance25VideoExtendPayload,
|
|
4130
|
+
estimatedTime: 200,
|
|
4131
|
+
mode: "video",
|
|
4132
|
+
inputType: "v2v",
|
|
4133
|
+
badge: ["new", "premium", "hot"],
|
|
4134
|
+
description: "Stitch up to 10 clips into one continuous, extended video.",
|
|
4135
|
+
features: [feat("Multi-Video Input", "input"), feat("Audio", "audio"), feat("720p", "resolution"), feat("4-30 sec", "duration")],
|
|
4136
|
+
paramConfig: {
|
|
4137
|
+
...params.prompt(),
|
|
4138
|
+
// Extension mode: aspect ratio is locked to 'adaptive' (vendor rule);
|
|
4139
|
+
// duration stays user-selectable.
|
|
4140
|
+
...params.aspectRatio(["adaptive"]),
|
|
4141
|
+
...params.resolution(["480p", "720p"], "720p"),
|
|
4142
|
+
...params.duration(SEEDANCE_25_DURATIONS, 15),
|
|
4143
|
+
...params.generateAudio(false),
|
|
4144
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4145
|
+
...params.videoInputs(10, "Source Videos", true)
|
|
4146
|
+
}
|
|
4147
|
+
},
|
|
3974
4148
|
{
|
|
3975
4149
|
id: "seedance-2.0",
|
|
3976
4150
|
name: "Seedance 2.0",
|
|
@@ -4354,6 +4528,7 @@ function buildSeedreamV2(modelId) {
|
|
|
4354
4528
|
}
|
|
4355
4529
|
var buildSeedream40Payload = buildSeedreamV2("seedream_4_0");
|
|
4356
4530
|
var buildSeedream45Payload = buildSeedreamV2("seedream_4_5");
|
|
4531
|
+
var buildSeedream47Payload = buildSeedreamV2("seedream_4_7");
|
|
4357
4532
|
var buildSeedream50LitePayload = buildSeedreamV2("seedream_5_0_lite");
|
|
4358
4533
|
var buildSeedream50ProPayload = buildSeedreamV2("seedream_5_0_pro");
|
|
4359
4534
|
var seedreamV2Params = {
|
|
@@ -4410,6 +4585,23 @@ var { MODELS: MODELS14 } = defineModels("seedream", [
|
|
|
4410
4585
|
...seedreamV2Params
|
|
4411
4586
|
}
|
|
4412
4587
|
},
|
|
4588
|
+
{
|
|
4589
|
+
id: "seedream-4.7",
|
|
4590
|
+
name: "Seedream 4.7",
|
|
4591
|
+
modelId: "seedream_4_7",
|
|
4592
|
+
addedAt: "2026-08-06",
|
|
4593
|
+
workflow: "seedream",
|
|
4594
|
+
buildPayload: buildSeedream47Payload,
|
|
4595
|
+
estimatedTime: { "1K": 12, "2K": 21, "4K": 58 },
|
|
4596
|
+
mode: "image",
|
|
4597
|
+
inputType: "t2i",
|
|
4598
|
+
description: "Reliable all-purpose generation with readable text overlay.",
|
|
4599
|
+
features: [feat("Multi-Image Input", "input"), feat("4K", "resolution")],
|
|
4600
|
+
paramConfig: {
|
|
4601
|
+
...params.resolution(["1K", "2K", "4K"]),
|
|
4602
|
+
...seedreamV2Params
|
|
4603
|
+
}
|
|
4604
|
+
},
|
|
4413
4605
|
{
|
|
4414
4606
|
id: "seedream-4.5",
|
|
4415
4607
|
name: "Seedream 4.5",
|
|
@@ -5166,6 +5358,7 @@ var buildGrokTTSPayload = (ctx) => ({
|
|
|
5166
5358
|
language: ctx.language ?? "auto",
|
|
5167
5359
|
voice_id: ctx.voiceId ?? DEFAULT_GROK_VOICE_ID
|
|
5168
5360
|
});
|
|
5361
|
+
var GROK_VIDEO_PROMPT_MAX = 4096;
|
|
5169
5362
|
var GROK_VIDEO_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3"];
|
|
5170
5363
|
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"];
|
|
5171
5364
|
var GROK_DURATIONS = [3, 5, 6, 8, 10, 12, 15];
|
|
@@ -5189,7 +5382,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5189
5382
|
description: "Fastest generation pipeline \u2014 720p with audio in seconds, up to 15s.",
|
|
5190
5383
|
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("Audio", "audio"), feat("720p", "resolution"), feat("15 sec", "duration")],
|
|
5191
5384
|
paramConfig: {
|
|
5192
|
-
...params.prompt(),
|
|
5385
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5193
5386
|
...params.aspectRatio(GROK_VIDEO_AR),
|
|
5194
5387
|
...params.resolution(GROK_VIDEO_RESOLUTIONS, "720p"),
|
|
5195
5388
|
...params.duration(GROK_DURATIONS, 6),
|
|
@@ -5211,7 +5404,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5211
5404
|
description: "Next-gen Grok video \u2014 faster, higher fidelity, up to 15s with audio.",
|
|
5212
5405
|
features: [feat("Image Input", "input"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("15 sec", "duration")],
|
|
5213
5406
|
paramConfig: {
|
|
5214
|
-
...params.prompt(),
|
|
5407
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5215
5408
|
...params.aspectRatio(GROK_VIDEO_AR),
|
|
5216
5409
|
...params.resolution(GROK_VIDEO_RESOLUTIONS_15, "720p"),
|
|
5217
5410
|
...params.duration(GROK_DURATIONS, 8),
|
|
@@ -5231,7 +5424,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5231
5424
|
description: "Restyle or remix an existing video with a new prompt direction.",
|
|
5232
5425
|
features: [feat("Video Input", "input"), feat("Up to 8s", "duration")],
|
|
5233
5426
|
paramConfig: {
|
|
5234
|
-
...params.prompt(),
|
|
5427
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5235
5428
|
...params.videoInput("Source Video", "reference", true, 8)
|
|
5236
5429
|
}
|
|
5237
5430
|
},
|
|
@@ -5248,7 +5441,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5248
5441
|
description: "Extend an existing video forward with a new prompt \u2014 up to 10 seconds.",
|
|
5249
5442
|
features: [feat("Video Input", "input"), feat("Up to 10s", "duration")],
|
|
5250
5443
|
paramConfig: {
|
|
5251
|
-
...params.prompt(),
|
|
5444
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5252
5445
|
...params.duration([3, 5, 6, 8, 10], 6),
|
|
5253
5446
|
...params.videoInput("Source Video")
|
|
5254
5447
|
}
|
|
@@ -5823,6 +6016,11 @@ var fluxKontextBase = {
|
|
|
5823
6016
|
mode: "image",
|
|
5824
6017
|
inputType: "t2i"
|
|
5825
6018
|
};
|
|
6019
|
+
var flux3VideoConstraints = [
|
|
6020
|
+
{ when: { draft: { is: true } }, then: {
|
|
6021
|
+
resolution: { allowed: ["hd"], reason: "Draft mode only supports HD resolution." }
|
|
6022
|
+
} }
|
|
6023
|
+
];
|
|
5826
6024
|
var { MODELS: MODELS21 } = defineModels("flux", [
|
|
5827
6025
|
{
|
|
5828
6026
|
...fluxV2Base,
|
|
@@ -5911,52 +6109,39 @@ var { MODELS: MODELS21 } = defineModels("flux", [
|
|
|
5911
6109
|
}
|
|
5912
6110
|
},
|
|
5913
6111
|
{
|
|
5914
|
-
// Single workflow `flux/v1/video`
|
|
5915
|
-
//
|
|
5916
|
-
// reference video, video continuation) through optional inputs — no
|
|
6112
|
+
// Single workflow `flux/v1/video` derives its mode from the input it's
|
|
6113
|
+
// given: none → t2v, keyframe images → i2v, a start video → v2v. No
|
|
5917
6114
|
// editWorkflow needed. Payload assembly lives in flux.payloads.ts.
|
|
5918
6115
|
id: "flux-3-video",
|
|
5919
6116
|
name: "Flux 3 Video",
|
|
5920
6117
|
workflow: "flux/v1/video",
|
|
5921
6118
|
mode: "video",
|
|
5922
6119
|
inputType: "t2v",
|
|
5923
|
-
release: "preview",
|
|
5924
6120
|
addedAt: "2026-07-27",
|
|
5925
6121
|
estimatedTime: 120,
|
|
5926
|
-
|
|
6122
|
+
constraints: flux3VideoConstraints,
|
|
6123
|
+
description: "Text-to-video with synchronized audio, plus image-to-video (animate up to 10 images) and video continuation.",
|
|
5927
6124
|
features: [
|
|
5928
6125
|
feat("Image & Video Input", "input"),
|
|
5929
|
-
feat("Start/End Frame", "frame"),
|
|
5930
6126
|
feat("Audio", "audio"),
|
|
5931
6127
|
feat("Up to 20s", "duration"),
|
|
5932
|
-
feat("
|
|
6128
|
+
feat("1080p", "resolution")
|
|
5933
6129
|
],
|
|
5934
6130
|
paramConfig: {
|
|
5935
6131
|
...params.prompt(),
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
{ id: "flux-3-preview-high", label: "High" },
|
|
5940
|
-
{ id: "flux-3-preview-optimized", label: "Optimized" }
|
|
5941
|
-
], "flux-3-preview-high", { label: "Model" }),
|
|
5942
|
-
...params.aspectRatio(["auto", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16", "9:21"], "auto"),
|
|
5943
|
-
...params.resolution(["480p", "720p"], "720p"),
|
|
5944
|
-
// 'auto' lets the model fit length; an explicit whole number is required
|
|
5945
|
-
// for a two-image (start+end) morph.
|
|
6132
|
+
...params.aspectRatio(["auto", "21:9", "2:1", "16:9", "4:3", "1:1", "3:4", "9:16"], "auto"),
|
|
6133
|
+
...params.resolution(["hd", "fhd"], "hd"),
|
|
6134
|
+
// 'auto' lets the model fit length; or a whole number of seconds (5–20).
|
|
5946
6135
|
...p.enum("duration", ["auto", "5", "10", "15", "20"], "auto", { label: "Duration" }),
|
|
5947
|
-
//
|
|
5948
|
-
...params.
|
|
5949
|
-
|
|
5950
|
-
// referenceImages (ir2v): who/what appears, never shown on screen.
|
|
5951
|
-
...params.imageInput(10, "Reference Images", false, "reference"),
|
|
5952
|
-
// startVideo (f2v): continue from a clip's final frames.
|
|
6136
|
+
// keyframes (i2v): 1–10 images to animate. Providing these selects i2v mode.
|
|
6137
|
+
...params.imageInput(10, "Images", false, "asset"),
|
|
6138
|
+
// startVideo (v2v): continue from a clip's final frames.
|
|
5953
6139
|
...params.videoInput("Start Video", "asset", false, 15),
|
|
5954
|
-
// referenceVideo (vr2v): carry subjects into a brand-new clip.
|
|
5955
|
-
...params.videoInputs(1, "Reference Video", false),
|
|
5956
6140
|
...params.generateAudio(true),
|
|
5957
|
-
|
|
5958
|
-
...p.range("
|
|
5959
|
-
|
|
6141
|
+
// Moderation level: 0 (strict) … 4 (permissive).
|
|
6142
|
+
...p.range("safetyTolerance", 0, 4, 2, { label: "Safety Tolerance" }),
|
|
6143
|
+
// draft: fast low-step preview.
|
|
6144
|
+
...p.boolean("draft", false, "Draft")
|
|
5960
6145
|
}
|
|
5961
6146
|
}
|
|
5962
6147
|
]);
|
|
@@ -5964,29 +6149,19 @@ var { MODELS: MODELS21 } = defineModels("flux", [
|
|
|
5964
6149
|
// src/vendors/catalog/flux.payloads.ts
|
|
5965
6150
|
var buildFlux3VideoPayload = (input) => {
|
|
5966
6151
|
const duration = input.duration && input.duration !== "auto" ? Number(input.duration) : "auto";
|
|
5967
|
-
const keyframes = [];
|
|
5968
|
-
if (input.startFrame) keyframes.push({ imageUrl: input.startFrame, frameIndex: 0 });
|
|
5969
|
-
if (input.endFrame && typeof duration === "number") {
|
|
5970
|
-
keyframes.push({ imageUrl: input.endFrame, frameIndex: duration * 24 });
|
|
5971
|
-
}
|
|
5972
6152
|
return {
|
|
5973
6153
|
prompt: input.prompt,
|
|
5974
|
-
model: input.model ?? "flux-3-preview-high",
|
|
5975
6154
|
aspectRatio: input.aspectRatio ?? "auto",
|
|
5976
|
-
resolution: input.resolution ?? "
|
|
6155
|
+
resolution: input.resolution ?? "hd",
|
|
5977
6156
|
duration,
|
|
5978
6157
|
generateAudio: input.generateAudio ?? true,
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
// startVideo (f2v) — continue from a clip's final frames.
|
|
6158
|
+
safetyTolerance: input.safetyTolerance ?? 2,
|
|
6159
|
+
// keyframes (i2v): 1–10 images to animate.
|
|
6160
|
+
...input.imageUrls?.length ? { keyframes: input.imageUrls } : {},
|
|
6161
|
+
// startVideo (v2v): continue from a clip's final frames.
|
|
5984
6162
|
...input.videoUrl ? { startVideo: input.videoUrl } : {},
|
|
5985
|
-
//
|
|
5986
|
-
...input.
|
|
5987
|
-
// seed omitted when unset → vendor randomizes.
|
|
5988
|
-
...input.seed != null ? { seed: input.seed } : {},
|
|
5989
|
-
...input.version ? { version: input.version } : {}
|
|
6163
|
+
// draft: fast low-step preview.
|
|
6164
|
+
...input.draft ? { draft: input.draft } : {}
|
|
5990
6165
|
};
|
|
5991
6166
|
};
|
|
5992
6167
|
registerPayloads(MODELS21, {
|
|
@@ -10824,9 +10999,13 @@ var Seedance20MiniVideoEdit = "seedance-2.0-mini-video-edit";
|
|
|
10824
10999
|
var Seedance20MiniVideoExtend = "seedance-2.0-mini-video-extend";
|
|
10825
11000
|
var Seedance20VideoEdit = "seedance-2.0-video-edit";
|
|
10826
11001
|
var Seedance20VideoExtend = "seedance-2.0-video-extend";
|
|
11002
|
+
var Seedance25 = "seedance-2.5";
|
|
11003
|
+
var Seedance25VideoEdit = "seedance-2.5-video-edit";
|
|
11004
|
+
var Seedance25VideoExtend = "seedance-2.5-video-extend";
|
|
10827
11005
|
var SeedanceI2v = "seedance-i2v";
|
|
10828
11006
|
var Seedream40 = "seedream-4.0";
|
|
10829
11007
|
var Seedream45 = "seedream-4.5";
|
|
11008
|
+
var Seedream47 = "seedream-4.7";
|
|
10830
11009
|
var Seedream50Lite = "seedream-5.0-lite";
|
|
10831
11010
|
var Seedream50Pro = "seedream-5.0-pro";
|
|
10832
11011
|
var Sora2 = "sora-2";
|
|
@@ -11024,9 +11203,13 @@ var Models = {
|
|
|
11024
11203
|
Seedance20MiniVideoExtend,
|
|
11025
11204
|
Seedance20VideoEdit,
|
|
11026
11205
|
Seedance20VideoExtend,
|
|
11206
|
+
Seedance25,
|
|
11207
|
+
Seedance25VideoEdit,
|
|
11208
|
+
Seedance25VideoExtend,
|
|
11027
11209
|
SeedanceI2v,
|
|
11028
11210
|
Seedream40,
|
|
11029
11211
|
Seedream45,
|
|
11212
|
+
Seedream47,
|
|
11030
11213
|
Seedream50Lite,
|
|
11031
11214
|
Seedream50Pro,
|
|
11032
11215
|
Sora2,
|