@picsart/ai-sdk 6.52.0 → 6.53.1
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/index.d.ts +14 -0
- package/index.js +107 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -931,6 +931,18 @@ type ModelInputById = {
|
|
|
931
931
|
imageUrls?: string[];
|
|
932
932
|
imageWeight?: number;
|
|
933
933
|
};
|
|
934
|
+
"ideogram-vector-1": {
|
|
935
|
+
prompt: string;
|
|
936
|
+
imageUrls?: string[];
|
|
937
|
+
aspectRatio?: "auto" | "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3" | "5:4" | "4:5" | "16:10" | "10:16" | "2:1" | "1:2" | "3:1" | "1:3" | "4:1" | "1:4";
|
|
938
|
+
quality?: "low" | "medium" | "high";
|
|
939
|
+
count?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
940
|
+
seed?: number;
|
|
941
|
+
};
|
|
942
|
+
"ideogram-vector-1-vectorize": {
|
|
943
|
+
startFrame: string;
|
|
944
|
+
mode?: "default" | "simple";
|
|
945
|
+
};
|
|
934
946
|
"kimi-k3": {
|
|
935
947
|
prompt: string;
|
|
936
948
|
imageUrls?: string[];
|
|
@@ -3640,6 +3652,8 @@ declare const Models: {
|
|
|
3640
3652
|
readonly IdeogramPImage: "ideogram-p-image";
|
|
3641
3653
|
readonly IdeogramV3: "ideogram-v3";
|
|
3642
3654
|
readonly IdeogramV4: "ideogram-v4";
|
|
3655
|
+
readonly IdeogramVector1: "ideogram-vector-1";
|
|
3656
|
+
readonly IdeogramVector1Vectorize: "ideogram-vector-1-vectorize";
|
|
3643
3657
|
readonly KimiK3: "kimi-k3";
|
|
3644
3658
|
readonly Kling30Image: "kling-3.0-image";
|
|
3645
3659
|
readonly KlingAvatar: "kling-avatar";
|
package/index.js
CHANGED
|
@@ -4565,6 +4565,8 @@ var seedance25ColorDepthConstraints = [
|
|
|
4565
4565
|
}
|
|
4566
4566
|
];
|
|
4567
4567
|
var SEEDANCE_25_FRAME_ADAPTIVE_REASON = "First/Last Frame mode requires an adaptive aspect ratio \u2014 the vendor rejects any fixed ratio.";
|
|
4568
|
+
var SEEDANCE_25_EDIT_REASON = "An edit follows its source video \u2014 the vendor requires an adaptive aspect ratio and Auto duration.";
|
|
4569
|
+
var SEEDANCE_25_EXTEND_REASON = "An extension follows its source video \u2014 the vendor requires an adaptive aspect ratio.";
|
|
4568
4570
|
var seedance25Constraints = [
|
|
4569
4571
|
...seedance20Constraints.slice(1),
|
|
4570
4572
|
{
|
|
@@ -4586,6 +4588,20 @@ var seedance25Constraints = [
|
|
|
4586
4588
|
when: { endFrame: { exists: true } },
|
|
4587
4589
|
then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_FRAME_ADAPTIVE_REASON } }
|
|
4588
4590
|
},
|
|
4591
|
+
// An explicit edit / extend task type carries the same vendor rules as the
|
|
4592
|
+
// -video-edit / -video-extend entries, which hardcode them. Mirrors the
|
|
4593
|
+
// lock in buildSeedance25PayloadFor.
|
|
4594
|
+
{
|
|
4595
|
+
when: { omniReferenceTaskType: { is: "edit" } },
|
|
4596
|
+
then: {
|
|
4597
|
+
aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_EDIT_REASON },
|
|
4598
|
+
duration: { allowed: [-1], reason: SEEDANCE_25_EDIT_REASON }
|
|
4599
|
+
}
|
|
4600
|
+
},
|
|
4601
|
+
{
|
|
4602
|
+
when: { omniReferenceTaskType: { is: "extend" } },
|
|
4603
|
+
then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_EXTEND_REASON } }
|
|
4604
|
+
},
|
|
4589
4605
|
...seedance25ColorDepthConstraints
|
|
4590
4606
|
];
|
|
4591
4607
|
var seedance25OutputFormat = (ctx) => {
|
|
@@ -4666,6 +4682,8 @@ var buildSeedance25PayloadFor = (modelAlias) => withSeedance25DraftMode(modelAli
|
|
|
4666
4682
|
const refAudios = ctx.audioUrls ?? [];
|
|
4667
4683
|
const usesFrame = Boolean(ctx.startFrame || ctx.endFrame);
|
|
4668
4684
|
const { omniReferenceTaskType } = ctx;
|
|
4685
|
+
const isEdit = omniReferenceTaskType === "edit";
|
|
4686
|
+
const followsSource = isEdit || omniReferenceTaskType === "extend";
|
|
4669
4687
|
return {
|
|
4670
4688
|
model: modelAlias,
|
|
4671
4689
|
content: [
|
|
@@ -4690,8 +4708,8 @@ var buildSeedance25PayloadFor = (modelAlias) => withSeedance25DraftMode(modelAli
|
|
|
4690
4708
|
// text item is not sent.
|
|
4691
4709
|
...ctx.prompt?.trim() ? [{ type: "text", text: ctx.prompt }] : []
|
|
4692
4710
|
],
|
|
4693
|
-
ratio: usesFrame ? "adaptive" : ctx.aspectRatio ?? "16:9",
|
|
4694
|
-
duration: ctx.duration ?? 5,
|
|
4711
|
+
ratio: usesFrame || followsSource ? "adaptive" : ctx.aspectRatio ?? "16:9",
|
|
4712
|
+
duration: isEdit ? -1 : ctx.duration ?? 5,
|
|
4695
4713
|
resolution: ctx.resolution ?? "1080p",
|
|
4696
4714
|
generate_audio: ctx.generateAudio ?? true,
|
|
4697
4715
|
output_format: seedance25OutputFormat(ctx),
|
|
@@ -8579,7 +8597,75 @@ var ideogram45Constraints = [
|
|
|
8579
8597
|
resolution: { disabled: true, reason: "The output keeps the source image size." }
|
|
8580
8598
|
} }
|
|
8581
8599
|
];
|
|
8600
|
+
var IDEOGRAM_VECTOR_IMAGE_BOUNDS = {
|
|
8601
|
+
maxBytes: 50 * 1024 * 1024
|
|
8602
|
+
};
|
|
8603
|
+
var IDEOGRAM_VECTOR_ASPECT_RATIOS = [
|
|
8604
|
+
"auto",
|
|
8605
|
+
"1:1",
|
|
8606
|
+
"16:9",
|
|
8607
|
+
"9:16",
|
|
8608
|
+
"4:3",
|
|
8609
|
+
"3:4",
|
|
8610
|
+
"3:2",
|
|
8611
|
+
"2:3",
|
|
8612
|
+
"5:4",
|
|
8613
|
+
"4:5",
|
|
8614
|
+
"16:10",
|
|
8615
|
+
"10:16",
|
|
8616
|
+
"2:1",
|
|
8617
|
+
"1:2",
|
|
8618
|
+
"3:1",
|
|
8619
|
+
"1:3",
|
|
8620
|
+
"4:1",
|
|
8621
|
+
"1:4"
|
|
8622
|
+
];
|
|
8623
|
+
var IDEOGRAM_VECTOR_QUALITIES = ["low", "medium", "high"];
|
|
8582
8624
|
var { MODELS: MODELS25 } = defineModels("ideogram", [
|
|
8625
|
+
{
|
|
8626
|
+
id: "ideogram-vector-1",
|
|
8627
|
+
name: "Ideogram Vector",
|
|
8628
|
+
addedAt: "2026-10-21",
|
|
8629
|
+
workflow: "ideogram/vector/generate",
|
|
8630
|
+
// The worker returns SVG and exposes no format param.
|
|
8631
|
+
outputExtension: "svg",
|
|
8632
|
+
estimatedTime: 30,
|
|
8633
|
+
mode: "image",
|
|
8634
|
+
inputType: "t2i",
|
|
8635
|
+
description: "Ideogram Vector \u2014 SVG logos, icons and illustrations from a prompt, optionally guided by up to 5 reference images.",
|
|
8636
|
+
features: [feat("Vector/SVG", "characteristic"), feat("Reference Images", "input")],
|
|
8637
|
+
paramConfig: {
|
|
8638
|
+
...params.prompt({ maxLength: 9500 }),
|
|
8639
|
+
// imageUrls[0] is the primary source; the rest are additional references.
|
|
8640
|
+
...params.imageInput(5, "Reference Images", false, "reference", IDEOGRAM_VECTOR_IMAGE_BOUNDS),
|
|
8641
|
+
...params.aspectRatio(IDEOGRAM_VECTOR_ASPECT_RATIOS, "auto"),
|
|
8642
|
+
...p.quality(IDEOGRAM_VECTOR_QUALITIES, "medium"),
|
|
8643
|
+
...params.count(IDEOGRAM_45_COUNTS, 1),
|
|
8644
|
+
...params.seed()
|
|
8645
|
+
}
|
|
8646
|
+
},
|
|
8647
|
+
{
|
|
8648
|
+
id: "ideogram-vector-1-vectorize",
|
|
8649
|
+
name: "Ideogram Vectorize",
|
|
8650
|
+
addedAt: "2026-10-21",
|
|
8651
|
+
workflow: "ideogram/vector/vectorize",
|
|
8652
|
+
syncExecute: true,
|
|
8653
|
+
// The worker returns SVG and exposes no format param.
|
|
8654
|
+
outputExtension: "svg",
|
|
8655
|
+
estimatedTime: 8,
|
|
8656
|
+
mode: "image",
|
|
8657
|
+
inputType: "i2i",
|
|
8658
|
+
description: "Ideogram Vectorize \u2014 convert a raster image (JPEG, PNG or WebP) into an SVG.",
|
|
8659
|
+
features: [feat("Vector/SVG", "characteristic"), feat("Image to SVG", "input")],
|
|
8660
|
+
paramConfig: {
|
|
8661
|
+
...params.startFrame("Source Image", true, IDEOGRAM_VECTOR_IMAGE_BOUNDS),
|
|
8662
|
+
// `simple` traces fewer, simpler shapes; `default` preserves finer details.
|
|
8663
|
+
...p.enum("mode", [
|
|
8664
|
+
{ id: "default", label: "Detailed" },
|
|
8665
|
+
{ id: "simple", label: "Simple" }
|
|
8666
|
+
], "default", { label: "Detail" })
|
|
8667
|
+
}
|
|
8668
|
+
},
|
|
8583
8669
|
{
|
|
8584
8670
|
id: "ideogram-4-5",
|
|
8585
8671
|
name: "Ideogram 4.5",
|
|
@@ -8878,9 +8964,23 @@ var buildIdeogram45PreciseEditPayload = (input) => {
|
|
|
8878
8964
|
...input.enableCopyrightDetection ? { enable_copyright_detection: true } : {}
|
|
8879
8965
|
};
|
|
8880
8966
|
};
|
|
8967
|
+
var buildIdeogramVectorPayload = (input) => ({
|
|
8968
|
+
prompt: input.prompt,
|
|
8969
|
+
...input.imageUrls?.length ? { images: input.imageUrls } : {},
|
|
8970
|
+
...input.aspectRatio ? { aspect_ratio: input.aspectRatio } : {},
|
|
8971
|
+
quality: input.quality ?? "medium",
|
|
8972
|
+
num_images: input.count ?? 1,
|
|
8973
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
8974
|
+
});
|
|
8975
|
+
var buildIdeogramVectorizePayload = (input) => ({
|
|
8976
|
+
image: input.startFrame,
|
|
8977
|
+
mode: input.mode ?? "default"
|
|
8978
|
+
});
|
|
8881
8979
|
registerPayloads(MODELS25, {
|
|
8882
8980
|
"ideogram-4-5": buildIdeogram45Payload,
|
|
8883
|
-
"ideogram-4-5-precise-edit": buildIdeogram45PreciseEditPayload
|
|
8981
|
+
"ideogram-4-5-precise-edit": buildIdeogram45PreciseEditPayload,
|
|
8982
|
+
"ideogram-vector-1": buildIdeogramVectorPayload,
|
|
8983
|
+
"ideogram-vector-1-vectorize": buildIdeogramVectorizePayload
|
|
8884
8984
|
});
|
|
8885
8985
|
|
|
8886
8986
|
// src/vendors/catalog/qwen.ts
|
|
@@ -15252,6 +15352,8 @@ var IdeogramCharacter = "ideogram-character";
|
|
|
15252
15352
|
var IdeogramPImage = "ideogram-p-image";
|
|
15253
15353
|
var IdeogramV3 = "ideogram-v3";
|
|
15254
15354
|
var IdeogramV4 = "ideogram-v4";
|
|
15355
|
+
var IdeogramVector1 = "ideogram-vector-1";
|
|
15356
|
+
var IdeogramVector1Vectorize = "ideogram-vector-1-vectorize";
|
|
15255
15357
|
var KimiK3 = "kimi-k3";
|
|
15256
15358
|
var Kling30Image = "kling-3.0-image";
|
|
15257
15359
|
var KlingAvatar = "kling-avatar";
|
|
@@ -15518,6 +15620,8 @@ var Models = {
|
|
|
15518
15620
|
IdeogramPImage,
|
|
15519
15621
|
IdeogramV3,
|
|
15520
15622
|
IdeogramV4,
|
|
15623
|
+
IdeogramVector1,
|
|
15624
|
+
IdeogramVector1Vectorize,
|
|
15521
15625
|
KimiK3,
|
|
15522
15626
|
Kling30Image,
|
|
15523
15627
|
KlingAvatar,
|