@picsart/ai-sdk 5.35.0 → 5.37.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 +5 -16
  2. package/index.js +30 -53
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -255,7 +255,7 @@ type ModelInputById = {
255
255
  };
256
256
  "gemini-2.5-flash-image": {
257
257
  prompt: string;
258
- aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9";
258
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9" | "auto";
259
259
  count?: 1 | 2 | 4 | 6 | 8 | 10;
260
260
  imageUrls?: string[];
261
261
  };
@@ -279,7 +279,7 @@ type ModelInputById = {
279
279
  };
280
280
  "gemini-3-pro-image": {
281
281
  prompt: string;
282
- aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9";
282
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "21:9" | "auto";
283
283
  resolution?: "1K" | "2K" | "4K";
284
284
  count?: 1 | 2 | 4 | 6 | 8 | 10;
285
285
  thinkingBudget?: number;
@@ -287,7 +287,7 @@ type ModelInputById = {
287
287
  };
288
288
  "gemini-3.1-flash-image": {
289
289
  prompt: string;
290
- aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "3:2" | "2:3" | "4:5" | "5:4" | "4:1" | "1:4" | "8:1" | "1:8" | "21:9";
290
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "3:2" | "2:3" | "4:5" | "5:4" | "4:1" | "1:4" | "8:1" | "1:8" | "21:9" | "auto";
291
291
  resolution?: "0.5K" | "1K" | "2K" | "4K";
292
292
  count?: 1 | 2 | 4 | 6 | 8 | 10;
293
293
  thinkingLevel?: "minimal" | "high";
@@ -295,7 +295,7 @@ type ModelInputById = {
295
295
  };
296
296
  "gemini-3.1-flash-lite-image": {
297
297
  prompt: string;
298
- aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "3:2" | "2:3" | "4:5" | "5:4" | "4:1" | "1:4" | "8:1" | "1:8" | "21:9";
298
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "3:2" | "2:3" | "4:5" | "5:4" | "4:1" | "1:4" | "8:1" | "1:8" | "21:9" | "auto";
299
299
  count?: 1 | 2 | 4 | 6 | 8 | 10;
300
300
  thinkingLevel?: "minimal" | "high";
301
301
  imageUrls?: string[];
@@ -528,6 +528,7 @@ type ModelInputById = {
528
528
  };
529
529
  "heygen-video-avatar": {
530
530
  videoId: string;
531
+ engine?: "avatar_iv" | "avatar_v";
531
532
  resolution?: "4k" | "1080p" | "720p";
532
533
  aspectRatio?: "16:9" | "9:16" | "4:5" | "5:4" | "1:1" | "auto";
533
534
  voiceId: string;
@@ -950,17 +951,6 @@ type ModelInputById = {
950
951
  prompt: string;
951
952
  negativePrompt?: string;
952
953
  };
953
- "picsart-qwen-image-edit-angle": {
954
- imageUrls: [string, ...string[]];
955
- prompt: string;
956
- negativePrompt?: string;
957
- numInferenceSteps?: number;
958
- cfgScale?: number;
959
- loraWeights?: {
960
- lora_angle?: number;
961
- lora_angle_lighting?: number;
962
- };
963
- };
964
954
  "picsart-qwen-makeup": {
965
955
  imageUrls: [string, ...string[]];
966
956
  prompt: string;
@@ -2821,7 +2811,6 @@ declare const Models: {
2821
2811
  readonly PicsartFlux2Klein: "picsart-flux-2-klein";
2822
2812
  readonly PicsartHidreamT2i: "picsart-hidream-t2i";
2823
2813
  readonly PicsartQwenImageEdit: "picsart-qwen-image-edit";
2824
- readonly PicsartQwenImageEditAngle: "picsart-qwen-image-edit-angle";
2825
2814
  readonly PicsartQwenMakeup: "picsart-qwen-makeup";
2826
2815
  readonly PicsartSanaSprintV1: "picsart-sana-sprint-v1";
2827
2816
  readonly PicsartSodV82: "picsart-sod-v8-2";
package/index.js CHANGED
@@ -5978,7 +5978,7 @@ var buildGeminiOmniVideoPayload = (ctx) => ({
5978
5978
  ...ctx.imageUrls?.[0] ? { image: { url: ctx.imageUrls[0], mimeType: inferMimeType2(ctx.imageUrls[0]) } } : {},
5979
5979
  ...ctx.videoUrl ? { video: { url: ctx.videoUrl } } : {}
5980
5980
  });
5981
- var GEMINI_AR_WIDE = ["1:1", "16:9", "9:16", "3:4", "4:3", "2:3", "21:9"];
5981
+ var GEMINI_AR_WIDE = ["1:1", "16:9", "9:16", "3:4", "4:3", "2:3", "21:9", "auto"];
5982
5982
  var thinkingLevelParam = {
5983
5983
  thinkingLevel: {
5984
5984
  label: "Thinking",
@@ -6017,7 +6017,7 @@ var { MODELS: MODELS22 } = defineModels("google", [
6017
6017
  features: [feat("Multi-Image Input", "input"), feat("4K", "resolution"), feat("Text Rendering", "characteristic")],
6018
6018
  paramConfig: {
6019
6019
  ...params.prompt(),
6020
- ...params.aspectRatio(["1:1", "16:9", "9:16", "3:4", "4:3", "3:2", "2:3", "4:5", "5:4", "4:1", "1:4", "8:1", "1:8", "21:9"], "1:1"),
6020
+ ...params.aspectRatio(["1:1", "16:9", "9:16", "3:4", "4:3", "3:2", "2:3", "4:5", "5:4", "4:1", "1:4", "8:1", "1:8", "21:9", "auto"], "1:1"),
6021
6021
  ...params.resolution(["0.5K", "1K", "2K", "4K"], "1K"),
6022
6022
  ...params.count(),
6023
6023
  ...thinkingLevelParam,
@@ -6040,7 +6040,7 @@ var { MODELS: MODELS22 } = defineModels("google", [
6040
6040
  features: [feat("Multi-Image Input", "input"), feat("Text Rendering", "characteristic")],
6041
6041
  paramConfig: {
6042
6042
  ...params.prompt(),
6043
- ...params.aspectRatio(["1:1", "16:9", "9:16", "3:4", "4:3", "3:2", "2:3", "4:5", "5:4", "4:1", "1:4", "8:1", "1:8", "21:9"], "1:1"),
6043
+ ...params.aspectRatio(["1:1", "16:9", "9:16", "3:4", "4:3", "3:2", "2:3", "4:5", "5:4", "4:1", "1:4", "8:1", "1:8", "21:9", "auto"], "1:1"),
6044
6044
  ...params.count(),
6045
6045
  ...thinkingLevelParam,
6046
6046
  ...params.imageInput(14, "Source Images")
@@ -6733,13 +6733,32 @@ var buildHeyGenPhotoAvatarPayload = (ctx) => ({
6733
6733
  ...ctx.resolution ? { resolution: ctx.resolution } : {},
6734
6734
  ...ctx.aspectRatio ? { aspect_ratio: ctx.aspectRatio } : {}
6735
6735
  });
6736
- var buildHeyGenVideoAvatarPayload = (ctx) => ({
6737
- avatar_id: ctx.videoId || void 0,
6738
- script: ctx.prompt,
6739
- voice_id: ctx.voiceId || void 0,
6740
- ...ctx.resolution ? { resolution: ctx.resolution } : {},
6741
- ...ctx.aspectRatio ? { aspect_ratio: ctx.aspectRatio } : {}
6742
- });
6736
+ var buildHeyGenVideoAvatarPayload = (ctx) => {
6737
+ const c = ctx;
6738
+ return {
6739
+ avatar_id: ctx.videoId || void 0,
6740
+ script: ctx.prompt,
6741
+ voice_id: ctx.voiceId || void 0,
6742
+ ...ctx.resolution ? { resolution: ctx.resolution } : {},
6743
+ ...ctx.aspectRatio ? { aspect_ratio: ctx.aspectRatio } : {},
6744
+ ...c.engine ? { engine: c.engine } : {}
6745
+ };
6746
+ };
6747
+ var engineParam = {
6748
+ engine: {
6749
+ label: "Engine",
6750
+ required: false,
6751
+ descriptor: {
6752
+ kind: "enum",
6753
+ valueType: "string",
6754
+ options: [
6755
+ { id: "avatar_iv", label: "Avatar IV" },
6756
+ { id: "avatar_v", label: "Avatar V" }
6757
+ ],
6758
+ default: "avatar_iv"
6759
+ }
6760
+ }
6761
+ };
6743
6762
  var dynamicVoiceConfig = {
6744
6763
  ...params.voiceId([], "", {
6745
6764
  required: true,
@@ -6794,6 +6813,7 @@ var { MODELS: MODELS25 } = defineModels("heygen", [
6794
6813
  required: true,
6795
6814
  catalog: { workflow: "heygen/v1/catalog/avatars" }
6796
6815
  }),
6816
+ ...engineParam,
6797
6817
  ...params.resolution(["4k", "1080p", "720p"], "720p"),
6798
6818
  ...params.aspectRatio(["16:9", "9:16", "4:5", "5:4", "1:1", "auto"]),
6799
6819
  ...dynamicVoiceConfig,
@@ -8160,15 +8180,6 @@ var buildPcpQwenEditPayload = (ctx) => {
8160
8180
  ...ctx.negativePrompt ? { negative_prompt: ctx.negativePrompt } : {}
8161
8181
  };
8162
8182
  };
8163
- var buildPcpQwenAnglePayload = (ctx) => {
8164
- const c = ctx;
8165
- return {
8166
- ...buildPcpQwenEditPayload(ctx),
8167
- ...c.numInferenceSteps != null ? { num_inference_steps: c.numInferenceSteps } : {},
8168
- ...ctx.cfgScale != null ? { guidance_scale: ctx.cfgScale } : {},
8169
- ...c.loraWeights ? { lora_params: { lora_weights: c.loraWeights, keep_other_weights: false } } : {}
8170
- };
8171
- };
8172
8183
  var buildPcpFluxKleinPayload = (ctx) => {
8173
8184
  const size = resolveImageSize(ctx, FLUX_AR_TO_SIZE);
8174
8185
  const [w, h] = size ? size.split("x").map((n) => parseInt(n)) : [1024, 1024];
@@ -8283,38 +8294,6 @@ var { MODELS: MODELS31 } = defineModels("picsart", [
8283
8294
  ...params.negativePrompt()
8284
8295
  }
8285
8296
  },
8286
- {
8287
- id: "picsart-qwen-image-edit-angle",
8288
- name: "Picsart Angle Change",
8289
- addedAt: "2026-06-30",
8290
- workflow: "pcp/v1/qwen-image-edit-angle",
8291
- buildPayload: buildPcpQwenAnglePayload,
8292
- estimatedTime: 20,
8293
- mode: "image",
8294
- inputType: "i2i",
8295
- description: "Change the camera angle / viewpoint of a subject with automatic relighting.",
8296
- features: [feat("Image Input", "input"), feat("Multi-Ref", "characteristic")],
8297
- paramConfig: {
8298
- ...params.imageInput(3, "Source Images", true),
8299
- ...params.prompt({ placeholder: "e.g. front-left quarter view elevated shot medium shot" }),
8300
- ...params.negativePrompt(),
8301
- numInferenceSteps: {
8302
- label: "Inference Steps",
8303
- descriptor: { kind: "range", min: 1, max: 50, step: 1, default: 16 }
8304
- },
8305
- ...params.cfgScale(1, 10, 4),
8306
- loraWeights: {
8307
- label: "LoRA Weights",
8308
- descriptor: {
8309
- kind: "object",
8310
- fields: {
8311
- lora_angle: { kind: "range", min: 0, max: 1, step: 0.1, default: 1, required: false },
8312
- lora_angle_lighting: { kind: "range", min: 0, max: 1, step: 0.1, default: 1, required: false }
8313
- }
8314
- }
8315
- }
8316
- }
8317
- },
8318
8297
  {
8319
8298
  id: "picsart-flux-2-klein",
8320
8299
  name: "Flux 2 Klein 4B",
@@ -11667,7 +11646,6 @@ var PicsartFlowVideo = "picsart-flow-video";
11667
11646
  var PicsartFlux2Klein = "picsart-flux-2-klein";
11668
11647
  var PicsartHidreamT2i = "picsart-hidream-t2i";
11669
11648
  var PicsartQwenImageEdit = "picsart-qwen-image-edit";
11670
- var PicsartQwenImageEditAngle = "picsart-qwen-image-edit-angle";
11671
11649
  var PicsartQwenMakeup = "picsart-qwen-makeup";
11672
11650
  var PicsartSanaSprintV1 = "picsart-sana-sprint-v1";
11673
11651
  var PicsartSodV82 = "picsart-sod-v8-2";
@@ -11896,7 +11874,6 @@ var Models = {
11896
11874
  PicsartFlux2Klein,
11897
11875
  PicsartHidreamT2i,
11898
11876
  PicsartQwenImageEdit,
11899
- PicsartQwenImageEditAngle,
11900
11877
  PicsartQwenMakeup,
11901
11878
  PicsartSanaSprintV1,
11902
11879
  PicsartSodV82,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.35.0",
3
+ "version": "5.37.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",