@picsart/ai-sdk 5.0.0 → 5.0.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.
Files changed (2) hide show
  1. package/index.js +21 -16
  2. package/package.json +1 -1
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picsart/ai-sdk",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
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",