@picsart/ai-sdk 5.0.0 → 5.1.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 +0 -5
  2. package/index.js +21 -48
  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
  };
@@ -2459,7 +2455,6 @@ declare const Models: {
2459
2455
  readonly QwenImage2: "qwen-image-2";
2460
2456
  readonly QwenImage2Pro: "qwen-image-2-pro";
2461
2457
  readonly QwenImage30: "qwen-image-3.0";
2462
- readonly QwenImageEditPlus: "qwen-image-edit-plus";
2463
2458
  readonly RecraftCreativeUpscale: "recraft-creative-upscale";
2464
2459
  readonly RecraftCrispUpscale: "recraft-crisp-upscale";
2465
2460
  readonly RecraftExplore: "recraft-explore";
package/index.js CHANGED
@@ -6106,20 +6106,21 @@ var { MODELS: MODELS23 } = defineModels("openai", [
6106
6106
  ]);
6107
6107
 
6108
6108
  // src/vendors/catalog/elevenlabs.ts
6109
- var buildElevenLabsTTSPayload = (ctx) => ({
6109
+ var buildElevenLabsTTSPayload = (modelId) => (ctx) => ({
6110
6110
  text: ctx.prompt,
6111
6111
  voice_id: ctx.voiceId ?? DEFAULT_VOICE_ID,
6112
- model_id: ctx.modelId,
6112
+ model_id: modelId,
6113
6113
  ...ctx.language ? { language_code: ctx.language } : {}
6114
6114
  });
6115
- var buildElevenLabsSFXPayload = (ctx) => ({
6115
+ var buildElevenLabsSFXPayload = (modelId) => (ctx) => ({
6116
6116
  text: ctx.prompt,
6117
- duration_seconds: ctx.duration ?? 5
6117
+ duration_seconds: ctx.duration ?? 5,
6118
+ model_id: modelId
6118
6119
  });
6119
- var buildElevenLabsSTSPayload = (ctx) => ({
6120
+ var buildElevenLabsSTSPayload = (modelId) => (ctx) => ({
6120
6121
  audio_url: ctx.audioUrl,
6121
6122
  voice_id: ctx.voiceId ?? DEFAULT_VOICE_ID,
6122
- model_id: ctx.modelId,
6123
+ model_id: modelId,
6123
6124
  remove_background_noise: ctx.removeBackgroundNoise ?? false
6124
6125
  });
6125
6126
  var buildElevenLabsAudioIsolationPayload = (ctx) => ({
@@ -6134,10 +6135,14 @@ var buildElevenLabsVoiceRemixPayload = (ctx) => ({
6134
6135
  voice_id: ctx.voiceId ?? DEFAULT_VOICE_ID,
6135
6136
  voice_description: ctx.prompt
6136
6137
  });
6137
- var buildElevenLabsVoiceDesignPayload = (ctx) => ({
6138
+ var buildElevenLabsVoiceDesignPayload = (modelId) => (ctx) => ({
6138
6139
  voice_description: ctx.prompt,
6139
6140
  auto_generate_text: true,
6140
- ...ctx.modelId ? { model_id: ctx.modelId } : {}
6141
+ model_id: modelId
6142
+ });
6143
+ var buildElevenLabsVoicePreviewsPayload = (ctx) => ({
6144
+ voice_description: ctx.prompt,
6145
+ auto_generate_text: true
6141
6146
  });
6142
6147
  var ttsParamConfig = (promptMaxLength) => ({
6143
6148
  ...params.language(true),
@@ -6152,7 +6157,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6152
6157
  modelId: "eleven_v3",
6153
6158
  addedAt: "2026-02-06",
6154
6159
  workflow: "elevenlabs/v1/text-to-speech",
6155
- buildPayload: buildElevenLabsTTSPayload,
6160
+ buildPayload: buildElevenLabsTTSPayload("eleven_v3"),
6156
6161
  estimatedTime: 11,
6157
6162
  mode: "audio",
6158
6163
  inputType: "tts",
@@ -6167,7 +6172,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6167
6172
  modelId: "eleven_multilingual_v2",
6168
6173
  addedAt: "2026-02-06",
6169
6174
  workflow: "elevenlabs/v1/text-to-speech",
6170
- buildPayload: buildElevenLabsTTSPayload,
6175
+ buildPayload: buildElevenLabsTTSPayload("eleven_multilingual_v2"),
6171
6176
  estimatedTime: 9,
6172
6177
  mode: "audio",
6173
6178
  inputType: "tts",
@@ -6183,7 +6188,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6183
6188
  modelId: "eleven_text_to_sound_v2",
6184
6189
  addedAt: "2026-02-06",
6185
6190
  workflow: "elevenlabs/v1/sound-generation",
6186
- buildPayload: buildElevenLabsSFXPayload,
6191
+ buildPayload: buildElevenLabsSFXPayload("eleven_text_to_sound_v2"),
6187
6192
  estimatedTime: 6,
6188
6193
  mode: "audio",
6189
6194
  inputType: "sfx",
@@ -6217,7 +6222,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6217
6222
  modelId: "eleven_english_sts_v2",
6218
6223
  addedAt: "2026-02-15",
6219
6224
  workflow: "elevenlabs/v1/speech-to-speech",
6220
- buildPayload: buildElevenLabsSTSPayload,
6225
+ buildPayload: buildElevenLabsSTSPayload("eleven_english_sts_v2"),
6221
6226
  estimatedTime: 15,
6222
6227
  mode: "audio",
6223
6228
  inputType: "sts",
@@ -6235,7 +6240,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6235
6240
  modelId: "eleven_multilingual_sts_v2",
6236
6241
  addedAt: "2026-02-15",
6237
6242
  workflow: "elevenlabs/v1/speech-to-speech",
6238
- buildPayload: buildElevenLabsSTSPayload,
6243
+ buildPayload: buildElevenLabsSTSPayload("eleven_multilingual_sts_v2"),
6239
6244
  estimatedTime: 15,
6240
6245
  mode: "audio",
6241
6246
  inputType: "sts",
@@ -6302,7 +6307,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6302
6307
  addedAt: "2026-03-24",
6303
6308
  modelId: "eleven_ttv_v3",
6304
6309
  workflow: "elevenlabs/v1/voice-design",
6305
- buildPayload: buildElevenLabsVoiceDesignPayload,
6310
+ buildPayload: buildElevenLabsVoiceDesignPayload("eleven_ttv_v3"),
6306
6311
  estimatedTime: 15,
6307
6312
  mode: "audio",
6308
6313
  inputType: "tts",
@@ -6316,7 +6321,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6316
6321
  addedAt: "2026-03-24",
6317
6322
  modelId: "eleven_multilingual_ttv_v2",
6318
6323
  workflow: "elevenlabs/v1/voice-design",
6319
- buildPayload: buildElevenLabsVoiceDesignPayload,
6324
+ buildPayload: buildElevenLabsVoiceDesignPayload("eleven_multilingual_ttv_v2"),
6320
6325
  estimatedTime: 15,
6321
6326
  mode: "audio",
6322
6327
  inputType: "tts",
@@ -6329,7 +6334,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
6329
6334
  name: "Eleven Voice Previews",
6330
6335
  addedAt: "2026-03-24",
6331
6336
  workflow: "elevenlabs/v1/voice-create-previews",
6332
- buildPayload: buildElevenLabsVoiceDesignPayload,
6337
+ buildPayload: buildElevenLabsVoicePreviewsPayload,
6333
6338
  estimatedTime: 15,
6334
6339
  mode: "audio",
6335
6340
  inputType: "tts",
@@ -6697,14 +6702,6 @@ var { MODELS: MODELS27 } = defineModels("ideogram", [
6697
6702
  ]);
6698
6703
 
6699
6704
  // src/vendors/catalog/qwen.ts
6700
- var QWEN_SIZE_MAP = {
6701
- "1024x1024": "1024x1024",
6702
- "1024x768": "1024x768",
6703
- "768x1024": "768x1024",
6704
- "1536x1024": "1536x1024",
6705
- "1024x1536": "1024x1536",
6706
- "2048x2048": "2048x2048"
6707
- };
6708
6705
  var QWEN_V1_SIZES = [
6709
6706
  "2048x2048",
6710
6707
  "2688x1536",
@@ -6726,11 +6723,6 @@ var buildQwen2Payload = (ctx) => {
6726
6723
  ...hasImages ? { image_urls: ctx.imageUrls } : {}
6727
6724
  };
6728
6725
  };
6729
- var buildQwenEditPlusPayload = (ctx) => ({
6730
- prompt: ctx.prompt,
6731
- image_urls: ctx.imageUrls ?? [],
6732
- ...ctx.size && QWEN_SIZE_MAP[ctx.size] ? { size: QWEN_SIZE_MAP[ctx.size] } : {}
6733
- });
6734
6726
  var buildQwenV1 = (model) => (ctx) => {
6735
6727
  const hasImages = Array.isArray(ctx.imageUrls) && ctx.imageUrls.length > 0;
6736
6728
  return {
@@ -6835,23 +6827,6 @@ var { MODELS: MODELS28 } = defineModels("qwen", [
6835
6827
  feat("2K", "resolution")
6836
6828
  ],
6837
6829
  paramConfig: qwenV1Params3
6838
- },
6839
- {
6840
- id: "qwen-image-edit-plus",
6841
- name: "Qwen Edit Plus",
6842
- addedAt: "2026-02-06",
6843
- workflow: "qwen-image-edit-plus",
6844
- buildPayload: buildQwenEditPlusPayload,
6845
- estimatedTime: 11,
6846
- mode: "image",
6847
- inputType: "i2i",
6848
- description: "Edit or transform up to 3 source images with prompt-guided changes.",
6849
- features: [feat("Image Input", "input")],
6850
- paramConfig: {
6851
- ...params.prompt(),
6852
- // size: Qwen edit-plus API ignores size param — output is always 1024x1024
6853
- ...params.imageInput(3, "Source Images", true)
6854
- }
6855
6830
  }
6856
6831
  ]);
6857
6832
 
@@ -10539,7 +10514,6 @@ var Qwen = "qwen";
10539
10514
  var QwenImage2 = "qwen-image-2";
10540
10515
  var QwenImage2Pro = "qwen-image-2-pro";
10541
10516
  var QwenImage30 = "qwen-image-3.0";
10542
- var QwenImageEditPlus = "qwen-image-edit-plus";
10543
10517
  var RecraftCreativeUpscale = "recraft-creative-upscale";
10544
10518
  var RecraftCrispUpscale = "recraft-crisp-upscale";
10545
10519
  var RecraftExplore = "recraft-explore";
@@ -10738,7 +10712,6 @@ var Models = {
10738
10712
  QwenImage2,
10739
10713
  QwenImage2Pro,
10740
10714
  QwenImage30,
10741
- QwenImageEditPlus,
10742
10715
  RecraftCreativeUpscale,
10743
10716
  RecraftCrispUpscale,
10744
10717
  RecraftExplore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.0.0",
3
+ "version": "5.1.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",