@picsart/ai-sdk 6.5.0 → 6.7.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/_vendor/workflows-types/index.d.ts +1724 -1676
- package/index.d.ts +59 -0
- package/index.js +212 -106
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -249,6 +249,14 @@ type ModelInputById = {
|
|
|
249
249
|
count?: 1 | 2 | 4 | 6 | 8 | 10;
|
|
250
250
|
imageUrls?: string[];
|
|
251
251
|
};
|
|
252
|
+
"flux-3-image": {
|
|
253
|
+
prompt: string;
|
|
254
|
+
aspectRatio?: "auto" | "21:9" | "2:1" | "16:9" | "3:2" | "7:5" | "4:3" | "5:4" | "1:1" | "4:5" | "3:4" | "5:7" | "2:3" | "9:16" | "1:2";
|
|
255
|
+
resolution?: "512sq" | "768sq" | "1k" | "2k" | "4k";
|
|
256
|
+
count?: 1 | 2 | 4 | 6 | 8 | 10;
|
|
257
|
+
imageUrls?: string[];
|
|
258
|
+
safetyTolerance?: number;
|
|
259
|
+
};
|
|
252
260
|
"flux-3-video": {
|
|
253
261
|
prompt: string;
|
|
254
262
|
aspectRatio?: "auto" | "21:9" | "2:1" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
@@ -2034,6 +2042,21 @@ interface FileDescriptor {
|
|
|
2034
2042
|
* worker stays the authoritative gate. Omit for no client-side cap.
|
|
2035
2043
|
*/
|
|
2036
2044
|
maxDurationSec?: number;
|
|
2045
|
+
/**
|
|
2046
|
+
* Min intrinsic duration (seconds) accepted for a video/audio file. Unlike
|
|
2047
|
+
* every other bound here this one has no remedy: a clip that is too short
|
|
2048
|
+
* cannot be lengthened, so the client's only honest move is to refuse the
|
|
2049
|
+
* attachment and say why. Enforced client-side at upload by measuring the
|
|
2050
|
+
* media before it is sent; the backend worker stays the authoritative gate.
|
|
2051
|
+
* Omit for no client-side floor.
|
|
2052
|
+
*/
|
|
2053
|
+
minDurationSec?: number;
|
|
2054
|
+
/**
|
|
2055
|
+
* Max intrinsic frame rate (fps) accepted for a video file. Enforced
|
|
2056
|
+
* client-side at upload by measuring the media before it is sent; the backend
|
|
2057
|
+
* worker stays the authoritative gate. Omit for no client-side cap.
|
|
2058
|
+
*/
|
|
2059
|
+
maxFrameRate?: number;
|
|
2037
2060
|
/**
|
|
2038
2061
|
* Min intrinsic pixel count (width × height) accepted for an image/video file.
|
|
2039
2062
|
* Enforced client-side at upload by measuring the media before it is sent; the
|
|
@@ -2049,6 +2072,41 @@ interface FileDescriptor {
|
|
|
2049
2072
|
* authoritative gate. Omit for no client-side floor.
|
|
2050
2073
|
*/
|
|
2051
2074
|
minSidePixels?: number;
|
|
2075
|
+
/**
|
|
2076
|
+
* Max intrinsic pixel count (width × height) accepted for an image/video
|
|
2077
|
+
* file. The ceiling matching `minPixels`, and a separate rule from
|
|
2078
|
+
* `maxSidePixels`: a 12000×2000 frame passes a 36 MP area cap and still
|
|
2079
|
+
* breaks a 6000 px per-side one. Enforced client-side at upload by measuring
|
|
2080
|
+
* the media before it is sent; the backend worker stays the authoritative
|
|
2081
|
+
* gate. Omit for no client-side ceiling.
|
|
2082
|
+
*/
|
|
2083
|
+
maxPixels?: number;
|
|
2084
|
+
/**
|
|
2085
|
+
* Max intrinsic long-side length (pixels) accepted for an image/video file:
|
|
2086
|
+
* `max(width, height)` must not exceed this. The ceiling matching
|
|
2087
|
+
* `minSidePixels`, so the pair expresses the shape vendors usually publish
|
|
2088
|
+
* ("width and height must each be between 300 and 6000 px"). Distinct from
|
|
2089
|
+
* `maxShortSidePixels`, which bounds the OTHER side and exists for upscaler
|
|
2090
|
+
* sources. Enforced client-side at upload by measuring the media before it is
|
|
2091
|
+
* sent; the backend worker stays the authoritative gate. Omit for no
|
|
2092
|
+
* client-side ceiling.
|
|
2093
|
+
*/
|
|
2094
|
+
maxSidePixels?: number;
|
|
2095
|
+
/**
|
|
2096
|
+
* Min intrinsic aspect ratio (width / height) accepted for an image/video
|
|
2097
|
+
* file. Vendors publish this as the bound a panorama or a tall crop breaks,
|
|
2098
|
+
* and it is not derivable from the pixel and side bounds: a 6000x1200 frame
|
|
2099
|
+
* satisfies a [300, 6000] per-side rule and a 36 MP area rule and is still
|
|
2100
|
+
* refused at 5.0. Enforced client-side at upload by measuring the media
|
|
2101
|
+
* before it is sent; the backend worker stays the authoritative gate. Omit
|
|
2102
|
+
* for no client-side floor.
|
|
2103
|
+
*/
|
|
2104
|
+
minAspectRatio?: number;
|
|
2105
|
+
/**
|
|
2106
|
+
* Max intrinsic aspect ratio (width / height) accepted for an image/video
|
|
2107
|
+
* file. The ceiling matching `minAspectRatio`.
|
|
2108
|
+
*/
|
|
2109
|
+
maxAspectRatio?: number;
|
|
2052
2110
|
/**
|
|
2053
2111
|
* Max intrinsic short-side length (pixels) accepted for an image/video file —
|
|
2054
2112
|
* `min(width, height)` must not exceed this. Used by upscalers whose source
|
|
@@ -2929,6 +2987,7 @@ declare const Models: {
|
|
|
2929
2987
|
readonly Flux2Flex: "flux-2-flex";
|
|
2930
2988
|
readonly Flux2Max: "flux-2-max";
|
|
2931
2989
|
readonly Flux2Pro: "flux-2-pro";
|
|
2990
|
+
readonly Flux3Image: "flux-3-image";
|
|
2932
2991
|
readonly Flux3Video: "flux-3-video";
|
|
2933
2992
|
readonly FluxKontextMax: "flux-kontext-max";
|
|
2934
2993
|
readonly FluxKontextPro: "flux-kontext-pro";
|
package/index.js
CHANGED
|
@@ -927,8 +927,14 @@ var p = {
|
|
|
927
927
|
accept,
|
|
928
928
|
...opts?.array ? { array: opts.array } : {},
|
|
929
929
|
...opts?.maxDurationSec != null ? { maxDurationSec: opts.maxDurationSec } : {},
|
|
930
|
+
...opts?.minDurationSec != null ? { minDurationSec: opts.minDurationSec } : {},
|
|
931
|
+
...opts?.maxFrameRate != null ? { maxFrameRate: opts.maxFrameRate } : {},
|
|
930
932
|
...opts?.minPixels != null ? { minPixels: opts.minPixels } : {},
|
|
933
|
+
...opts?.maxPixels != null ? { maxPixels: opts.maxPixels } : {},
|
|
931
934
|
...opts?.minSidePixels != null ? { minSidePixels: opts.minSidePixels } : {},
|
|
935
|
+
...opts?.maxSidePixels != null ? { maxSidePixels: opts.maxSidePixels } : {},
|
|
936
|
+
...opts?.minAspectRatio != null ? { minAspectRatio: opts.minAspectRatio } : {},
|
|
937
|
+
...opts?.maxAspectRatio != null ? { maxAspectRatio: opts.maxAspectRatio } : {},
|
|
932
938
|
...opts?.maxShortSidePixels != null ? { maxShortSidePixels: opts.maxShortSidePixels } : {},
|
|
933
939
|
...opts?.maxBytes != null ? { maxBytes: opts.maxBytes } : {}
|
|
934
940
|
}
|
|
@@ -1162,50 +1168,37 @@ var params = {
|
|
|
1162
1168
|
// `category` defaults to the most common role for the slot (overridable per call):
|
|
1163
1169
|
// asset → start/end frame, sync audio (direct inputs to the output)
|
|
1164
1170
|
// reference → ref images/videos/audios (guidance signals)
|
|
1165
|
-
/** Array of image inputs (writes to `imageUrls`).
|
|
1166
|
-
|
|
1167
|
-
* rule stated as a total pixel count, `minSidePixels` for one stated per
|
|
1168
|
-
* side (width and height each), which is what most vendors publish. */
|
|
1169
|
-
imageInput: (max = 1, label = "Start Image", required = false, category = "reference", bounds) => p.file("imageUrls", "image", {
|
|
1170
|
-
array: { max },
|
|
1171
|
-
label,
|
|
1172
|
-
required,
|
|
1173
|
-
category,
|
|
1174
|
-
...bounds?.minPixels != null ? { minPixels: bounds.minPixels } : {},
|
|
1175
|
-
...bounds?.minSidePixels != null ? { minSidePixels: bounds.minSidePixels } : {}
|
|
1176
|
-
}),
|
|
1171
|
+
/** Array of image inputs (writes to `imageUrls`). */
|
|
1172
|
+
imageInput: (max = 1, label = "Start Image", required = false, category = "reference", bounds) => p.file("imageUrls", "image", { array: { max }, label, required, category, ...bounds }),
|
|
1177
1173
|
/** Single source-video slot (v2v / video edit). Writes to `videoUrl`.
|
|
1178
|
-
* `
|
|
1179
|
-
*
|
|
1180
|
-
|
|
1181
|
-
videoInput: (label = "Source Video", category = "reference", required = true, maxDurationSec, maxShortSidePixels, maxBytes) => p.file("videoUrl", "video", {
|
|
1174
|
+
* The four positional limits predate `bounds` and are kept so the dozens of
|
|
1175
|
+
* existing call sites do not churn; new limits go in `bounds`. */
|
|
1176
|
+
videoInput: (label = "Source Video", category = "reference", required = true, maxDurationSec, maxShortSidePixels, maxBytes, bounds) => p.file("videoUrl", "video", {
|
|
1182
1177
|
label,
|
|
1183
1178
|
required,
|
|
1184
1179
|
category,
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1180
|
+
maxDurationSec,
|
|
1181
|
+
maxShortSidePixels,
|
|
1182
|
+
maxBytes,
|
|
1183
|
+
...bounds
|
|
1188
1184
|
}),
|
|
1189
1185
|
/** Single driving / sync-audio slot. Writes to `audioUrl`. */
|
|
1190
1186
|
audioInput: (label = "Audio Track", required = false, category = "asset") => p.file("audioUrl", "audio", { label, required, category }),
|
|
1191
|
-
/** Array of reference videos (writes to `videoUrls`).
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1194
|
-
*
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
}),
|
|
1204
|
-
/**
|
|
1205
|
-
|
|
1206
|
-
audioInputs: (max = 3, label = "Reference Audios", required = false) => p.file("audioUrls", "audio", { array: { max }, label, required, category: "reference" }),
|
|
1207
|
-
startFrame: (label = "Start Frame", required = false) => p.file("startFrame", "image", { label, required, category: "asset" }),
|
|
1208
|
-
endFrame: (label = "End Frame") => p.file("endFrame", "image", { label, category: "asset" })
|
|
1187
|
+
/** Array of reference videos (writes to `videoUrls`). `bounds` is checked per
|
|
1188
|
+
* clip. The backend also caps the COMBINED length of the array per model,
|
|
1189
|
+
* which no descriptor field expresses yet; declaring the per-clip bounds
|
|
1190
|
+
* still turns the common single-clip case into a trim prompt in the composer
|
|
1191
|
+
* instead of a vendor `400` after the user pressed Generate. */
|
|
1192
|
+
videoInputs: (max = 3, label = "Reference Videos", required = false, bounds) => p.file("videoUrls", "video", { array: { max }, label, required, category: "reference", ...bounds }),
|
|
1193
|
+
/** Array of reference audios (writes to `audioUrls`). `bounds` is checked per
|
|
1194
|
+
* clip; as with `videoInputs` the backend also caps the combined length. */
|
|
1195
|
+
audioInputs: (max = 3, label = "Reference Audios", required = false, bounds) => p.file("audioUrls", "audio", { array: { max }, label, required, category: "reference", ...bounds }),
|
|
1196
|
+
/** First-frame slot (writes to `startFrame`). Vendors routinely publish a
|
|
1197
|
+
* DIFFERENT pixel floor for a frame than for a reference image, because a
|
|
1198
|
+
* frame becomes the output's first rendered frame. */
|
|
1199
|
+
startFrame: (label = "Start Frame", required = false, bounds) => p.file("startFrame", "image", { label, required, category: "asset", ...bounds }),
|
|
1200
|
+
/** Last-frame slot (writes to `endFrame`). Same `bounds` as `startFrame`. */
|
|
1201
|
+
endFrame: (label = "End Frame", bounds) => p.file("endFrame", "image", { label, category: "asset", ...bounds })
|
|
1209
1202
|
};
|
|
1210
1203
|
var paramPresets = {
|
|
1211
1204
|
videoStartEndWithAudio
|
|
@@ -3673,8 +3666,71 @@ registerPayloads(MODELS11, {
|
|
|
3673
3666
|
// src/vendors/catalog/seedance.ts
|
|
3674
3667
|
var SEEDANCE_FRAME_REF_REASON = "Start/End frames cannot be combined with reference images, videos, or audios";
|
|
3675
3668
|
var SEEDANCE_MIN_SIDE_PIXELS = 300;
|
|
3669
|
+
var SEEDANCE_MAX_SIDE_PIXELS = 6e3;
|
|
3670
|
+
var SEEDANCE_MIN_ASPECT_RATIO = 0.39;
|
|
3671
|
+
var SEEDANCE_MAX_ASPECT_RATIO = 2.5;
|
|
3672
|
+
var SEEDANCE_MAX_IMAGE_PIXELS = 36e6;
|
|
3676
3673
|
var SEEDANCE_VIDEO_MIN_PIXELS = 407696;
|
|
3677
|
-
var
|
|
3674
|
+
var SEEDANCE_VIDEO_MAX_PIXELS = 8295044;
|
|
3675
|
+
var SEEDANCE_MIN_MEDIA_SEC = 1.8;
|
|
3676
|
+
var SEEDANCE_MAX_FRAME_RATE = 60;
|
|
3677
|
+
var SEEDANCE_MAX_VIDEO_BYTES = 209715200;
|
|
3678
|
+
var SEEDANCE_FRAME_MIN_PIXELS = 9e4;
|
|
3679
|
+
var SEEDANCE_MAX_IMAGE_BYTES = 31457280;
|
|
3680
|
+
var SEEDANCE_MAX_AUDIO_BYTES = 15728640;
|
|
3681
|
+
var SEEDANCE_25_MAX_MEDIA_SEC = 30;
|
|
3682
|
+
var SEEDANCE_20_MAX_MEDIA_SEC = 15;
|
|
3683
|
+
var SEEDANCE_IMAGE_BOUNDS = {
|
|
3684
|
+
minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
|
|
3685
|
+
maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
|
|
3686
|
+
minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
|
|
3687
|
+
maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
|
|
3688
|
+
maxPixels: SEEDANCE_MAX_IMAGE_PIXELS,
|
|
3689
|
+
maxBytes: SEEDANCE_MAX_IMAGE_BYTES
|
|
3690
|
+
};
|
|
3691
|
+
var SEEDANCE_FRAME_BOUNDS = {
|
|
3692
|
+
minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
|
|
3693
|
+
maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
|
|
3694
|
+
minPixels: SEEDANCE_FRAME_MIN_PIXELS,
|
|
3695
|
+
maxPixels: SEEDANCE_MAX_IMAGE_PIXELS,
|
|
3696
|
+
minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
|
|
3697
|
+
maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
|
|
3698
|
+
maxBytes: SEEDANCE_MAX_IMAGE_BYTES
|
|
3699
|
+
};
|
|
3700
|
+
var SEEDANCE_25_VIDEO_BOUNDS = {
|
|
3701
|
+
minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
|
|
3702
|
+
maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
|
|
3703
|
+
minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
|
|
3704
|
+
maxPixels: SEEDANCE_VIDEO_MAX_PIXELS,
|
|
3705
|
+
minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
|
|
3706
|
+
maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
|
|
3707
|
+
maxBytes: SEEDANCE_MAX_VIDEO_BYTES,
|
|
3708
|
+
minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
|
|
3709
|
+
maxDurationSec: SEEDANCE_25_MAX_MEDIA_SEC,
|
|
3710
|
+
maxFrameRate: SEEDANCE_MAX_FRAME_RATE
|
|
3711
|
+
};
|
|
3712
|
+
var SEEDANCE_20_VIDEO_BOUNDS = {
|
|
3713
|
+
minAspectRatio: SEEDANCE_MIN_ASPECT_RATIO,
|
|
3714
|
+
maxAspectRatio: SEEDANCE_MAX_ASPECT_RATIO,
|
|
3715
|
+
minPixels: SEEDANCE_VIDEO_MIN_PIXELS,
|
|
3716
|
+
maxPixels: SEEDANCE_VIDEO_MAX_PIXELS,
|
|
3717
|
+
minSidePixels: SEEDANCE_MIN_SIDE_PIXELS,
|
|
3718
|
+
maxSidePixels: SEEDANCE_MAX_SIDE_PIXELS,
|
|
3719
|
+
maxBytes: SEEDANCE_MAX_VIDEO_BYTES,
|
|
3720
|
+
minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
|
|
3721
|
+
maxDurationSec: SEEDANCE_20_MAX_MEDIA_SEC,
|
|
3722
|
+
maxFrameRate: SEEDANCE_MAX_FRAME_RATE
|
|
3723
|
+
};
|
|
3724
|
+
var SEEDANCE_25_AUDIO_BOUNDS = {
|
|
3725
|
+
minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
|
|
3726
|
+
maxDurationSec: SEEDANCE_25_MAX_MEDIA_SEC,
|
|
3727
|
+
maxBytes: SEEDANCE_MAX_AUDIO_BYTES
|
|
3728
|
+
};
|
|
3729
|
+
var SEEDANCE_20_AUDIO_BOUNDS = {
|
|
3730
|
+
minDurationSec: SEEDANCE_MIN_MEDIA_SEC,
|
|
3731
|
+
maxDurationSec: SEEDANCE_20_MAX_MEDIA_SEC,
|
|
3732
|
+
maxBytes: SEEDANCE_MAX_AUDIO_BYTES
|
|
3733
|
+
};
|
|
3678
3734
|
var seedance20Constraints = [
|
|
3679
3735
|
{
|
|
3680
3736
|
when: {
|
|
@@ -3944,15 +4000,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
3944
4000
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
3945
4001
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
3946
4002
|
// 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
|
|
3947
|
-
...params.imageInput(30, "Reference Images", false, "reference",
|
|
3948
|
-
...params.videoInputs(10, "Reference Videos", false,
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
}),
|
|
3953
|
-
...params.audioInputs(10, "Reference Audios"),
|
|
3954
|
-
...params.startFrame(),
|
|
3955
|
-
...params.endFrame()
|
|
4003
|
+
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4004
|
+
...params.videoInputs(10, "Reference Videos", false, SEEDANCE_25_VIDEO_BOUNDS),
|
|
4005
|
+
...params.audioInputs(10, "Reference Audios", false, SEEDANCE_25_AUDIO_BOUNDS),
|
|
4006
|
+
...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
|
|
4007
|
+
...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
|
|
3956
4008
|
}
|
|
3957
4009
|
},
|
|
3958
4010
|
{
|
|
@@ -3983,15 +4035,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
3983
4035
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
3984
4036
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
3985
4037
|
// 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
|
|
3986
|
-
...params.imageInput(30, "Reference Images", false, "reference",
|
|
3987
|
-
...params.videoInputs(10, "Reference Videos", false,
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
}),
|
|
3992
|
-
...params.audioInputs(10, "Reference Audios"),
|
|
3993
|
-
...params.startFrame(),
|
|
3994
|
-
...params.endFrame()
|
|
4038
|
+
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4039
|
+
...params.videoInputs(10, "Reference Videos", false, SEEDANCE_25_VIDEO_BOUNDS),
|
|
4040
|
+
...params.audioInputs(10, "Reference Audios", false, SEEDANCE_25_AUDIO_BOUNDS),
|
|
4041
|
+
...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
|
|
4042
|
+
...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
|
|
3995
4043
|
}
|
|
3996
4044
|
},
|
|
3997
4045
|
{
|
|
@@ -4018,8 +4066,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4018
4066
|
...params.returnLastFrame(),
|
|
4019
4067
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
4020
4068
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
4021
|
-
|
|
4022
|
-
|
|
4069
|
+
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
4070
|
+
// / maxBytes args predate it and are skipped rather than duplicated.
|
|
4071
|
+
...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_25_VIDEO_BOUNDS),
|
|
4072
|
+
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
|
|
4023
4073
|
}
|
|
4024
4074
|
},
|
|
4025
4075
|
{
|
|
@@ -4047,8 +4097,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4047
4097
|
...params.returnLastFrame(),
|
|
4048
4098
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
4049
4099
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
4050
|
-
|
|
4051
|
-
|
|
4100
|
+
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
4101
|
+
// / maxBytes args predate it and are skipped rather than duplicated.
|
|
4102
|
+
...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_25_VIDEO_BOUNDS),
|
|
4103
|
+
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
|
|
4052
4104
|
}
|
|
4053
4105
|
},
|
|
4054
4106
|
{
|
|
@@ -4075,7 +4127,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4075
4127
|
...params.generateAudio(),
|
|
4076
4128
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
4077
4129
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
4078
|
-
...params.videoInputs(10, "Source Videos", true,
|
|
4130
|
+
...params.videoInputs(10, "Source Videos", true, SEEDANCE_25_VIDEO_BOUNDS)
|
|
4079
4131
|
}
|
|
4080
4132
|
},
|
|
4081
4133
|
{
|
|
@@ -4103,7 +4155,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4103
4155
|
...params.generateAudio(),
|
|
4104
4156
|
...p.enum("outputFormat", SEEDANCE_25_FORMATS, "mp4", { label: "Format" }),
|
|
4105
4157
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
4106
|
-
...params.videoInputs(10, "Source Videos", true,
|
|
4158
|
+
...params.videoInputs(10, "Source Videos", true, SEEDANCE_25_VIDEO_BOUNDS)
|
|
4107
4159
|
}
|
|
4108
4160
|
},
|
|
4109
4161
|
{
|
|
@@ -4129,14 +4181,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4129
4181
|
...params.returnLastFrame(),
|
|
4130
4182
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
4131
4183
|
// start/end frame stay on their own named slots.
|
|
4132
|
-
...params.imageInput(9, "Reference Images", false, "reference",
|
|
4133
|
-
...params.videoInputs(3, "Reference Videos", false,
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
...params.audioInputs(3, "Reference Audios"),
|
|
4138
|
-
...params.startFrame(),
|
|
4139
|
-
...params.endFrame()
|
|
4184
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4185
|
+
...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4186
|
+
...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
|
|
4187
|
+
...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
|
|
4188
|
+
...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
|
|
4140
4189
|
}
|
|
4141
4190
|
},
|
|
4142
4191
|
{
|
|
@@ -4166,14 +4215,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4166
4215
|
...params.returnLastFrame(),
|
|
4167
4216
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
4168
4217
|
// start/end frame stay on their own named slots.
|
|
4169
|
-
...params.imageInput(9, "Reference Images", false, "reference",
|
|
4170
|
-
...params.videoInputs(3, "Reference Videos", false,
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
...params.audioInputs(3, "Reference Audios"),
|
|
4175
|
-
...params.startFrame(),
|
|
4176
|
-
...params.endFrame()
|
|
4218
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4219
|
+
...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4220
|
+
...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
|
|
4221
|
+
...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
|
|
4222
|
+
...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
|
|
4177
4223
|
}
|
|
4178
4224
|
},
|
|
4179
4225
|
{
|
|
@@ -4199,14 +4245,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4199
4245
|
...params.returnLastFrame(),
|
|
4200
4246
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
4201
4247
|
// start/end frame stay on their own named slots.
|
|
4202
|
-
...params.imageInput(9, "Reference Images", false, "reference",
|
|
4203
|
-
...params.videoInputs(3, "Reference Videos", false,
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
...params.audioInputs(3, "Reference Audios"),
|
|
4208
|
-
...params.startFrame(),
|
|
4209
|
-
...params.endFrame()
|
|
4248
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4249
|
+
...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4250
|
+
...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
|
|
4251
|
+
...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
|
|
4252
|
+
...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
|
|
4210
4253
|
}
|
|
4211
4254
|
},
|
|
4212
4255
|
{
|
|
@@ -4232,14 +4275,11 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4232
4275
|
...params.returnLastFrame(),
|
|
4233
4276
|
// Reference roles map directly to backend `reference_*` content entries.
|
|
4234
4277
|
// start/end frame stay on their own named slots.
|
|
4235
|
-
...params.imageInput(9, "Reference Images", false, "reference",
|
|
4236
|
-
...params.videoInputs(3, "Reference Videos", false,
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
...params.audioInputs(3, "Reference Audios"),
|
|
4241
|
-
...params.startFrame(),
|
|
4242
|
-
...params.endFrame()
|
|
4278
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4279
|
+
...params.videoInputs(3, "Reference Videos", false, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4280
|
+
...params.audioInputs(3, "Reference Audios", false, SEEDANCE_20_AUDIO_BOUNDS),
|
|
4281
|
+
...params.startFrame("Start Frame", false, SEEDANCE_FRAME_BOUNDS),
|
|
4282
|
+
...params.endFrame("End Frame", SEEDANCE_FRAME_BOUNDS)
|
|
4243
4283
|
}
|
|
4244
4284
|
},
|
|
4245
4285
|
{
|
|
@@ -4262,8 +4302,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4262
4302
|
...params.duration(SEEDANCE_V2_DURATIONS, 5),
|
|
4263
4303
|
...params.generateAudio(),
|
|
4264
4304
|
...params.returnLastFrame(),
|
|
4265
|
-
|
|
4266
|
-
|
|
4305
|
+
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
4306
|
+
// / maxBytes args predate it and are skipped rather than duplicated.
|
|
4307
|
+
...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4308
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
|
|
4267
4309
|
}
|
|
4268
4310
|
},
|
|
4269
4311
|
{
|
|
@@ -4287,8 +4329,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4287
4329
|
...params.duration(SEEDANCE_V2_DURATIONS, 5),
|
|
4288
4330
|
...params.generateAudio(),
|
|
4289
4331
|
...params.returnLastFrame(),
|
|
4290
|
-
|
|
4291
|
-
|
|
4332
|
+
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
4333
|
+
// / maxBytes args predate it and are skipped rather than duplicated.
|
|
4334
|
+
...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4335
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
|
|
4292
4336
|
}
|
|
4293
4337
|
},
|
|
4294
4338
|
{
|
|
@@ -4311,8 +4355,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4311
4355
|
...params.duration(SEEDANCE_V2_DURATIONS, 5),
|
|
4312
4356
|
...params.generateAudio(),
|
|
4313
4357
|
...params.returnLastFrame(),
|
|
4314
|
-
|
|
4315
|
-
|
|
4358
|
+
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
4359
|
+
// / maxBytes args predate it and are skipped rather than duplicated.
|
|
4360
|
+
...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4361
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
|
|
4316
4362
|
}
|
|
4317
4363
|
},
|
|
4318
4364
|
{
|
|
@@ -4335,8 +4381,10 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4335
4381
|
...params.duration(SEEDANCE_V2_DURATIONS, 5),
|
|
4336
4382
|
...params.generateAudio(),
|
|
4337
4383
|
...params.returnLastFrame(),
|
|
4338
|
-
|
|
4339
|
-
|
|
4384
|
+
// Every limit rides in `bounds`; the positional maxDuration / maxShortSide
|
|
4385
|
+
// / maxBytes args predate it and are skipped rather than duplicated.
|
|
4386
|
+
...params.videoInput("Source Video", "reference", true, void 0, void 0, void 0, SEEDANCE_20_VIDEO_BOUNDS),
|
|
4387
|
+
...params.imageInput(9, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS)
|
|
4340
4388
|
}
|
|
4341
4389
|
},
|
|
4342
4390
|
{
|
|
@@ -4358,7 +4406,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4358
4406
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
4359
4407
|
...params.duration(SEEDANCE_V2_DURATIONS, 15),
|
|
4360
4408
|
...params.generateAudio(),
|
|
4361
|
-
...params.videoInputs(3, "Source Videos", true)
|
|
4409
|
+
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
4362
4410
|
}
|
|
4363
4411
|
},
|
|
4364
4412
|
{
|
|
@@ -4381,7 +4429,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4381
4429
|
...params.resolution(["480p", "720p", "1080p", "4k"], "720p"),
|
|
4382
4430
|
...params.duration(SEEDANCE_V2_DURATIONS, 15),
|
|
4383
4431
|
...params.generateAudio(),
|
|
4384
|
-
...params.videoInputs(3, "Source Videos", true)
|
|
4432
|
+
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
4385
4433
|
}
|
|
4386
4434
|
},
|
|
4387
4435
|
{
|
|
@@ -4403,7 +4451,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4403
4451
|
...params.resolution(["480p", "720p"], "720p"),
|
|
4404
4452
|
...params.duration(SEEDANCE_V2_DURATIONS, 15),
|
|
4405
4453
|
...params.generateAudio(),
|
|
4406
|
-
...params.videoInputs(3, "Source Videos", true)
|
|
4454
|
+
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
4407
4455
|
}
|
|
4408
4456
|
},
|
|
4409
4457
|
{
|
|
@@ -4425,7 +4473,7 @@ var { MODELS: MODELS12 } = defineModels("seedance", [
|
|
|
4425
4473
|
...params.resolution(["480p", "720p"], "720p"),
|
|
4426
4474
|
...params.duration(SEEDANCE_V2_DURATIONS, 15),
|
|
4427
4475
|
...params.generateAudio(),
|
|
4428
|
-
...params.videoInputs(3, "Source Videos", true)
|
|
4476
|
+
...params.videoInputs(3, "Source Videos", true, SEEDANCE_20_VIDEO_BOUNDS)
|
|
4429
4477
|
}
|
|
4430
4478
|
},
|
|
4431
4479
|
{
|
|
@@ -5441,6 +5489,24 @@ var FLUX_AR_TO_SIZE = {
|
|
|
5441
5489
|
};
|
|
5442
5490
|
var fluxAspectRatios = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "9:21"];
|
|
5443
5491
|
var fluxResolutions = ["1K", "2K", "4K"];
|
|
5492
|
+
var flux3ImageAspectRatios = [
|
|
5493
|
+
"auto",
|
|
5494
|
+
"21:9",
|
|
5495
|
+
"2:1",
|
|
5496
|
+
"16:9",
|
|
5497
|
+
"3:2",
|
|
5498
|
+
"7:5",
|
|
5499
|
+
"4:3",
|
|
5500
|
+
"5:4",
|
|
5501
|
+
"1:1",
|
|
5502
|
+
"4:5",
|
|
5503
|
+
"3:4",
|
|
5504
|
+
"5:7",
|
|
5505
|
+
"2:3",
|
|
5506
|
+
"9:16",
|
|
5507
|
+
"1:2"
|
|
5508
|
+
];
|
|
5509
|
+
var flux3ImageResolutions = ["512sq", "768sq", "1k", "2k", "4k"];
|
|
5444
5510
|
var buildFluxV2Payload = (modelId) => (ctx) => ({
|
|
5445
5511
|
prompt: ctx.prompt,
|
|
5446
5512
|
model: modelId,
|
|
@@ -5584,6 +5650,44 @@ var { MODELS: MODELS20 } = defineModels("flux", [
|
|
|
5584
5650
|
...params.imageInput(1, "Source Image")
|
|
5585
5651
|
}
|
|
5586
5652
|
},
|
|
5653
|
+
{
|
|
5654
|
+
// Pure pass-through: every Command field already carries the SDK's own
|
|
5655
|
+
// unified name (prompt, imageUrls, aspectRatio, resolution, count,
|
|
5656
|
+
// safetyTolerance), so no payload builder is needed. Like the flux-2
|
|
5657
|
+
// entries this is one workflow for both directions — supplying imageUrls
|
|
5658
|
+
// switches the vendor into editing mode — hence inputType 't2i'.
|
|
5659
|
+
//
|
|
5660
|
+
// The Command's `version` field pins the endpoint contract version
|
|
5661
|
+
// ('latest' today; the vendor will add dated release tags). It selects a
|
|
5662
|
+
// contract rather than shaping a generation, so it is not surfaced as a
|
|
5663
|
+
// param; the vendor default applies.
|
|
5664
|
+
id: "flux-3-image",
|
|
5665
|
+
name: "Flux 3 Image",
|
|
5666
|
+
workflow: "bfl/v1/flux-3-image",
|
|
5667
|
+
mode: "image",
|
|
5668
|
+
inputType: "t2i",
|
|
5669
|
+
// Early-access at the vendor — stage only until it is cleared for prod.
|
|
5670
|
+
release: "preview",
|
|
5671
|
+
addedAt: "2026-09-22",
|
|
5672
|
+
estimatedTime: 75,
|
|
5673
|
+
description: "Generate and edit images with up to 10 references \u2014 multi-reference composition, precise local edits and text rendering, natively up to 4K.",
|
|
5674
|
+
features: [
|
|
5675
|
+
feat("Multi-Image Input", "input"),
|
|
5676
|
+
feat("4K", "resolution")
|
|
5677
|
+
],
|
|
5678
|
+
paramConfig: {
|
|
5679
|
+
...params.prompt(),
|
|
5680
|
+
...params.aspectRatio(flux3ImageAspectRatios, "auto"),
|
|
5681
|
+
...params.resolution(flux3ImageResolutions, "1k"),
|
|
5682
|
+
...params.count(),
|
|
5683
|
+
// Up to 10 references; the first one drives the output ratio while
|
|
5684
|
+
// aspectRatio is 'auto'.
|
|
5685
|
+
...params.imageInput(10, "Reference Images", false, "reference"),
|
|
5686
|
+
// Moderation level: 0 (strict) … 4 (permissive). Narrower than the 0–6
|
|
5687
|
+
// of the FLUX.2 / Kontext endpoints.
|
|
5688
|
+
...p.range("safetyTolerance", 0, 4, 2, { label: "Safety Tolerance" })
|
|
5689
|
+
}
|
|
5690
|
+
},
|
|
5587
5691
|
{
|
|
5588
5692
|
// Single workflow `flux/v1/video` derives its mode from the input it's
|
|
5589
5693
|
// given: none → t2v, keyframe images → i2v, a start video → v2v. No
|
|
@@ -12013,6 +12117,7 @@ var ElevenlabsSfx = "elevenlabs-sfx";
|
|
|
12013
12117
|
var Flux2Flex = "flux-2-flex";
|
|
12014
12118
|
var Flux2Max = "flux-2-max";
|
|
12015
12119
|
var Flux2Pro = "flux-2-pro";
|
|
12120
|
+
var Flux3Image = "flux-3-image";
|
|
12016
12121
|
var Flux3Video = "flux-3-video";
|
|
12017
12122
|
var FluxKontextMax = "flux-kontext-max";
|
|
12018
12123
|
var FluxKontextPro = "flux-kontext-pro";
|
|
@@ -12252,6 +12357,7 @@ var Models = {
|
|
|
12252
12357
|
Flux2Flex,
|
|
12253
12358
|
Flux2Max,
|
|
12254
12359
|
Flux2Pro,
|
|
12360
|
+
Flux3Image,
|
|
12255
12361
|
Flux3Video,
|
|
12256
12362
|
FluxKontextMax,
|
|
12257
12363
|
FluxKontextPro,
|