@picsart/ai-sdk 6.5.0 → 6.6.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 +9 -0
- package/index.js +58 -0
- 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";
|
|
@@ -2929,6 +2937,7 @@ declare const Models: {
|
|
|
2929
2937
|
readonly Flux2Flex: "flux-2-flex";
|
|
2930
2938
|
readonly Flux2Max: "flux-2-max";
|
|
2931
2939
|
readonly Flux2Pro: "flux-2-pro";
|
|
2940
|
+
readonly Flux3Image: "flux-3-image";
|
|
2932
2941
|
readonly Flux3Video: "flux-3-video";
|
|
2933
2942
|
readonly FluxKontextMax: "flux-kontext-max";
|
|
2934
2943
|
readonly FluxKontextPro: "flux-kontext-pro";
|
package/index.js
CHANGED
|
@@ -5441,6 +5441,24 @@ var FLUX_AR_TO_SIZE = {
|
|
|
5441
5441
|
};
|
|
5442
5442
|
var fluxAspectRatios = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "9:21"];
|
|
5443
5443
|
var fluxResolutions = ["1K", "2K", "4K"];
|
|
5444
|
+
var flux3ImageAspectRatios = [
|
|
5445
|
+
"auto",
|
|
5446
|
+
"21:9",
|
|
5447
|
+
"2:1",
|
|
5448
|
+
"16:9",
|
|
5449
|
+
"3:2",
|
|
5450
|
+
"7:5",
|
|
5451
|
+
"4:3",
|
|
5452
|
+
"5:4",
|
|
5453
|
+
"1:1",
|
|
5454
|
+
"4:5",
|
|
5455
|
+
"3:4",
|
|
5456
|
+
"5:7",
|
|
5457
|
+
"2:3",
|
|
5458
|
+
"9:16",
|
|
5459
|
+
"1:2"
|
|
5460
|
+
];
|
|
5461
|
+
var flux3ImageResolutions = ["512sq", "768sq", "1k", "2k", "4k"];
|
|
5444
5462
|
var buildFluxV2Payload = (modelId) => (ctx) => ({
|
|
5445
5463
|
prompt: ctx.prompt,
|
|
5446
5464
|
model: modelId,
|
|
@@ -5584,6 +5602,44 @@ var { MODELS: MODELS20 } = defineModels("flux", [
|
|
|
5584
5602
|
...params.imageInput(1, "Source Image")
|
|
5585
5603
|
}
|
|
5586
5604
|
},
|
|
5605
|
+
{
|
|
5606
|
+
// Pure pass-through: every Command field already carries the SDK's own
|
|
5607
|
+
// unified name (prompt, imageUrls, aspectRatio, resolution, count,
|
|
5608
|
+
// safetyTolerance), so no payload builder is needed. Like the flux-2
|
|
5609
|
+
// entries this is one workflow for both directions — supplying imageUrls
|
|
5610
|
+
// switches the vendor into editing mode — hence inputType 't2i'.
|
|
5611
|
+
//
|
|
5612
|
+
// The Command's `version` field pins the endpoint contract version
|
|
5613
|
+
// ('latest' today; the vendor will add dated release tags). It selects a
|
|
5614
|
+
// contract rather than shaping a generation, so it is not surfaced as a
|
|
5615
|
+
// param; the vendor default applies.
|
|
5616
|
+
id: "flux-3-image",
|
|
5617
|
+
name: "Flux 3 Image",
|
|
5618
|
+
workflow: "bfl/v1/flux-3-image",
|
|
5619
|
+
mode: "image",
|
|
5620
|
+
inputType: "t2i",
|
|
5621
|
+
// Early-access at the vendor — stage only until it is cleared for prod.
|
|
5622
|
+
release: "preview",
|
|
5623
|
+
addedAt: "2026-09-22",
|
|
5624
|
+
estimatedTime: 75,
|
|
5625
|
+
description: "Generate and edit images with up to 10 references \u2014 multi-reference composition, precise local edits and text rendering, natively up to 4K.",
|
|
5626
|
+
features: [
|
|
5627
|
+
feat("Multi-Image Input", "input"),
|
|
5628
|
+
feat("4K", "resolution")
|
|
5629
|
+
],
|
|
5630
|
+
paramConfig: {
|
|
5631
|
+
...params.prompt(),
|
|
5632
|
+
...params.aspectRatio(flux3ImageAspectRatios, "auto"),
|
|
5633
|
+
...params.resolution(flux3ImageResolutions, "1k"),
|
|
5634
|
+
...params.count(),
|
|
5635
|
+
// Up to 10 references; the first one drives the output ratio while
|
|
5636
|
+
// aspectRatio is 'auto'.
|
|
5637
|
+
...params.imageInput(10, "Reference Images", false, "reference"),
|
|
5638
|
+
// Moderation level: 0 (strict) … 4 (permissive). Narrower than the 0–6
|
|
5639
|
+
// of the FLUX.2 / Kontext endpoints.
|
|
5640
|
+
...p.range("safetyTolerance", 0, 4, 2, { label: "Safety Tolerance" })
|
|
5641
|
+
}
|
|
5642
|
+
},
|
|
5587
5643
|
{
|
|
5588
5644
|
// Single workflow `flux/v1/video` derives its mode from the input it's
|
|
5589
5645
|
// given: none → t2v, keyframe images → i2v, a start video → v2v. No
|
|
@@ -12013,6 +12069,7 @@ var ElevenlabsSfx = "elevenlabs-sfx";
|
|
|
12013
12069
|
var Flux2Flex = "flux-2-flex";
|
|
12014
12070
|
var Flux2Max = "flux-2-max";
|
|
12015
12071
|
var Flux2Pro = "flux-2-pro";
|
|
12072
|
+
var Flux3Image = "flux-3-image";
|
|
12016
12073
|
var Flux3Video = "flux-3-video";
|
|
12017
12074
|
var FluxKontextMax = "flux-kontext-max";
|
|
12018
12075
|
var FluxKontextPro = "flux-kontext-pro";
|
|
@@ -12252,6 +12309,7 @@ var Models = {
|
|
|
12252
12309
|
Flux2Flex,
|
|
12253
12310
|
Flux2Max,
|
|
12254
12311
|
Flux2Pro,
|
|
12312
|
+
Flux3Image,
|
|
12255
12313
|
Flux3Video,
|
|
12256
12314
|
FluxKontextMax,
|
|
12257
12315
|
FluxKontextPro,
|