@picsart/ai-sdk 6.18.1 → 6.19.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 +4 -4
- package/index.d.ts +2 -0
- package/index.js +25 -2
- package/package.json +1 -1
|
@@ -149,7 +149,7 @@ interface ChatCompletionsCommand$1 {
|
|
|
149
149
|
tools?: FunctionTool[];
|
|
150
150
|
service_tier?: ServiceTier;
|
|
151
151
|
}
|
|
152
|
-
type ChatCompletionModels = "gpt-6-astra" | "gpt-6-sol" | "gpt-6-luna" | "gpt-5" | "gpt-5.1" | "gpt-5.2" | "gpt-5.2-pro" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-pro" | "gpt-5.4-mini" | "gpt-5.4-nano" | "gpt-5.5" | "gpt-5.5-pro" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gpt-5-pro" | "gpt-5-mini" | "gpt-5-nano" | "gpt-5-search-api" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-haiku-4-5" | "claude-fable-5" | "claude-fable-5-1" | "gemini-3.1-pro-preview" | "gemini-3-flash-preview" | "gemini-3.8-flash" | "gemini-3.7-flash" | "gemini-3.6-flash" | "gemini-3.5-flash" | "gemini-3.5-flash-lite" | "gemini-3.1-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro";
|
|
152
|
+
type ChatCompletionModels = "gpt-6-astra" | "gpt-6-sol" | "gpt-6-luna" | "gpt-5" | "gpt-5.1" | "gpt-5.2" | "gpt-5.2-pro" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-pro" | "gpt-5.4-mini" | "gpt-5.4-nano" | "gpt-5.5" | "gpt-5.5-pro" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gpt-5-pro" | "gpt-5-mini" | "gpt-5-nano" | "gpt-5-search-api" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-opus-5-5" | "claude-haiku-4-5" | "claude-fable-5" | "claude-fable-5-1" | "gemini-3.1-pro-preview" | "gemini-3-flash-preview" | "gemini-3.8-flash" | "gemini-3.7-flash" | "gemini-3.6-flash" | "gemini-3.5-flash" | "gemini-3.5-flash-lite" | "gemini-3.1-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro";
|
|
153
153
|
interface MessageParam {
|
|
154
154
|
name?: string;
|
|
155
155
|
role: "developer" | "system" | "user" | "assistant" | "tool";
|
|
@@ -206,7 +206,7 @@ interface ChatCompletionResponse {
|
|
|
206
206
|
interface ChatCompletionResult {
|
|
207
207
|
id: string;
|
|
208
208
|
created: number;
|
|
209
|
-
model: "gpt-6-astra" | "gpt-6-sol" | "gpt-6-luna" | "gpt-5" | "gpt-5.1" | "gpt-5.2" | "gpt-5.2-pro" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-pro" | "gpt-5.4-mini" | "gpt-5.4-nano" | "gpt-5.5" | "gpt-5.5-pro" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gpt-5-pro" | "gpt-5-mini" | "gpt-5-nano" | "gpt-5-search-api" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-haiku-4-5" | "claude-fable-5" | "claude-fable-5-1" | "gemini-3.1-pro-preview" | "gemini-3-flash-preview" | "gemini-3.8-flash" | "gemini-3.7-flash" | "gemini-3.6-flash" | "gemini-3.5-flash" | "gemini-3.5-flash-lite" | "gemini-3.1-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro";
|
|
209
|
+
model: "gpt-6-astra" | "gpt-6-sol" | "gpt-6-luna" | "gpt-5" | "gpt-5.1" | "gpt-5.2" | "gpt-5.2-pro" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-pro" | "gpt-5.4-mini" | "gpt-5.4-nano" | "gpt-5.5" | "gpt-5.5-pro" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gpt-5-pro" | "gpt-5-mini" | "gpt-5-nano" | "gpt-5-search-api" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-opus-5-5" | "claude-haiku-4-5" | "claude-fable-5" | "claude-fable-5-1" | "gemini-3.1-pro-preview" | "gemini-3-flash-preview" | "gemini-3.8-flash" | "gemini-3.7-flash" | "gemini-3.6-flash" | "gemini-3.5-flash" | "gemini-3.5-flash-lite" | "gemini-3.1-flash-lite" | "gemini-2.5-flash" | "gemini-2.5-pro";
|
|
210
210
|
choices: Choice[];
|
|
211
211
|
usage: Usage$1;
|
|
212
212
|
}
|
|
@@ -776,7 +776,7 @@ interface ClaudeV1MessagesCommand {
|
|
|
776
776
|
context_management?: ClaudeContextManagement;
|
|
777
777
|
options?: GenAIOptions$2E;
|
|
778
778
|
}
|
|
779
|
-
type ClaudeV1Models = "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "claude-haiku-4-5" | "claude-fable-5" | "claude-fable-5-1";
|
|
779
|
+
type ClaudeV1Models = "claude-opus-4-8" | "claude-opus-5" | "claude-opus-5-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "claude-haiku-4-5" | "claude-fable-5" | "claude-fable-5-1";
|
|
780
780
|
interface ClaudeMessageParam {
|
|
781
781
|
role: string;
|
|
782
782
|
content: ClaudeContentBlock[];
|
|
@@ -9603,7 +9603,7 @@ interface CatalogPreviewModel {
|
|
|
9603
9603
|
|
|
9604
9604
|
interface ImageSegmentationCommand {
|
|
9605
9605
|
image_url: string;
|
|
9606
|
-
model
|
|
9606
|
+
model?: "picsart-multimatting-v13" | "picsart-sky-v1";
|
|
9607
9607
|
segmentation_class?: "all" | "background" | "hair" | "skin" | "lips" | "eyes" | "clothes" | "glasses" | "teeth" | "foreground";
|
|
9608
9608
|
options?: GenAIOptions$C;
|
|
9609
9609
|
}
|
package/index.d.ts
CHANGED
|
@@ -1754,6 +1754,7 @@ type ModelInputById = {
|
|
|
1754
1754
|
video_input: boolean;
|
|
1755
1755
|
signature: string;
|
|
1756
1756
|
};
|
|
1757
|
+
omniReferenceTaskType?: "auto" | "reference" | "edit" | "extend";
|
|
1757
1758
|
imageUrls?: string[];
|
|
1758
1759
|
videoUrls?: string[];
|
|
1759
1760
|
audioUrls?: string[];
|
|
@@ -1798,6 +1799,7 @@ type ModelInputById = {
|
|
|
1798
1799
|
video_input: boolean;
|
|
1799
1800
|
signature: string;
|
|
1800
1801
|
};
|
|
1802
|
+
omniReferenceTaskType?: "auto" | "reference" | "edit" | "extend";
|
|
1801
1803
|
imageUrls?: string[];
|
|
1802
1804
|
videoUrls?: string[];
|
|
1803
1805
|
audioUrls?: string[];
|
package/index.js
CHANGED
|
@@ -4453,6 +4453,7 @@ var buildSeedance25PayloadFor = (modelAlias) => withSeedance25DraftMode(modelAli
|
|
|
4453
4453
|
const refVideos = ctx.videoUrls ?? [];
|
|
4454
4454
|
const refAudios = ctx.audioUrls ?? [];
|
|
4455
4455
|
const usesFrame = Boolean(ctx.startFrame || ctx.endFrame);
|
|
4456
|
+
const { omniReferenceTaskType } = ctx;
|
|
4456
4457
|
return {
|
|
4457
4458
|
model: modelAlias,
|
|
4458
4459
|
content: [
|
|
@@ -4482,7 +4483,8 @@ var buildSeedance25PayloadFor = (modelAlias) => withSeedance25DraftMode(modelAli
|
|
|
4482
4483
|
resolution: ctx.resolution ?? "1080p",
|
|
4483
4484
|
generate_audio: ctx.generateAudio ?? true,
|
|
4484
4485
|
output_format: seedance25OutputFormat(ctx),
|
|
4485
|
-
...ctx.returnLastFrame ? { return_last_frame: true } : {}
|
|
4486
|
+
...ctx.returnLastFrame ? { return_last_frame: true } : {},
|
|
4487
|
+
...omniReferenceTaskType !== void 0 ? { omni_reference_task_type: omniReferenceTaskType } : {}
|
|
4486
4488
|
};
|
|
4487
4489
|
});
|
|
4488
4490
|
var buildSeedance25VideoEditPayloadFor = (modelAlias) => withSeedance25DraftMode(modelAlias, (ctx) => ({
|
|
@@ -4501,6 +4503,7 @@ var buildSeedance25VideoEditPayloadFor = (modelAlias) => withSeedance25DraftMode
|
|
|
4501
4503
|
resolution: ctx.resolution ?? "1080p",
|
|
4502
4504
|
generate_audio: ctx.generateAudio ?? true,
|
|
4503
4505
|
output_format: seedance25OutputFormat(ctx),
|
|
4506
|
+
omni_reference_task_type: "edit",
|
|
4504
4507
|
...ctx.returnLastFrame ? { return_last_frame: true } : {}
|
|
4505
4508
|
}));
|
|
4506
4509
|
var buildSeedance25VideoExtendPayloadFor = (modelAlias) => withSeedance25DraftMode(modelAlias, (ctx) => ({
|
|
@@ -4517,7 +4520,8 @@ var buildSeedance25VideoExtendPayloadFor = (modelAlias) => withSeedance25DraftMo
|
|
|
4517
4520
|
duration: ctx.duration ?? 15,
|
|
4518
4521
|
resolution: ctx.resolution ?? "1080p",
|
|
4519
4522
|
generate_audio: ctx.generateAudio ?? true,
|
|
4520
|
-
output_format: seedance25OutputFormat(ctx)
|
|
4523
|
+
output_format: seedance25OutputFormat(ctx),
|
|
4524
|
+
omni_reference_task_type: "extend"
|
|
4521
4525
|
}));
|
|
4522
4526
|
var SEEDANCE_AR = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"];
|
|
4523
4527
|
var SEEDANCE_25_FORMATS = ["mp4", "mov"];
|
|
@@ -4545,6 +4549,23 @@ var seedance25DraftTaskParam = {
|
|
|
4545
4549
|
}
|
|
4546
4550
|
}
|
|
4547
4551
|
};
|
|
4552
|
+
var seedance25TaskTypeParam = {
|
|
4553
|
+
omniReferenceTaskType: {
|
|
4554
|
+
label: "Task Type",
|
|
4555
|
+
required: false,
|
|
4556
|
+
descriptor: {
|
|
4557
|
+
kind: "enum",
|
|
4558
|
+
valueType: "string",
|
|
4559
|
+
options: [
|
|
4560
|
+
{ id: "auto", label: "Auto" },
|
|
4561
|
+
{ id: "reference", label: "Reference" },
|
|
4562
|
+
{ id: "edit", label: "Edit" },
|
|
4563
|
+
{ id: "extend", label: "Extend" }
|
|
4564
|
+
],
|
|
4565
|
+
default: "auto"
|
|
4566
|
+
}
|
|
4567
|
+
}
|
|
4568
|
+
};
|
|
4548
4569
|
var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
4549
4570
|
{
|
|
4550
4571
|
id: "seedance-2.5",
|
|
@@ -4573,6 +4594,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4573
4594
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
4574
4595
|
...seedance25DraftParam,
|
|
4575
4596
|
...seedance25DraftTaskParam,
|
|
4597
|
+
...seedance25TaskTypeParam,
|
|
4576
4598
|
// 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
|
|
4577
4599
|
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4578
4600
|
...params.videoInputs(10, "Reference Videos", false, SEEDANCE_25_VIDEO_BOUNDS),
|
|
@@ -4612,6 +4634,7 @@ var { MODELS: MODELS13 } = defineModels("seedance", [
|
|
|
4612
4634
|
...p.enum("colorDepth", SEEDANCE_25_COLOR_DEPTHS, "10bit", { label: "Color Depth" }),
|
|
4613
4635
|
...seedance25DraftParam,
|
|
4614
4636
|
...seedance25DraftTaskParam,
|
|
4637
|
+
...seedance25TaskTypeParam,
|
|
4615
4638
|
// 2.5 lifts the reference caps to 30 images / 10 videos / 10 audios.
|
|
4616
4639
|
...params.imageInput(30, "Reference Images", false, "reference", SEEDANCE_IMAGE_BOUNDS),
|
|
4617
4640
|
...params.videoInputs(10, "Reference Videos", false, SEEDANCE_25_VIDEO_BOUNDS),
|