@runapi.ai/suno 0.2.4 → 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/dist/index.d.mts CHANGED
@@ -1,185 +1,404 @@
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
- type SunoModel = 'suno-v5.5' | 'suno-v5' | 'suno-v4.5-plus' | 'suno-v4.5-all' | 'suno-v4.5' | 'suno-v4' | 'suno-v3.5';
4
+ /** Suno music generation engine version. V5.5 has highest quality; V4 is the earliest available. */
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. */
9
+ type ValidationPhraseLanguage = 'en' | 'zh' | 'es' | 'fr' | 'pt' | 'de' | 'ja' | 'ko' | 'hi' | 'ru';
10
+ /** Musical key for sound effect generation (major and minor keys). */
6
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';
7
- type VocalGender = 'm' | 'f';
8
- type PersonaModel = 'style_persona' | 'voice_persona';
12
+ type VocalGender = 'male' | 'female';
13
+ /** `style` applies genre/mood without changing the voice; `voice` applies cloned voice characteristics. */
14
+ type PersonaType = 'style' | 'voice';
15
+ /** `source` inherits style/title/continue_at from the original track; `custom` requires explicit values. */
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
+ */
23
+ type VocalMode = 'auto_lyrics' | 'exact_lyrics' | 'instrumental';
9
24
  type TaskStatus = AsyncTaskStatus;
25
+ /** Progress phase of a multi-step music generation task. */
10
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. */
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
+ */
11
34
  interface SunoBaseParams {
12
35
  callback_url?: string;
13
36
  model?: SunoModel;
14
37
  vocal_gender?: VocalGender;
38
+ /** 0-1; higher values enforce stricter style adherence. */
15
39
  style_weight?: number;
40
+ /** 0-1; higher values allow more creative deviation from the prompt. */
16
41
  weirdness_constraint?: number;
42
+ /** 0-1; higher values prioritize audio fidelity over stylistic variation. */
17
43
  audio_weight?: number;
18
44
  }
19
- interface TextToMusicSimpleParams extends SunoBaseParams {
20
- custom_mode: false;
21
- instrumental: boolean;
45
+ /** Auto-lyrics variant: generates lyrics automatically from `prompt`. */
46
+ interface TextToMusicPromptParams extends SunoBaseParams {
47
+ vocal_mode: 'auto_lyrics';
48
+ /** Song brief used for automatic lyrics generation. */
22
49
  prompt: string;
50
+ lyrics?: never;
51
+ style?: never;
52
+ title?: never;
53
+ }
54
+ /** Exact-lyrics variant: sings the literal `lyrics` text with explicit style/title. */
55
+ interface TextToMusicLyricsParams extends SunoBaseParams {
56
+ vocal_mode: 'exact_lyrics';
57
+ prompt?: never;
58
+ lyrics: string;
59
+ style: string;
60
+ title: string;
61
+ persona_id?: string;
62
+ persona_type?: PersonaType;
63
+ /** Styles to avoid (e.g. "heavy metal, screamo"). */
64
+ negative_tags?: string;
65
+ duration_seconds?: number;
66
+ /** Timestamp in seconds to continue generation from. */
67
+ continue_at?: number;
68
+ endpoint?: string;
23
69
  }
24
- interface TextToMusicCustomParams extends SunoBaseParams {
25
- custom_mode: true;
26
- instrumental: boolean;
70
+ /** Instrumental variant: produces music with no vocals. Requires explicit style/title. */
71
+ interface TextToMusicInstrumentalParams extends SunoBaseParams {
72
+ vocal_mode: 'instrumental';
73
+ prompt?: never;
74
+ lyrics?: never;
27
75
  style: string;
28
76
  title: string;
29
- prompt?: string;
30
77
  persona_id?: string;
31
- persona_model?: PersonaModel;
78
+ persona_type?: PersonaType;
32
79
  negative_tags?: string;
33
- duration?: number;
80
+ duration_seconds?: number;
34
81
  continue_at?: number;
35
82
  endpoint?: string;
36
83
  }
37
- type TextToMusicParams = TextToMusicSimpleParams | TextToMusicCustomParams;
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
+ */
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
+ */
38
96
  interface ExtendMusicParams extends SunoBaseParams {
39
97
  task_id?: string;
40
98
  audio_id?: string;
41
99
  audio_url?: string;
42
100
  upload_url?: string;
43
- default_param_flag?: boolean;
101
+ parameter_mode: ParameterMode;
102
+ /** When true, produces an instrumental extension with no vocals. */
44
103
  instrumental?: boolean;
45
104
  prompt?: string;
105
+ lyrics?: string;
106
+ /** Required when parameter_mode is `custom`. */
46
107
  style?: string;
108
+ /** Required when parameter_mode is `custom`. Max ~80-100 characters. */
47
109
  title?: string;
110
+ /** Required when parameter_mode is `custom`. Seconds, must be > 0 and < source duration. */
48
111
  continue_at?: number;
49
112
  persona_id?: string;
50
- persona_model?: PersonaModel;
113
+ persona_type?: PersonaType;
51
114
  model?: SunoModel;
52
115
  negative_tags?: string;
53
116
  }
117
+ /** Params for generating cover artwork for an existing music task. */
54
118
  interface GenerateArtworkParams {
119
+ /** Source music task ID to generate artwork for. */
55
120
  task_id: string;
56
121
  callback_url?: string;
57
122
  [key: string]: unknown;
58
123
  }
59
- interface CoverAudioSimpleParams extends SunoBaseParams {
124
+ /** Cover audio with auto-generated lyrics from a prompt. */
125
+ interface CoverAudioPromptParams extends SunoBaseParams {
126
+ /** URL of the audio file to re-record vocals over. */
60
127
  upload_url: string;
61
- custom_mode: false;
62
- instrumental: boolean;
128
+ vocal_mode: 'auto_lyrics';
63
129
  prompt: string;
130
+ lyrics?: never;
131
+ style?: never;
132
+ title?: never;
64
133
  negative_tags?: string;
65
134
  }
66
- interface CoverAudioCustomParams extends SunoBaseParams {
135
+ /** Cover audio with exact lyrics sung over the uploaded track. */
136
+ interface CoverAudioLyricsParams extends SunoBaseParams {
67
137
  upload_url: string;
68
- custom_mode: true;
69
- instrumental: boolean;
138
+ vocal_mode: 'exact_lyrics';
139
+ prompt?: never;
140
+ lyrics: string;
70
141
  style: string;
71
142
  title: string;
72
- prompt?: string;
73
143
  persona_id?: string;
74
- persona_model?: PersonaModel;
144
+ persona_type?: PersonaType;
75
145
  negative_tags?: string;
76
146
  }
77
- type CoverAudioParams = CoverAudioSimpleParams | CoverAudioCustomParams;
147
+ /** Cover audio as instrumental (no vocals) over the uploaded track. */
148
+ interface CoverAudioInstrumentalParams extends SunoBaseParams {
149
+ upload_url: string;
150
+ vocal_mode: 'instrumental';
151
+ prompt?: never;
152
+ lyrics?: never;
153
+ style: string;
154
+ title: string;
155
+ persona_id?: string;
156
+ persona_type?: PersonaType;
157
+ negative_tags?: string;
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
+ */
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
+ */
78
168
  interface AddInstrumentalParams extends SunoBaseParams {
79
169
  model?: SunoModel;
80
170
  upload_url: string;
81
171
  title: string;
172
+ /** Styles to avoid (required, but can be empty string). */
82
173
  negative_tags: string;
174
+ /** Style/genre tags for the generated instrumental. */
83
175
  tags: string;
84
176
  }
177
+ /** Params for generating and adding vocals to an uploaded instrumental track. */
85
178
  interface AddVocalsParams extends SunoBaseParams {
86
179
  model?: SunoModel;
87
180
  upload_url: string;
88
- prompt: string;
181
+ /** Vocal lyrics to sing over the instrumental. */
182
+ lyrics: string;
89
183
  title: string;
184
+ /** Styles to avoid (required, but can be empty string). */
90
185
  negative_tags: string;
91
186
  style: string;
92
187
  }
188
+ /** Params for splitting a track into individual instrument stems (vocals, drums, bass, etc.). */
93
189
  interface SeparateAudioStemsParams {
94
190
  task_id: string;
95
191
  audio_id: string;
192
+ /** `separate_vocal` isolates vocals+instrumental; `split_stem` splits into all individual instruments. */
96
193
  type?: 'separate_vocal' | 'split_stem' | string;
97
194
  callback_url?: string;
98
195
  }
196
+ /** Params for extracting per-instrument MIDI note data from a generated track. */
99
197
  interface GenerateMidiParams {
100
198
  task_id: string;
101
199
  callback_url?: string;
102
200
  }
201
+ /** Params for converting a generated track to WAV format. */
103
202
  interface ConvertAudioParams {
104
203
  task_id: string;
105
204
  audio_id?: string;
106
205
  callback_url?: string;
107
206
  }
207
+ /** Params for generating a music visualization video from an existing track. */
108
208
  interface VisualizeMusicParams {
109
209
  task_id: string;
110
210
  audio_id?: string;
111
211
  prompt?: string;
112
212
  callback_url?: string;
213
+ /** Author name displayed in the visualization video. */
113
214
  author?: string;
215
+ /** Domain name watermark overlaid on the video. */
114
216
  domain_name?: string;
115
217
  }
218
+ /** Params for AI-powered lyrics generation from a text prompt. */
116
219
  interface GenerateLyricsParams {
117
220
  prompt: string;
118
221
  callback_url?: string;
119
222
  }
223
+ /** Params for retrieving word-level timing alignment for a track. Synchronous -- use `run()` directly. */
120
224
  interface GetTimestampedLyricsParams {
121
225
  task_id: string;
122
226
  audio_id: string;
123
227
  callback_url?: string;
124
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
+ */
125
233
  interface ReplaceSectionParams {
126
234
  task_id: string;
127
235
  audio_id: string;
128
- prompt: string;
236
+ /** Replacement lyrics for the specified section. */
237
+ lyrics: string;
238
+ /** Style/genre tags for the replacement section. */
129
239
  tags: string;
130
240
  title: string;
241
+ /** Section start time in seconds. */
131
242
  infill_start_time: number;
243
+ /** Section end time in seconds. */
132
244
  infill_end_time: number;
133
245
  callback_url?: string;
134
246
  negative_tags?: string;
247
+ /** Complete song lyrics for context; helps maintain coherence across sections. */
135
248
  full_lyrics?: string;
136
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
+ */
137
254
  interface GeneratePersonaParams {
255
+ /** Source task ID containing reference vocals. */
138
256
  task_id: string;
139
257
  audio_id: string;
140
258
  name: string;
141
259
  description: string;
142
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
+ */
143
265
  interface BoostStyleParams {
266
+ /** Style description to generate tags from (e.g. "upbeat summer pop with acoustic guitar"). */
144
267
  description: string;
145
268
  name?: string;
146
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
+ */
147
274
  interface TextToSoundParams {
148
275
  callback_url?: string;
149
276
  model: SoundModel;
277
+ /** Sound description, max 500 characters. */
150
278
  prompt: string;
279
+ /** When true, generates seamlessly loopable audio. */
151
280
  sound_loop?: boolean;
281
+ /** BPM (1-300) for rhythmic sound effects. */
152
282
  sound_tempo?: number;
153
283
  sound_key?: SoundKey;
284
+ /** When true, captures lyric subtitles from the generated audio. */
154
285
  grab_lyrics?: boolean;
155
286
  }
156
- interface CreateMashupSimpleParams extends SunoBaseParams {
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
+ */
293
+ interface VoiceToValidationPhraseParams {
294
+ /** URL of the source voice recording. */
295
+ voice_url: string;
296
+ /** Start of the vocal segment in the recording (seconds). */
297
+ vocal_start_seconds: number;
298
+ /** End of the vocal segment in the recording (seconds). */
299
+ vocal_end_seconds: number;
300
+ language?: ValidationPhraseLanguage;
301
+ callback_url?: string;
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
+ */
307
+ interface RegenerateValidationPhraseParams {
308
+ /** Task ID from a prior VoiceToValidationPhrase call. */
309
+ task_id: string;
310
+ callback_url?: string;
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
+ */
316
+ interface GenerateVoiceParams {
317
+ task_id: string;
318
+ /** URL of the user's recording of the validation phrase. */
319
+ verify_url: string;
320
+ voice_name?: string;
321
+ description?: string;
322
+ style?: string;
323
+ singer_skill_level?: SingerSkillLevel;
324
+ callback_url?: string;
325
+ }
326
+ /**
327
+ * Step 4 (final) of voice cloning: checks whether a custom voice from GenerateVoice is ready.
328
+ * Synchronous -- use `run()` directly.
329
+ */
330
+ interface CheckVoiceParams {
331
+ /** Task ID from a prior GenerateVoice call. */
332
+ task_id: string;
333
+ }
334
+ /** Mashup with auto-generated lyrics. */
335
+ interface CreateMashupPromptParams extends SunoBaseParams {
336
+ /** Exactly two audio URLs to blend into one composition. */
157
337
  upload_url_list: [string, string];
158
- custom_mode: false;
159
338
  model?: SunoModel;
339
+ vocal_mode: 'auto_lyrics';
160
340
  prompt: string;
161
- instrumental?: boolean;
341
+ lyrics?: never;
342
+ style?: never;
343
+ title?: never;
162
344
  }
163
- interface CreateMashupCustomParams extends SunoBaseParams {
345
+ /** Mashup with exact lyrics sung over the blended tracks. */
346
+ interface CreateMashupLyricsParams extends SunoBaseParams {
164
347
  upload_url_list: [string, string];
165
- custom_mode: true;
166
348
  model?: SunoModel;
349
+ vocal_mode: 'exact_lyrics';
350
+ prompt?: never;
351
+ lyrics: string;
167
352
  style: string;
168
353
  title: string;
169
- prompt?: string;
170
- instrumental?: boolean;
354
+ persona_id?: string;
355
+ persona_type?: PersonaType;
356
+ }
357
+ /** Mashup as instrumental (no vocals). */
358
+ interface CreateMashupInstrumentalParams extends SunoBaseParams {
359
+ upload_url_list: [string, string];
360
+ model?: SunoModel;
361
+ vocal_mode: 'instrumental';
362
+ prompt?: never;
363
+ lyrics?: never;
364
+ style: string;
365
+ title: string;
366
+ persona_id?: string;
367
+ persona_type?: PersonaType;
171
368
  }
172
- type CreateMashupParams = CreateMashupSimpleParams | CreateMashupCustomParams;
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
+ */
373
+ type CreateMashupParams = CreateMashupPromptParams | CreateMashupLyricsParams | CreateMashupInstrumentalParams;
374
+ /** Initial response from task creation with the assigned task ID. */
173
375
  interface TaskCreateResponse {
174
376
  id: string;
175
377
  status?: string;
176
378
  [key: string]: unknown;
177
379
  }
380
+ /** Metadata and URLs for a generated music track. */
178
381
  interface Audio {
179
382
  id: string;
180
383
  audio_url?: string;
384
+ /** Progressive streaming URL; available before the full file is ready. */
181
385
  stream_audio_url?: string;
182
386
  image_url?: string;
387
+ lyrics?: string;
388
+ model_name?: string;
389
+ title?: string;
390
+ tags?: string[];
391
+ /** Track duration in seconds. */
392
+ duration?: number;
393
+ [key: string]: unknown;
394
+ }
395
+ /** Metadata and URLs for a generated sound effect (distinct from music {@link Audio}). */
396
+ interface SoundAudio {
397
+ id: string;
398
+ audio_url?: string;
399
+ stream_audio_url?: string;
400
+ image_url?: string;
401
+ /** The prompt that was used to generate this sound effect. */
183
402
  prompt?: string;
184
403
  model_name?: string;
185
404
  title?: string;
@@ -187,6 +406,7 @@ interface Audio {
187
406
  duration?: number;
188
407
  [key: string]: unknown;
189
408
  }
409
+ /** Base response for all Suno async tasks, carrying lifecycle status and generation progress. */
190
410
  interface AsyncTaskResponse {
191
411
  id: string;
192
412
  status: TaskStatus;
@@ -194,27 +414,36 @@ interface AsyncTaskResponse {
194
414
  error?: string;
195
415
  [key: string]: unknown;
196
416
  }
417
+ /** Result of a text-to-music generation task. */
197
418
  interface TextToMusicResponse extends AsyncTaskResponse {
198
419
  audios?: Audio[];
199
420
  }
421
+ /** Result of a music extension task. `original_task_id` references the source track. */
200
422
  interface ExtendMusicResponse extends AsyncTaskResponse {
201
423
  original_task_id?: string;
202
424
  audios?: Audio[];
203
425
  }
426
+ /** Result of an artwork generation task containing cover image URLs. */
204
427
  interface GenerateArtworkResponse extends AsyncTaskResponse {
205
428
  covers?: Array<{
206
429
  url: string;
207
430
  }>;
208
431
  }
432
+ /** Result of a cover audio task. */
209
433
  interface CoverAudioResponse extends AsyncTaskResponse {
210
434
  audios?: Audio[];
211
435
  }
436
+ /** Result of adding an instrumental backing track. */
212
437
  interface AddInstrumentalResponse extends TextToMusicResponse {
213
438
  }
439
+ /** Result of adding vocals to a track. */
214
440
  interface AddVocalsResponse extends TextToMusicResponse {
215
441
  }
216
- interface TextToSoundResponse extends TextToMusicResponse {
442
+ /** Result of a sound effect generation task (uses {@link SoundAudio} instead of {@link Audio}). */
443
+ interface TextToSoundResponse extends AsyncTaskResponse {
444
+ audios?: SoundAudio[];
217
445
  }
446
+ /** URLs for each isolated instrument stem after separation. Only populated stems have URLs. */
218
447
  interface SeparatedAudio {
219
448
  vocal_url?: string;
220
449
  instrumental_url?: string;
@@ -231,72 +460,112 @@ interface SeparatedAudio {
231
460
  synth_url?: string;
232
461
  woodwinds_url?: string;
233
462
  }
463
+ /** Result of a stem separation task. */
234
464
  interface SeparateAudioStemsResponse extends AsyncTaskResponse {
235
465
  separated_audios?: SeparatedAudio;
236
466
  }
467
+ /** A single MIDI note event within an instrument track. */
237
468
  interface MidiNote {
469
+ /** MIDI pitch number (0-127). */
238
470
  pitch: number;
239
471
  start_time: number;
240
472
  end_time: number;
473
+ /** Note velocity (0-1 normalized). */
241
474
  velocity: number;
242
475
  }
476
+ /** All notes for a single instrument extracted from a track. */
243
477
  interface MidiInstrument {
244
478
  name: string;
245
479
  notes: MidiNote[];
246
480
  }
481
+ /** Result of a MIDI extraction task with per-instrument note data. */
247
482
  interface GenerateMidiResponse extends AsyncTaskResponse {
248
483
  instruments?: MidiInstrument[];
249
484
  }
485
+ /** Result of a WAV conversion task. */
250
486
  interface ConvertAudioResponse extends AsyncTaskResponse {
487
+ /** Download URL for the converted WAV file. */
251
488
  wav_url?: string;
252
489
  original_task_id?: string;
253
490
  }
491
+ /** Result of a music visualization task containing the generated video URL. */
254
492
  interface VisualizeMusicResponse extends AsyncTaskResponse {
255
493
  video_url?: string;
256
494
  original_task_id?: string;
257
495
  }
496
+ /** Result of a lyrics generation task with sectioned lyrics. */
258
497
  interface GenerateLyricsResponse extends AsyncTaskResponse {
498
+ /** Generated lyrics, split by section (e.g. "Chorus", "Verse 1"). */
259
499
  lyrics?: Array<{
260
500
  title?: string;
261
501
  text: string;
262
502
  }>;
263
503
  }
504
+ /** Word-level timing alignment for a single word in a track. */
264
505
  interface AlignedWord {
265
506
  word: string;
507
+ /** Whether alignment succeeded for this word. */
266
508
  success: boolean;
267
509
  start_time: number;
268
510
  end_time: number;
511
+ /** Alignment confidence score. */
269
512
  palign: number;
270
513
  }
514
+ /** Synchronous response containing word-level timing data and waveform for a track. */
271
515
  interface GetTimestampedLyricsResponse {
272
516
  aligned_words?: AlignedWord[];
517
+ /** Waveform amplitude data for visualization. */
273
518
  waveform_data?: number[];
519
+ /** Character error rate of the lyrics alignment. */
274
520
  hoot_cer?: number;
275
521
  is_streamed?: boolean;
276
522
  [key: string]: unknown;
277
523
  }
524
+ /** Result of a section replacement task. */
278
525
  interface ReplaceSectionResponse extends AsyncTaskResponse {
279
526
  track?: Audio;
280
527
  }
528
+ /** A reusable style or voice persona, referenced by ID in generation params. */
281
529
  interface Persona {
282
530
  id: string;
283
531
  name: string;
284
532
  description: string;
285
533
  [key: string]: unknown;
286
534
  }
535
+ /** Synchronous result of persona creation. */
287
536
  interface GeneratePersonaResponse {
288
537
  persona: Persona;
289
538
  error?: string;
290
539
  [key: string]: unknown;
291
540
  }
541
+ /** Synchronous result of style tag generation. `style` contains the generated tags string. */
292
542
  interface BoostStyleResponse {
293
543
  style: string;
294
544
  error?: string;
295
545
  [key: string]: unknown;
296
546
  }
547
+ /** Result of a mashup task. */
297
548
  interface CreateMashupResponse extends AsyncTaskResponse {
298
549
  audios?: Audio[];
299
550
  }
551
+ /** Result of a voice-cloning validation phrase task. The user must re-record this phrase. */
552
+ interface ValidationPhraseResponse extends AsyncTaskResponse {
553
+ provider_status?: string;
554
+ /** The validation phrase text the user must read back for voice cloning. */
555
+ validation_phrase?: string;
556
+ }
557
+ /** Result of a voice generation (training) task. `voice_id` is usable in subsequent generation params. */
558
+ interface VoiceGenerationResponse extends AsyncTaskResponse {
559
+ provider_status?: string;
560
+ /** Custom voice identifier, usable as persona in subsequent music generation. */
561
+ voice_id?: string;
562
+ }
563
+ /** Synchronous result indicating whether a custom voice is ready for use. */
564
+ interface CheckVoiceResponse {
565
+ is_available?: boolean;
566
+ error?: string;
567
+ [key: string]: unknown;
568
+ }
300
569
  type CompletedTextToMusicResponse = TextToMusicResponse & {
301
570
  status: 'completed';
302
571
  audios: Audio[];
@@ -356,141 +625,531 @@ type CompletedCreateMashupResponse = CreateMashupResponse & {
356
625
  };
357
626
  type CompletedTextToSoundResponse = TextToSoundResponse & {
358
627
  status: 'completed';
359
- audios: Audio[];
628
+ audios: SoundAudio[];
629
+ };
630
+ type CompletedValidationPhraseResponse = ValidationPhraseResponse & {
631
+ status: 'completed';
632
+ validation_phrase: string;
633
+ };
634
+ type CompletedVoiceGenerationResponse = VoiceGenerationResponse & {
635
+ status: 'completed';
636
+ voice_id: string;
360
637
  };
361
638
 
639
+ /** Generates songs from a text prompt with configurable vocal mode, style, and persona. */
362
640
  declare class TextToMusic {
363
641
  private readonly http;
364
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
+ */
365
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
+ */
366
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
+ */
367
663
  get(id: string, options?: RequestOptions): Promise<TextToMusicResponse>;
368
664
  }
369
665
 
666
+ /** Continues an existing track from a specified timestamp, inheriting or overriding its settings. */
370
667
  declare class ExtendMusic {
371
668
  private readonly http;
372
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
+ */
373
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
+ */
374
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
+ */
375
690
  get(id: string, options?: RequestOptions): Promise<ExtendMusicResponse>;
376
691
  }
377
692
 
693
+ /** Creates cover artwork for an existing music task. */
378
694
  declare class GenerateArtwork {
379
695
  private readonly http;
380
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
+ */
381
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
+ */
382
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
+ */
383
717
  get(id: string, options?: RequestOptions): Promise<GenerateArtworkResponse>;
384
718
  }
385
719
 
720
+ /** Re-records vocals over an uploaded audio file with a new style or voice. */
386
721
  declare class CoverAudio {
387
722
  private readonly http;
388
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
+ */
389
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
+ */
390
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
+ */
391
744
  get(id: string, options?: RequestOptions): Promise<CoverAudioResponse>;
392
745
  }
393
746
 
747
+ /** Generates and adds an instrumental backing track to uploaded audio. */
394
748
  declare class AddInstrumental {
395
749
  private readonly http;
396
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
+ */
397
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
+ */
398
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
+ */
399
771
  get(id: string, options?: RequestOptions): Promise<AddInstrumentalResponse>;
400
772
  }
401
773
 
774
+ /** Generates and adds vocals to an uploaded instrumental track. */
402
775
  declare class AddVocals {
403
776
  private readonly http;
404
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
+ */
405
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
+ */
406
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
+ */
407
798
  get(id: string, options?: RequestOptions): Promise<AddVocalsResponse>;
408
799
  }
409
800
 
801
+ /** Splits a track into individual instrument stems (vocals, drums, bass, guitar, etc.). */
410
802
  declare class SeparateAudioStems {
411
803
  private readonly http;
412
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
+ */
413
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
+ */
414
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
+ */
415
825
  get(id: string, options?: RequestOptions): Promise<SeparateAudioStemsResponse>;
416
826
  }
417
827
 
828
+ /** Extracts per-instrument MIDI note data from a generated track. */
418
829
  declare class GenerateMidi {
419
830
  private readonly http;
420
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
+ */
421
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
+ */
422
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
+ */
423
852
  get(id: string, options?: RequestOptions): Promise<GenerateMidiResponse>;
424
853
  }
425
854
 
855
+ /** Converts a generated track to WAV format. */
426
856
  declare class ConvertAudio {
427
857
  private readonly http;
428
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
+ */
429
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
+ */
430
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
+ */
431
879
  get(id: string, options?: RequestOptions): Promise<ConvertAudioResponse>;
432
880
  }
433
881
 
882
+ /** Generates a music visualization video from an existing track. */
434
883
  declare class VisualizeMusic {
435
884
  private readonly http;
436
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
+ */
437
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
+ */
438
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
+ */
439
906
  get(id: string, options?: RequestOptions): Promise<VisualizeMusicResponse>;
440
907
  }
441
908
 
909
+ /** Produces AI-generated lyrics from a text prompt. */
442
910
  declare class GenerateLyrics {
443
911
  private readonly http;
444
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
+ */
445
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
+ */
446
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
+ */
447
933
  get(id: string, options?: RequestOptions): Promise<GenerateLyricsResponse>;
448
934
  }
449
935
 
936
+ /** Retrieves word-level timing alignment for a track. Synchronous (run only, no create/get polling). */
450
937
  declare class GetTimestampedLyrics {
451
938
  private readonly http;
452
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
+ */
453
946
  run(params: GetTimestampedLyricsParams, options?: RequestOptions): Promise<GetTimestampedLyricsResponse>;
454
947
  }
455
948
 
949
+ /** Re-generates a time range within an existing track with new lyrics and style. */
456
950
  declare class ReplaceSection {
457
951
  private readonly http;
458
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
+ */
459
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
+ */
460
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
+ */
461
973
  get(id: string, options?: RequestOptions): Promise<ReplaceSectionResponse>;
462
974
  }
463
975
 
976
+ /** Blends two audio tracks into a single new composition. */
464
977
  declare class CreateMashup {
465
978
  private readonly http;
466
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
+ */
467
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
+ */
468
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
+ */
469
1000
  get(id: string, options?: RequestOptions): Promise<CreateMashupResponse>;
470
1001
  }
471
1002
 
1003
+ /** Generates sound effects (not music) from a text description with optional looping and BPM control. */
472
1004
  declare class TextToSound {
473
1005
  private readonly http;
474
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
+ */
475
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
+ */
476
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
+ */
477
1027
  get(id: string, options?: RequestOptions): Promise<TextToSoundResponse>;
478
1028
  }
479
1029
 
1030
+ /** Creates a reusable style or voice persona from an existing track's vocals. Synchronous (run only). */
480
1031
  declare class GeneratePersona {
481
1032
  private readonly http;
482
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
+ */
483
1040
  run(params: GeneratePersonaParams, options?: RequestOptions): Promise<GeneratePersonaResponse>;
484
1041
  }
485
1042
 
1043
+ /** Generates style/genre tags from a text description for use in style fields. Synchronous (run only). */
486
1044
  declare class BoostStyle {
487
1045
  private readonly http;
488
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
+ */
489
1053
  run(params: BoostStyleParams, options?: RequestOptions): Promise<BoostStyleResponse>;
490
1054
  }
491
1055
 
1056
+ /** Step 1 of voice cloning: extracts a validation phrase from a voice recording for the user to re-record. */
1057
+ declare class VoiceToValidationPhrase {
1058
+ private readonly http;
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
+ */
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
+ */
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
+ */
1080
+ get(id: string, options?: RequestOptions): Promise<ValidationPhraseResponse>;
1081
+ }
1082
+
1083
+ /** Step 2 (optional) of voice cloning: requests a new, easier validation phrase. */
1084
+ declare class RegenerateValidationPhrase {
1085
+ private readonly http;
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
+ */
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
+ */
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
+ */
1107
+ get(id: string, options?: RequestOptions): Promise<ValidationPhraseResponse>;
1108
+ }
1109
+
1110
+ /** Step 3 of voice cloning: trains a custom voice from the user's recording of the validation phrase. */
1111
+ declare class GenerateVoice {
1112
+ private readonly http;
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
+ */
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
+ */
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
+ */
1134
+ get(id: string, options?: RequestOptions): Promise<VoiceGenerationResponse>;
1135
+ }
1136
+
1137
+ /** Step 4 of voice cloning: checks whether a custom voice is ready for use. Synchronous (run only). */
1138
+ declare class CheckVoice {
1139
+ private readonly http;
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
+ */
1147
+ run(params: CheckVoiceParams, options?: RequestOptions): Promise<CheckVoiceResponse>;
1148
+ }
1149
+
492
1150
  /**
493
- * Suno API client.
1151
+ * Suno music platform client covering song generation, extension, covers, stems,
1152
+ * MIDI, lyrics, mashups, sound effects, visualization, personas, and voice cloning.
494
1153
  *
495
1154
  * @example
496
1155
  * ```typescript
@@ -500,32 +1159,55 @@ declare class BoostStyle {
500
1159
  * });
501
1160
  *
502
1161
  * const result = await client.textToMusic.run({
503
- * custom_mode: false,
504
- * instrumental: false,
505
1162
  * prompt: 'A chill lo-fi beat with soft vocals',
506
1163
  * model: 'suno-v4.5-plus',
507
1164
  * });
508
1165
  * ```
509
1166
  */
510
- declare class SunoClient {
1167
+ declare class SunoClient extends BaseClient {
1168
+ /** Generates songs from a text prompt with configurable vocal mode, style, and persona. */
511
1169
  readonly textToMusic: TextToMusic;
1170
+ /** Continues an existing track from a specified timestamp, inheriting or overriding its settings. */
512
1171
  readonly extendMusic: ExtendMusic;
1172
+ /** Creates cover artwork for an existing music task. */
513
1173
  readonly generateArtwork: GenerateArtwork;
1174
+ /** Re-records vocals over an uploaded audio file with a new style or voice. */
514
1175
  readonly coverAudio: CoverAudio;
1176
+ /** Generates and adds an instrumental backing track to uploaded audio. */
515
1177
  readonly addInstrumental: AddInstrumental;
1178
+ /** Generates and adds vocals to an uploaded instrumental track. */
516
1179
  readonly addVocals: AddVocals;
1180
+ /** Splits a track into individual instrument stems (vocals, drums, bass, guitar, etc.). */
517
1181
  readonly separateAudioStems: SeparateAudioStems;
1182
+ /** Extracts per-instrument MIDI note data from a generated track. */
518
1183
  readonly generateMidi: GenerateMidi;
1184
+ /** Converts a generated track to WAV format. */
519
1185
  readonly convertAudio: ConvertAudio;
1186
+ /** Generates a music visualization video from an existing track. */
520
1187
  readonly visualizeMusic: VisualizeMusic;
1188
+ /** Produces AI-generated lyrics from a text prompt. */
521
1189
  readonly generateLyrics: GenerateLyrics;
1190
+ /** Retrieves word-level timing alignment for a track. Synchronous (run only). */
522
1191
  readonly getTimestampedLyrics: GetTimestampedLyrics;
1192
+ /** Re-generates a time range within an existing track with new lyrics and style. */
523
1193
  readonly replaceSection: ReplaceSection;
1194
+ /** Blends two audio tracks into a single new composition. */
524
1195
  readonly createMashup: CreateMashup;
1196
+ /** Generates sound effects (not music) from a text description with optional looping and BPM control. */
525
1197
  readonly textToSound: TextToSound;
1198
+ /** Creates a reusable style or voice persona from a track's vocals. Synchronous (run only). */
526
1199
  readonly generatePersona: GeneratePersona;
1200
+ /** Generates style/genre tags from a text description for use in style fields. Synchronous (run only). */
527
1201
  readonly boostStyle: BoostStyle;
1202
+ /** Step 1 of voice cloning: extracts a validation phrase from a voice recording. */
1203
+ readonly voiceToValidationPhrase: VoiceToValidationPhrase;
1204
+ /** Step 2 (optional) of voice cloning: requests a new, easier validation phrase. */
1205
+ readonly regenerateValidationPhrase: RegenerateValidationPhrase;
1206
+ /** Step 3 of voice cloning: trains a custom voice from the user's recording of the validation phrase. */
1207
+ readonly generateVoice: GenerateVoice;
1208
+ /** Step 4 of voice cloning: checks whether a custom voice is ready for use. Synchronous (run only). */
1209
+ readonly checkVoice: CheckVoice;
528
1210
  constructor(options?: ClientOptions);
529
1211
  }
530
1212
 
531
- export { type AddInstrumentalParams, type AddInstrumentalResponse, type AddVocalsParams, type AddVocalsResponse, type AlignedWord, type AsyncTaskResponse, type Audio, type BoostStyleParams, type BoostStyleResponse, type CompletedAddInstrumentalResponse, type CompletedAddVocalsResponse, type CompletedConvertAudioResponse, type CompletedCoverAudioResponse, type CompletedCreateMashupResponse, type CompletedExtendMusicResponse, type CompletedGenerateArtworkResponse, type CompletedGenerateLyricsResponse, type CompletedGenerateMidiResponse, type CompletedReplaceSectionResponse, type CompletedSeparateAudioStemsResponse, type CompletedTextToMusicResponse, type CompletedTextToSoundResponse, type CompletedVisualizeMusicResponse, type ConvertAudioParams, type ConvertAudioResponse, type CoverAudioCustomParams, type CoverAudioParams, type CoverAudioResponse, type CoverAudioSimpleParams, type CreateMashupCustomParams, type CreateMashupParams, type CreateMashupResponse, type CreateMashupSimpleParams, type ExtendMusicParams, type ExtendMusicResponse, type GenerateArtworkParams, type GenerateArtworkResponse, type GenerateLyricsParams, type GenerateLyricsResponse, type GenerateMidiParams, type GenerateMidiResponse, type GeneratePersonaParams, type GeneratePersonaResponse, type GenerationStage, type GetTimestampedLyricsParams, type GetTimestampedLyricsResponse, type MidiInstrument, type MidiNote, type Persona, type PersonaModel, type ReplaceSectionParams, type ReplaceSectionResponse, type SeparateAudioStemsParams, type SeparateAudioStemsResponse, type SeparatedAudio, type SoundKey, type SoundModel, type SunoBaseParams, SunoClient, type SunoModel, type TaskCreateResponse, type TaskStatus, type TextToMusicCustomParams, type TextToMusicParams, type TextToMusicResponse, type TextToMusicSimpleParams, type TextToSoundParams, type TextToSoundResponse, type VisualizeMusicParams, type VisualizeMusicResponse, type VocalGender };
1213
+ export { type AddInstrumentalParams, type AddInstrumentalResponse, type AddVocalsParams, type AddVocalsResponse, type AlignedWord, type AsyncTaskResponse, type Audio, type BoostStyleParams, type BoostStyleResponse, type CheckVoiceParams, type CheckVoiceResponse, type CompletedAddInstrumentalResponse, type CompletedAddVocalsResponse, type CompletedConvertAudioResponse, type CompletedCoverAudioResponse, type CompletedCreateMashupResponse, type CompletedExtendMusicResponse, type CompletedGenerateArtworkResponse, type CompletedGenerateLyricsResponse, type CompletedGenerateMidiResponse, type CompletedReplaceSectionResponse, type CompletedSeparateAudioStemsResponse, type CompletedTextToMusicResponse, type CompletedTextToSoundResponse, type CompletedValidationPhraseResponse, type CompletedVisualizeMusicResponse, type CompletedVoiceGenerationResponse, type ConvertAudioParams, type ConvertAudioResponse, type CoverAudioInstrumentalParams, type CoverAudioLyricsParams, type CoverAudioParams, type CoverAudioPromptParams, type CoverAudioResponse, type CreateMashupInstrumentalParams, type CreateMashupLyricsParams, type CreateMashupParams, type CreateMashupPromptParams, type CreateMashupResponse, type ExtendMusicParams, type ExtendMusicResponse, type GenerateArtworkParams, type GenerateArtworkResponse, type GenerateLyricsParams, type GenerateLyricsResponse, type GenerateMidiParams, type GenerateMidiResponse, type GeneratePersonaParams, type GeneratePersonaResponse, type GenerateVoiceParams, type GenerationStage, type GetTimestampedLyricsParams, type GetTimestampedLyricsResponse, type MidiInstrument, type MidiNote, type ParameterMode, type Persona, type PersonaType, type RegenerateValidationPhraseParams, type ReplaceSectionParams, type ReplaceSectionResponse, type SeparateAudioStemsParams, type SeparateAudioStemsResponse, type SeparatedAudio, type SingerSkillLevel, type SoundAudio, type SoundKey, type SoundModel, type SunoBaseParams, SunoClient, type SunoModel, type TaskCreateResponse, type TaskStatus, type TextToMusicInstrumentalParams, type TextToMusicLyricsParams, type TextToMusicParams, type TextToMusicPromptParams, type TextToMusicResponse, type TextToSoundParams, type TextToSoundResponse, type ValidationPhraseLanguage, type ValidationPhraseResponse, type VisualizeMusicParams, type VisualizeMusicResponse, type VocalGender, type VocalMode, type VoiceGenerationResponse, type VoiceToValidationPhraseParams };