@picsart/ai-sdk 5.0.1 → 5.2.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.
Files changed (3) hide show
  1. package/index.d.ts +32 -5
  2. package/index.js +87 -32
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -915,10 +915,6 @@ type ModelInputById = {
915
915
  imageUrls?: string[];
916
916
  promptExtendMode?: "direct" | "agent";
917
917
  };
918
- "qwen-image-edit-plus": {
919
- prompt: string;
920
- imageUrls: [string, ...string[]];
921
- };
922
918
  "recraft-creative-upscale": {
923
919
  imageUrls: [string, ...string[]];
924
920
  };
@@ -1049,6 +1045,34 @@ type ModelInputById = {
1049
1045
  imageUrls?: string[];
1050
1046
  imageWeight?: number;
1051
1047
  };
1048
+ "recraftv4_styles": {
1049
+ prompt: string;
1050
+ aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2";
1051
+ count?: 1 | 2 | 4 | 6;
1052
+ imageUrls?: string[];
1053
+ imageWeight?: number;
1054
+ };
1055
+ "recraftv4_styles_pro": {
1056
+ prompt: string;
1057
+ aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2";
1058
+ count?: 1 | 2 | 4 | 6;
1059
+ imageUrls?: string[];
1060
+ imageWeight?: number;
1061
+ };
1062
+ "recraftv4_styles_pro_vector": {
1063
+ prompt: string;
1064
+ aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2";
1065
+ count?: 1 | 2 | 4 | 6;
1066
+ imageUrls?: string[];
1067
+ imageWeight?: number;
1068
+ };
1069
+ "recraftv4_styles_vector": {
1070
+ prompt: string;
1071
+ aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2";
1072
+ count?: 1 | 2 | 4 | 6;
1073
+ imageUrls?: string[];
1074
+ imageWeight?: number;
1075
+ };
1052
1076
  "recraftv4_vector": {
1053
1077
  prompt: string;
1054
1078
  aspectRatio?: "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "16:9" | "9:16" | "2:1" | "1:2";
@@ -2459,7 +2483,6 @@ declare const Models: {
2459
2483
  readonly QwenImage2: "qwen-image-2";
2460
2484
  readonly QwenImage2Pro: "qwen-image-2-pro";
2461
2485
  readonly QwenImage30: "qwen-image-3.0";
2462
- readonly QwenImageEditPlus: "qwen-image-edit-plus";
2463
2486
  readonly RecraftCreativeUpscale: "recraft-creative-upscale";
2464
2487
  readonly RecraftCrispUpscale: "recraft-crisp-upscale";
2465
2488
  readonly RecraftExplore: "recraft-explore";
@@ -2481,6 +2504,10 @@ declare const Models: {
2481
2504
  readonly Recraftv41Vector: "recraftv4_1_vector";
2482
2505
  readonly Recraftv4Pro: "recraftv4_pro";
2483
2506
  readonly Recraftv4ProVector: "recraftv4_pro_vector";
2507
+ readonly Recraftv4Styles: "recraftv4_styles";
2508
+ readonly Recraftv4StylesPro: "recraftv4_styles_pro";
2509
+ readonly Recraftv4StylesProVector: "recraftv4_styles_pro_vector";
2510
+ readonly Recraftv4StylesVector: "recraftv4_styles_vector";
2484
2511
  readonly Recraftv4Vector: "recraftv4_vector";
2485
2512
  readonly Reve: "reve";
2486
2513
  readonly RunwayAleph2: "runway-aleph2";
package/index.js CHANGED
@@ -6702,14 +6702,6 @@ var { MODELS: MODELS27 } = defineModels("ideogram", [
6702
6702
  ]);
6703
6703
 
6704
6704
  // src/vendors/catalog/qwen.ts
6705
- var QWEN_SIZE_MAP = {
6706
- "1024x1024": "1024x1024",
6707
- "1024x768": "1024x768",
6708
- "768x1024": "768x1024",
6709
- "1536x1024": "1536x1024",
6710
- "1024x1536": "1024x1536",
6711
- "2048x2048": "2048x2048"
6712
- };
6713
6705
  var QWEN_V1_SIZES = [
6714
6706
  "2048x2048",
6715
6707
  "2688x1536",
@@ -6731,11 +6723,6 @@ var buildQwen2Payload = (ctx) => {
6731
6723
  ...hasImages ? { image_urls: ctx.imageUrls } : {}
6732
6724
  };
6733
6725
  };
6734
- var buildQwenEditPlusPayload = (ctx) => ({
6735
- prompt: ctx.prompt,
6736
- image_urls: ctx.imageUrls ?? [],
6737
- ...ctx.size && QWEN_SIZE_MAP[ctx.size] ? { size: QWEN_SIZE_MAP[ctx.size] } : {}
6738
- });
6739
6726
  var buildQwenV1 = (model) => (ctx) => {
6740
6727
  const hasImages = Array.isArray(ctx.imageUrls) && ctx.imageUrls.length > 0;
6741
6728
  return {
@@ -6840,23 +6827,6 @@ var { MODELS: MODELS28 } = defineModels("qwen", [
6840
6827
  feat("2K", "resolution")
6841
6828
  ],
6842
6829
  paramConfig: qwenV1Params3
6843
- },
6844
- {
6845
- id: "qwen-image-edit-plus",
6846
- name: "Qwen Edit Plus",
6847
- addedAt: "2026-02-06",
6848
- workflow: "qwen-image-edit-plus",
6849
- buildPayload: buildQwenEditPlusPayload,
6850
- estimatedTime: 11,
6851
- mode: "image",
6852
- inputType: "i2i",
6853
- description: "Edit or transform up to 3 source images with prompt-guided changes.",
6854
- features: [feat("Image Input", "input")],
6855
- paramConfig: {
6856
- ...params.prompt(),
6857
- // size: Qwen edit-plus API ignores size param — output is always 1024x1024
6858
- ...params.imageInput(3, "Source Images", true)
6859
- }
6860
6830
  }
6861
6831
  ]);
6862
6832
 
@@ -7205,6 +7175,85 @@ var { MODELS: MODELS29 } = defineModels("recraft", [
7205
7175
  ...params.imageWeight(0, 100, 80, 5)
7206
7176
  }
7207
7177
  },
7178
+ // ── V4 Styles family — style-driven via style_id / style_reference_urls ─
7179
+ {
7180
+ id: "recraftv4_styles",
7181
+ name: "Recraft V4 Styles",
7182
+ addedAt: "2026-08-14",
7183
+ workflow: "recraft/v1/images/generations",
7184
+ buildPayload: buildRecraftV4VariantPayload("recraftv4_styles"),
7185
+ estimatedTime: 17,
7186
+ mode: "image",
7187
+ inputType: "t2i",
7188
+ description: "Style-focused raster output with 10K-character prompts.",
7189
+ features: [feat("Image Input", "input"), feat("Text in Image", "characteristic"), feat("10K Prompt", "characteristic")],
7190
+ paramConfig: {
7191
+ ...params.prompt({ maxLength: 1e4 }),
7192
+ ...params.aspectRatio(recraftAspectRatios, "1:1"),
7193
+ ...params.count([1, 2, 4, 6]),
7194
+ ...params.imageInput(1, "Source Image"),
7195
+ ...params.imageWeight(0, 100, 80, 5)
7196
+ }
7197
+ },
7198
+ {
7199
+ id: "recraftv4_styles_vector",
7200
+ name: "Recraft V4 Styles Vector",
7201
+ addedAt: "2026-08-14",
7202
+ workflow: "recraft/v1/images/generations",
7203
+ buildPayload: buildRecraftV4VariantPayload("recraftv4_styles_vector"),
7204
+ estimatedTime: 22,
7205
+ mode: "image",
7206
+ inputType: "t2i",
7207
+ description: "Style-focused SVG vector output with 10K-character prompts.",
7208
+ features: [feat("Image Input", "input"), feat("Vector/SVG", "characteristic"), feat("10K Prompt", "characteristic")],
7209
+ paramConfig: {
7210
+ ...params.prompt({ maxLength: 1e4 }),
7211
+ ...params.aspectRatio(recraftAspectRatios, "1:1"),
7212
+ ...params.count([1, 2, 4, 6]),
7213
+ ...params.imageInput(1, "Source Image"),
7214
+ ...params.imageWeight(0, 100, 80, 5)
7215
+ }
7216
+ },
7217
+ {
7218
+ id: "recraftv4_styles_pro",
7219
+ name: "Recraft V4 Styles Pro",
7220
+ addedAt: "2026-08-14",
7221
+ workflow: "recraft/v1/images/generations",
7222
+ buildPayload: buildRecraftV4VariantPayload("recraftv4_styles_pro"),
7223
+ estimatedTime: 35,
7224
+ mode: "image",
7225
+ inputType: "t2i",
7226
+ badge: ["premium"],
7227
+ description: "Pro-quality style-focused raster output with enhanced detail and 10K-character prompts.",
7228
+ features: [feat("Image Input", "input"), feat("Text in Image", "characteristic"), feat("10K Prompt", "characteristic")],
7229
+ paramConfig: {
7230
+ ...params.prompt({ maxLength: 1e4 }),
7231
+ ...params.aspectRatio(recraftAspectRatios, "1:1"),
7232
+ ...params.count([1, 2, 4, 6]),
7233
+ ...params.imageInput(1, "Source Image"),
7234
+ ...params.imageWeight(0, 100, 80, 5)
7235
+ }
7236
+ },
7237
+ {
7238
+ id: "recraftv4_styles_pro_vector",
7239
+ name: "Recraft V4 Styles Pro Vector",
7240
+ addedAt: "2026-08-14",
7241
+ workflow: "recraft/v1/images/generations",
7242
+ buildPayload: buildRecraftV4VariantPayload("recraftv4_styles_pro_vector"),
7243
+ estimatedTime: 35,
7244
+ mode: "image",
7245
+ inputType: "t2i",
7246
+ badge: ["premium"],
7247
+ description: "Pro-quality style-focused SVG vector output with enhanced detail and 10K-character prompts.",
7248
+ features: [feat("Image Input", "input"), feat("Vector/SVG", "characteristic"), feat("10K Prompt", "characteristic")],
7249
+ paramConfig: {
7250
+ ...params.prompt({ maxLength: 1e4 }),
7251
+ ...params.aspectRatio(recraftAspectRatios, "1:1"),
7252
+ ...params.count([1, 2, 4, 6]),
7253
+ ...params.imageInput(1, "Source Image"),
7254
+ ...params.imageWeight(0, 100, 80, 5)
7255
+ }
7256
+ },
7208
7257
  {
7209
7258
  id: "recraftv3_vector",
7210
7259
  name: "Recraft V3 Vector",
@@ -10544,7 +10593,6 @@ var Qwen = "qwen";
10544
10593
  var QwenImage2 = "qwen-image-2";
10545
10594
  var QwenImage2Pro = "qwen-image-2-pro";
10546
10595
  var QwenImage30 = "qwen-image-3.0";
10547
- var QwenImageEditPlus = "qwen-image-edit-plus";
10548
10596
  var RecraftCreativeUpscale = "recraft-creative-upscale";
10549
10597
  var RecraftCrispUpscale = "recraft-crisp-upscale";
10550
10598
  var RecraftExplore = "recraft-explore";
@@ -10566,6 +10614,10 @@ var Recraftv41UtilityVector = "recraftv4_1_utility_vector";
10566
10614
  var Recraftv41Vector = "recraftv4_1_vector";
10567
10615
  var Recraftv4Pro = "recraftv4_pro";
10568
10616
  var Recraftv4ProVector = "recraftv4_pro_vector";
10617
+ var Recraftv4Styles = "recraftv4_styles";
10618
+ var Recraftv4StylesPro = "recraftv4_styles_pro";
10619
+ var Recraftv4StylesProVector = "recraftv4_styles_pro_vector";
10620
+ var Recraftv4StylesVector = "recraftv4_styles_vector";
10569
10621
  var Recraftv4Vector = "recraftv4_vector";
10570
10622
  var Reve = "reve";
10571
10623
  var RunwayAleph2 = "runway-aleph2";
@@ -10743,7 +10795,6 @@ var Models = {
10743
10795
  QwenImage2,
10744
10796
  QwenImage2Pro,
10745
10797
  QwenImage30,
10746
- QwenImageEditPlus,
10747
10798
  RecraftCreativeUpscale,
10748
10799
  RecraftCrispUpscale,
10749
10800
  RecraftExplore,
@@ -10765,6 +10816,10 @@ var Models = {
10765
10816
  Recraftv41Vector,
10766
10817
  Recraftv4Pro,
10767
10818
  Recraftv4ProVector,
10819
+ Recraftv4Styles,
10820
+ Recraftv4StylesPro,
10821
+ Recraftv4StylesProVector,
10822
+ Recraftv4StylesVector,
10768
10823
  Recraftv4Vector,
10769
10824
  Reve,
10770
10825
  RunwayAleph2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.0.1",
3
+ "version": "5.2.0",
4
4
  "type": "module",
5
5
  "description": "Type-safe SDK for 100+ AI models — image, video, audio, and text generation with Picsart",
6
6
  "license": "MIT",