@picsart/ai-sdk 3.26.0 → 3.28.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 +1306 -1073
- package/index.d.ts +14 -0
- package/index.js +99 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -69,6 +69,14 @@ type ModelInputById = {
|
|
|
69
69
|
imageUrls: [string, ...string[]];
|
|
70
70
|
audioUrl: string;
|
|
71
71
|
};
|
|
72
|
+
"bytedance-video-enhance": {
|
|
73
|
+
videoUrl: string;
|
|
74
|
+
quality?: "standard" | "professional";
|
|
75
|
+
resolution?: "source" | "720p" | "1080p" | "2k" | "4k" | "8k";
|
|
76
|
+
fps?: 30 | 60 | 120;
|
|
77
|
+
scene?: "common" | "ugc" | "short_series" | "aigc" | "old_film";
|
|
78
|
+
bitrateLevel?: "low" | "medium" | "high";
|
|
79
|
+
};
|
|
72
80
|
"bytedance-video-upscaler": {
|
|
73
81
|
videoUrl: string;
|
|
74
82
|
};
|
|
@@ -802,6 +810,10 @@ type ModelInputById = {
|
|
|
802
810
|
aspectRatio?: "1:1" | "5:3" | "3:5" | "4:3" | "3:4";
|
|
803
811
|
imageUrls?: string[];
|
|
804
812
|
};
|
|
813
|
+
"picsart-hidream-t2i": {
|
|
814
|
+
prompt: string;
|
|
815
|
+
aspectRatio?: "1:1" | "5:3" | "3:5" | "4:3" | "3:4";
|
|
816
|
+
};
|
|
805
817
|
"picsart-qwen-image-edit": {
|
|
806
818
|
imageUrls: [string, ...string[]];
|
|
807
819
|
prompt: string;
|
|
@@ -2133,6 +2145,7 @@ interface ModelFilter {
|
|
|
2133
2145
|
declare const Models: {
|
|
2134
2146
|
readonly AsyncFlashV1: "async-flash-v1";
|
|
2135
2147
|
readonly BytedanceOmnihumanV15: "bytedance-omnihuman-v1.5";
|
|
2148
|
+
readonly BytedanceVideoEnhance: "bytedance-video-enhance";
|
|
2136
2149
|
readonly BytedanceVideoUpscaler: "bytedance-video-upscaler";
|
|
2137
2150
|
readonly ClaudeHaiku45: "claude-haiku-4-5";
|
|
2138
2151
|
readonly ClaudeOpus48: "claude-opus-4-8";
|
|
@@ -2243,6 +2256,7 @@ declare const Models: {
|
|
|
2243
2256
|
readonly PicsartChangeBg: "picsart-change-bg";
|
|
2244
2257
|
readonly PicsartEnhance: "picsart-enhance";
|
|
2245
2258
|
readonly PicsartFlux2Klein: "picsart-flux-2-klein";
|
|
2259
|
+
readonly PicsartHidreamT2i: "picsart-hidream-t2i";
|
|
2246
2260
|
readonly PicsartQwenImageEdit: "picsart-qwen-image-edit";
|
|
2247
2261
|
readonly PicsartQwenImageEditAngle: "picsart-qwen-image-edit-angle";
|
|
2248
2262
|
readonly PicsartQwenMakeup: "picsart-qwen-makeup";
|
package/index.js
CHANGED
|
@@ -2652,6 +2652,22 @@ var { MODELS: MODELS5 } = defineModels("ovi", [
|
|
|
2652
2652
|
]);
|
|
2653
2653
|
|
|
2654
2654
|
// src/vendors/catalog/bytedance.ts
|
|
2655
|
+
var BYTEDANCE_ENHANCE_RESOLUTION_OPTIONS = [
|
|
2656
|
+
"source",
|
|
2657
|
+
"720p",
|
|
2658
|
+
"1080p",
|
|
2659
|
+
"2k",
|
|
2660
|
+
"4k",
|
|
2661
|
+
"8k"
|
|
2662
|
+
];
|
|
2663
|
+
var BYTEDANCE_ENHANCE_FPS_OPTIONS = [30, 60, 120];
|
|
2664
|
+
var BYTEDANCE_ENHANCE_SCENE_OPTIONS = [
|
|
2665
|
+
"common",
|
|
2666
|
+
"ugc",
|
|
2667
|
+
"short_series",
|
|
2668
|
+
"aigc",
|
|
2669
|
+
"old_film"
|
|
2670
|
+
];
|
|
2655
2671
|
var buildBytedanceUpscalerPayload = (ctx) => ({
|
|
2656
2672
|
video_url: ctx.videoUrl,
|
|
2657
2673
|
target_resolution: "1080p"
|
|
@@ -2694,9 +2710,67 @@ var { MODELS: MODELS6 } = defineModels("bytedance", [
|
|
|
2694
2710
|
...params.imageInput(1, "Portrait Image", true),
|
|
2695
2711
|
...params.audioInput("Audio Track", true)
|
|
2696
2712
|
}
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
id: "bytedance-video-enhance",
|
|
2716
|
+
name: "ByteDance Video Enhance",
|
|
2717
|
+
addedAt: "2026-07-29",
|
|
2718
|
+
workflow: "bytedance/video-enhance",
|
|
2719
|
+
// Measured on the live API: 303s end-to-end for a 5s 720p→1080p@60fps
|
|
2720
|
+
// professional run. Wall time scales with source duration, so this is a
|
|
2721
|
+
// representative short-clip figure, not a ceiling.
|
|
2722
|
+
estimatedTime: 300,
|
|
2723
|
+
mode: "video",
|
|
2724
|
+
inputType: "v2v",
|
|
2725
|
+
// The pa-bytedance-pluggable-worker MR adding this task is still open, so
|
|
2726
|
+
// the workflow is not deployed. Flip this off once the worker ships.
|
|
2727
|
+
disabled: true,
|
|
2728
|
+
description: "Denoise, color-correct and super-resolve existing footage up to 8K, with frame-rate conversion.",
|
|
2729
|
+
features: [feat("Video Required", "input"), feat("Up to 8K", "resolution"), feat("Enhance", "quality")],
|
|
2730
|
+
paramConfig: {
|
|
2731
|
+
...params.videoInput("Source Video", "asset", true),
|
|
2732
|
+
...p.quality(["standard", "professional"], "standard"),
|
|
2733
|
+
...p.enum("resolution", [...BYTEDANCE_ENHANCE_RESOLUTION_OPTIONS], "source"),
|
|
2734
|
+
// Always sent — the backend rejects a request it cannot price, and the
|
|
2735
|
+
// source frame rate is not discoverable from file metadata.
|
|
2736
|
+
...p.enum("fps", [...BYTEDANCE_ENHANCE_FPS_OPTIONS], 30),
|
|
2737
|
+
...p.enum("scene", [...BYTEDANCE_ENHANCE_SCENE_OPTIONS], "common"),
|
|
2738
|
+
...p.enum("bitrateLevel", ["low", "medium", "high"], "medium")
|
|
2739
|
+
},
|
|
2740
|
+
constraints: [
|
|
2741
|
+
{
|
|
2742
|
+
when: { quality: { is: "professional" } },
|
|
2743
|
+
then: { scene: { disabled: true, reason: "Scene presets only apply to the standard version" } }
|
|
2744
|
+
}
|
|
2745
|
+
]
|
|
2697
2746
|
}
|
|
2698
2747
|
]);
|
|
2699
2748
|
|
|
2749
|
+
// src/vendors/catalog/bytedance.payloads.ts
|
|
2750
|
+
var DEFAULT_TOOL_VERSION = "standard";
|
|
2751
|
+
var buildBytedanceVideoEnhancePayload = (input) => {
|
|
2752
|
+
const toolVersion = input.quality ?? DEFAULT_TOOL_VERSION;
|
|
2753
|
+
return {
|
|
2754
|
+
video_url: input.videoUrl,
|
|
2755
|
+
tool_version: toolVersion,
|
|
2756
|
+
bitrate_level: input.bitrateLevel ?? "medium",
|
|
2757
|
+
// Always sent: the backend resolves the billing tier before generating and
|
|
2758
|
+
// rejects the request (`billing_undetermined`) when the output frame rate is
|
|
2759
|
+
// unknown — it cannot read the source frame rate from file metadata.
|
|
2760
|
+
fps: input.fps ?? 30,
|
|
2761
|
+
// `source` is the SDK-only sentinel for "keep the source resolution"; the
|
|
2762
|
+
// backend expresses that by omitting the field. Sending an explicit tier
|
|
2763
|
+
// instead would silently rescale (and reprice) every request.
|
|
2764
|
+
...input.resolution && input.resolution !== "source" ? { resolution: input.resolution } : {},
|
|
2765
|
+
// The vendor ignores `scene` unless tool_version is standard, and the
|
|
2766
|
+
// backend validator rejects the combination outright.
|
|
2767
|
+
...input.scene && toolVersion === DEFAULT_TOOL_VERSION ? { scene: input.scene } : {}
|
|
2768
|
+
};
|
|
2769
|
+
};
|
|
2770
|
+
registerPayloads(MODELS6, {
|
|
2771
|
+
"bytedance-video-enhance": buildBytedanceVideoEnhancePayload
|
|
2772
|
+
});
|
|
2773
|
+
|
|
2700
2774
|
// src/vendors/catalog/videography.ts
|
|
2701
2775
|
var buildVideographyPayload = (ctx) => ({
|
|
2702
2776
|
imageUrl: ctx.imageUrls?.[0]
|
|
@@ -7701,6 +7775,27 @@ var { MODELS: MODELS32 } = defineModels("picsart", [
|
|
|
7701
7775
|
...params.prompt(),
|
|
7702
7776
|
...params.aspectRatio(Object.keys(SANA_AR_TO_SIZE), "1:1")
|
|
7703
7777
|
}
|
|
7778
|
+
},
|
|
7779
|
+
{
|
|
7780
|
+
id: "picsart-hidream-t2i",
|
|
7781
|
+
name: "Picsart HiDream T2I",
|
|
7782
|
+
addedAt: "2026-07-29",
|
|
7783
|
+
workflow: "pcp/v1/hidream-t2i",
|
|
7784
|
+
estimatedTime: 7,
|
|
7785
|
+
// measured on the backend service; p95 ~6.5s
|
|
7786
|
+
mode: "image",
|
|
7787
|
+
inputType: "t2i",
|
|
7788
|
+
release: "preview",
|
|
7789
|
+
description: "Fast text-to-image generation powered by HiDream-Image-O1",
|
|
7790
|
+
features: [feat("Text-to-Image", "input")],
|
|
7791
|
+
paramConfig: {
|
|
7792
|
+
...params.prompt(),
|
|
7793
|
+
// The worker accepts any "W:H"; this list mirrors what Flux 2 Pro exposes.
|
|
7794
|
+
// Deliberately not derived from FLUX_AR_TO_SIZE: HiDream passes the ratio
|
|
7795
|
+
// straight through to the task, so its options must not drift with changes
|
|
7796
|
+
// to Flux's ratio-to-size map.
|
|
7797
|
+
...params.aspectRatio(["1:1", "5:3", "3:5", "4:3", "3:4"], "1:1")
|
|
7798
|
+
}
|
|
7704
7799
|
}
|
|
7705
7800
|
]);
|
|
7706
7801
|
|
|
@@ -10269,6 +10364,7 @@ var catalog = {
|
|
|
10269
10364
|
// src/generated/model-constants.ts
|
|
10270
10365
|
var AsyncFlashV1 = "async-flash-v1";
|
|
10271
10366
|
var BytedanceOmnihumanV15 = "bytedance-omnihuman-v1.5";
|
|
10367
|
+
var BytedanceVideoEnhance = "bytedance-video-enhance";
|
|
10272
10368
|
var BytedanceVideoUpscaler = "bytedance-video-upscaler";
|
|
10273
10369
|
var ClaudeHaiku45 = "claude-haiku-4-5";
|
|
10274
10370
|
var ClaudeOpus48 = "claude-opus-4-8";
|
|
@@ -10379,6 +10475,7 @@ var Ovi = "ovi";
|
|
|
10379
10475
|
var PicsartChangeBg = "picsart-change-bg";
|
|
10380
10476
|
var PicsartEnhance = "picsart-enhance";
|
|
10381
10477
|
var PicsartFlux2Klein = "picsart-flux-2-klein";
|
|
10478
|
+
var PicsartHidreamT2i = "picsart-hidream-t2i";
|
|
10382
10479
|
var PicsartQwenImageEdit = "picsart-qwen-image-edit";
|
|
10383
10480
|
var PicsartQwenImageEditAngle = "picsart-qwen-image-edit-angle";
|
|
10384
10481
|
var PicsartQwenMakeup = "picsart-qwen-makeup";
|
|
@@ -10465,6 +10562,7 @@ var Wan27VideoEdit = "wan-2.7-video-edit";
|
|
|
10465
10562
|
var Models = {
|
|
10466
10563
|
AsyncFlashV1,
|
|
10467
10564
|
BytedanceOmnihumanV15,
|
|
10565
|
+
BytedanceVideoEnhance,
|
|
10468
10566
|
BytedanceVideoUpscaler,
|
|
10469
10567
|
ClaudeHaiku45,
|
|
10470
10568
|
ClaudeOpus48,
|
|
@@ -10575,6 +10673,7 @@ var Models = {
|
|
|
10575
10673
|
PicsartChangeBg,
|
|
10576
10674
|
PicsartEnhance,
|
|
10577
10675
|
PicsartFlux2Klein,
|
|
10676
|
+
PicsartHidreamT2i,
|
|
10578
10677
|
PicsartQwenImageEdit,
|
|
10579
10678
|
PicsartQwenImageEditAngle,
|
|
10580
10679
|
PicsartQwenMakeup,
|