@runapi.ai/suno 0.2.6 → 0.2.7
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/README.md +3 -1
- package/dist/index.d.mts +548 -3
- package/dist/index.d.ts +548 -3
- package/dist/index.js +374 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +375 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/skills/suno/README.md +3 -2
- package/skills/suno/SKILL.md +15 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,57 @@
|
|
|
1
|
-
import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, ClientOptions } from '@runapi.ai/core';
|
|
1
|
+
import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, BaseClient, ClientOptions } from '@runapi.ai/core';
|
|
2
2
|
export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
|
|
3
3
|
|
|
4
|
+
/** Suno music generation engine version. V5.5 has highest quality; V4 is the earliest available. */
|
|
4
5
|
type SunoModel = 'suno-v5.5' | 'suno-v5' | 'suno-v4.5-plus' | 'suno-v4.5-all' | 'suno-v4.5' | 'suno-v4';
|
|
6
|
+
/** Model versions that support sound effect generation (subset of SunoModel). */
|
|
5
7
|
type SoundModel = 'suno-v5' | 'suno-v5.5';
|
|
8
|
+
/** Language for the voice-cloning validation phrase the user must read back. */
|
|
6
9
|
type ValidationPhraseLanguage = 'en' | 'zh' | 'es' | 'fr' | 'pt' | 'de' | 'ja' | 'ko' | 'hi' | 'ru';
|
|
10
|
+
/** Musical key for sound effect generation (major and minor keys). */
|
|
7
11
|
type SoundKey = 'Cm' | 'C#m' | 'Dm' | 'D#m' | 'Em' | 'Fm' | 'F#m' | 'Gm' | 'G#m' | 'Am' | 'A#m' | 'Bm' | 'C' | 'C#' | 'D' | 'D#' | 'E' | 'F' | 'F#' | 'G' | 'G#' | 'A' | 'A#' | 'B';
|
|
8
12
|
type VocalGender = 'male' | 'female';
|
|
13
|
+
/** `style` applies genre/mood without changing the voice; `voice` applies cloned voice characteristics. */
|
|
9
14
|
type PersonaType = 'style' | 'voice';
|
|
15
|
+
/** `source` inherits style/title/continue_at from the original track; `custom` requires explicit values. */
|
|
10
16
|
type ParameterMode = 'source' | 'custom';
|
|
17
|
+
/**
|
|
18
|
+
* Controls how vocals are generated.
|
|
19
|
+
* - `auto_lyrics`: generates lyrics automatically from the `prompt` field
|
|
20
|
+
* - `exact_lyrics`: sings the exact text in the `lyrics` field
|
|
21
|
+
* - `instrumental`: produces music with no vocals
|
|
22
|
+
*/
|
|
11
23
|
type VocalMode = 'auto_lyrics' | 'exact_lyrics' | 'instrumental';
|
|
12
24
|
type TaskStatus = AsyncTaskStatus;
|
|
25
|
+
/** Progress phase of a multi-step music generation task. */
|
|
13
26
|
type GenerationStage = 'text_generated' | 'first_audio_ready' | 'all_audios_ready' | 'failed';
|
|
27
|
+
/** Singing ability of the voice being cloned; calibrates model expectations during voice generation. */
|
|
14
28
|
type SingerSkillLevel = 'beginner' | 'intermediate' | 'advanced' | 'professional';
|
|
29
|
+
/**
|
|
30
|
+
* Fields shared across most Suno music generation endpoints.
|
|
31
|
+
* `style_weight`, `weirdness_constraint`, and `audio_weight` are 0-1 knobs (2 decimal places)
|
|
32
|
+
* that tune style adherence, creative deviation, and audio fidelity respectively.
|
|
33
|
+
*/
|
|
15
34
|
interface SunoBaseParams {
|
|
16
35
|
callback_url?: string;
|
|
17
36
|
model?: SunoModel;
|
|
18
37
|
vocal_gender?: VocalGender;
|
|
38
|
+
/** 0-1; higher values enforce stricter style adherence. */
|
|
19
39
|
style_weight?: number;
|
|
40
|
+
/** 0-1; higher values allow more creative deviation from the prompt. */
|
|
20
41
|
weirdness_constraint?: number;
|
|
42
|
+
/** 0-1; higher values prioritize audio fidelity over stylistic variation. */
|
|
21
43
|
audio_weight?: number;
|
|
22
44
|
}
|
|
45
|
+
/** Auto-lyrics variant: generates lyrics automatically from `prompt`. */
|
|
23
46
|
interface TextToMusicPromptParams extends SunoBaseParams {
|
|
24
47
|
vocal_mode: 'auto_lyrics';
|
|
48
|
+
/** Song brief used for automatic lyrics generation. */
|
|
25
49
|
prompt: string;
|
|
26
50
|
lyrics?: never;
|
|
27
51
|
style?: never;
|
|
28
52
|
title?: never;
|
|
29
53
|
}
|
|
54
|
+
/** Exact-lyrics variant: sings the literal `lyrics` text with explicit style/title. */
|
|
30
55
|
interface TextToMusicLyricsParams extends SunoBaseParams {
|
|
31
56
|
vocal_mode: 'exact_lyrics';
|
|
32
57
|
prompt?: never;
|
|
@@ -35,11 +60,14 @@ interface TextToMusicLyricsParams extends SunoBaseParams {
|
|
|
35
60
|
title: string;
|
|
36
61
|
persona_id?: string;
|
|
37
62
|
persona_type?: PersonaType;
|
|
63
|
+
/** Styles to avoid (e.g. "heavy metal, screamo"). */
|
|
38
64
|
negative_tags?: string;
|
|
39
65
|
duration_seconds?: number;
|
|
66
|
+
/** Timestamp in seconds to continue generation from. */
|
|
40
67
|
continue_at?: number;
|
|
41
68
|
endpoint?: string;
|
|
42
69
|
}
|
|
70
|
+
/** Instrumental variant: produces music with no vocals. Requires explicit style/title. */
|
|
43
71
|
interface TextToMusicInstrumentalParams extends SunoBaseParams {
|
|
44
72
|
vocal_mode: 'instrumental';
|
|
45
73
|
prompt?: never;
|
|
@@ -53,30 +81,49 @@ interface TextToMusicInstrumentalParams extends SunoBaseParams {
|
|
|
53
81
|
continue_at?: number;
|
|
54
82
|
endpoint?: string;
|
|
55
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Params for text-to-music generation. The discriminated union on `vocal_mode` determines
|
|
86
|
+
* which fields are required: `auto_lyrics` needs `prompt`, `exact_lyrics` needs `lyrics` + `style` + `title`,
|
|
87
|
+
* and `instrumental` needs `style` + `title`.
|
|
88
|
+
*/
|
|
56
89
|
type TextToMusicParams = TextToMusicPromptParams | TextToMusicLyricsParams | TextToMusicInstrumentalParams;
|
|
90
|
+
/**
|
|
91
|
+
* Params for extending an existing track from a specified timestamp.
|
|
92
|
+
* Provide exactly one source: `task_id`, `audio_id`, `audio_url`, or `upload_url`.
|
|
93
|
+
* `parameter_mode` controls whether to inherit the source track's settings (`source`)
|
|
94
|
+
* or override style, title, and continue_at (`custom`).
|
|
95
|
+
*/
|
|
57
96
|
interface ExtendMusicParams extends SunoBaseParams {
|
|
58
97
|
task_id?: string;
|
|
59
98
|
audio_id?: string;
|
|
60
99
|
audio_url?: string;
|
|
61
100
|
upload_url?: string;
|
|
62
101
|
parameter_mode: ParameterMode;
|
|
102
|
+
/** When true, produces an instrumental extension with no vocals. */
|
|
63
103
|
instrumental?: boolean;
|
|
64
104
|
prompt?: string;
|
|
65
105
|
lyrics?: string;
|
|
106
|
+
/** Required when parameter_mode is `custom`. */
|
|
66
107
|
style?: string;
|
|
108
|
+
/** Required when parameter_mode is `custom`. Max ~80-100 characters. */
|
|
67
109
|
title?: string;
|
|
110
|
+
/** Required when parameter_mode is `custom`. Seconds, must be > 0 and < source duration. */
|
|
68
111
|
continue_at?: number;
|
|
69
112
|
persona_id?: string;
|
|
70
113
|
persona_type?: PersonaType;
|
|
71
114
|
model?: SunoModel;
|
|
72
115
|
negative_tags?: string;
|
|
73
116
|
}
|
|
117
|
+
/** Params for generating cover artwork for an existing music task. */
|
|
74
118
|
interface GenerateArtworkParams {
|
|
119
|
+
/** Source music task ID to generate artwork for. */
|
|
75
120
|
task_id: string;
|
|
76
121
|
callback_url?: string;
|
|
77
122
|
[key: string]: unknown;
|
|
78
123
|
}
|
|
124
|
+
/** Cover audio with auto-generated lyrics from a prompt. */
|
|
79
125
|
interface CoverAudioPromptParams extends SunoBaseParams {
|
|
126
|
+
/** URL of the audio file to re-record vocals over. */
|
|
80
127
|
upload_url: string;
|
|
81
128
|
vocal_mode: 'auto_lyrics';
|
|
82
129
|
prompt: string;
|
|
@@ -85,6 +132,7 @@ interface CoverAudioPromptParams extends SunoBaseParams {
|
|
|
85
132
|
title?: never;
|
|
86
133
|
negative_tags?: string;
|
|
87
134
|
}
|
|
135
|
+
/** Cover audio with exact lyrics sung over the uploaded track. */
|
|
88
136
|
interface CoverAudioLyricsParams extends SunoBaseParams {
|
|
89
137
|
upload_url: string;
|
|
90
138
|
vocal_mode: 'exact_lyrics';
|
|
@@ -96,6 +144,7 @@ interface CoverAudioLyricsParams extends SunoBaseParams {
|
|
|
96
144
|
persona_type?: PersonaType;
|
|
97
145
|
negative_tags?: string;
|
|
98
146
|
}
|
|
147
|
+
/** Cover audio as instrumental (no vocals) over the uploaded track. */
|
|
99
148
|
interface CoverAudioInstrumentalParams extends SunoBaseParams {
|
|
100
149
|
upload_url: string;
|
|
101
150
|
vocal_mode: 'instrumental';
|
|
@@ -107,98 +156,166 @@ interface CoverAudioInstrumentalParams extends SunoBaseParams {
|
|
|
107
156
|
persona_type?: PersonaType;
|
|
108
157
|
negative_tags?: string;
|
|
109
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Params for re-recording vocals over an uploaded audio file. Discriminated on `vocal_mode`
|
|
161
|
+
* the same way as {@link TextToMusicParams}.
|
|
162
|
+
*/
|
|
110
163
|
type CoverAudioParams = CoverAudioPromptParams | CoverAudioLyricsParams | CoverAudioInstrumentalParams;
|
|
164
|
+
/**
|
|
165
|
+
* Params for generating and adding an instrumental backing track to uploaded audio.
|
|
166
|
+
* `tags` and `negative_tags` control the generated style; pass empty strings if no preference.
|
|
167
|
+
*/
|
|
111
168
|
interface AddInstrumentalParams extends SunoBaseParams {
|
|
112
169
|
model?: SunoModel;
|
|
113
170
|
upload_url: string;
|
|
114
171
|
title: string;
|
|
172
|
+
/** Styles to avoid (required, but can be empty string). */
|
|
115
173
|
negative_tags: string;
|
|
174
|
+
/** Style/genre tags for the generated instrumental. */
|
|
116
175
|
tags: string;
|
|
117
176
|
}
|
|
177
|
+
/** Params for generating and adding vocals to an uploaded instrumental track. */
|
|
118
178
|
interface AddVocalsParams extends SunoBaseParams {
|
|
119
179
|
model?: SunoModel;
|
|
120
180
|
upload_url: string;
|
|
181
|
+
/** Vocal lyrics to sing over the instrumental. */
|
|
121
182
|
lyrics: string;
|
|
122
183
|
title: string;
|
|
184
|
+
/** Styles to avoid (required, but can be empty string). */
|
|
123
185
|
negative_tags: string;
|
|
124
186
|
style: string;
|
|
125
187
|
}
|
|
188
|
+
/** Params for splitting a track into individual instrument stems (vocals, drums, bass, etc.). */
|
|
126
189
|
interface SeparateAudioStemsParams {
|
|
127
190
|
task_id: string;
|
|
128
191
|
audio_id: string;
|
|
192
|
+
/** `separate_vocal` isolates vocals+instrumental; `split_stem` splits into all individual instruments. */
|
|
129
193
|
type?: 'separate_vocal' | 'split_stem' | string;
|
|
130
194
|
callback_url?: string;
|
|
131
195
|
}
|
|
196
|
+
/** Params for extracting per-instrument MIDI note data from a generated track. */
|
|
132
197
|
interface GenerateMidiParams {
|
|
133
198
|
task_id: string;
|
|
134
199
|
callback_url?: string;
|
|
135
200
|
}
|
|
201
|
+
/** Params for converting a generated track to WAV format. */
|
|
136
202
|
interface ConvertAudioParams {
|
|
137
203
|
task_id: string;
|
|
138
204
|
audio_id?: string;
|
|
139
205
|
callback_url?: string;
|
|
140
206
|
}
|
|
207
|
+
/** Params for generating a music visualization video from an existing track. */
|
|
141
208
|
interface VisualizeMusicParams {
|
|
142
209
|
task_id: string;
|
|
143
210
|
audio_id?: string;
|
|
144
211
|
prompt?: string;
|
|
145
212
|
callback_url?: string;
|
|
213
|
+
/** Author name displayed in the visualization video. */
|
|
146
214
|
author?: string;
|
|
215
|
+
/** Domain name watermark overlaid on the video. */
|
|
147
216
|
domain_name?: string;
|
|
148
217
|
}
|
|
218
|
+
/** Params for AI-powered lyrics generation from a text prompt. */
|
|
149
219
|
interface GenerateLyricsParams {
|
|
150
220
|
prompt: string;
|
|
151
221
|
callback_url?: string;
|
|
152
222
|
}
|
|
223
|
+
/** Params for retrieving word-level timing alignment for a track. Synchronous -- use `run()` directly. */
|
|
153
224
|
interface GetTimestampedLyricsParams {
|
|
154
225
|
task_id: string;
|
|
155
226
|
audio_id: string;
|
|
156
227
|
callback_url?: string;
|
|
157
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Params for re-generating a time range within an existing track with new lyrics and style.
|
|
231
|
+
* `infill_start_time` and `infill_end_time` define the section boundaries in seconds.
|
|
232
|
+
*/
|
|
158
233
|
interface ReplaceSectionParams {
|
|
159
234
|
task_id: string;
|
|
160
235
|
audio_id: string;
|
|
236
|
+
/** Replacement lyrics for the specified section. */
|
|
161
237
|
lyrics: string;
|
|
238
|
+
/** Style/genre tags for the replacement section. */
|
|
162
239
|
tags: string;
|
|
163
240
|
title: string;
|
|
241
|
+
/** Section start time in seconds. */
|
|
164
242
|
infill_start_time: number;
|
|
243
|
+
/** Section end time in seconds. */
|
|
165
244
|
infill_end_time: number;
|
|
166
245
|
callback_url?: string;
|
|
167
246
|
negative_tags?: string;
|
|
247
|
+
/** Complete song lyrics for context; helps maintain coherence across sections. */
|
|
168
248
|
full_lyrics?: string;
|
|
169
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* Params for creating a reusable persona from an existing track's vocals.
|
|
252
|
+
* The persona can be referenced by ID in subsequent generation params. Synchronous -- use `run()` directly.
|
|
253
|
+
*/
|
|
170
254
|
interface GeneratePersonaParams {
|
|
255
|
+
/** Source task ID containing reference vocals. */
|
|
171
256
|
task_id: string;
|
|
172
257
|
audio_id: string;
|
|
173
258
|
name: string;
|
|
174
259
|
description: string;
|
|
175
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Params for generating style/genre tags from a text description.
|
|
263
|
+
* Useful for filling `style` fields in other params. Synchronous -- use `run()` directly.
|
|
264
|
+
*/
|
|
176
265
|
interface BoostStyleParams {
|
|
266
|
+
/** Style description to generate tags from (e.g. "upbeat summer pop with acoustic guitar"). */
|
|
177
267
|
description: string;
|
|
178
268
|
name?: string;
|
|
179
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Params for sound effect generation (not music -- use {@link TextToMusicParams} for songs).
|
|
272
|
+
* Supports loopable audio, BPM control, and musical key selection.
|
|
273
|
+
*/
|
|
180
274
|
interface TextToSoundParams {
|
|
181
275
|
callback_url?: string;
|
|
182
276
|
model: SoundModel;
|
|
277
|
+
/** Sound description, max 500 characters. */
|
|
183
278
|
prompt: string;
|
|
279
|
+
/** When true, generates seamlessly loopable audio. */
|
|
184
280
|
sound_loop?: boolean;
|
|
281
|
+
/** BPM (1-300) for rhythmic sound effects. */
|
|
185
282
|
sound_tempo?: number;
|
|
186
283
|
sound_key?: SoundKey;
|
|
284
|
+
/** When true, captures lyric subtitles from the generated audio. */
|
|
187
285
|
grab_lyrics?: boolean;
|
|
188
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Step 1 of voice cloning: upload a voice recording and specify vocal segment boundaries.
|
|
289
|
+
* Returns a validation phrase the user must re-record and submit via {@link GenerateVoiceParams}.
|
|
290
|
+
*
|
|
291
|
+
* Voice cloning workflow: VoiceToValidationPhrase -> RegenerateValidationPhrase (optional) -> GenerateVoice -> CheckVoice.
|
|
292
|
+
*/
|
|
189
293
|
interface VoiceToValidationPhraseParams {
|
|
294
|
+
/** URL of the source voice recording. */
|
|
190
295
|
voice_url: string;
|
|
296
|
+
/** Start of the vocal segment in the recording (seconds). */
|
|
191
297
|
vocal_start_seconds: number;
|
|
298
|
+
/** End of the vocal segment in the recording (seconds). */
|
|
192
299
|
vocal_end_seconds: number;
|
|
193
300
|
language?: ValidationPhraseLanguage;
|
|
194
301
|
callback_url?: string;
|
|
195
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Step 2 (optional) of voice cloning: requests a new, easier validation phrase for an
|
|
305
|
+
* in-progress voice cloning task, if the original phrase was too difficult.
|
|
306
|
+
*/
|
|
196
307
|
interface RegenerateValidationPhraseParams {
|
|
308
|
+
/** Task ID from a prior VoiceToValidationPhrase call. */
|
|
197
309
|
task_id: string;
|
|
198
310
|
callback_url?: string;
|
|
199
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* Step 3 of voice cloning: submits the user's recording of the validation phrase to train a custom voice.
|
|
314
|
+
* `task_id` is from the prior VoiceToValidationPhrase task; `verify_url` is the user's recording.
|
|
315
|
+
*/
|
|
200
316
|
interface GenerateVoiceParams {
|
|
201
317
|
task_id: string;
|
|
318
|
+
/** URL of the user's recording of the validation phrase. */
|
|
202
319
|
verify_url: string;
|
|
203
320
|
voice_name?: string;
|
|
204
321
|
description?: string;
|
|
@@ -206,10 +323,17 @@ interface GenerateVoiceParams {
|
|
|
206
323
|
singer_skill_level?: SingerSkillLevel;
|
|
207
324
|
callback_url?: string;
|
|
208
325
|
}
|
|
326
|
+
/**
|
|
327
|
+
* Step 4 (final) of voice cloning: checks whether a custom voice from GenerateVoice is ready.
|
|
328
|
+
* Synchronous -- use `run()` directly.
|
|
329
|
+
*/
|
|
209
330
|
interface CheckVoiceParams {
|
|
331
|
+
/** Task ID from a prior GenerateVoice call. */
|
|
210
332
|
task_id: string;
|
|
211
333
|
}
|
|
334
|
+
/** Mashup with auto-generated lyrics. */
|
|
212
335
|
interface CreateMashupPromptParams extends SunoBaseParams {
|
|
336
|
+
/** Exactly two audio URLs to blend into one composition. */
|
|
213
337
|
upload_url_list: [string, string];
|
|
214
338
|
model?: SunoModel;
|
|
215
339
|
vocal_mode: 'auto_lyrics';
|
|
@@ -218,6 +342,7 @@ interface CreateMashupPromptParams extends SunoBaseParams {
|
|
|
218
342
|
style?: never;
|
|
219
343
|
title?: never;
|
|
220
344
|
}
|
|
345
|
+
/** Mashup with exact lyrics sung over the blended tracks. */
|
|
221
346
|
interface CreateMashupLyricsParams extends SunoBaseParams {
|
|
222
347
|
upload_url_list: [string, string];
|
|
223
348
|
model?: SunoModel;
|
|
@@ -229,6 +354,7 @@ interface CreateMashupLyricsParams extends SunoBaseParams {
|
|
|
229
354
|
persona_id?: string;
|
|
230
355
|
persona_type?: PersonaType;
|
|
231
356
|
}
|
|
357
|
+
/** Mashup as instrumental (no vocals). */
|
|
232
358
|
interface CreateMashupInstrumentalParams extends SunoBaseParams {
|
|
233
359
|
upload_url_list: [string, string];
|
|
234
360
|
model?: SunoModel;
|
|
@@ -240,29 +366,39 @@ interface CreateMashupInstrumentalParams extends SunoBaseParams {
|
|
|
240
366
|
persona_id?: string;
|
|
241
367
|
persona_type?: PersonaType;
|
|
242
368
|
}
|
|
369
|
+
/**
|
|
370
|
+
* Params for blending exactly two audio tracks into a single new composition.
|
|
371
|
+
* Discriminated on `vocal_mode` the same way as {@link TextToMusicParams}.
|
|
372
|
+
*/
|
|
243
373
|
type CreateMashupParams = CreateMashupPromptParams | CreateMashupLyricsParams | CreateMashupInstrumentalParams;
|
|
374
|
+
/** Initial response from task creation with the assigned task ID. */
|
|
244
375
|
interface TaskCreateResponse {
|
|
245
376
|
id: string;
|
|
246
377
|
status?: string;
|
|
247
378
|
[key: string]: unknown;
|
|
248
379
|
}
|
|
380
|
+
/** Metadata and URLs for a generated music track. */
|
|
249
381
|
interface Audio {
|
|
250
382
|
id: string;
|
|
251
383
|
audio_url?: string;
|
|
384
|
+
/** Progressive streaming URL; available before the full file is ready. */
|
|
252
385
|
stream_audio_url?: string;
|
|
253
386
|
image_url?: string;
|
|
254
387
|
lyrics?: string;
|
|
255
388
|
model_name?: string;
|
|
256
389
|
title?: string;
|
|
257
390
|
tags?: string[];
|
|
391
|
+
/** Track duration in seconds. */
|
|
258
392
|
duration?: number;
|
|
259
393
|
[key: string]: unknown;
|
|
260
394
|
}
|
|
395
|
+
/** Metadata and URLs for a generated sound effect (distinct from music {@link Audio}). */
|
|
261
396
|
interface SoundAudio {
|
|
262
397
|
id: string;
|
|
263
398
|
audio_url?: string;
|
|
264
399
|
stream_audio_url?: string;
|
|
265
400
|
image_url?: string;
|
|
401
|
+
/** The prompt that was used to generate this sound effect. */
|
|
266
402
|
prompt?: string;
|
|
267
403
|
model_name?: string;
|
|
268
404
|
title?: string;
|
|
@@ -270,6 +406,7 @@ interface SoundAudio {
|
|
|
270
406
|
duration?: number;
|
|
271
407
|
[key: string]: unknown;
|
|
272
408
|
}
|
|
409
|
+
/** Base response for all Suno async tasks, carrying lifecycle status and generation progress. */
|
|
273
410
|
interface AsyncTaskResponse {
|
|
274
411
|
id: string;
|
|
275
412
|
status: TaskStatus;
|
|
@@ -277,28 +414,36 @@ interface AsyncTaskResponse {
|
|
|
277
414
|
error?: string;
|
|
278
415
|
[key: string]: unknown;
|
|
279
416
|
}
|
|
417
|
+
/** Result of a text-to-music generation task. */
|
|
280
418
|
interface TextToMusicResponse extends AsyncTaskResponse {
|
|
281
419
|
audios?: Audio[];
|
|
282
420
|
}
|
|
421
|
+
/** Result of a music extension task. `original_task_id` references the source track. */
|
|
283
422
|
interface ExtendMusicResponse extends AsyncTaskResponse {
|
|
284
423
|
original_task_id?: string;
|
|
285
424
|
audios?: Audio[];
|
|
286
425
|
}
|
|
426
|
+
/** Result of an artwork generation task containing cover image URLs. */
|
|
287
427
|
interface GenerateArtworkResponse extends AsyncTaskResponse {
|
|
288
428
|
covers?: Array<{
|
|
289
429
|
url: string;
|
|
290
430
|
}>;
|
|
291
431
|
}
|
|
432
|
+
/** Result of a cover audio task. */
|
|
292
433
|
interface CoverAudioResponse extends AsyncTaskResponse {
|
|
293
434
|
audios?: Audio[];
|
|
294
435
|
}
|
|
436
|
+
/** Result of adding an instrumental backing track. */
|
|
295
437
|
interface AddInstrumentalResponse extends TextToMusicResponse {
|
|
296
438
|
}
|
|
439
|
+
/** Result of adding vocals to a track. */
|
|
297
440
|
interface AddVocalsResponse extends TextToMusicResponse {
|
|
298
441
|
}
|
|
442
|
+
/** Result of a sound effect generation task (uses {@link SoundAudio} instead of {@link Audio}). */
|
|
299
443
|
interface TextToSoundResponse extends AsyncTaskResponse {
|
|
300
444
|
audios?: SoundAudio[];
|
|
301
445
|
}
|
|
446
|
+
/** URLs for each isolated instrument stem after separation. Only populated stems have URLs. */
|
|
302
447
|
interface SeparatedAudio {
|
|
303
448
|
vocal_url?: string;
|
|
304
449
|
instrumental_url?: string;
|
|
@@ -315,80 +460,107 @@ interface SeparatedAudio {
|
|
|
315
460
|
synth_url?: string;
|
|
316
461
|
woodwinds_url?: string;
|
|
317
462
|
}
|
|
463
|
+
/** Result of a stem separation task. */
|
|
318
464
|
interface SeparateAudioStemsResponse extends AsyncTaskResponse {
|
|
319
465
|
separated_audios?: SeparatedAudio;
|
|
320
466
|
}
|
|
467
|
+
/** A single MIDI note event within an instrument track. */
|
|
321
468
|
interface MidiNote {
|
|
469
|
+
/** MIDI pitch number (0-127). */
|
|
322
470
|
pitch: number;
|
|
323
471
|
start_time: number;
|
|
324
472
|
end_time: number;
|
|
473
|
+
/** Note velocity (0-1 normalized). */
|
|
325
474
|
velocity: number;
|
|
326
475
|
}
|
|
476
|
+
/** All notes for a single instrument extracted from a track. */
|
|
327
477
|
interface MidiInstrument {
|
|
328
478
|
name: string;
|
|
329
479
|
notes: MidiNote[];
|
|
330
480
|
}
|
|
481
|
+
/** Result of a MIDI extraction task with per-instrument note data. */
|
|
331
482
|
interface GenerateMidiResponse extends AsyncTaskResponse {
|
|
332
483
|
instruments?: MidiInstrument[];
|
|
333
484
|
}
|
|
485
|
+
/** Result of a WAV conversion task. */
|
|
334
486
|
interface ConvertAudioResponse extends AsyncTaskResponse {
|
|
487
|
+
/** Download URL for the converted WAV file. */
|
|
335
488
|
wav_url?: string;
|
|
336
489
|
original_task_id?: string;
|
|
337
490
|
}
|
|
491
|
+
/** Result of a music visualization task containing the generated video URL. */
|
|
338
492
|
interface VisualizeMusicResponse extends AsyncTaskResponse {
|
|
339
493
|
video_url?: string;
|
|
340
494
|
original_task_id?: string;
|
|
341
495
|
}
|
|
496
|
+
/** Result of a lyrics generation task with sectioned lyrics. */
|
|
342
497
|
interface GenerateLyricsResponse extends AsyncTaskResponse {
|
|
498
|
+
/** Generated lyrics, split by section (e.g. "Chorus", "Verse 1"). */
|
|
343
499
|
lyrics?: Array<{
|
|
344
500
|
title?: string;
|
|
345
501
|
text: string;
|
|
346
502
|
}>;
|
|
347
503
|
}
|
|
504
|
+
/** Word-level timing alignment for a single word in a track. */
|
|
348
505
|
interface AlignedWord {
|
|
349
506
|
word: string;
|
|
507
|
+
/** Whether alignment succeeded for this word. */
|
|
350
508
|
success: boolean;
|
|
351
509
|
start_time: number;
|
|
352
510
|
end_time: number;
|
|
511
|
+
/** Alignment confidence score. */
|
|
353
512
|
palign: number;
|
|
354
513
|
}
|
|
514
|
+
/** Synchronous response containing word-level timing data and waveform for a track. */
|
|
355
515
|
interface GetTimestampedLyricsResponse {
|
|
356
516
|
aligned_words?: AlignedWord[];
|
|
517
|
+
/** Waveform amplitude data for visualization. */
|
|
357
518
|
waveform_data?: number[];
|
|
519
|
+
/** Character error rate of the lyrics alignment. */
|
|
358
520
|
hoot_cer?: number;
|
|
359
521
|
is_streamed?: boolean;
|
|
360
522
|
[key: string]: unknown;
|
|
361
523
|
}
|
|
524
|
+
/** Result of a section replacement task. */
|
|
362
525
|
interface ReplaceSectionResponse extends AsyncTaskResponse {
|
|
363
526
|
track?: Audio;
|
|
364
527
|
}
|
|
528
|
+
/** A reusable style or voice persona, referenced by ID in generation params. */
|
|
365
529
|
interface Persona {
|
|
366
530
|
id: string;
|
|
367
531
|
name: string;
|
|
368
532
|
description: string;
|
|
369
533
|
[key: string]: unknown;
|
|
370
534
|
}
|
|
535
|
+
/** Synchronous result of persona creation. */
|
|
371
536
|
interface GeneratePersonaResponse {
|
|
372
537
|
persona: Persona;
|
|
373
538
|
error?: string;
|
|
374
539
|
[key: string]: unknown;
|
|
375
540
|
}
|
|
541
|
+
/** Synchronous result of style tag generation. `style` contains the generated tags string. */
|
|
376
542
|
interface BoostStyleResponse {
|
|
377
543
|
style: string;
|
|
378
544
|
error?: string;
|
|
379
545
|
[key: string]: unknown;
|
|
380
546
|
}
|
|
547
|
+
/** Result of a mashup task. */
|
|
381
548
|
interface CreateMashupResponse extends AsyncTaskResponse {
|
|
382
549
|
audios?: Audio[];
|
|
383
550
|
}
|
|
551
|
+
/** Result of a voice-cloning validation phrase task. The user must re-record this phrase. */
|
|
384
552
|
interface ValidationPhraseResponse extends AsyncTaskResponse {
|
|
385
553
|
provider_status?: string;
|
|
554
|
+
/** The validation phrase text the user must read back for voice cloning. */
|
|
386
555
|
validation_phrase?: string;
|
|
387
556
|
}
|
|
557
|
+
/** Result of a voice generation (training) task. `voice_id` is usable in subsequent generation params. */
|
|
388
558
|
interface VoiceGenerationResponse extends AsyncTaskResponse {
|
|
389
559
|
provider_status?: string;
|
|
560
|
+
/** Custom voice identifier, usable as persona in subsequent music generation. */
|
|
390
561
|
voice_id?: string;
|
|
391
562
|
}
|
|
563
|
+
/** Synchronous result indicating whether a custom voice is ready for use. */
|
|
392
564
|
interface CheckVoiceResponse {
|
|
393
565
|
is_available?: boolean;
|
|
394
566
|
error?: string;
|
|
@@ -464,168 +636,520 @@ type CompletedVoiceGenerationResponse = VoiceGenerationResponse & {
|
|
|
464
636
|
voice_id: string;
|
|
465
637
|
};
|
|
466
638
|
|
|
639
|
+
/** Generates songs from a text prompt with configurable vocal mode, style, and persona. */
|
|
467
640
|
declare class TextToMusic {
|
|
468
641
|
private readonly http;
|
|
469
642
|
constructor(http: HttpClient);
|
|
643
|
+
/**
|
|
644
|
+
* Create a text to music task and wait until complete.
|
|
645
|
+
* @param params Text to music parameters.
|
|
646
|
+
* @param options Per-request and polling overrides.
|
|
647
|
+
* @returns The completed text to music response.
|
|
648
|
+
*/
|
|
470
649
|
run(params: TextToMusicParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToMusicResponse>;
|
|
650
|
+
/**
|
|
651
|
+
* Create a text to music task; returns immediately with a task id.
|
|
652
|
+
* @param params Text to music parameters.
|
|
653
|
+
* @param options Per-request overrides.
|
|
654
|
+
* @returns The task creation result.
|
|
655
|
+
*/
|
|
471
656
|
create(params: TextToMusicParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
657
|
+
/**
|
|
658
|
+
* Fetch the current status of a text to music task.
|
|
659
|
+
* @param id The task id.
|
|
660
|
+
* @param options Per-request overrides.
|
|
661
|
+
* @returns The current text to music task status.
|
|
662
|
+
*/
|
|
472
663
|
get(id: string, options?: RequestOptions): Promise<TextToMusicResponse>;
|
|
473
664
|
}
|
|
474
665
|
|
|
666
|
+
/** Continues an existing track from a specified timestamp, inheriting or overriding its settings. */
|
|
475
667
|
declare class ExtendMusic {
|
|
476
668
|
private readonly http;
|
|
477
669
|
constructor(http: HttpClient);
|
|
670
|
+
/**
|
|
671
|
+
* Create an extend music task and wait until complete.
|
|
672
|
+
* @param params Extend music parameters.
|
|
673
|
+
* @param options Per-request and polling overrides.
|
|
674
|
+
* @returns The completed extend music response.
|
|
675
|
+
*/
|
|
478
676
|
run(params: ExtendMusicParams, options?: RequestOptions & PollingOptions): Promise<CompletedExtendMusicResponse>;
|
|
677
|
+
/**
|
|
678
|
+
* Create an extend music task; returns immediately with a task id.
|
|
679
|
+
* @param params Extend music parameters.
|
|
680
|
+
* @param options Per-request overrides.
|
|
681
|
+
* @returns The task creation result.
|
|
682
|
+
*/
|
|
479
683
|
create(params: ExtendMusicParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
684
|
+
/**
|
|
685
|
+
* Fetch the current status of an extend music task.
|
|
686
|
+
* @param id The task id.
|
|
687
|
+
* @param options Per-request overrides.
|
|
688
|
+
* @returns The current extend music task status.
|
|
689
|
+
*/
|
|
480
690
|
get(id: string, options?: RequestOptions): Promise<ExtendMusicResponse>;
|
|
481
691
|
}
|
|
482
692
|
|
|
693
|
+
/** Creates cover artwork for an existing music task. */
|
|
483
694
|
declare class GenerateArtwork {
|
|
484
695
|
private readonly http;
|
|
485
696
|
constructor(http: HttpClient);
|
|
697
|
+
/**
|
|
698
|
+
* Create a generate artwork task and wait until complete.
|
|
699
|
+
* @param params Generate artwork parameters.
|
|
700
|
+
* @param options Per-request and polling overrides.
|
|
701
|
+
* @returns The completed generate artwork response.
|
|
702
|
+
*/
|
|
486
703
|
run(params: GenerateArtworkParams, options?: RequestOptions & PollingOptions): Promise<CompletedGenerateArtworkResponse>;
|
|
704
|
+
/**
|
|
705
|
+
* Create a generate artwork task; returns immediately with a task id.
|
|
706
|
+
* @param params Generate artwork parameters.
|
|
707
|
+
* @param options Per-request overrides.
|
|
708
|
+
* @returns The task creation result.
|
|
709
|
+
*/
|
|
487
710
|
create(params: GenerateArtworkParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
711
|
+
/**
|
|
712
|
+
* Fetch the current status of a generate artwork task.
|
|
713
|
+
* @param id The task id.
|
|
714
|
+
* @param options Per-request overrides.
|
|
715
|
+
* @returns The current generate artwork task status.
|
|
716
|
+
*/
|
|
488
717
|
get(id: string, options?: RequestOptions): Promise<GenerateArtworkResponse>;
|
|
489
718
|
}
|
|
490
719
|
|
|
720
|
+
/** Re-records vocals over an uploaded audio file with a new style or voice. */
|
|
491
721
|
declare class CoverAudio {
|
|
492
722
|
private readonly http;
|
|
493
723
|
constructor(http: HttpClient);
|
|
724
|
+
/**
|
|
725
|
+
* Create a cover audio task and wait until complete.
|
|
726
|
+
* @param params Cover audio parameters.
|
|
727
|
+
* @param options Per-request and polling overrides.
|
|
728
|
+
* @returns The completed cover audio response.
|
|
729
|
+
*/
|
|
494
730
|
run(params: CoverAudioParams, options?: RequestOptions & PollingOptions): Promise<CompletedCoverAudioResponse>;
|
|
731
|
+
/**
|
|
732
|
+
* Create a cover audio task; returns immediately with a task id.
|
|
733
|
+
* @param params Cover audio parameters.
|
|
734
|
+
* @param options Per-request overrides.
|
|
735
|
+
* @returns The task creation result.
|
|
736
|
+
*/
|
|
495
737
|
create(params: CoverAudioParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
738
|
+
/**
|
|
739
|
+
* Fetch the current status of a cover audio task.
|
|
740
|
+
* @param id The task id.
|
|
741
|
+
* @param options Per-request overrides.
|
|
742
|
+
* @returns The current cover audio task status.
|
|
743
|
+
*/
|
|
496
744
|
get(id: string, options?: RequestOptions): Promise<CoverAudioResponse>;
|
|
497
745
|
}
|
|
498
746
|
|
|
747
|
+
/** Generates and adds an instrumental backing track to uploaded audio. */
|
|
499
748
|
declare class AddInstrumental {
|
|
500
749
|
private readonly http;
|
|
501
750
|
constructor(http: HttpClient);
|
|
751
|
+
/**
|
|
752
|
+
* Create an add instrumental task and wait until complete.
|
|
753
|
+
* @param params Add instrumental parameters.
|
|
754
|
+
* @param options Per-request and polling overrides.
|
|
755
|
+
* @returns The completed add instrumental response.
|
|
756
|
+
*/
|
|
502
757
|
run(params: AddInstrumentalParams, options?: RequestOptions & PollingOptions): Promise<CompletedAddInstrumentalResponse>;
|
|
758
|
+
/**
|
|
759
|
+
* Create an add instrumental task; returns immediately with a task id.
|
|
760
|
+
* @param params Add instrumental parameters.
|
|
761
|
+
* @param options Per-request overrides.
|
|
762
|
+
* @returns The task creation result.
|
|
763
|
+
*/
|
|
503
764
|
create(params: AddInstrumentalParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
765
|
+
/**
|
|
766
|
+
* Fetch the current status of an add instrumental task.
|
|
767
|
+
* @param id The task id.
|
|
768
|
+
* @param options Per-request overrides.
|
|
769
|
+
* @returns The current add instrumental task status.
|
|
770
|
+
*/
|
|
504
771
|
get(id: string, options?: RequestOptions): Promise<AddInstrumentalResponse>;
|
|
505
772
|
}
|
|
506
773
|
|
|
774
|
+
/** Generates and adds vocals to an uploaded instrumental track. */
|
|
507
775
|
declare class AddVocals {
|
|
508
776
|
private readonly http;
|
|
509
777
|
constructor(http: HttpClient);
|
|
778
|
+
/**
|
|
779
|
+
* Create an add vocals task and wait until complete.
|
|
780
|
+
* @param params Add vocals parameters.
|
|
781
|
+
* @param options Per-request and polling overrides.
|
|
782
|
+
* @returns The completed add vocals response.
|
|
783
|
+
*/
|
|
510
784
|
run(params: AddVocalsParams, options?: RequestOptions & PollingOptions): Promise<CompletedAddVocalsResponse>;
|
|
785
|
+
/**
|
|
786
|
+
* Create an add vocals task; returns immediately with a task id.
|
|
787
|
+
* @param params Add vocals parameters.
|
|
788
|
+
* @param options Per-request overrides.
|
|
789
|
+
* @returns The task creation result.
|
|
790
|
+
*/
|
|
511
791
|
create(params: AddVocalsParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
792
|
+
/**
|
|
793
|
+
* Fetch the current status of an add vocals task.
|
|
794
|
+
* @param id The task id.
|
|
795
|
+
* @param options Per-request overrides.
|
|
796
|
+
* @returns The current add vocals task status.
|
|
797
|
+
*/
|
|
512
798
|
get(id: string, options?: RequestOptions): Promise<AddVocalsResponse>;
|
|
513
799
|
}
|
|
514
800
|
|
|
801
|
+
/** Splits a track into individual instrument stems (vocals, drums, bass, guitar, etc.). */
|
|
515
802
|
declare class SeparateAudioStems {
|
|
516
803
|
private readonly http;
|
|
517
804
|
constructor(http: HttpClient);
|
|
805
|
+
/**
|
|
806
|
+
* Create a separate audio stems task and wait until complete.
|
|
807
|
+
* @param params Separate audio stems parameters.
|
|
808
|
+
* @param options Per-request and polling overrides.
|
|
809
|
+
* @returns The completed separate audio stems response.
|
|
810
|
+
*/
|
|
518
811
|
run(params: SeparateAudioStemsParams, options?: RequestOptions & PollingOptions): Promise<CompletedSeparateAudioStemsResponse>;
|
|
812
|
+
/**
|
|
813
|
+
* Create a separate audio stems task; returns immediately with a task id.
|
|
814
|
+
* @param params Separate audio stems parameters.
|
|
815
|
+
* @param options Per-request overrides.
|
|
816
|
+
* @returns The task creation result.
|
|
817
|
+
*/
|
|
519
818
|
create(params: SeparateAudioStemsParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
819
|
+
/**
|
|
820
|
+
* Fetch the current status of a separate audio stems task.
|
|
821
|
+
* @param id The task id.
|
|
822
|
+
* @param options Per-request overrides.
|
|
823
|
+
* @returns The current separate audio stems task status.
|
|
824
|
+
*/
|
|
520
825
|
get(id: string, options?: RequestOptions): Promise<SeparateAudioStemsResponse>;
|
|
521
826
|
}
|
|
522
827
|
|
|
828
|
+
/** Extracts per-instrument MIDI note data from a generated track. */
|
|
523
829
|
declare class GenerateMidi {
|
|
524
830
|
private readonly http;
|
|
525
831
|
constructor(http: HttpClient);
|
|
832
|
+
/**
|
|
833
|
+
* Create a generate midi task and wait until complete.
|
|
834
|
+
* @param params Generate midi parameters.
|
|
835
|
+
* @param options Per-request and polling overrides.
|
|
836
|
+
* @returns The completed generate midi response.
|
|
837
|
+
*/
|
|
526
838
|
run(params: GenerateMidiParams, options?: RequestOptions & PollingOptions): Promise<CompletedGenerateMidiResponse>;
|
|
839
|
+
/**
|
|
840
|
+
* Create a generate midi task; returns immediately with a task id.
|
|
841
|
+
* @param params Generate midi parameters.
|
|
842
|
+
* @param options Per-request overrides.
|
|
843
|
+
* @returns The task creation result.
|
|
844
|
+
*/
|
|
527
845
|
create(params: GenerateMidiParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
846
|
+
/**
|
|
847
|
+
* Fetch the current status of a generate midi task.
|
|
848
|
+
* @param id The task id.
|
|
849
|
+
* @param options Per-request overrides.
|
|
850
|
+
* @returns The current generate midi task status.
|
|
851
|
+
*/
|
|
528
852
|
get(id: string, options?: RequestOptions): Promise<GenerateMidiResponse>;
|
|
529
853
|
}
|
|
530
854
|
|
|
855
|
+
/** Converts a generated track to WAV format. */
|
|
531
856
|
declare class ConvertAudio {
|
|
532
857
|
private readonly http;
|
|
533
858
|
constructor(http: HttpClient);
|
|
859
|
+
/**
|
|
860
|
+
* Create a convert audio task and wait until complete.
|
|
861
|
+
* @param params Convert audio parameters.
|
|
862
|
+
* @param options Per-request and polling overrides.
|
|
863
|
+
* @returns The completed convert audio response.
|
|
864
|
+
*/
|
|
534
865
|
run(params: ConvertAudioParams, options?: RequestOptions & PollingOptions): Promise<CompletedConvertAudioResponse>;
|
|
866
|
+
/**
|
|
867
|
+
* Create a convert audio task; returns immediately with a task id.
|
|
868
|
+
* @param params Convert audio parameters.
|
|
869
|
+
* @param options Per-request overrides.
|
|
870
|
+
* @returns The task creation result.
|
|
871
|
+
*/
|
|
535
872
|
create(params: ConvertAudioParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
873
|
+
/**
|
|
874
|
+
* Fetch the current status of a convert audio task.
|
|
875
|
+
* @param id The task id.
|
|
876
|
+
* @param options Per-request overrides.
|
|
877
|
+
* @returns The current convert audio task status.
|
|
878
|
+
*/
|
|
536
879
|
get(id: string, options?: RequestOptions): Promise<ConvertAudioResponse>;
|
|
537
880
|
}
|
|
538
881
|
|
|
882
|
+
/** Generates a music visualization video from an existing track. */
|
|
539
883
|
declare class VisualizeMusic {
|
|
540
884
|
private readonly http;
|
|
541
885
|
constructor(http: HttpClient);
|
|
886
|
+
/**
|
|
887
|
+
* Create a visualize music task and wait until complete.
|
|
888
|
+
* @param params Visualize music parameters.
|
|
889
|
+
* @param options Per-request and polling overrides.
|
|
890
|
+
* @returns The completed visualize music response.
|
|
891
|
+
*/
|
|
542
892
|
run(params: VisualizeMusicParams, options?: RequestOptions & PollingOptions): Promise<CompletedVisualizeMusicResponse>;
|
|
893
|
+
/**
|
|
894
|
+
* Create a visualize music task; returns immediately with a task id.
|
|
895
|
+
* @param params Visualize music parameters.
|
|
896
|
+
* @param options Per-request overrides.
|
|
897
|
+
* @returns The task creation result.
|
|
898
|
+
*/
|
|
543
899
|
create(params: VisualizeMusicParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
900
|
+
/**
|
|
901
|
+
* Fetch the current status of a visualize music task.
|
|
902
|
+
* @param id The task id.
|
|
903
|
+
* @param options Per-request overrides.
|
|
904
|
+
* @returns The current visualize music task status.
|
|
905
|
+
*/
|
|
544
906
|
get(id: string, options?: RequestOptions): Promise<VisualizeMusicResponse>;
|
|
545
907
|
}
|
|
546
908
|
|
|
909
|
+
/** Produces AI-generated lyrics from a text prompt. */
|
|
547
910
|
declare class GenerateLyrics {
|
|
548
911
|
private readonly http;
|
|
549
912
|
constructor(http: HttpClient);
|
|
913
|
+
/**
|
|
914
|
+
* Create a generate lyrics task and wait until complete.
|
|
915
|
+
* @param params Generate lyrics parameters.
|
|
916
|
+
* @param options Per-request and polling overrides.
|
|
917
|
+
* @returns The completed generate lyrics response.
|
|
918
|
+
*/
|
|
550
919
|
run(params: GenerateLyricsParams, options?: RequestOptions & PollingOptions): Promise<CompletedGenerateLyricsResponse>;
|
|
920
|
+
/**
|
|
921
|
+
* Create a generate lyrics task; returns immediately with a task id.
|
|
922
|
+
* @param params Generate lyrics parameters.
|
|
923
|
+
* @param options Per-request overrides.
|
|
924
|
+
* @returns The task creation result.
|
|
925
|
+
*/
|
|
551
926
|
create(params: GenerateLyricsParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
927
|
+
/**
|
|
928
|
+
* Fetch the current status of a generate lyrics task.
|
|
929
|
+
* @param id The task id.
|
|
930
|
+
* @param options Per-request overrides.
|
|
931
|
+
* @returns The current generate lyrics task status.
|
|
932
|
+
*/
|
|
552
933
|
get(id: string, options?: RequestOptions): Promise<GenerateLyricsResponse>;
|
|
553
934
|
}
|
|
554
935
|
|
|
936
|
+
/** Retrieves word-level timing alignment for a track. Synchronous (run only, no create/get polling). */
|
|
555
937
|
declare class GetTimestampedLyrics {
|
|
556
938
|
private readonly http;
|
|
557
939
|
constructor(http: HttpClient);
|
|
940
|
+
/**
|
|
941
|
+
* Run get timestamped lyrics (synchronous).
|
|
942
|
+
* @param params Get timestamped lyrics parameters.
|
|
943
|
+
* @param options Per-request overrides.
|
|
944
|
+
* @returns The get timestamped lyrics response.
|
|
945
|
+
*/
|
|
558
946
|
run(params: GetTimestampedLyricsParams, options?: RequestOptions): Promise<GetTimestampedLyricsResponse>;
|
|
559
947
|
}
|
|
560
948
|
|
|
949
|
+
/** Re-generates a time range within an existing track with new lyrics and style. */
|
|
561
950
|
declare class ReplaceSection {
|
|
562
951
|
private readonly http;
|
|
563
952
|
constructor(http: HttpClient);
|
|
953
|
+
/**
|
|
954
|
+
* Create a replace section task and wait until complete.
|
|
955
|
+
* @param params Replace section parameters.
|
|
956
|
+
* @param options Per-request and polling overrides.
|
|
957
|
+
* @returns The completed replace section response.
|
|
958
|
+
*/
|
|
564
959
|
run(params: ReplaceSectionParams, options?: RequestOptions & PollingOptions): Promise<CompletedReplaceSectionResponse>;
|
|
960
|
+
/**
|
|
961
|
+
* Create a replace section task; returns immediately with a task id.
|
|
962
|
+
* @param params Replace section parameters.
|
|
963
|
+
* @param options Per-request overrides.
|
|
964
|
+
* @returns The task creation result.
|
|
965
|
+
*/
|
|
565
966
|
create(params: ReplaceSectionParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
967
|
+
/**
|
|
968
|
+
* Fetch the current status of a replace section task.
|
|
969
|
+
* @param id The task id.
|
|
970
|
+
* @param options Per-request overrides.
|
|
971
|
+
* @returns The current replace section task status.
|
|
972
|
+
*/
|
|
566
973
|
get(id: string, options?: RequestOptions): Promise<ReplaceSectionResponse>;
|
|
567
974
|
}
|
|
568
975
|
|
|
976
|
+
/** Blends two audio tracks into a single new composition. */
|
|
569
977
|
declare class CreateMashup {
|
|
570
978
|
private readonly http;
|
|
571
979
|
constructor(http: HttpClient);
|
|
980
|
+
/**
|
|
981
|
+
* Create a create mashup task and wait until complete.
|
|
982
|
+
* @param params Create mashup parameters.
|
|
983
|
+
* @param options Per-request and polling overrides.
|
|
984
|
+
* @returns The completed create mashup response.
|
|
985
|
+
*/
|
|
572
986
|
run(params: CreateMashupParams, options?: RequestOptions & PollingOptions): Promise<CompletedCreateMashupResponse>;
|
|
987
|
+
/**
|
|
988
|
+
* Create a create mashup task; returns immediately with a task id.
|
|
989
|
+
* @param params Create mashup parameters.
|
|
990
|
+
* @param options Per-request overrides.
|
|
991
|
+
* @returns The task creation result.
|
|
992
|
+
*/
|
|
573
993
|
create(params: CreateMashupParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
994
|
+
/**
|
|
995
|
+
* Fetch the current status of a create mashup task.
|
|
996
|
+
* @param id The task id.
|
|
997
|
+
* @param options Per-request overrides.
|
|
998
|
+
* @returns The current create mashup task status.
|
|
999
|
+
*/
|
|
574
1000
|
get(id: string, options?: RequestOptions): Promise<CreateMashupResponse>;
|
|
575
1001
|
}
|
|
576
1002
|
|
|
1003
|
+
/** Generates sound effects (not music) from a text description with optional looping and BPM control. */
|
|
577
1004
|
declare class TextToSound {
|
|
578
1005
|
private readonly http;
|
|
579
1006
|
constructor(http: HttpClient);
|
|
1007
|
+
/**
|
|
1008
|
+
* Create a text to sound task and wait until complete.
|
|
1009
|
+
* @param params Text to sound parameters.
|
|
1010
|
+
* @param options Per-request and polling overrides.
|
|
1011
|
+
* @returns The completed text to sound response.
|
|
1012
|
+
*/
|
|
580
1013
|
run(params: TextToSoundParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToSoundResponse>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Create a text to sound task; returns immediately with a task id.
|
|
1016
|
+
* @param params Text to sound parameters.
|
|
1017
|
+
* @param options Per-request overrides.
|
|
1018
|
+
* @returns The task creation result.
|
|
1019
|
+
*/
|
|
581
1020
|
create(params: TextToSoundParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Fetch the current status of a text to sound task.
|
|
1023
|
+
* @param id The task id.
|
|
1024
|
+
* @param options Per-request overrides.
|
|
1025
|
+
* @returns The current text to sound task status.
|
|
1026
|
+
*/
|
|
582
1027
|
get(id: string, options?: RequestOptions): Promise<TextToSoundResponse>;
|
|
583
1028
|
}
|
|
584
1029
|
|
|
1030
|
+
/** Creates a reusable style or voice persona from an existing track's vocals. Synchronous (run only). */
|
|
585
1031
|
declare class GeneratePersona {
|
|
586
1032
|
private readonly http;
|
|
587
1033
|
constructor(http: HttpClient);
|
|
1034
|
+
/**
|
|
1035
|
+
* Run generate persona (synchronous).
|
|
1036
|
+
* @param params Generate persona parameters.
|
|
1037
|
+
* @param options Per-request overrides.
|
|
1038
|
+
* @returns The generate persona response.
|
|
1039
|
+
*/
|
|
588
1040
|
run(params: GeneratePersonaParams, options?: RequestOptions): Promise<GeneratePersonaResponse>;
|
|
589
1041
|
}
|
|
590
1042
|
|
|
1043
|
+
/** Generates style/genre tags from a text description for use in style fields. Synchronous (run only). */
|
|
591
1044
|
declare class BoostStyle {
|
|
592
1045
|
private readonly http;
|
|
593
1046
|
constructor(http: HttpClient);
|
|
1047
|
+
/**
|
|
1048
|
+
* Run boost style (synchronous).
|
|
1049
|
+
* @param params Boost style parameters.
|
|
1050
|
+
* @param options Per-request overrides.
|
|
1051
|
+
* @returns The boost style response.
|
|
1052
|
+
*/
|
|
594
1053
|
run(params: BoostStyleParams, options?: RequestOptions): Promise<BoostStyleResponse>;
|
|
595
1054
|
}
|
|
596
1055
|
|
|
1056
|
+
/** Step 1 of voice cloning: extracts a validation phrase from a voice recording for the user to re-record. */
|
|
597
1057
|
declare class VoiceToValidationPhrase {
|
|
598
1058
|
private readonly http;
|
|
599
1059
|
constructor(http: HttpClient);
|
|
1060
|
+
/**
|
|
1061
|
+
* Create a voice to validation phrase task and wait until complete.
|
|
1062
|
+
* @param params Voice to validation phrase parameters.
|
|
1063
|
+
* @param options Per-request and polling overrides.
|
|
1064
|
+
* @returns The completed voice to validation phrase response.
|
|
1065
|
+
*/
|
|
600
1066
|
run(params: VoiceToValidationPhraseParams, options?: RequestOptions & PollingOptions): Promise<CompletedValidationPhraseResponse>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Create a voice to validation phrase task; returns immediately with a task id.
|
|
1069
|
+
* @param params Voice to validation phrase parameters.
|
|
1070
|
+
* @param options Per-request overrides.
|
|
1071
|
+
* @returns The task creation result.
|
|
1072
|
+
*/
|
|
601
1073
|
create(params: VoiceToValidationPhraseParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
1074
|
+
/**
|
|
1075
|
+
* Fetch the current status of a voice to validation phrase task.
|
|
1076
|
+
* @param id The task id.
|
|
1077
|
+
* @param options Per-request overrides.
|
|
1078
|
+
* @returns The current voice to validation phrase task status.
|
|
1079
|
+
*/
|
|
602
1080
|
get(id: string, options?: RequestOptions): Promise<ValidationPhraseResponse>;
|
|
603
1081
|
}
|
|
604
1082
|
|
|
1083
|
+
/** Step 2 (optional) of voice cloning: requests a new, easier validation phrase. */
|
|
605
1084
|
declare class RegenerateValidationPhrase {
|
|
606
1085
|
private readonly http;
|
|
607
1086
|
constructor(http: HttpClient);
|
|
1087
|
+
/**
|
|
1088
|
+
* Create a regenerate validation phrase task and wait until complete.
|
|
1089
|
+
* @param params Regenerate validation phrase parameters.
|
|
1090
|
+
* @param options Per-request and polling overrides.
|
|
1091
|
+
* @returns The completed regenerate validation phrase response.
|
|
1092
|
+
*/
|
|
608
1093
|
run(params: RegenerateValidationPhraseParams, options?: RequestOptions & PollingOptions): Promise<CompletedValidationPhraseResponse>;
|
|
1094
|
+
/**
|
|
1095
|
+
* Create a regenerate validation phrase task; returns immediately with a task id.
|
|
1096
|
+
* @param params Regenerate validation phrase parameters.
|
|
1097
|
+
* @param options Per-request overrides.
|
|
1098
|
+
* @returns The task creation result.
|
|
1099
|
+
*/
|
|
609
1100
|
create(params: RegenerateValidationPhraseParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Fetch the current status of a regenerate validation phrase task.
|
|
1103
|
+
* @param id The task id.
|
|
1104
|
+
* @param options Per-request overrides.
|
|
1105
|
+
* @returns The current regenerate validation phrase task status.
|
|
1106
|
+
*/
|
|
610
1107
|
get(id: string, options?: RequestOptions): Promise<ValidationPhraseResponse>;
|
|
611
1108
|
}
|
|
612
1109
|
|
|
1110
|
+
/** Step 3 of voice cloning: trains a custom voice from the user's recording of the validation phrase. */
|
|
613
1111
|
declare class GenerateVoice {
|
|
614
1112
|
private readonly http;
|
|
615
1113
|
constructor(http: HttpClient);
|
|
1114
|
+
/**
|
|
1115
|
+
* Create a generate voice task and wait until complete.
|
|
1116
|
+
* @param params Generate voice parameters.
|
|
1117
|
+
* @param options Per-request and polling overrides.
|
|
1118
|
+
* @returns The completed generate voice response.
|
|
1119
|
+
*/
|
|
616
1120
|
run(params: GenerateVoiceParams, options?: RequestOptions & PollingOptions): Promise<CompletedVoiceGenerationResponse>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Create a generate voice task; returns immediately with a task id.
|
|
1123
|
+
* @param params Generate voice parameters.
|
|
1124
|
+
* @param options Per-request overrides.
|
|
1125
|
+
* @returns The task creation result.
|
|
1126
|
+
*/
|
|
617
1127
|
create(params: GenerateVoiceParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Fetch the current status of a generate voice task.
|
|
1130
|
+
* @param id The task id.
|
|
1131
|
+
* @param options Per-request overrides.
|
|
1132
|
+
* @returns The current generate voice task status.
|
|
1133
|
+
*/
|
|
618
1134
|
get(id: string, options?: RequestOptions): Promise<VoiceGenerationResponse>;
|
|
619
1135
|
}
|
|
620
1136
|
|
|
1137
|
+
/** Step 4 of voice cloning: checks whether a custom voice is ready for use. Synchronous (run only). */
|
|
621
1138
|
declare class CheckVoice {
|
|
622
1139
|
private readonly http;
|
|
623
1140
|
constructor(http: HttpClient);
|
|
1141
|
+
/**
|
|
1142
|
+
* Run check voice (synchronous).
|
|
1143
|
+
* @param params Check voice parameters.
|
|
1144
|
+
* @param options Per-request overrides.
|
|
1145
|
+
* @returns The check voice response.
|
|
1146
|
+
*/
|
|
624
1147
|
run(params: CheckVoiceParams, options?: RequestOptions): Promise<CheckVoiceResponse>;
|
|
625
1148
|
}
|
|
626
1149
|
|
|
627
1150
|
/**
|
|
628
|
-
* Suno
|
|
1151
|
+
* Suno music platform client covering song generation, extension, covers, stems,
|
|
1152
|
+
* MIDI, lyrics, mashups, sound effects, visualization, personas, and voice cloning.
|
|
629
1153
|
*
|
|
630
1154
|
* @example
|
|
631
1155
|
* ```typescript
|
|
@@ -640,27 +1164,48 @@ declare class CheckVoice {
|
|
|
640
1164
|
* });
|
|
641
1165
|
* ```
|
|
642
1166
|
*/
|
|
643
|
-
declare class SunoClient {
|
|
1167
|
+
declare class SunoClient extends BaseClient {
|
|
1168
|
+
/** Generates songs from a text prompt with configurable vocal mode, style, and persona. */
|
|
644
1169
|
readonly textToMusic: TextToMusic;
|
|
1170
|
+
/** Continues an existing track from a specified timestamp, inheriting or overriding its settings. */
|
|
645
1171
|
readonly extendMusic: ExtendMusic;
|
|
1172
|
+
/** Creates cover artwork for an existing music task. */
|
|
646
1173
|
readonly generateArtwork: GenerateArtwork;
|
|
1174
|
+
/** Re-records vocals over an uploaded audio file with a new style or voice. */
|
|
647
1175
|
readonly coverAudio: CoverAudio;
|
|
1176
|
+
/** Generates and adds an instrumental backing track to uploaded audio. */
|
|
648
1177
|
readonly addInstrumental: AddInstrumental;
|
|
1178
|
+
/** Generates and adds vocals to an uploaded instrumental track. */
|
|
649
1179
|
readonly addVocals: AddVocals;
|
|
1180
|
+
/** Splits a track into individual instrument stems (vocals, drums, bass, guitar, etc.). */
|
|
650
1181
|
readonly separateAudioStems: SeparateAudioStems;
|
|
1182
|
+
/** Extracts per-instrument MIDI note data from a generated track. */
|
|
651
1183
|
readonly generateMidi: GenerateMidi;
|
|
1184
|
+
/** Converts a generated track to WAV format. */
|
|
652
1185
|
readonly convertAudio: ConvertAudio;
|
|
1186
|
+
/** Generates a music visualization video from an existing track. */
|
|
653
1187
|
readonly visualizeMusic: VisualizeMusic;
|
|
1188
|
+
/** Produces AI-generated lyrics from a text prompt. */
|
|
654
1189
|
readonly generateLyrics: GenerateLyrics;
|
|
1190
|
+
/** Retrieves word-level timing alignment for a track. Synchronous (run only). */
|
|
655
1191
|
readonly getTimestampedLyrics: GetTimestampedLyrics;
|
|
1192
|
+
/** Re-generates a time range within an existing track with new lyrics and style. */
|
|
656
1193
|
readonly replaceSection: ReplaceSection;
|
|
1194
|
+
/** Blends two audio tracks into a single new composition. */
|
|
657
1195
|
readonly createMashup: CreateMashup;
|
|
1196
|
+
/** Generates sound effects (not music) from a text description with optional looping and BPM control. */
|
|
658
1197
|
readonly textToSound: TextToSound;
|
|
1198
|
+
/** Creates a reusable style or voice persona from a track's vocals. Synchronous (run only). */
|
|
659
1199
|
readonly generatePersona: GeneratePersona;
|
|
1200
|
+
/** Generates style/genre tags from a text description for use in style fields. Synchronous (run only). */
|
|
660
1201
|
readonly boostStyle: BoostStyle;
|
|
1202
|
+
/** Step 1 of voice cloning: extracts a validation phrase from a voice recording. */
|
|
661
1203
|
readonly voiceToValidationPhrase: VoiceToValidationPhrase;
|
|
1204
|
+
/** Step 2 (optional) of voice cloning: requests a new, easier validation phrase. */
|
|
662
1205
|
readonly regenerateValidationPhrase: RegenerateValidationPhrase;
|
|
1206
|
+
/** Step 3 of voice cloning: trains a custom voice from the user's recording of the validation phrase. */
|
|
663
1207
|
readonly generateVoice: GenerateVoice;
|
|
1208
|
+
/** Step 4 of voice cloning: checks whether a custom voice is ready for use. Synchronous (run only). */
|
|
664
1209
|
readonly checkVoice: CheckVoice;
|
|
665
1210
|
constructor(options?: ClientOptions);
|
|
666
1211
|
}
|