@picsart/ai-sdk 6.11.1 → 6.12.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.
- package/_vendor/workflows-types/index.d.ts +1770 -1714
- package/index.d.ts +19 -2
- package/index.js +78 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -204,6 +204,16 @@ type ModelInputById = {
|
|
|
204
204
|
styleExaggeration?: number;
|
|
205
205
|
speed?: number;
|
|
206
206
|
useSpeakerBoost?: boolean;
|
|
207
|
+
withTimestamps?: boolean;
|
|
208
|
+
};
|
|
209
|
+
"eleven-speech-to-text": {
|
|
210
|
+
audioUrl: string;
|
|
211
|
+
language?: string;
|
|
212
|
+
diarize?: boolean;
|
|
213
|
+
numSpeakers?: number;
|
|
214
|
+
timestampsGranularity?: "word" | "character";
|
|
215
|
+
tagAudioEvents?: boolean;
|
|
216
|
+
seed?: number;
|
|
207
217
|
};
|
|
208
218
|
"eleven-sts-v2": {
|
|
209
219
|
audioUrl: string;
|
|
@@ -232,6 +242,11 @@ type ModelInputById = {
|
|
|
232
242
|
styleExaggeration?: number;
|
|
233
243
|
speed?: number;
|
|
234
244
|
useSpeakerBoost?: boolean;
|
|
245
|
+
withTimestamps?: boolean;
|
|
246
|
+
};
|
|
247
|
+
"eleven-video-to-music": {
|
|
248
|
+
videoUrls: [string, ...string[]];
|
|
249
|
+
prompt?: string;
|
|
235
250
|
};
|
|
236
251
|
"eleven-voice-create": {
|
|
237
252
|
prompt: string;
|
|
@@ -1885,7 +1900,7 @@ type ModelInputById = {
|
|
|
1885
1900
|
type TypedModelId = keyof ModelInputById;
|
|
1886
1901
|
type ModelInput<M extends TypedModelId> = ModelInputById[M];
|
|
1887
1902
|
/** IDs of text-generation (LLM) models — narrows generateText(). */
|
|
1888
|
-
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra";
|
|
1903
|
+
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra";
|
|
1889
1904
|
type TextModelInputById = Pick<ModelInputById, TextModelId>;
|
|
1890
1905
|
|
|
1891
1906
|
/**
|
|
@@ -2423,7 +2438,7 @@ type Provider = AppProvider;
|
|
|
2423
2438
|
/** App generation modes. */
|
|
2424
2439
|
type GenerationMode = 'video' | 'image' | 'audio' | 'text';
|
|
2425
2440
|
/** App input types. */
|
|
2426
|
-
type InputType = 't2v' | 'i2v' | 'v2v' | 'a2v' | 't2i' | 'i2i' | 't2a' | 'v2a' | 'tts' | 'sts' | 'sfx' | 'music' | 't2t' | 'i2t' | 'v2t';
|
|
2441
|
+
type InputType = 't2v' | 'i2v' | 'v2v' | 'a2v' | 't2i' | 'i2i' | 't2a' | 'v2a' | 'tts' | 'sts' | 'sfx' | 'music' | 't2t' | 'i2t' | 'v2t' | 'a2t';
|
|
2427
2442
|
interface ModelFeature {
|
|
2428
2443
|
label: string;
|
|
2429
2444
|
variant: 'frame' | 'resolution' | 'audio' | 'duration' | 'input' | 'quality' | 'style' | 'characteristic';
|
|
@@ -3083,9 +3098,11 @@ declare const Models: {
|
|
|
3083
3098
|
readonly ElevenDubbing: "eleven-dubbing";
|
|
3084
3099
|
readonly ElevenMultilingualStsV2: "eleven-multilingual-sts-v2";
|
|
3085
3100
|
readonly ElevenMultilingualV2: "eleven-multilingual-v2";
|
|
3101
|
+
readonly ElevenSpeechToText: "eleven-speech-to-text";
|
|
3086
3102
|
readonly ElevenStsV2: "eleven-sts-v2";
|
|
3087
3103
|
readonly ElevenTextToDialogue: "eleven-text-to-dialogue";
|
|
3088
3104
|
readonly ElevenV3: "eleven-v3";
|
|
3105
|
+
readonly ElevenVideoToMusic: "eleven-video-to-music";
|
|
3089
3106
|
readonly ElevenVoiceCreate: "eleven-voice-create";
|
|
3090
3107
|
readonly ElevenVoiceDesignV2: "eleven-voice-design-v2";
|
|
3091
3108
|
readonly ElevenVoiceDesignV3: "eleven-voice-design-v3";
|
package/index.js
CHANGED
|
@@ -6937,7 +6937,11 @@ var ttsParamConfig = (promptMaxLength, withLanguage) => ({
|
|
|
6937
6937
|
...withLanguage ? params.language(false) : {},
|
|
6938
6938
|
...params.prompt({ maxLength: promptMaxLength }),
|
|
6939
6939
|
...params.voiceId([], DEFAULT_VOICE_ID, { catalog: VOICE_CATALOG }),
|
|
6940
|
-
...voiceSettingsParams(true)
|
|
6940
|
+
...voiceSettingsParams(true),
|
|
6941
|
+
// Timings come back beside the audio, for captions and lip sync. Off by
|
|
6942
|
+
// default: the vendor answers a different route that inlines the audio as
|
|
6943
|
+
// base64, and callers who do not need timings should not pay the decode.
|
|
6944
|
+
...p.boolean("withTimestamps", false, "Character Timings")
|
|
6941
6945
|
});
|
|
6942
6946
|
var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
6943
6947
|
// ── TTS ───────────────────────────────────────────────────────────
|
|
@@ -7063,6 +7067,56 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
7063
7067
|
...p.boolean("isInstrumental", false, "Instrumental Only")
|
|
7064
7068
|
}
|
|
7065
7069
|
},
|
|
7070
|
+
// ── Transcription ─────────────────────────────────────────────────
|
|
7071
|
+
{
|
|
7072
|
+
// `modelId` is the pricing-catalog key: the vendor id `scribe_v2` is not
|
|
7073
|
+
// vendor-scoped, so pricing carries the `eleven_` prefix, as music does.
|
|
7074
|
+
id: "eleven-speech-to-text",
|
|
7075
|
+
name: "Eleven Scribe v2",
|
|
7076
|
+
modelId: "eleven_scribe_v2",
|
|
7077
|
+
addedAt: "2026-09-24",
|
|
7078
|
+
workflow: "elevenlabs/v1/speech-to-text",
|
|
7079
|
+
estimatedTime: 10,
|
|
7080
|
+
mode: "text",
|
|
7081
|
+
inputType: "a2t",
|
|
7082
|
+
description: "Transcribe speech from audio or video, with word timings and speaker labels.",
|
|
7083
|
+
features: [feat("Transcription", "characteristic"), feat("Speaker Labels", "characteristic")],
|
|
7084
|
+
paramConfig: {
|
|
7085
|
+
...params.audioInput("Audio or Video", true),
|
|
7086
|
+
// ISO 639-1 or 639-3. Left free text: the vendor detects the language on
|
|
7087
|
+
// its own, and the closed list would be 99 entries of upkeep.
|
|
7088
|
+
language: {
|
|
7089
|
+
label: "Language (ISO code, optional)",
|
|
7090
|
+
descriptor: { kind: "text", placeholder: "e.g. en, rus \u2014 omit to auto-detect" }
|
|
7091
|
+
},
|
|
7092
|
+
...p.boolean("diarize", false, "Label Speakers"),
|
|
7093
|
+
...p.range("numSpeakers", 1, 32, 1, { step: 1, label: "Speakers" }),
|
|
7094
|
+
...p.enum("timestampsGranularity", ["word", "character"], "word", { label: "Timing Detail" }),
|
|
7095
|
+
...p.boolean("tagAudioEvents", false, "Tag Audio Events"),
|
|
7096
|
+
...params.seed(2147483647)
|
|
7097
|
+
}
|
|
7098
|
+
},
|
|
7099
|
+
// ── Video to Music ────────────────────────────────────────────────
|
|
7100
|
+
{
|
|
7101
|
+
// Same pricing model as music-generation — the same engine writes the
|
|
7102
|
+
// track; what separates the two is the use case, `video-to-audio`.
|
|
7103
|
+
id: "eleven-video-to-music",
|
|
7104
|
+
name: "Eleven Video to Music",
|
|
7105
|
+
modelId: "eleven_music_v2",
|
|
7106
|
+
addedAt: "2026-09-24",
|
|
7107
|
+
workflow: "elevenlabs/v1/video-to-music",
|
|
7108
|
+
estimatedTime: 25,
|
|
7109
|
+
mode: "audio",
|
|
7110
|
+
inputType: "v2a",
|
|
7111
|
+
description: "Score a video with a soundtrack written to follow what happens on screen.",
|
|
7112
|
+
features: [feat("Video Scoring", "characteristic"), feat("Soundtrack", "characteristic")],
|
|
7113
|
+
paramConfig: {
|
|
7114
|
+
// The vendor takes up to ten clips, 200MB and 600 seconds in total, and
|
|
7115
|
+
// scores them as one timeline.
|
|
7116
|
+
...params.videoInputs(10, "Videos", true),
|
|
7117
|
+
...params.prompt({ maxLength: 1e3, required: false, placeholder: "How the soundtrack should sound" })
|
|
7118
|
+
}
|
|
7119
|
+
},
|
|
7066
7120
|
// ── Speech-to-Speech ──────────────────────────────────────────────
|
|
7067
7121
|
{
|
|
7068
7122
|
id: "eleven-sts-v2",
|
|
@@ -7227,6 +7281,7 @@ var buildElevenLabsTTSPayload = (modelId) => (input) => ({
|
|
|
7227
7281
|
voice_id: input.voiceId ?? DEFAULT_VOICE_ID,
|
|
7228
7282
|
model_id: modelId,
|
|
7229
7283
|
...input.language ? { language_code: input.language } : {},
|
|
7284
|
+
...input.withTimestamps ? { with_timestamps: true } : {},
|
|
7230
7285
|
...voiceSettings(input)
|
|
7231
7286
|
});
|
|
7232
7287
|
var buildElevenLabsSTSPayload = (modelId) => (input) => ({
|
|
@@ -7246,13 +7301,30 @@ var buildElevenLabsDialoguePayload = (input) => ({
|
|
|
7246
7301
|
...input.language ? { language_code: input.language } : {},
|
|
7247
7302
|
...input.seed != null ? { seed: input.seed } : {}
|
|
7248
7303
|
});
|
|
7304
|
+
var buildElevenLabsTranscribePayload = (input) => ({
|
|
7305
|
+
audio_url: input.audioUrl,
|
|
7306
|
+
...input.language ? { language_code: input.language } : {},
|
|
7307
|
+
...input.diarize ? { diarize: true } : {},
|
|
7308
|
+
// Only meaningful alongside diarization, and only when the caller moved it
|
|
7309
|
+
// off the default of one.
|
|
7310
|
+
...input.diarize && input.numSpeakers && input.numSpeakers > 1 ? { num_speakers: input.numSpeakers } : {},
|
|
7311
|
+
...input.timestampsGranularity ? { timestamps_granularity: input.timestampsGranularity } : {},
|
|
7312
|
+
...input.tagAudioEvents ? { tag_audio_events: true } : {},
|
|
7313
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
7314
|
+
});
|
|
7315
|
+
var buildElevenLabsVideoToMusicPayload = (input) => ({
|
|
7316
|
+
video_urls: input.videoUrls,
|
|
7317
|
+
...input.prompt ? { description: input.prompt } : {}
|
|
7318
|
+
});
|
|
7249
7319
|
registerPayloads(MODELS24, {
|
|
7250
7320
|
"elevenlabs-music-v2": buildElevenLabsMusicPayload,
|
|
7251
7321
|
"eleven-v3": buildElevenLabsTTSPayload("eleven_v3"),
|
|
7252
7322
|
"eleven-multilingual-v2": buildElevenLabsTTSPayload("eleven_multilingual_v2"),
|
|
7253
7323
|
"eleven-sts-v2": buildElevenLabsSTSPayload("eleven_english_sts_v2"),
|
|
7254
7324
|
"eleven-multilingual-sts-v2": buildElevenLabsSTSPayload("eleven_multilingual_sts_v2"),
|
|
7255
|
-
"eleven-text-to-dialogue": buildElevenLabsDialoguePayload
|
|
7325
|
+
"eleven-text-to-dialogue": buildElevenLabsDialoguePayload,
|
|
7326
|
+
"eleven-speech-to-text": buildElevenLabsTranscribePayload,
|
|
7327
|
+
"eleven-video-to-music": buildElevenLabsVideoToMusicPayload
|
|
7256
7328
|
});
|
|
7257
7329
|
|
|
7258
7330
|
// src/vendors/catalog/heygen.ts
|
|
@@ -12587,9 +12659,11 @@ var ElevenAudioIsolation = "eleven-audio-isolation";
|
|
|
12587
12659
|
var ElevenDubbing = "eleven-dubbing";
|
|
12588
12660
|
var ElevenMultilingualStsV2 = "eleven-multilingual-sts-v2";
|
|
12589
12661
|
var ElevenMultilingualV2 = "eleven-multilingual-v2";
|
|
12662
|
+
var ElevenSpeechToText = "eleven-speech-to-text";
|
|
12590
12663
|
var ElevenStsV2 = "eleven-sts-v2";
|
|
12591
12664
|
var ElevenTextToDialogue = "eleven-text-to-dialogue";
|
|
12592
12665
|
var ElevenV3 = "eleven-v3";
|
|
12666
|
+
var ElevenVideoToMusic = "eleven-video-to-music";
|
|
12593
12667
|
var ElevenVoiceCreate = "eleven-voice-create";
|
|
12594
12668
|
var ElevenVoiceDesignV2 = "eleven-voice-design-v2";
|
|
12595
12669
|
var ElevenVoiceDesignV3 = "eleven-voice-design-v3";
|
|
@@ -12832,9 +12906,11 @@ var Models = {
|
|
|
12832
12906
|
ElevenDubbing,
|
|
12833
12907
|
ElevenMultilingualStsV2,
|
|
12834
12908
|
ElevenMultilingualV2,
|
|
12909
|
+
ElevenSpeechToText,
|
|
12835
12910
|
ElevenStsV2,
|
|
12836
12911
|
ElevenTextToDialogue,
|
|
12837
12912
|
ElevenV3,
|
|
12913
|
+
ElevenVideoToMusic,
|
|
12838
12914
|
ElevenVoiceCreate,
|
|
12839
12915
|
ElevenVoiceDesignV2,
|
|
12840
12916
|
ElevenVoiceDesignV3,
|