@picsart/ai-sdk 6.30.0 → 6.32.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 +705 -689
- package/index.d.ts +15 -2
- package/index.js +76 -9
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -168,6 +168,10 @@ type ModelInputById = {
|
|
|
168
168
|
prompt: string;
|
|
169
169
|
imageUrls?: string[];
|
|
170
170
|
};
|
|
171
|
+
"claude-haiku-5-5": {
|
|
172
|
+
prompt: string;
|
|
173
|
+
imageUrls?: string[];
|
|
174
|
+
};
|
|
171
175
|
"claude-opus-4-8": {
|
|
172
176
|
prompt: string;
|
|
173
177
|
imageUrls?: string[];
|
|
@@ -203,6 +207,13 @@ type ModelInputById = {
|
|
|
203
207
|
duration?: number;
|
|
204
208
|
manifestDisclosure?: boolean;
|
|
205
209
|
};
|
|
210
|
+
"depth-anything-video": {
|
|
211
|
+
videoUrl: string;
|
|
212
|
+
model?: "VDA-Small" | "VDA-Base" | "VDA-Large";
|
|
213
|
+
colormap?: "grayscale" | "turbo" | "inferno" | "magma" | "viridis";
|
|
214
|
+
resolution?: "auto" | "360p" | "480p" | "720p" | "1080p";
|
|
215
|
+
sideBySide?: boolean;
|
|
216
|
+
};
|
|
206
217
|
"eleven-audio-isolation": {
|
|
207
218
|
audioUrl: string;
|
|
208
219
|
};
|
|
@@ -2063,7 +2074,7 @@ type ModelInputById = {
|
|
|
2063
2074
|
type TypedModelId = keyof ModelInputById;
|
|
2064
2075
|
type ModelInput<M extends TypedModelId> = ModelInputById[M];
|
|
2065
2076
|
/** IDs of text-generation (LLM) models — narrows generateText(). */
|
|
2066
|
-
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol";
|
|
2077
|
+
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-haiku-5-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra" | "gpt-6-luna" | "gpt-6-sol";
|
|
2067
2078
|
type TextModelInputById = Pick<ModelInputById, TextModelId>;
|
|
2068
2079
|
/** IDs of structured-output (json-mode) models — narrows run()'s result type. */
|
|
2069
2080
|
type JsonModelId = "typesafe-evaluate";
|
|
@@ -2468,7 +2479,7 @@ interface ModelFilter {
|
|
|
2468
2479
|
release?: ReleaseTag[];
|
|
2469
2480
|
}
|
|
2470
2481
|
|
|
2471
|
-
type AppProvider = 'picsart' | 'google' | 'kling' | 'grok' | 'openai' | 'flux' | 'ideogram' | 'elevenlabs' | 'minimax' | 'wan' | 'seedance' | 'ltx' | 'seedream' | 'seedaudio' | 'hunyuan' | 'pika' | 'runway' | 'luma' | 'ovi' | 'creatify' | 'veed' | 'bytedance' | 'qwen' | 'reve' | 'recraft' | 'videography' | 'topaz' | 'heygen' | 'happyhorse' | 'pixverse' | 'anthropic' | 'async' | 'captionsai' | 'meta' | 'typesafe';
|
|
2482
|
+
type AppProvider = 'picsart' | 'google' | 'kling' | 'grok' | 'openai' | 'flux' | 'ideogram' | 'elevenlabs' | 'minimax' | 'wan' | 'seedance' | 'ltx' | 'seedream' | 'seedaudio' | 'hunyuan' | 'pika' | 'runway' | 'luma' | 'ovi' | 'creatify' | 'veed' | 'bytedance' | 'qwen' | 'reve' | 'recraft' | 'videography' | 'topaz' | 'heygen' | 'happyhorse' | 'pixverse' | 'anthropic' | 'async' | 'captionsai' | 'meta' | 'typesafe' | 'depth-anything';
|
|
2472
2483
|
/** Provider used by model definitions. */
|
|
2473
2484
|
type Provider = AppProvider;
|
|
2474
2485
|
/** App generation modes. `json` marks structured-output models (judges,
|
|
@@ -3346,6 +3357,7 @@ declare const Models: {
|
|
|
3346
3357
|
readonly ClaudeFable5: "claude-fable-5";
|
|
3347
3358
|
readonly ClaudeFable51: "claude-fable-5-1";
|
|
3348
3359
|
readonly ClaudeHaiku45: "claude-haiku-4-5";
|
|
3360
|
+
readonly ClaudeHaiku55: "claude-haiku-5-5";
|
|
3349
3361
|
readonly ClaudeOpus48: "claude-opus-4-8";
|
|
3350
3362
|
readonly ClaudeOpus5: "claude-opus-5";
|
|
3351
3363
|
readonly ClaudeSonnet45: "claude-sonnet-4-5";
|
|
@@ -3353,6 +3365,7 @@ declare const Models: {
|
|
|
3353
3365
|
readonly ClaudeSonnet5: "claude-sonnet-5";
|
|
3354
3366
|
readonly CreatifyAurora: "creatify-aurora";
|
|
3355
3367
|
readonly CreatifyBoreal: "creatify-boreal";
|
|
3368
|
+
readonly DepthAnythingVideo: "depth-anything-video";
|
|
3356
3369
|
readonly ElevenAudioIsolation: "eleven-audio-isolation";
|
|
3357
3370
|
readonly ElevenDialogueV4: "eleven-dialogue-v4";
|
|
3358
3371
|
readonly ElevenDubbing: "eleven-dubbing";
|
package/index.js
CHANGED
|
@@ -795,7 +795,8 @@ var providers = {
|
|
|
795
795
|
async: { color: "#5E5CE6", label: "AA", name: "Async AI" },
|
|
796
796
|
captionsai: { color: "#1D1F20", label: "MR", name: "Mirage" },
|
|
797
797
|
meta: { color: "#0081FB", label: "MT", name: "Meta" },
|
|
798
|
-
typesafe: { color: "#3E6B8F", label: "TS", name: "TypeSafe" }
|
|
798
|
+
typesafe: { color: "#3E6B8F", label: "TS", name: "TypeSafe" },
|
|
799
|
+
"depth-anything": { color: "#0EA5E9", label: "DA", name: "Depth Anything" }
|
|
799
800
|
};
|
|
800
801
|
|
|
801
802
|
// src/core/descriptors/presets.ts
|
|
@@ -1173,7 +1174,7 @@ var passthroughPayload = (paramConfig) => (ctx) => {
|
|
|
1173
1174
|
return payload;
|
|
1174
1175
|
};
|
|
1175
1176
|
function defineModels(provider, configs) {
|
|
1176
|
-
const
|
|
1177
|
+
const MODELS40 = [];
|
|
1177
1178
|
for (const c of configs) {
|
|
1178
1179
|
const prov = c.provider ?? provider;
|
|
1179
1180
|
const resolvedPayload = c.buildPayload ?? passthroughPayload(c.paramConfig);
|
|
@@ -1209,19 +1210,19 @@ function defineModels(provider, configs) {
|
|
|
1209
1210
|
if (c.constraints !== void 0) model.constraints = c.constraints;
|
|
1210
1211
|
const contract = createModelContract(model);
|
|
1211
1212
|
model.outputSchema = c.outputSchema ?? contract.output;
|
|
1212
|
-
|
|
1213
|
+
MODELS40.push(model);
|
|
1213
1214
|
}
|
|
1214
|
-
return { MODELS:
|
|
1215
|
+
return { MODELS: MODELS40 };
|
|
1215
1216
|
}
|
|
1216
|
-
function registerPayloads(
|
|
1217
|
+
function registerPayloads(MODELS40, payloads) {
|
|
1217
1218
|
for (const [id, builder] of Object.entries(payloads)) {
|
|
1218
|
-
const model =
|
|
1219
|
+
const model = MODELS40.find((m) => m.id === id);
|
|
1219
1220
|
if (model) model.buildPayload = builder;
|
|
1220
1221
|
}
|
|
1221
1222
|
}
|
|
1222
|
-
function registerEditPayloads(
|
|
1223
|
+
function registerEditPayloads(MODELS40, payloads) {
|
|
1223
1224
|
for (const [id, builder] of Object.entries(payloads)) {
|
|
1224
|
-
const model =
|
|
1225
|
+
const model = MODELS40.find((m) => m.id === id);
|
|
1225
1226
|
if (model) model.buildEditPayload = builder;
|
|
1226
1227
|
}
|
|
1227
1228
|
}
|
|
@@ -10148,6 +10149,19 @@ var { MODELS: ANTHROPIC } = defineModels("anthropic", [
|
|
|
10148
10149
|
features: [feat("Vision", "input")],
|
|
10149
10150
|
paramConfig: { ...params.prompt(), ...params.imageInput(8, "Images") }
|
|
10150
10151
|
},
|
|
10152
|
+
{
|
|
10153
|
+
id: "claude-haiku-5-5",
|
|
10154
|
+
name: "Claude Haiku 5.5",
|
|
10155
|
+
workflow: "claude/v1/messages",
|
|
10156
|
+
addedAt: "2026-10-09",
|
|
10157
|
+
estimatedTime: 4,
|
|
10158
|
+
mode: "text",
|
|
10159
|
+
inputType: "i2t",
|
|
10160
|
+
badge: ["fast"],
|
|
10161
|
+
description: "Next-generation Haiku \u2014 fast, lightweight Claude for high-volume text tasks.",
|
|
10162
|
+
features: [feat("Vision", "input")],
|
|
10163
|
+
paramConfig: { ...params.prompt(), ...params.imageInput(8, "Images") }
|
|
10164
|
+
},
|
|
10151
10165
|
{
|
|
10152
10166
|
id: "claude-haiku-4-5",
|
|
10153
10167
|
name: "Claude Haiku 4.5",
|
|
@@ -10568,6 +10582,7 @@ registerPayloads(MODELS35, {
|
|
|
10568
10582
|
"claude-sonnet-5": buildClaudePayload("claude-sonnet-5"),
|
|
10569
10583
|
"claude-sonnet-4-6": buildClaudePayload("claude-sonnet-4-6"),
|
|
10570
10584
|
"claude-sonnet-4-5": buildClaudePayload("claude-sonnet-4-5"),
|
|
10585
|
+
"claude-haiku-5-5": buildClaudePayload("claude-haiku-5-5"),
|
|
10571
10586
|
"claude-haiku-4-5": buildClaudePayload("claude-haiku-4-5"),
|
|
10572
10587
|
"gpt-6-astra": buildOpenAiPayload("gpt-6-astra"),
|
|
10573
10588
|
"gpt-6-sol": buildOpenAiPayload("gpt-6-sol"),
|
|
@@ -10781,6 +10796,53 @@ registerPayloads(MODELS38, {
|
|
|
10781
10796
|
"typesafe-evaluate": buildEvaluatePayload
|
|
10782
10797
|
});
|
|
10783
10798
|
|
|
10799
|
+
// src/vendors/catalog/depth-anything.ts
|
|
10800
|
+
var { MODELS: MODELS39 } = defineModels("depth-anything", [
|
|
10801
|
+
{
|
|
10802
|
+
// Billed per second of the source clip at one flat rate, so none of the
|
|
10803
|
+
// knobs below changes the price. `max_frames` / `output_fps` are left to
|
|
10804
|
+
// the vendor defaults on purpose: a frame cap would shorten the processed
|
|
10805
|
+
// clip while billing still counts the whole source.
|
|
10806
|
+
id: "depth-anything-video",
|
|
10807
|
+
name: "Video Depth Anything",
|
|
10808
|
+
modelId: "fal-ai-depth-anything-video",
|
|
10809
|
+
addedAt: "2026-10-08",
|
|
10810
|
+
workflow: "depth-anything-video",
|
|
10811
|
+
estimatedTime: 60,
|
|
10812
|
+
mode: "video",
|
|
10813
|
+
inputType: "v2v",
|
|
10814
|
+
description: "Estimate temporally consistent depth for every frame of a video and render it as a depth-map video \u2014 grayscale or a color map, optionally side by side with the source.",
|
|
10815
|
+
features: [
|
|
10816
|
+
feat("Depth Map", "characteristic"),
|
|
10817
|
+
feat("Video Input", "input"),
|
|
10818
|
+
feat("1080p", "resolution")
|
|
10819
|
+
],
|
|
10820
|
+
paramConfig: {
|
|
10821
|
+
...params.videoInput("Source Video", "asset", true),
|
|
10822
|
+
// Small is fastest, Large is the most accurate.
|
|
10823
|
+
...p.enum("model", ["VDA-Small", "VDA-Base", "VDA-Large"], "VDA-Large", { label: "Model Size" }),
|
|
10824
|
+
...p.enum("colormap", ["grayscale", "turbo", "inferno", "magma", "viridis"], "grayscale", { label: "Color Map" }),
|
|
10825
|
+
// 'auto' keeps the source resolution, capped at 1080p.
|
|
10826
|
+
...params.resolution(["auto", "360p", "480p", "720p", "1080p"], "auto"),
|
|
10827
|
+
...p.boolean("sideBySide", false, "Side by Side")
|
|
10828
|
+
}
|
|
10829
|
+
}
|
|
10830
|
+
]);
|
|
10831
|
+
|
|
10832
|
+
// src/vendors/catalog/depth-anything.payloads.ts
|
|
10833
|
+
var buildDepthAnythingVideoPayload = (input) => ({
|
|
10834
|
+
video_url: input.videoUrl,
|
|
10835
|
+
model: input.model ?? "VDA-Large",
|
|
10836
|
+
colormap: input.colormap ?? "grayscale",
|
|
10837
|
+
resolution: input.resolution ?? "auto",
|
|
10838
|
+
side_by_side: input.sideBySide ?? false,
|
|
10839
|
+
// The .npz export is a second, non-media output the SDK has no slot for.
|
|
10840
|
+
include_raw_depths: false
|
|
10841
|
+
});
|
|
10842
|
+
registerPayloads(MODELS39, {
|
|
10843
|
+
"depth-anything-video": buildDepthAnythingVideoPayload
|
|
10844
|
+
});
|
|
10845
|
+
|
|
10784
10846
|
// src/vendors/catalog/creatify.payloads.ts
|
|
10785
10847
|
var buildCreatifyBorealPayload = (input) => ({
|
|
10786
10848
|
prompt: input.prompt,
|
|
@@ -10936,7 +10998,8 @@ var ALL_MODELS = [
|
|
|
10936
10998
|
...MODELS35,
|
|
10937
10999
|
...MODELS36,
|
|
10938
11000
|
...MODELS37,
|
|
10939
|
-
...MODELS38
|
|
11001
|
+
...MODELS38,
|
|
11002
|
+
...MODELS39
|
|
10940
11003
|
];
|
|
10941
11004
|
var getModelsByMode = (mode, includeHidden = false) => ALL_MODELS.filter((m) => m.mode === mode && (includeHidden || isVisibleForReleases(m)));
|
|
10942
11005
|
|
|
@@ -13641,6 +13704,7 @@ var CaptionsaiVideoCaptions = "captionsai-video-captions";
|
|
|
13641
13704
|
var ClaudeFable5 = "claude-fable-5";
|
|
13642
13705
|
var ClaudeFable51 = "claude-fable-5-1";
|
|
13643
13706
|
var ClaudeHaiku45 = "claude-haiku-4-5";
|
|
13707
|
+
var ClaudeHaiku55 = "claude-haiku-5-5";
|
|
13644
13708
|
var ClaudeOpus48 = "claude-opus-4-8";
|
|
13645
13709
|
var ClaudeOpus5 = "claude-opus-5";
|
|
13646
13710
|
var ClaudeSonnet45 = "claude-sonnet-4-5";
|
|
@@ -13648,6 +13712,7 @@ var ClaudeSonnet46 = "claude-sonnet-4-6";
|
|
|
13648
13712
|
var ClaudeSonnet5 = "claude-sonnet-5";
|
|
13649
13713
|
var CreatifyAurora = "creatify-aurora";
|
|
13650
13714
|
var CreatifyBoreal = "creatify-boreal";
|
|
13715
|
+
var DepthAnythingVideo = "depth-anything-video";
|
|
13651
13716
|
var ElevenAudioIsolation = "eleven-audio-isolation";
|
|
13652
13717
|
var ElevenDialogueV4 = "eleven-dialogue-v4";
|
|
13653
13718
|
var ElevenDubbing = "eleven-dubbing";
|
|
@@ -13899,6 +13964,7 @@ var Models = {
|
|
|
13899
13964
|
ClaudeFable5,
|
|
13900
13965
|
ClaudeFable51,
|
|
13901
13966
|
ClaudeHaiku45,
|
|
13967
|
+
ClaudeHaiku55,
|
|
13902
13968
|
ClaudeOpus48,
|
|
13903
13969
|
ClaudeOpus5,
|
|
13904
13970
|
ClaudeSonnet45,
|
|
@@ -13906,6 +13972,7 @@ var Models = {
|
|
|
13906
13972
|
ClaudeSonnet5,
|
|
13907
13973
|
CreatifyAurora,
|
|
13908
13974
|
CreatifyBoreal,
|
|
13975
|
+
DepthAnythingVideo,
|
|
13909
13976
|
ElevenAudioIsolation,
|
|
13910
13977
|
ElevenDialogueV4,
|
|
13911
13978
|
ElevenDubbing,
|