@runapi.ai/suno 0.2.4 → 0.2.6

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.ts CHANGED
@@ -1,13 +1,17 @@
1
1
  import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, 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
+ type SunoModel = 'suno-v5.5' | 'suno-v5' | 'suno-v4.5-plus' | 'suno-v4.5-all' | 'suno-v4.5' | 'suno-v4';
5
5
  type SoundModel = 'suno-v5' | 'suno-v5.5';
6
+ type ValidationPhraseLanguage = 'en' | 'zh' | 'es' | 'fr' | 'pt' | 'de' | 'ja' | 'ko' | 'hi' | 'ru';
6
7
  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';
8
+ type VocalGender = 'male' | 'female';
9
+ type PersonaType = 'style' | 'voice';
10
+ type ParameterMode = 'source' | 'custom';
11
+ type VocalMode = 'auto_lyrics' | 'exact_lyrics' | 'instrumental';
9
12
  type TaskStatus = AsyncTaskStatus;
10
13
  type GenerationStage = 'text_generated' | 'first_audio_ready' | 'all_audios_ready' | 'failed';
14
+ type SingerSkillLevel = 'beginner' | 'intermediate' | 'advanced' | 'professional';
11
15
  interface SunoBaseParams {
12
16
  callback_url?: string;
13
17
  model?: SunoModel;
@@ -16,38 +20,54 @@ interface SunoBaseParams {
16
20
  weirdness_constraint?: number;
17
21
  audio_weight?: number;
18
22
  }
19
- interface TextToMusicSimpleParams extends SunoBaseParams {
20
- custom_mode: false;
21
- instrumental: boolean;
23
+ interface TextToMusicPromptParams extends SunoBaseParams {
24
+ vocal_mode: 'auto_lyrics';
22
25
  prompt: string;
26
+ lyrics?: never;
27
+ style?: never;
28
+ title?: never;
29
+ }
30
+ interface TextToMusicLyricsParams extends SunoBaseParams {
31
+ vocal_mode: 'exact_lyrics';
32
+ prompt?: never;
33
+ lyrics: string;
34
+ style: string;
35
+ title: string;
36
+ persona_id?: string;
37
+ persona_type?: PersonaType;
38
+ negative_tags?: string;
39
+ duration_seconds?: number;
40
+ continue_at?: number;
41
+ endpoint?: string;
23
42
  }
24
- interface TextToMusicCustomParams extends SunoBaseParams {
25
- custom_mode: true;
26
- instrumental: boolean;
43
+ interface TextToMusicInstrumentalParams extends SunoBaseParams {
44
+ vocal_mode: 'instrumental';
45
+ prompt?: never;
46
+ lyrics?: never;
27
47
  style: string;
28
48
  title: string;
29
- prompt?: string;
30
49
  persona_id?: string;
31
- persona_model?: PersonaModel;
50
+ persona_type?: PersonaType;
32
51
  negative_tags?: string;
33
- duration?: number;
52
+ duration_seconds?: number;
34
53
  continue_at?: number;
35
54
  endpoint?: string;
36
55
  }
37
- type TextToMusicParams = TextToMusicSimpleParams | TextToMusicCustomParams;
56
+ type TextToMusicParams = TextToMusicPromptParams | TextToMusicLyricsParams | TextToMusicInstrumentalParams;
38
57
  interface ExtendMusicParams extends SunoBaseParams {
39
58
  task_id?: string;
40
59
  audio_id?: string;
41
60
  audio_url?: string;
42
61
  upload_url?: string;
43
- default_param_flag?: boolean;
62
+ parameter_mode: ParameterMode;
44
63
  instrumental?: boolean;
45
64
  prompt?: string;
65
+ lyrics?: string;
46
66
  style?: string;
47
67
  title?: string;
48
68
  continue_at?: number;
49
69
  persona_id?: string;
50
- persona_model?: PersonaModel;
70
+ persona_type?: PersonaType;
51
71
  model?: SunoModel;
52
72
  negative_tags?: string;
53
73
  }
@@ -56,25 +76,38 @@ interface GenerateArtworkParams {
56
76
  callback_url?: string;
57
77
  [key: string]: unknown;
58
78
  }
59
- interface CoverAudioSimpleParams extends SunoBaseParams {
79
+ interface CoverAudioPromptParams extends SunoBaseParams {
60
80
  upload_url: string;
61
- custom_mode: false;
62
- instrumental: boolean;
81
+ vocal_mode: 'auto_lyrics';
63
82
  prompt: string;
83
+ lyrics?: never;
84
+ style?: never;
85
+ title?: never;
64
86
  negative_tags?: string;
65
87
  }
66
- interface CoverAudioCustomParams extends SunoBaseParams {
88
+ interface CoverAudioLyricsParams extends SunoBaseParams {
67
89
  upload_url: string;
68
- custom_mode: true;
69
- instrumental: boolean;
90
+ vocal_mode: 'exact_lyrics';
91
+ prompt?: never;
92
+ lyrics: string;
70
93
  style: string;
71
94
  title: string;
72
- prompt?: string;
73
95
  persona_id?: string;
74
- persona_model?: PersonaModel;
96
+ persona_type?: PersonaType;
75
97
  negative_tags?: string;
76
98
  }
77
- type CoverAudioParams = CoverAudioSimpleParams | CoverAudioCustomParams;
99
+ interface CoverAudioInstrumentalParams extends SunoBaseParams {
100
+ upload_url: string;
101
+ vocal_mode: 'instrumental';
102
+ prompt?: never;
103
+ lyrics?: never;
104
+ style: string;
105
+ title: string;
106
+ persona_id?: string;
107
+ persona_type?: PersonaType;
108
+ negative_tags?: string;
109
+ }
110
+ type CoverAudioParams = CoverAudioPromptParams | CoverAudioLyricsParams | CoverAudioInstrumentalParams;
78
111
  interface AddInstrumentalParams extends SunoBaseParams {
79
112
  model?: SunoModel;
80
113
  upload_url: string;
@@ -85,7 +118,7 @@ interface AddInstrumentalParams extends SunoBaseParams {
85
118
  interface AddVocalsParams extends SunoBaseParams {
86
119
  model?: SunoModel;
87
120
  upload_url: string;
88
- prompt: string;
121
+ lyrics: string;
89
122
  title: string;
90
123
  negative_tags: string;
91
124
  style: string;
@@ -125,7 +158,7 @@ interface GetTimestampedLyricsParams {
125
158
  interface ReplaceSectionParams {
126
159
  task_id: string;
127
160
  audio_id: string;
128
- prompt: string;
161
+ lyrics: string;
129
162
  tags: string;
130
163
  title: string;
131
164
  infill_start_time: number;
@@ -153,29 +186,79 @@ interface TextToSoundParams {
153
186
  sound_key?: SoundKey;
154
187
  grab_lyrics?: boolean;
155
188
  }
156
- interface CreateMashupSimpleParams extends SunoBaseParams {
189
+ interface VoiceToValidationPhraseParams {
190
+ voice_url: string;
191
+ vocal_start_seconds: number;
192
+ vocal_end_seconds: number;
193
+ language?: ValidationPhraseLanguage;
194
+ callback_url?: string;
195
+ }
196
+ interface RegenerateValidationPhraseParams {
197
+ task_id: string;
198
+ callback_url?: string;
199
+ }
200
+ interface GenerateVoiceParams {
201
+ task_id: string;
202
+ verify_url: string;
203
+ voice_name?: string;
204
+ description?: string;
205
+ style?: string;
206
+ singer_skill_level?: SingerSkillLevel;
207
+ callback_url?: string;
208
+ }
209
+ interface CheckVoiceParams {
210
+ task_id: string;
211
+ }
212
+ interface CreateMashupPromptParams extends SunoBaseParams {
157
213
  upload_url_list: [string, string];
158
- custom_mode: false;
159
214
  model?: SunoModel;
215
+ vocal_mode: 'auto_lyrics';
160
216
  prompt: string;
161
- instrumental?: boolean;
217
+ lyrics?: never;
218
+ style?: never;
219
+ title?: never;
162
220
  }
163
- interface CreateMashupCustomParams extends SunoBaseParams {
221
+ interface CreateMashupLyricsParams extends SunoBaseParams {
164
222
  upload_url_list: [string, string];
165
- custom_mode: true;
166
223
  model?: SunoModel;
224
+ vocal_mode: 'exact_lyrics';
225
+ prompt?: never;
226
+ lyrics: string;
167
227
  style: string;
168
228
  title: string;
169
- prompt?: string;
170
- instrumental?: boolean;
229
+ persona_id?: string;
230
+ persona_type?: PersonaType;
231
+ }
232
+ interface CreateMashupInstrumentalParams extends SunoBaseParams {
233
+ upload_url_list: [string, string];
234
+ model?: SunoModel;
235
+ vocal_mode: 'instrumental';
236
+ prompt?: never;
237
+ lyrics?: never;
238
+ style: string;
239
+ title: string;
240
+ persona_id?: string;
241
+ persona_type?: PersonaType;
171
242
  }
172
- type CreateMashupParams = CreateMashupSimpleParams | CreateMashupCustomParams;
243
+ type CreateMashupParams = CreateMashupPromptParams | CreateMashupLyricsParams | CreateMashupInstrumentalParams;
173
244
  interface TaskCreateResponse {
174
245
  id: string;
175
246
  status?: string;
176
247
  [key: string]: unknown;
177
248
  }
178
249
  interface Audio {
250
+ id: string;
251
+ audio_url?: string;
252
+ stream_audio_url?: string;
253
+ image_url?: string;
254
+ lyrics?: string;
255
+ model_name?: string;
256
+ title?: string;
257
+ tags?: string[];
258
+ duration?: number;
259
+ [key: string]: unknown;
260
+ }
261
+ interface SoundAudio {
179
262
  id: string;
180
263
  audio_url?: string;
181
264
  stream_audio_url?: string;
@@ -213,7 +296,8 @@ interface AddInstrumentalResponse extends TextToMusicResponse {
213
296
  }
214
297
  interface AddVocalsResponse extends TextToMusicResponse {
215
298
  }
216
- interface TextToSoundResponse extends TextToMusicResponse {
299
+ interface TextToSoundResponse extends AsyncTaskResponse {
300
+ audios?: SoundAudio[];
217
301
  }
218
302
  interface SeparatedAudio {
219
303
  vocal_url?: string;
@@ -297,6 +381,19 @@ interface BoostStyleResponse {
297
381
  interface CreateMashupResponse extends AsyncTaskResponse {
298
382
  audios?: Audio[];
299
383
  }
384
+ interface ValidationPhraseResponse extends AsyncTaskResponse {
385
+ provider_status?: string;
386
+ validation_phrase?: string;
387
+ }
388
+ interface VoiceGenerationResponse extends AsyncTaskResponse {
389
+ provider_status?: string;
390
+ voice_id?: string;
391
+ }
392
+ interface CheckVoiceResponse {
393
+ is_available?: boolean;
394
+ error?: string;
395
+ [key: string]: unknown;
396
+ }
300
397
  type CompletedTextToMusicResponse = TextToMusicResponse & {
301
398
  status: 'completed';
302
399
  audios: Audio[];
@@ -356,7 +453,15 @@ type CompletedCreateMashupResponse = CreateMashupResponse & {
356
453
  };
357
454
  type CompletedTextToSoundResponse = TextToSoundResponse & {
358
455
  status: 'completed';
359
- audios: Audio[];
456
+ audios: SoundAudio[];
457
+ };
458
+ type CompletedValidationPhraseResponse = ValidationPhraseResponse & {
459
+ status: 'completed';
460
+ validation_phrase: string;
461
+ };
462
+ type CompletedVoiceGenerationResponse = VoiceGenerationResponse & {
463
+ status: 'completed';
464
+ voice_id: string;
360
465
  };
361
466
 
362
467
  declare class TextToMusic {
@@ -489,6 +594,36 @@ declare class BoostStyle {
489
594
  run(params: BoostStyleParams, options?: RequestOptions): Promise<BoostStyleResponse>;
490
595
  }
491
596
 
597
+ declare class VoiceToValidationPhrase {
598
+ private readonly http;
599
+ constructor(http: HttpClient);
600
+ run(params: VoiceToValidationPhraseParams, options?: RequestOptions & PollingOptions): Promise<CompletedValidationPhraseResponse>;
601
+ create(params: VoiceToValidationPhraseParams, options?: RequestOptions): Promise<TaskCreateResponse>;
602
+ get(id: string, options?: RequestOptions): Promise<ValidationPhraseResponse>;
603
+ }
604
+
605
+ declare class RegenerateValidationPhrase {
606
+ private readonly http;
607
+ constructor(http: HttpClient);
608
+ run(params: RegenerateValidationPhraseParams, options?: RequestOptions & PollingOptions): Promise<CompletedValidationPhraseResponse>;
609
+ create(params: RegenerateValidationPhraseParams, options?: RequestOptions): Promise<TaskCreateResponse>;
610
+ get(id: string, options?: RequestOptions): Promise<ValidationPhraseResponse>;
611
+ }
612
+
613
+ declare class GenerateVoice {
614
+ private readonly http;
615
+ constructor(http: HttpClient);
616
+ run(params: GenerateVoiceParams, options?: RequestOptions & PollingOptions): Promise<CompletedVoiceGenerationResponse>;
617
+ create(params: GenerateVoiceParams, options?: RequestOptions): Promise<TaskCreateResponse>;
618
+ get(id: string, options?: RequestOptions): Promise<VoiceGenerationResponse>;
619
+ }
620
+
621
+ declare class CheckVoice {
622
+ private readonly http;
623
+ constructor(http: HttpClient);
624
+ run(params: CheckVoiceParams, options?: RequestOptions): Promise<CheckVoiceResponse>;
625
+ }
626
+
492
627
  /**
493
628
  * Suno API client.
494
629
  *
@@ -500,8 +635,6 @@ declare class BoostStyle {
500
635
  * });
501
636
  *
502
637
  * const result = await client.textToMusic.run({
503
- * custom_mode: false,
504
- * instrumental: false,
505
638
  * prompt: 'A chill lo-fi beat with soft vocals',
506
639
  * model: 'suno-v4.5-plus',
507
640
  * });
@@ -525,7 +658,11 @@ declare class SunoClient {
525
658
  readonly textToSound: TextToSound;
526
659
  readonly generatePersona: GeneratePersona;
527
660
  readonly boostStyle: BoostStyle;
661
+ readonly voiceToValidationPhrase: VoiceToValidationPhrase;
662
+ readonly regenerateValidationPhrase: RegenerateValidationPhrase;
663
+ readonly generateVoice: GenerateVoice;
664
+ readonly checkVoice: CheckVoice;
528
665
  constructor(options?: ClientOptions);
529
666
  }
530
667
 
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 };
668
+ 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 };
package/dist/index.js CHANGED
@@ -20,23 +20,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
- AuthenticationError: () => import_core19.AuthenticationError,
24
- InsufficientCreditsError: () => import_core19.InsufficientCreditsError,
25
- NetworkError: () => import_core19.NetworkError,
26
- NotFoundError: () => import_core19.NotFoundError,
27
- RateLimitError: () => import_core19.RateLimitError,
28
- RunApiError: () => import_core19.RunApiError,
29
- ServiceUnavailableError: () => import_core19.ServiceUnavailableError,
23
+ AuthenticationError: () => import_core23.AuthenticationError,
24
+ InsufficientCreditsError: () => import_core23.InsufficientCreditsError,
25
+ NetworkError: () => import_core23.NetworkError,
26
+ NotFoundError: () => import_core23.NotFoundError,
27
+ RateLimitError: () => import_core23.RateLimitError,
28
+ RunApiError: () => import_core23.RunApiError,
29
+ ServiceUnavailableError: () => import_core23.ServiceUnavailableError,
30
30
  SunoClient: () => SunoClient,
31
- TaskFailedError: () => import_core19.TaskFailedError,
32
- TaskTimeoutError: () => import_core19.TaskTimeoutError,
33
- TimeoutError: () => import_core19.TimeoutError,
34
- ValidationError: () => import_core19.ValidationError
31
+ TaskFailedError: () => import_core23.TaskFailedError,
32
+ TaskTimeoutError: () => import_core23.TaskTimeoutError,
33
+ TimeoutError: () => import_core23.TimeoutError,
34
+ ValidationError: () => import_core23.ValidationError
35
35
  });
36
36
  module.exports = __toCommonJS(index_exports);
37
37
 
38
38
  // src/client.ts
39
- var import_core18 = require("@runapi.ai/core");
39
+ var import_core22 = require("@runapi.ai/core");
40
40
 
41
41
  // src/resources/text-to-music.ts
42
42
  var import_core = require("@runapi.ai/core");
@@ -506,6 +506,112 @@ var BoostStyle = class {
506
506
  }
507
507
  };
508
508
 
509
+ // src/resources/voice-to-validation-phrase.ts
510
+ var import_core18 = require("@runapi.ai/core");
511
+ var import_internal15 = require("@runapi.ai/core/internal");
512
+ var ENDPOINT18 = "/api/v1/suno/voice_to_validation_phrase";
513
+ var VoiceToValidationPhrase = class {
514
+ constructor(http) {
515
+ this.http = http;
516
+ }
517
+ http;
518
+ async run(params, options) {
519
+ const { id } = await this.create(params, options);
520
+ const response = await (0, import_internal15.pollUntilComplete)(() => this.get(id, options), {
521
+ maxWaitMs: options?.maxWaitMs,
522
+ pollIntervalMs: options?.pollIntervalMs
523
+ });
524
+ return response;
525
+ }
526
+ async create(params, options) {
527
+ return this.http.request("POST", ENDPOINT18, {
528
+ body: (0, import_core18.compactParams)(params),
529
+ ...options
530
+ });
531
+ }
532
+ async get(id, options) {
533
+ return this.http.request("GET", `${ENDPOINT18}/${id}`, {
534
+ ...options
535
+ });
536
+ }
537
+ };
538
+
539
+ // src/resources/regenerate-validation-phrase.ts
540
+ var import_core19 = require("@runapi.ai/core");
541
+ var import_internal16 = require("@runapi.ai/core/internal");
542
+ var ENDPOINT19 = "/api/v1/suno/regenerate_validation_phrase";
543
+ var RegenerateValidationPhrase = class {
544
+ constructor(http) {
545
+ this.http = http;
546
+ }
547
+ http;
548
+ async run(params, options) {
549
+ const { id } = await this.create(params, options);
550
+ const response = await (0, import_internal16.pollUntilComplete)(() => this.get(id, options), {
551
+ maxWaitMs: options?.maxWaitMs,
552
+ pollIntervalMs: options?.pollIntervalMs
553
+ });
554
+ return response;
555
+ }
556
+ async create(params, options) {
557
+ return this.http.request("POST", ENDPOINT19, {
558
+ body: (0, import_core19.compactParams)(params),
559
+ ...options
560
+ });
561
+ }
562
+ async get(id, options) {
563
+ return this.http.request("GET", `${ENDPOINT19}/${id}`, {
564
+ ...options
565
+ });
566
+ }
567
+ };
568
+
569
+ // src/resources/generate-voice.ts
570
+ var import_core20 = require("@runapi.ai/core");
571
+ var import_internal17 = require("@runapi.ai/core/internal");
572
+ var ENDPOINT20 = "/api/v1/suno/generate_voice";
573
+ var GenerateVoice = class {
574
+ constructor(http) {
575
+ this.http = http;
576
+ }
577
+ http;
578
+ async run(params, options) {
579
+ const { id } = await this.create(params, options);
580
+ const response = await (0, import_internal17.pollUntilComplete)(() => this.get(id, options), {
581
+ maxWaitMs: options?.maxWaitMs,
582
+ pollIntervalMs: options?.pollIntervalMs
583
+ });
584
+ return response;
585
+ }
586
+ async create(params, options) {
587
+ return this.http.request("POST", ENDPOINT20, {
588
+ body: (0, import_core20.compactParams)(params),
589
+ ...options
590
+ });
591
+ }
592
+ async get(id, options) {
593
+ return this.http.request("GET", `${ENDPOINT20}/${id}`, {
594
+ ...options
595
+ });
596
+ }
597
+ };
598
+
599
+ // src/resources/check-voice.ts
600
+ var import_core21 = require("@runapi.ai/core");
601
+ var ENDPOINT21 = "/api/v1/suno/check_voice";
602
+ var CheckVoice = class {
603
+ constructor(http) {
604
+ this.http = http;
605
+ }
606
+ http;
607
+ async run(params, options) {
608
+ return this.http.request("POST", ENDPOINT21, {
609
+ body: (0, import_core21.compactParams)(params),
610
+ ...options
611
+ });
612
+ }
613
+ };
614
+
509
615
  // src/client.ts
510
616
  var SunoClient = class {
511
617
  textToMusic;
@@ -525,8 +631,12 @@ var SunoClient = class {
525
631
  textToSound;
526
632
  generatePersona;
527
633
  boostStyle;
634
+ voiceToValidationPhrase;
635
+ regenerateValidationPhrase;
636
+ generateVoice;
637
+ checkVoice;
528
638
  constructor(options = {}) {
529
- const http = (0, import_core18.createHttpClient)(options);
639
+ const http = (0, import_core22.createHttpClient)(options);
530
640
  this.textToMusic = new TextToMusic(http);
531
641
  this.extendMusic = new ExtendMusic(http);
532
642
  this.generateArtwork = new GenerateArtwork(http);
@@ -544,11 +654,15 @@ var SunoClient = class {
544
654
  this.textToSound = new TextToSound(http);
545
655
  this.generatePersona = new GeneratePersona(http);
546
656
  this.boostStyle = new BoostStyle(http);
657
+ this.voiceToValidationPhrase = new VoiceToValidationPhrase(http);
658
+ this.regenerateValidationPhrase = new RegenerateValidationPhrase(http);
659
+ this.generateVoice = new GenerateVoice(http);
660
+ this.checkVoice = new CheckVoice(http);
547
661
  }
548
662
  };
549
663
 
550
664
  // src/index.ts
551
- var import_core19 = require("@runapi.ai/core");
665
+ var import_core23 = require("@runapi.ai/core");
552
666
  // Annotate the CommonJS export names for ESM import in node:
553
667
  0 && (module.exports = {
554
668
  AuthenticationError,