@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/dist/index.js CHANGED
@@ -47,6 +47,12 @@ var TextToMusic = class {
47
47
  this.http = http;
48
48
  }
49
49
  http;
50
+ /**
51
+ * Create a text to music task and wait until complete.
52
+ * @param params Text to music parameters.
53
+ * @param options Per-request and polling overrides.
54
+ * @returns The completed text to music response.
55
+ */
50
56
  async run(params, options) {
51
57
  const { id } = await this.create(params, options);
52
58
  const response = await (0, import_internal.pollUntilComplete)(() => this.get(id, options), {
@@ -55,12 +61,24 @@ var TextToMusic = class {
55
61
  });
56
62
  return response;
57
63
  }
64
+ /**
65
+ * Create a text to music task; returns immediately with a task id.
66
+ * @param params Text to music parameters.
67
+ * @param options Per-request overrides.
68
+ * @returns The task creation result.
69
+ */
58
70
  async create(params, options) {
59
71
  return this.http.request("POST", ENDPOINT, {
60
72
  body: (0, import_core.compactParams)(params),
61
73
  ...options
62
74
  });
63
75
  }
76
+ /**
77
+ * Fetch the current status of a text to music task.
78
+ * @param id The task id.
79
+ * @param options Per-request overrides.
80
+ * @returns The current text to music task status.
81
+ */
64
82
  async get(id, options) {
65
83
  return this.http.request("GET", `${ENDPOINT}/${id}`, {
66
84
  ...options
@@ -77,6 +95,12 @@ var ExtendMusic = class {
77
95
  this.http = http;
78
96
  }
79
97
  http;
98
+ /**
99
+ * Create an extend music task and wait until complete.
100
+ * @param params Extend music parameters.
101
+ * @param options Per-request and polling overrides.
102
+ * @returns The completed extend music response.
103
+ */
80
104
  async run(params, options) {
81
105
  const { id } = await this.create(params, options);
82
106
  const response = await (0, import_internal2.pollUntilComplete)(() => this.get(id, options), {
@@ -85,12 +109,24 @@ var ExtendMusic = class {
85
109
  });
86
110
  return response;
87
111
  }
112
+ /**
113
+ * Create an extend music task; returns immediately with a task id.
114
+ * @param params Extend music parameters.
115
+ * @param options Per-request overrides.
116
+ * @returns The task creation result.
117
+ */
88
118
  async create(params, options) {
89
119
  return this.http.request("POST", ENDPOINT2, {
90
120
  body: (0, import_core2.compactParams)(params),
91
121
  ...options
92
122
  });
93
123
  }
124
+ /**
125
+ * Fetch the current status of an extend music task.
126
+ * @param id The task id.
127
+ * @param options Per-request overrides.
128
+ * @returns The current extend music task status.
129
+ */
94
130
  async get(id, options) {
95
131
  return this.http.request("GET", `${ENDPOINT2}/${id}`, {
96
132
  ...options
@@ -107,6 +143,12 @@ var GenerateArtwork = class {
107
143
  this.http = http;
108
144
  }
109
145
  http;
146
+ /**
147
+ * Create a generate artwork task and wait until complete.
148
+ * @param params Generate artwork parameters.
149
+ * @param options Per-request and polling overrides.
150
+ * @returns The completed generate artwork response.
151
+ */
110
152
  async run(params, options) {
111
153
  const { id } = await this.create(params, options);
112
154
  const response = await (0, import_internal3.pollUntilComplete)(() => this.get(id, options), {
@@ -115,12 +157,24 @@ var GenerateArtwork = class {
115
157
  });
116
158
  return response;
117
159
  }
160
+ /**
161
+ * Create a generate artwork task; returns immediately with a task id.
162
+ * @param params Generate artwork parameters.
163
+ * @param options Per-request overrides.
164
+ * @returns The task creation result.
165
+ */
118
166
  async create(params, options) {
119
167
  return this.http.request("POST", ENDPOINT3, {
120
168
  body: (0, import_core3.compactParams)(params),
121
169
  ...options
122
170
  });
123
171
  }
172
+ /**
173
+ * Fetch the current status of a generate artwork task.
174
+ * @param id The task id.
175
+ * @param options Per-request overrides.
176
+ * @returns The current generate artwork task status.
177
+ */
124
178
  async get(id, options) {
125
179
  return this.http.request("GET", `${ENDPOINT3}/${id}`, {
126
180
  ...options
@@ -137,6 +191,12 @@ var CoverAudio = class {
137
191
  this.http = http;
138
192
  }
139
193
  http;
194
+ /**
195
+ * Create a cover audio task and wait until complete.
196
+ * @param params Cover audio parameters.
197
+ * @param options Per-request and polling overrides.
198
+ * @returns The completed cover audio response.
199
+ */
140
200
  async run(params, options) {
141
201
  const { id } = await this.create(params, options);
142
202
  const response = await (0, import_internal4.pollUntilComplete)(() => this.get(id, options), {
@@ -145,12 +205,24 @@ var CoverAudio = class {
145
205
  });
146
206
  return response;
147
207
  }
208
+ /**
209
+ * Create a cover audio task; returns immediately with a task id.
210
+ * @param params Cover audio parameters.
211
+ * @param options Per-request overrides.
212
+ * @returns The task creation result.
213
+ */
148
214
  async create(params, options) {
149
215
  return this.http.request("POST", ENDPOINT4, {
150
216
  body: (0, import_core4.compactParams)(params),
151
217
  ...options
152
218
  });
153
219
  }
220
+ /**
221
+ * Fetch the current status of a cover audio task.
222
+ * @param id The task id.
223
+ * @param options Per-request overrides.
224
+ * @returns The current cover audio task status.
225
+ */
154
226
  async get(id, options) {
155
227
  return this.http.request("GET", `${ENDPOINT4}/${id}`, {
156
228
  ...options
@@ -167,6 +239,12 @@ var AddInstrumental = class {
167
239
  this.http = http;
168
240
  }
169
241
  http;
242
+ /**
243
+ * Create an add instrumental task and wait until complete.
244
+ * @param params Add instrumental parameters.
245
+ * @param options Per-request and polling overrides.
246
+ * @returns The completed add instrumental response.
247
+ */
170
248
  async run(params, options) {
171
249
  const { id } = await this.create(params, options);
172
250
  const response = await (0, import_internal5.pollUntilComplete)(() => this.get(id, options), {
@@ -175,12 +253,24 @@ var AddInstrumental = class {
175
253
  });
176
254
  return response;
177
255
  }
256
+ /**
257
+ * Create an add instrumental task; returns immediately with a task id.
258
+ * @param params Add instrumental parameters.
259
+ * @param options Per-request overrides.
260
+ * @returns The task creation result.
261
+ */
178
262
  async create(params, options) {
179
263
  return this.http.request("POST", ENDPOINT5, {
180
264
  body: (0, import_core5.compactParams)(params),
181
265
  ...options
182
266
  });
183
267
  }
268
+ /**
269
+ * Fetch the current status of an add instrumental task.
270
+ * @param id The task id.
271
+ * @param options Per-request overrides.
272
+ * @returns The current add instrumental task status.
273
+ */
184
274
  async get(id, options) {
185
275
  return this.http.request("GET", `${ENDPOINT5}/${id}`, {
186
276
  ...options
@@ -197,6 +287,12 @@ var AddVocals = class {
197
287
  this.http = http;
198
288
  }
199
289
  http;
290
+ /**
291
+ * Create an add vocals task and wait until complete.
292
+ * @param params Add vocals parameters.
293
+ * @param options Per-request and polling overrides.
294
+ * @returns The completed add vocals response.
295
+ */
200
296
  async run(params, options) {
201
297
  const { id } = await this.create(params, options);
202
298
  const response = await (0, import_internal6.pollUntilComplete)(() => this.get(id, options), {
@@ -205,12 +301,24 @@ var AddVocals = class {
205
301
  });
206
302
  return response;
207
303
  }
304
+ /**
305
+ * Create an add vocals task; returns immediately with a task id.
306
+ * @param params Add vocals parameters.
307
+ * @param options Per-request overrides.
308
+ * @returns The task creation result.
309
+ */
208
310
  async create(params, options) {
209
311
  return this.http.request("POST", ENDPOINT6, {
210
312
  body: (0, import_core6.compactParams)(params),
211
313
  ...options
212
314
  });
213
315
  }
316
+ /**
317
+ * Fetch the current status of an add vocals task.
318
+ * @param id The task id.
319
+ * @param options Per-request overrides.
320
+ * @returns The current add vocals task status.
321
+ */
214
322
  async get(id, options) {
215
323
  return this.http.request("GET", `${ENDPOINT6}/${id}`, {
216
324
  ...options
@@ -227,6 +335,12 @@ var SeparateAudioStems = class {
227
335
  this.http = http;
228
336
  }
229
337
  http;
338
+ /**
339
+ * Create a separate audio stems task and wait until complete.
340
+ * @param params Separate audio stems parameters.
341
+ * @param options Per-request and polling overrides.
342
+ * @returns The completed separate audio stems response.
343
+ */
230
344
  async run(params, options) {
231
345
  const { id } = await this.create(params, options);
232
346
  const response = await (0, import_internal7.pollUntilComplete)(() => this.get(id, options), {
@@ -235,12 +349,24 @@ var SeparateAudioStems = class {
235
349
  });
236
350
  return response;
237
351
  }
352
+ /**
353
+ * Create a separate audio stems task; returns immediately with a task id.
354
+ * @param params Separate audio stems parameters.
355
+ * @param options Per-request overrides.
356
+ * @returns The task creation result.
357
+ */
238
358
  async create(params, options) {
239
359
  return this.http.request("POST", ENDPOINT7, {
240
360
  body: (0, import_core7.compactParams)(params),
241
361
  ...options
242
362
  });
243
363
  }
364
+ /**
365
+ * Fetch the current status of a separate audio stems task.
366
+ * @param id The task id.
367
+ * @param options Per-request overrides.
368
+ * @returns The current separate audio stems task status.
369
+ */
244
370
  async get(id, options) {
245
371
  return this.http.request("GET", `${ENDPOINT7}/${id}`, {
246
372
  ...options
@@ -257,6 +383,12 @@ var GenerateMidi = class {
257
383
  this.http = http;
258
384
  }
259
385
  http;
386
+ /**
387
+ * Create a generate midi task and wait until complete.
388
+ * @param params Generate midi parameters.
389
+ * @param options Per-request and polling overrides.
390
+ * @returns The completed generate midi response.
391
+ */
260
392
  async run(params, options) {
261
393
  const { id } = await this.create(params, options);
262
394
  const response = await (0, import_internal8.pollUntilComplete)(() => this.get(id, options), {
@@ -265,12 +397,24 @@ var GenerateMidi = class {
265
397
  });
266
398
  return response;
267
399
  }
400
+ /**
401
+ * Create a generate midi task; returns immediately with a task id.
402
+ * @param params Generate midi parameters.
403
+ * @param options Per-request overrides.
404
+ * @returns The task creation result.
405
+ */
268
406
  async create(params, options) {
269
407
  return this.http.request("POST", ENDPOINT8, {
270
408
  body: (0, import_core8.compactParams)(params),
271
409
  ...options
272
410
  });
273
411
  }
412
+ /**
413
+ * Fetch the current status of a generate midi task.
414
+ * @param id The task id.
415
+ * @param options Per-request overrides.
416
+ * @returns The current generate midi task status.
417
+ */
274
418
  async get(id, options) {
275
419
  return this.http.request("GET", `${ENDPOINT8}/${id}`, {
276
420
  ...options
@@ -287,6 +431,12 @@ var ConvertAudio = class {
287
431
  this.http = http;
288
432
  }
289
433
  http;
434
+ /**
435
+ * Create a convert audio task and wait until complete.
436
+ * @param params Convert audio parameters.
437
+ * @param options Per-request and polling overrides.
438
+ * @returns The completed convert audio response.
439
+ */
290
440
  async run(params, options) {
291
441
  const { id } = await this.create(params, options);
292
442
  const response = await (0, import_internal9.pollUntilComplete)(() => this.get(id, options), {
@@ -295,12 +445,24 @@ var ConvertAudio = class {
295
445
  });
296
446
  return response;
297
447
  }
448
+ /**
449
+ * Create a convert audio task; returns immediately with a task id.
450
+ * @param params Convert audio parameters.
451
+ * @param options Per-request overrides.
452
+ * @returns The task creation result.
453
+ */
298
454
  async create(params, options) {
299
455
  return this.http.request("POST", ENDPOINT9, {
300
456
  body: (0, import_core9.compactParams)(params),
301
457
  ...options
302
458
  });
303
459
  }
460
+ /**
461
+ * Fetch the current status of a convert audio task.
462
+ * @param id The task id.
463
+ * @param options Per-request overrides.
464
+ * @returns The current convert audio task status.
465
+ */
304
466
  async get(id, options) {
305
467
  return this.http.request("GET", `${ENDPOINT9}/${id}`, {
306
468
  ...options
@@ -317,6 +479,12 @@ var VisualizeMusic = class {
317
479
  this.http = http;
318
480
  }
319
481
  http;
482
+ /**
483
+ * Create a visualize music task and wait until complete.
484
+ * @param params Visualize music parameters.
485
+ * @param options Per-request and polling overrides.
486
+ * @returns The completed visualize music response.
487
+ */
320
488
  async run(params, options) {
321
489
  const { id } = await this.create(params, options);
322
490
  const response = await (0, import_internal10.pollUntilComplete)(() => this.get(id, options), {
@@ -325,12 +493,24 @@ var VisualizeMusic = class {
325
493
  });
326
494
  return response;
327
495
  }
496
+ /**
497
+ * Create a visualize music task; returns immediately with a task id.
498
+ * @param params Visualize music parameters.
499
+ * @param options Per-request overrides.
500
+ * @returns The task creation result.
501
+ */
328
502
  async create(params, options) {
329
503
  return this.http.request("POST", ENDPOINT10, {
330
504
  body: (0, import_core10.compactParams)(params),
331
505
  ...options
332
506
  });
333
507
  }
508
+ /**
509
+ * Fetch the current status of a visualize music task.
510
+ * @param id The task id.
511
+ * @param options Per-request overrides.
512
+ * @returns The current visualize music task status.
513
+ */
334
514
  async get(id, options) {
335
515
  return this.http.request("GET", `${ENDPOINT10}/${id}`, {
336
516
  ...options
@@ -347,6 +527,12 @@ var GenerateLyrics = class {
347
527
  this.http = http;
348
528
  }
349
529
  http;
530
+ /**
531
+ * Create a generate lyrics task and wait until complete.
532
+ * @param params Generate lyrics parameters.
533
+ * @param options Per-request and polling overrides.
534
+ * @returns The completed generate lyrics response.
535
+ */
350
536
  async run(params, options) {
351
537
  const { id } = await this.create(params, options);
352
538
  const response = await (0, import_internal11.pollUntilComplete)(() => this.get(id, options), {
@@ -355,12 +541,24 @@ var GenerateLyrics = class {
355
541
  });
356
542
  return response;
357
543
  }
544
+ /**
545
+ * Create a generate lyrics task; returns immediately with a task id.
546
+ * @param params Generate lyrics parameters.
547
+ * @param options Per-request overrides.
548
+ * @returns The task creation result.
549
+ */
358
550
  async create(params, options) {
359
551
  return this.http.request("POST", ENDPOINT11, {
360
552
  body: (0, import_core11.compactParams)(params),
361
553
  ...options
362
554
  });
363
555
  }
556
+ /**
557
+ * Fetch the current status of a generate lyrics task.
558
+ * @param id The task id.
559
+ * @param options Per-request overrides.
560
+ * @returns The current generate lyrics task status.
561
+ */
364
562
  async get(id, options) {
365
563
  return this.http.request("GET", `${ENDPOINT11}/${id}`, {
366
564
  ...options
@@ -376,6 +574,12 @@ var GetTimestampedLyrics = class {
376
574
  this.http = http;
377
575
  }
378
576
  http;
577
+ /**
578
+ * Run get timestamped lyrics (synchronous).
579
+ * @param params Get timestamped lyrics parameters.
580
+ * @param options Per-request overrides.
581
+ * @returns The get timestamped lyrics response.
582
+ */
379
583
  async run(params, options) {
380
584
  return this.http.request("POST", ENDPOINT12, {
381
585
  body: (0, import_core12.compactParams)(params),
@@ -393,6 +597,12 @@ var ReplaceSection = class {
393
597
  this.http = http;
394
598
  }
395
599
  http;
600
+ /**
601
+ * Create a replace section task and wait until complete.
602
+ * @param params Replace section parameters.
603
+ * @param options Per-request and polling overrides.
604
+ * @returns The completed replace section response.
605
+ */
396
606
  async run(params, options) {
397
607
  const { id } = await this.create(params, options);
398
608
  const response = await (0, import_internal12.pollUntilComplete)(() => this.get(id, options), {
@@ -401,12 +611,24 @@ var ReplaceSection = class {
401
611
  });
402
612
  return response;
403
613
  }
614
+ /**
615
+ * Create a replace section task; returns immediately with a task id.
616
+ * @param params Replace section parameters.
617
+ * @param options Per-request overrides.
618
+ * @returns The task creation result.
619
+ */
404
620
  async create(params, options) {
405
621
  return this.http.request("POST", ENDPOINT13, {
406
622
  body: (0, import_core13.compactParams)(params),
407
623
  ...options
408
624
  });
409
625
  }
626
+ /**
627
+ * Fetch the current status of a replace section task.
628
+ * @param id The task id.
629
+ * @param options Per-request overrides.
630
+ * @returns The current replace section task status.
631
+ */
410
632
  async get(id, options) {
411
633
  return this.http.request("GET", `${ENDPOINT13}/${id}`, {
412
634
  ...options
@@ -423,6 +645,12 @@ var CreateMashup = class {
423
645
  this.http = http;
424
646
  }
425
647
  http;
648
+ /**
649
+ * Create a create mashup task and wait until complete.
650
+ * @param params Create mashup parameters.
651
+ * @param options Per-request and polling overrides.
652
+ * @returns The completed create mashup response.
653
+ */
426
654
  async run(params, options) {
427
655
  const { id } = await this.create(params, options);
428
656
  const response = await (0, import_internal13.pollUntilComplete)(() => this.get(id, options), {
@@ -431,12 +659,24 @@ var CreateMashup = class {
431
659
  });
432
660
  return response;
433
661
  }
662
+ /**
663
+ * Create a create mashup task; returns immediately with a task id.
664
+ * @param params Create mashup parameters.
665
+ * @param options Per-request overrides.
666
+ * @returns The task creation result.
667
+ */
434
668
  async create(params, options) {
435
669
  return this.http.request("POST", ENDPOINT14, {
436
670
  body: (0, import_core14.compactParams)(params),
437
671
  ...options
438
672
  });
439
673
  }
674
+ /**
675
+ * Fetch the current status of a create mashup task.
676
+ * @param id The task id.
677
+ * @param options Per-request overrides.
678
+ * @returns The current create mashup task status.
679
+ */
440
680
  async get(id, options) {
441
681
  return this.http.request("GET", `${ENDPOINT14}/${id}`, {
442
682
  ...options
@@ -453,6 +693,12 @@ var TextToSound = class {
453
693
  this.http = http;
454
694
  }
455
695
  http;
696
+ /**
697
+ * Create a text to sound task and wait until complete.
698
+ * @param params Text to sound parameters.
699
+ * @param options Per-request and polling overrides.
700
+ * @returns The completed text to sound response.
701
+ */
456
702
  async run(params, options) {
457
703
  const { id } = await this.create(params, options);
458
704
  const response = await (0, import_internal14.pollUntilComplete)(() => this.get(id, options), {
@@ -461,12 +707,24 @@ var TextToSound = class {
461
707
  });
462
708
  return response;
463
709
  }
710
+ /**
711
+ * Create a text to sound task; returns immediately with a task id.
712
+ * @param params Text to sound parameters.
713
+ * @param options Per-request overrides.
714
+ * @returns The task creation result.
715
+ */
464
716
  async create(params, options) {
465
717
  return this.http.request("POST", ENDPOINT15, {
466
718
  body: (0, import_core15.compactParams)(params),
467
719
  ...options
468
720
  });
469
721
  }
722
+ /**
723
+ * Fetch the current status of a text to sound task.
724
+ * @param id The task id.
725
+ * @param options Per-request overrides.
726
+ * @returns The current text to sound task status.
727
+ */
470
728
  async get(id, options) {
471
729
  return this.http.request("GET", `${ENDPOINT15}/${id}`, {
472
730
  ...options
@@ -482,6 +740,12 @@ var GeneratePersona = class {
482
740
  this.http = http;
483
741
  }
484
742
  http;
743
+ /**
744
+ * Run generate persona (synchronous).
745
+ * @param params Generate persona parameters.
746
+ * @param options Per-request overrides.
747
+ * @returns The generate persona response.
748
+ */
485
749
  async run(params, options) {
486
750
  return this.http.request("POST", ENDPOINT16, {
487
751
  body: (0, import_core16.compactParams)(params),
@@ -498,6 +762,12 @@ var BoostStyle = class {
498
762
  this.http = http;
499
763
  }
500
764
  http;
765
+ /**
766
+ * Run boost style (synchronous).
767
+ * @param params Boost style parameters.
768
+ * @param options Per-request overrides.
769
+ * @returns The boost style response.
770
+ */
501
771
  async run(params, options) {
502
772
  return this.http.request("POST", ENDPOINT17, {
503
773
  body: (0, import_core17.compactParams)(params),
@@ -515,6 +785,12 @@ var VoiceToValidationPhrase = class {
515
785
  this.http = http;
516
786
  }
517
787
  http;
788
+ /**
789
+ * Create a voice to validation phrase task and wait until complete.
790
+ * @param params Voice to validation phrase parameters.
791
+ * @param options Per-request and polling overrides.
792
+ * @returns The completed voice to validation phrase response.
793
+ */
518
794
  async run(params, options) {
519
795
  const { id } = await this.create(params, options);
520
796
  const response = await (0, import_internal15.pollUntilComplete)(() => this.get(id, options), {
@@ -523,12 +799,24 @@ var VoiceToValidationPhrase = class {
523
799
  });
524
800
  return response;
525
801
  }
802
+ /**
803
+ * Create a voice to validation phrase task; returns immediately with a task id.
804
+ * @param params Voice to validation phrase parameters.
805
+ * @param options Per-request overrides.
806
+ * @returns The task creation result.
807
+ */
526
808
  async create(params, options) {
527
809
  return this.http.request("POST", ENDPOINT18, {
528
810
  body: (0, import_core18.compactParams)(params),
529
811
  ...options
530
812
  });
531
813
  }
814
+ /**
815
+ * Fetch the current status of a voice to validation phrase task.
816
+ * @param id The task id.
817
+ * @param options Per-request overrides.
818
+ * @returns The current voice to validation phrase task status.
819
+ */
532
820
  async get(id, options) {
533
821
  return this.http.request("GET", `${ENDPOINT18}/${id}`, {
534
822
  ...options
@@ -545,6 +833,12 @@ var RegenerateValidationPhrase = class {
545
833
  this.http = http;
546
834
  }
547
835
  http;
836
+ /**
837
+ * Create a regenerate validation phrase task and wait until complete.
838
+ * @param params Regenerate validation phrase parameters.
839
+ * @param options Per-request and polling overrides.
840
+ * @returns The completed regenerate validation phrase response.
841
+ */
548
842
  async run(params, options) {
549
843
  const { id } = await this.create(params, options);
550
844
  const response = await (0, import_internal16.pollUntilComplete)(() => this.get(id, options), {
@@ -553,12 +847,24 @@ var RegenerateValidationPhrase = class {
553
847
  });
554
848
  return response;
555
849
  }
850
+ /**
851
+ * Create a regenerate validation phrase task; returns immediately with a task id.
852
+ * @param params Regenerate validation phrase parameters.
853
+ * @param options Per-request overrides.
854
+ * @returns The task creation result.
855
+ */
556
856
  async create(params, options) {
557
857
  return this.http.request("POST", ENDPOINT19, {
558
858
  body: (0, import_core19.compactParams)(params),
559
859
  ...options
560
860
  });
561
861
  }
862
+ /**
863
+ * Fetch the current status of a regenerate validation phrase task.
864
+ * @param id The task id.
865
+ * @param options Per-request overrides.
866
+ * @returns The current regenerate validation phrase task status.
867
+ */
562
868
  async get(id, options) {
563
869
  return this.http.request("GET", `${ENDPOINT19}/${id}`, {
564
870
  ...options
@@ -575,6 +881,12 @@ var GenerateVoice = class {
575
881
  this.http = http;
576
882
  }
577
883
  http;
884
+ /**
885
+ * Create a generate voice task and wait until complete.
886
+ * @param params Generate voice parameters.
887
+ * @param options Per-request and polling overrides.
888
+ * @returns The completed generate voice response.
889
+ */
578
890
  async run(params, options) {
579
891
  const { id } = await this.create(params, options);
580
892
  const response = await (0, import_internal17.pollUntilComplete)(() => this.get(id, options), {
@@ -583,12 +895,24 @@ var GenerateVoice = class {
583
895
  });
584
896
  return response;
585
897
  }
898
+ /**
899
+ * Create a generate voice task; returns immediately with a task id.
900
+ * @param params Generate voice parameters.
901
+ * @param options Per-request overrides.
902
+ * @returns The task creation result.
903
+ */
586
904
  async create(params, options) {
587
905
  return this.http.request("POST", ENDPOINT20, {
588
906
  body: (0, import_core20.compactParams)(params),
589
907
  ...options
590
908
  });
591
909
  }
910
+ /**
911
+ * Fetch the current status of a generate voice task.
912
+ * @param id The task id.
913
+ * @param options Per-request overrides.
914
+ * @returns The current generate voice task status.
915
+ */
592
916
  async get(id, options) {
593
917
  return this.http.request("GET", `${ENDPOINT20}/${id}`, {
594
918
  ...options
@@ -604,6 +928,12 @@ var CheckVoice = class {
604
928
  this.http = http;
605
929
  }
606
930
  http;
931
+ /**
932
+ * Run check voice (synchronous).
933
+ * @param params Check voice parameters.
934
+ * @param options Per-request overrides.
935
+ * @returns The check voice response.
936
+ */
607
937
  async run(params, options) {
608
938
  return this.http.request("POST", ENDPOINT21, {
609
939
  body: (0, import_core21.compactParams)(params),
@@ -613,51 +943,72 @@ var CheckVoice = class {
613
943
  };
614
944
 
615
945
  // src/client.ts
616
- var SunoClient = class {
946
+ var SunoClient = class extends import_core22.BaseClient {
947
+ /** Generates songs from a text prompt with configurable vocal mode, style, and persona. */
617
948
  textToMusic;
949
+ /** Continues an existing track from a specified timestamp, inheriting or overriding its settings. */
618
950
  extendMusic;
951
+ /** Creates cover artwork for an existing music task. */
619
952
  generateArtwork;
953
+ /** Re-records vocals over an uploaded audio file with a new style or voice. */
620
954
  coverAudio;
955
+ /** Generates and adds an instrumental backing track to uploaded audio. */
621
956
  addInstrumental;
957
+ /** Generates and adds vocals to an uploaded instrumental track. */
622
958
  addVocals;
959
+ /** Splits a track into individual instrument stems (vocals, drums, bass, guitar, etc.). */
623
960
  separateAudioStems;
961
+ /** Extracts per-instrument MIDI note data from a generated track. */
624
962
  generateMidi;
963
+ /** Converts a generated track to WAV format. */
625
964
  convertAudio;
965
+ /** Generates a music visualization video from an existing track. */
626
966
  visualizeMusic;
967
+ /** Produces AI-generated lyrics from a text prompt. */
627
968
  generateLyrics;
969
+ /** Retrieves word-level timing alignment for a track. Synchronous (run only). */
628
970
  getTimestampedLyrics;
971
+ /** Re-generates a time range within an existing track with new lyrics and style. */
629
972
  replaceSection;
973
+ /** Blends two audio tracks into a single new composition. */
630
974
  createMashup;
975
+ /** Generates sound effects (not music) from a text description with optional looping and BPM control. */
631
976
  textToSound;
977
+ /** Creates a reusable style or voice persona from a track's vocals. Synchronous (run only). */
632
978
  generatePersona;
979
+ /** Generates style/genre tags from a text description for use in style fields. Synchronous (run only). */
633
980
  boostStyle;
981
+ /** Step 1 of voice cloning: extracts a validation phrase from a voice recording. */
634
982
  voiceToValidationPhrase;
983
+ /** Step 2 (optional) of voice cloning: requests a new, easier validation phrase. */
635
984
  regenerateValidationPhrase;
985
+ /** Step 3 of voice cloning: trains a custom voice from the user's recording of the validation phrase. */
636
986
  generateVoice;
987
+ /** Step 4 of voice cloning: checks whether a custom voice is ready for use. Synchronous (run only). */
637
988
  checkVoice;
638
989
  constructor(options = {}) {
639
- const http = (0, import_core22.createHttpClient)(options);
640
- this.textToMusic = new TextToMusic(http);
641
- this.extendMusic = new ExtendMusic(http);
642
- this.generateArtwork = new GenerateArtwork(http);
643
- this.coverAudio = new CoverAudio(http);
644
- this.addInstrumental = new AddInstrumental(http);
645
- this.addVocals = new AddVocals(http);
646
- this.separateAudioStems = new SeparateAudioStems(http);
647
- this.generateMidi = new GenerateMidi(http);
648
- this.convertAudio = new ConvertAudio(http);
649
- this.visualizeMusic = new VisualizeMusic(http);
650
- this.generateLyrics = new GenerateLyrics(http);
651
- this.getTimestampedLyrics = new GetTimestampedLyrics(http);
652
- this.replaceSection = new ReplaceSection(http);
653
- this.createMashup = new CreateMashup(http);
654
- this.textToSound = new TextToSound(http);
655
- this.generatePersona = new GeneratePersona(http);
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);
990
+ super(options);
991
+ this.textToMusic = new TextToMusic(this.http);
992
+ this.extendMusic = new ExtendMusic(this.http);
993
+ this.generateArtwork = new GenerateArtwork(this.http);
994
+ this.coverAudio = new CoverAudio(this.http);
995
+ this.addInstrumental = new AddInstrumental(this.http);
996
+ this.addVocals = new AddVocals(this.http);
997
+ this.separateAudioStems = new SeparateAudioStems(this.http);
998
+ this.generateMidi = new GenerateMidi(this.http);
999
+ this.convertAudio = new ConvertAudio(this.http);
1000
+ this.visualizeMusic = new VisualizeMusic(this.http);
1001
+ this.generateLyrics = new GenerateLyrics(this.http);
1002
+ this.getTimestampedLyrics = new GetTimestampedLyrics(this.http);
1003
+ this.replaceSection = new ReplaceSection(this.http);
1004
+ this.createMashup = new CreateMashup(this.http);
1005
+ this.textToSound = new TextToSound(this.http);
1006
+ this.generatePersona = new GeneratePersona(this.http);
1007
+ this.boostStyle = new BoostStyle(this.http);
1008
+ this.voiceToValidationPhrase = new VoiceToValidationPhrase(this.http);
1009
+ this.regenerateValidationPhrase = new RegenerateValidationPhrase(this.http);
1010
+ this.generateVoice = new GenerateVoice(this.http);
1011
+ this.checkVoice = new CheckVoice(this.http);
661
1012
  }
662
1013
  };
663
1014