@picsart/ai-sdk 3.32.1 → 3.35.5
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 +235 -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,186 @@ 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
|
+
release: "preview",
|
|
4079
|
+
badge: ["new", "premium", "hot"],
|
|
4080
|
+
description: "Latest cinematic video with audio, multi-reference input, and mp4/mov output. Up to 30s.",
|
|
4081
|
+
features: [feat("Reference Image", "frame"), feat("Start/End Frame", "frame"), feat("Audio", "audio"), feat("720p", "resolution"), feat("4-30 sec", "duration")],
|
|
4082
|
+
paramConfig: {
|
|
4083
|
+
...params.prompt(),
|
|
4084
|
+
...params.aspectRatio(SEEDANCE_AR),
|
|
4085
|
+
...params.resolution(["480p", "720p"], "720p"),
|
|
4086
|
+
...params.duration(SEEDANCE_25_DURATIONS, 5),
|
|
4087
|
+
...params.generateAudio(false),
|
|
4088
|
+
...params.returnLastFrame(),
|
|
4089
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4090
|
+
// 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
|
|
4091
|
+
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_MIN_PIXELS),
|
|
4092
|
+
...params.videoInputs(10, "Reference Videos", false, SEEDANCE_MIN_PIXELS),
|
|
4093
|
+
...params.audioInputs(10, "Reference Audios"),
|
|
4094
|
+
...params.startFrame(),
|
|
4095
|
+
...params.endFrame()
|
|
4096
|
+
}
|
|
4097
|
+
},
|
|
4098
|
+
{
|
|
4099
|
+
id: "seedance-2.5-video-edit",
|
|
4100
|
+
name: "Seedance 2.5 Video Edit",
|
|
4101
|
+
modelId: "seedance-2.5",
|
|
4102
|
+
addedAt: "2026-08-06",
|
|
4103
|
+
workflow: "seedance",
|
|
4104
|
+
buildPayload: buildSeedance25VideoEditPayload,
|
|
4105
|
+
estimatedTime: 60,
|
|
4106
|
+
mode: "video",
|
|
4107
|
+
inputType: "v2v",
|
|
4108
|
+
release: "preview",
|
|
4109
|
+
badge: ["new", "premium", "hot"],
|
|
4110
|
+
description: "Edit video \u2014 replace subjects, add or remove objects, restyle scenes with reference images.",
|
|
4111
|
+
features: [feat("Video Input", "input"), feat("Multi-Image Input", "input"), feat("Audio", "audio"), feat("720p", "resolution"), feat("Source length", "duration")],
|
|
4112
|
+
paramConfig: {
|
|
4113
|
+
...params.prompt(),
|
|
4114
|
+
// Editing mode: aspect ratio is fixed to 'adaptive' and duration is
|
|
4115
|
+
// source-driven ('-1'), so neither is user-selectable (vendor rule).
|
|
4116
|
+
...params.aspectRatio(["adaptive"]),
|
|
4117
|
+
...params.resolution(["480p", "720p"], "720p"),
|
|
4118
|
+
...params.generateAudio(false),
|
|
4119
|
+
...params.returnLastFrame(),
|
|
4120
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4121
|
+
...params.videoInput("Source Video"),
|
|
4122
|
+
...params.imageInput(30, "Reference Images")
|
|
4123
|
+
}
|
|
4124
|
+
},
|
|
4125
|
+
{
|
|
4126
|
+
id: "seedance-2.5-video-extend",
|
|
4127
|
+
name: "Seedance 2.5 Video Extend",
|
|
4128
|
+
modelId: "seedance-2.5",
|
|
4129
|
+
addedAt: "2026-08-06",
|
|
4130
|
+
workflow: "seedance",
|
|
4131
|
+
buildPayload: buildSeedance25VideoExtendPayload,
|
|
4132
|
+
estimatedTime: 200,
|
|
4133
|
+
mode: "video",
|
|
4134
|
+
inputType: "v2v",
|
|
4135
|
+
release: "preview",
|
|
4136
|
+
badge: ["new", "premium", "hot"],
|
|
4137
|
+
description: "Stitch up to 10 clips into one continuous, extended video.",
|
|
4138
|
+
features: [feat("Multi-Video Input", "input"), feat("Audio", "audio"), feat("720p", "resolution"), feat("4-30 sec", "duration")],
|
|
4139
|
+
paramConfig: {
|
|
4140
|
+
...params.prompt(),
|
|
4141
|
+
// Extension mode: aspect ratio is locked to 'adaptive' (vendor rule);
|
|
4142
|
+
// duration stays user-selectable.
|
|
4143
|
+
...params.aspectRatio(["adaptive"]),
|
|
4144
|
+
...params.resolution(["480p", "720p"], "720p"),
|
|
4145
|
+
...params.duration(SEEDANCE_25_DURATIONS, 15),
|
|
4146
|
+
...params.generateAudio(false),
|
|
4147
|
+
...p.enum("outputFormat", ["mp4", "mov"], "mp4", { label: "Format" }),
|
|
4148
|
+
...params.videoInputs(10, "Source Videos", true)
|
|
4149
|
+
}
|
|
4150
|
+
},
|
|
3974
4151
|
{
|
|
3975
4152
|
id: "seedance-2.0",
|
|
3976
4153
|
name: "Seedance 2.0",
|
|
@@ -4354,6 +4531,7 @@ function buildSeedreamV2(modelId) {
|
|
|
4354
4531
|
}
|
|
4355
4532
|
var buildSeedream40Payload = buildSeedreamV2("seedream_4_0");
|
|
4356
4533
|
var buildSeedream45Payload = buildSeedreamV2("seedream_4_5");
|
|
4534
|
+
var buildSeedream47Payload = buildSeedreamV2("seedream_4_7");
|
|
4357
4535
|
var buildSeedream50LitePayload = buildSeedreamV2("seedream_5_0_lite");
|
|
4358
4536
|
var buildSeedream50ProPayload = buildSeedreamV2("seedream_5_0_pro");
|
|
4359
4537
|
var seedreamV2Params = {
|
|
@@ -4410,6 +4588,23 @@ var { MODELS: MODELS14 } = defineModels("seedream", [
|
|
|
4410
4588
|
...seedreamV2Params
|
|
4411
4589
|
}
|
|
4412
4590
|
},
|
|
4591
|
+
{
|
|
4592
|
+
id: "seedream-4.7",
|
|
4593
|
+
name: "Seedream 4.7",
|
|
4594
|
+
modelId: "seedream_4_7",
|
|
4595
|
+
addedAt: "2026-08-06",
|
|
4596
|
+
workflow: "seedream",
|
|
4597
|
+
buildPayload: buildSeedream47Payload,
|
|
4598
|
+
estimatedTime: { "1K": 12, "2K": 21, "4K": 58 },
|
|
4599
|
+
mode: "image",
|
|
4600
|
+
inputType: "t2i",
|
|
4601
|
+
description: "Reliable all-purpose generation with readable text overlay.",
|
|
4602
|
+
features: [feat("Multi-Image Input", "input"), feat("4K", "resolution")],
|
|
4603
|
+
paramConfig: {
|
|
4604
|
+
...params.resolution(["1K", "2K", "4K"]),
|
|
4605
|
+
...seedreamV2Params
|
|
4606
|
+
}
|
|
4607
|
+
},
|
|
4413
4608
|
{
|
|
4414
4609
|
id: "seedream-4.5",
|
|
4415
4610
|
name: "Seedream 4.5",
|
|
@@ -5166,6 +5361,7 @@ var buildGrokTTSPayload = (ctx) => ({
|
|
|
5166
5361
|
language: ctx.language ?? "auto",
|
|
5167
5362
|
voice_id: ctx.voiceId ?? DEFAULT_GROK_VOICE_ID
|
|
5168
5363
|
});
|
|
5364
|
+
var GROK_VIDEO_PROMPT_MAX = 4096;
|
|
5169
5365
|
var GROK_VIDEO_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3"];
|
|
5170
5366
|
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
5367
|
var GROK_DURATIONS = [3, 5, 6, 8, 10, 12, 15];
|
|
@@ -5189,7 +5385,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5189
5385
|
description: "Fastest generation pipeline \u2014 720p with audio in seconds, up to 15s.",
|
|
5190
5386
|
features: [feat("Image Input", "input"), feat("Start Frame", "frame"), feat("Audio", "audio"), feat("720p", "resolution"), feat("15 sec", "duration")],
|
|
5191
5387
|
paramConfig: {
|
|
5192
|
-
...params.prompt(),
|
|
5388
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5193
5389
|
...params.aspectRatio(GROK_VIDEO_AR),
|
|
5194
5390
|
...params.resolution(GROK_VIDEO_RESOLUTIONS, "720p"),
|
|
5195
5391
|
...params.duration(GROK_DURATIONS, 6),
|
|
@@ -5211,7 +5407,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5211
5407
|
description: "Next-gen Grok video \u2014 faster, higher fidelity, up to 15s with audio.",
|
|
5212
5408
|
features: [feat("Image Input", "input"), feat("Audio", "audio"), feat("1080p", "resolution"), feat("15 sec", "duration")],
|
|
5213
5409
|
paramConfig: {
|
|
5214
|
-
...params.prompt(),
|
|
5410
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5215
5411
|
...params.aspectRatio(GROK_VIDEO_AR),
|
|
5216
5412
|
...params.resolution(GROK_VIDEO_RESOLUTIONS_15, "720p"),
|
|
5217
5413
|
...params.duration(GROK_DURATIONS, 8),
|
|
@@ -5231,7 +5427,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5231
5427
|
description: "Restyle or remix an existing video with a new prompt direction.",
|
|
5232
5428
|
features: [feat("Video Input", "input"), feat("Up to 8s", "duration")],
|
|
5233
5429
|
paramConfig: {
|
|
5234
|
-
...params.prompt(),
|
|
5430
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5235
5431
|
...params.videoInput("Source Video", "reference", true, 8)
|
|
5236
5432
|
}
|
|
5237
5433
|
},
|
|
@@ -5248,7 +5444,7 @@ var { MODELS: MODELS17 } = defineModels("grok", [
|
|
|
5248
5444
|
description: "Extend an existing video forward with a new prompt \u2014 up to 10 seconds.",
|
|
5249
5445
|
features: [feat("Video Input", "input"), feat("Up to 10s", "duration")],
|
|
5250
5446
|
paramConfig: {
|
|
5251
|
-
...params.prompt(),
|
|
5447
|
+
...params.prompt({ maxLength: GROK_VIDEO_PROMPT_MAX }),
|
|
5252
5448
|
...params.duration([3, 5, 6, 8, 10], 6),
|
|
5253
5449
|
...params.videoInput("Source Video")
|
|
5254
5450
|
}
|
|
@@ -5823,6 +6019,11 @@ var fluxKontextBase = {
|
|
|
5823
6019
|
mode: "image",
|
|
5824
6020
|
inputType: "t2i"
|
|
5825
6021
|
};
|
|
6022
|
+
var flux3VideoConstraints = [
|
|
6023
|
+
{ when: { draft: { is: true } }, then: {
|
|
6024
|
+
resolution: { allowed: ["hd"], reason: "Draft mode only supports HD resolution." }
|
|
6025
|
+
} }
|
|
6026
|
+
];
|
|
5826
6027
|
var { MODELS: MODELS21 } = defineModels("flux", [
|
|
5827
6028
|
{
|
|
5828
6029
|
...fluxV2Base,
|
|
@@ -5911,52 +6112,39 @@ var { MODELS: MODELS21 } = defineModels("flux", [
|
|
|
5911
6112
|
}
|
|
5912
6113
|
},
|
|
5913
6114
|
{
|
|
5914
|
-
// Single workflow `flux/v1/video`
|
|
5915
|
-
//
|
|
5916
|
-
// reference video, video continuation) through optional inputs — no
|
|
6115
|
+
// Single workflow `flux/v1/video` derives its mode from the input it's
|
|
6116
|
+
// given: none → t2v, keyframe images → i2v, a start video → v2v. No
|
|
5917
6117
|
// editWorkflow needed. Payload assembly lives in flux.payloads.ts.
|
|
5918
6118
|
id: "flux-3-video",
|
|
5919
6119
|
name: "Flux 3 Video",
|
|
5920
6120
|
workflow: "flux/v1/video",
|
|
5921
6121
|
mode: "video",
|
|
5922
6122
|
inputType: "t2v",
|
|
5923
|
-
release: "preview",
|
|
5924
6123
|
addedAt: "2026-07-27",
|
|
5925
6124
|
estimatedTime: 120,
|
|
5926
|
-
|
|
6125
|
+
constraints: flux3VideoConstraints,
|
|
6126
|
+
description: "Text-to-video with synchronized audio, plus image-to-video (animate up to 10 images) and video continuation.",
|
|
5927
6127
|
features: [
|
|
5928
6128
|
feat("Image & Video Input", "input"),
|
|
5929
|
-
feat("Start/End Frame", "frame"),
|
|
5930
6129
|
feat("Audio", "audio"),
|
|
5931
6130
|
feat("Up to 20s", "duration"),
|
|
5932
|
-
feat("
|
|
6131
|
+
feat("1080p", "resolution")
|
|
5933
6132
|
],
|
|
5934
6133
|
paramConfig: {
|
|
5935
6134
|
...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.
|
|
6135
|
+
...params.aspectRatio(["auto", "21:9", "2:1", "16:9", "4:3", "1:1", "3:4", "9:16"], "auto"),
|
|
6136
|
+
...params.resolution(["hd", "fhd"], "hd"),
|
|
6137
|
+
// 'auto' lets the model fit length; or a whole number of seconds (5–20).
|
|
5946
6138
|
...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.
|
|
6139
|
+
// keyframes (i2v): 1–10 images to animate. Providing these selects i2v mode.
|
|
6140
|
+
...params.imageInput(10, "Images", false, "asset"),
|
|
6141
|
+
// startVideo (v2v): continue from a clip's final frames.
|
|
5953
6142
|
...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
6143
|
...params.generateAudio(true),
|
|
5957
|
-
|
|
5958
|
-
...p.range("
|
|
5959
|
-
|
|
6144
|
+
// Moderation level: 0 (strict) … 4 (permissive).
|
|
6145
|
+
...p.range("safetyTolerance", 0, 4, 2, { label: "Safety Tolerance" }),
|
|
6146
|
+
// draft: fast low-step preview.
|
|
6147
|
+
...p.boolean("draft", false, "Draft")
|
|
5960
6148
|
}
|
|
5961
6149
|
}
|
|
5962
6150
|
]);
|
|
@@ -5964,29 +6152,19 @@ var { MODELS: MODELS21 } = defineModels("flux", [
|
|
|
5964
6152
|
// src/vendors/catalog/flux.payloads.ts
|
|
5965
6153
|
var buildFlux3VideoPayload = (input) => {
|
|
5966
6154
|
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
6155
|
return {
|
|
5973
6156
|
prompt: input.prompt,
|
|
5974
|
-
model: input.model ?? "flux-3-preview-high",
|
|
5975
6157
|
aspectRatio: input.aspectRatio ?? "auto",
|
|
5976
|
-
resolution: input.resolution ?? "
|
|
6158
|
+
resolution: input.resolution ?? "hd",
|
|
5977
6159
|
duration,
|
|
5978
6160
|
generateAudio: input.generateAudio ?? true,
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
// startVideo (f2v) — continue from a clip's final frames.
|
|
6161
|
+
safetyTolerance: input.safetyTolerance ?? 2,
|
|
6162
|
+
// keyframes (i2v): 1–10 images to animate.
|
|
6163
|
+
...input.imageUrls?.length ? { keyframes: input.imageUrls } : {},
|
|
6164
|
+
// startVideo (v2v): continue from a clip's final frames.
|
|
5984
6165
|
...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 } : {}
|
|
6166
|
+
// draft: fast low-step preview.
|
|
6167
|
+
...input.draft ? { draft: input.draft } : {}
|
|
5990
6168
|
};
|
|
5991
6169
|
};
|
|
5992
6170
|
registerPayloads(MODELS21, {
|
|
@@ -10824,9 +11002,13 @@ var Seedance20MiniVideoEdit = "seedance-2.0-mini-video-edit";
|
|
|
10824
11002
|
var Seedance20MiniVideoExtend = "seedance-2.0-mini-video-extend";
|
|
10825
11003
|
var Seedance20VideoEdit = "seedance-2.0-video-edit";
|
|
10826
11004
|
var Seedance20VideoExtend = "seedance-2.0-video-extend";
|
|
11005
|
+
var Seedance25 = "seedance-2.5";
|
|
11006
|
+
var Seedance25VideoEdit = "seedance-2.5-video-edit";
|
|
11007
|
+
var Seedance25VideoExtend = "seedance-2.5-video-extend";
|
|
10827
11008
|
var SeedanceI2v = "seedance-i2v";
|
|
10828
11009
|
var Seedream40 = "seedream-4.0";
|
|
10829
11010
|
var Seedream45 = "seedream-4.5";
|
|
11011
|
+
var Seedream47 = "seedream-4.7";
|
|
10830
11012
|
var Seedream50Lite = "seedream-5.0-lite";
|
|
10831
11013
|
var Seedream50Pro = "seedream-5.0-pro";
|
|
10832
11014
|
var Sora2 = "sora-2";
|
|
@@ -11024,9 +11206,13 @@ var Models = {
|
|
|
11024
11206
|
Seedance20MiniVideoExtend,
|
|
11025
11207
|
Seedance20VideoEdit,
|
|
11026
11208
|
Seedance20VideoExtend,
|
|
11209
|
+
Seedance25,
|
|
11210
|
+
Seedance25VideoEdit,
|
|
11211
|
+
Seedance25VideoExtend,
|
|
11027
11212
|
SeedanceI2v,
|
|
11028
11213
|
Seedream40,
|
|
11029
11214
|
Seedream45,
|
|
11215
|
+
Seedream47,
|
|
11030
11216
|
Seedream50Lite,
|
|
11031
11217
|
Seedream50Pro,
|
|
11032
11218
|
Sora2,
|