@runapi.ai/suno 0.2.1
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/LICENSE +201 -0
- package/README.md +43 -0
- package/dist/index.d.mts +531 -0
- package/dist/index.d.ts +531 -0
- package/dist/index.js +567 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +541 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +79 -0
- package/skills/suno/README.md +58 -0
- package/skills/suno/SKILL.md +238 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, ClientOptions } from '@runapi.ai/core';
|
|
2
|
+
export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
|
|
3
|
+
|
|
4
|
+
type SunoModel = 'V5_5' | 'V5' | 'V4_5PLUS' | 'V4_5ALL' | 'V4_5' | 'V4' | 'V3_5';
|
|
5
|
+
type SoundModel = 'V5' | 'V5_5';
|
|
6
|
+
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';
|
|
9
|
+
type TaskStatus = AsyncTaskStatus;
|
|
10
|
+
type GenerationStage = 'text_generated' | 'first_audio_ready' | 'all_audios_ready' | 'failed';
|
|
11
|
+
interface SunoBaseParams {
|
|
12
|
+
callback_url?: string;
|
|
13
|
+
model?: SunoModel;
|
|
14
|
+
vocal_gender?: VocalGender;
|
|
15
|
+
style_weight?: number;
|
|
16
|
+
weirdness_constraint?: number;
|
|
17
|
+
audio_weight?: number;
|
|
18
|
+
}
|
|
19
|
+
interface TextToMusicSimpleParams extends SunoBaseParams {
|
|
20
|
+
custom_mode: false;
|
|
21
|
+
instrumental: boolean;
|
|
22
|
+
prompt: string;
|
|
23
|
+
}
|
|
24
|
+
interface TextToMusicCustomParams extends SunoBaseParams {
|
|
25
|
+
custom_mode: true;
|
|
26
|
+
instrumental: boolean;
|
|
27
|
+
style: string;
|
|
28
|
+
title: string;
|
|
29
|
+
prompt?: string;
|
|
30
|
+
persona_id?: string;
|
|
31
|
+
persona_model?: PersonaModel;
|
|
32
|
+
negative_tags?: string;
|
|
33
|
+
duration?: number;
|
|
34
|
+
continue_at?: number;
|
|
35
|
+
endpoint?: string;
|
|
36
|
+
}
|
|
37
|
+
type TextToMusicParams = TextToMusicSimpleParams | TextToMusicCustomParams;
|
|
38
|
+
interface ExtendMusicParams extends SunoBaseParams {
|
|
39
|
+
task_id?: string;
|
|
40
|
+
audio_id?: string;
|
|
41
|
+
audio_url?: string;
|
|
42
|
+
upload_url?: string;
|
|
43
|
+
default_param_flag?: boolean;
|
|
44
|
+
instrumental?: boolean;
|
|
45
|
+
prompt?: string;
|
|
46
|
+
style?: string;
|
|
47
|
+
title?: string;
|
|
48
|
+
continue_at?: number;
|
|
49
|
+
persona_id?: string;
|
|
50
|
+
persona_model?: PersonaModel;
|
|
51
|
+
model?: SunoModel;
|
|
52
|
+
negative_tags?: string;
|
|
53
|
+
}
|
|
54
|
+
interface GenerateArtworkParams {
|
|
55
|
+
task_id: string;
|
|
56
|
+
callback_url?: string;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
interface CoverAudioSimpleParams extends SunoBaseParams {
|
|
60
|
+
upload_url: string;
|
|
61
|
+
custom_mode: false;
|
|
62
|
+
instrumental: boolean;
|
|
63
|
+
prompt: string;
|
|
64
|
+
negative_tags?: string;
|
|
65
|
+
}
|
|
66
|
+
interface CoverAudioCustomParams extends SunoBaseParams {
|
|
67
|
+
upload_url: string;
|
|
68
|
+
custom_mode: true;
|
|
69
|
+
instrumental: boolean;
|
|
70
|
+
style: string;
|
|
71
|
+
title: string;
|
|
72
|
+
prompt?: string;
|
|
73
|
+
persona_id?: string;
|
|
74
|
+
persona_model?: PersonaModel;
|
|
75
|
+
negative_tags?: string;
|
|
76
|
+
}
|
|
77
|
+
type CoverAudioParams = CoverAudioSimpleParams | CoverAudioCustomParams;
|
|
78
|
+
interface AddInstrumentalParams extends SunoBaseParams {
|
|
79
|
+
model?: SunoModel;
|
|
80
|
+
upload_url: string;
|
|
81
|
+
title: string;
|
|
82
|
+
negative_tags: string;
|
|
83
|
+
tags: string;
|
|
84
|
+
}
|
|
85
|
+
interface AddVocalsParams extends SunoBaseParams {
|
|
86
|
+
model?: SunoModel;
|
|
87
|
+
upload_url: string;
|
|
88
|
+
prompt: string;
|
|
89
|
+
title: string;
|
|
90
|
+
negative_tags: string;
|
|
91
|
+
style: string;
|
|
92
|
+
}
|
|
93
|
+
interface SeparateAudioStemsParams {
|
|
94
|
+
task_id: string;
|
|
95
|
+
audio_id: string;
|
|
96
|
+
type?: 'separate_vocal' | 'split_stem' | string;
|
|
97
|
+
callback_url?: string;
|
|
98
|
+
}
|
|
99
|
+
interface GenerateMidiParams {
|
|
100
|
+
task_id: string;
|
|
101
|
+
callback_url?: string;
|
|
102
|
+
}
|
|
103
|
+
interface ConvertAudioParams {
|
|
104
|
+
task_id: string;
|
|
105
|
+
audio_id?: string;
|
|
106
|
+
callback_url?: string;
|
|
107
|
+
}
|
|
108
|
+
interface VisualizeMusicParams {
|
|
109
|
+
task_id: string;
|
|
110
|
+
audio_id?: string;
|
|
111
|
+
prompt?: string;
|
|
112
|
+
callback_url?: string;
|
|
113
|
+
author?: string;
|
|
114
|
+
domain_name?: string;
|
|
115
|
+
}
|
|
116
|
+
interface GenerateLyricsParams {
|
|
117
|
+
prompt: string;
|
|
118
|
+
callback_url?: string;
|
|
119
|
+
}
|
|
120
|
+
interface GetTimestampedLyricsParams {
|
|
121
|
+
task_id: string;
|
|
122
|
+
audio_id: string;
|
|
123
|
+
callback_url?: string;
|
|
124
|
+
}
|
|
125
|
+
interface ReplaceSectionParams {
|
|
126
|
+
task_id: string;
|
|
127
|
+
audio_id: string;
|
|
128
|
+
prompt: string;
|
|
129
|
+
tags: string;
|
|
130
|
+
title: string;
|
|
131
|
+
infill_start_time: number;
|
|
132
|
+
infill_end_time: number;
|
|
133
|
+
callback_url?: string;
|
|
134
|
+
negative_tags?: string;
|
|
135
|
+
full_lyrics?: string;
|
|
136
|
+
}
|
|
137
|
+
interface GeneratePersonaParams {
|
|
138
|
+
task_id: string;
|
|
139
|
+
audio_id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
description: string;
|
|
142
|
+
}
|
|
143
|
+
interface BoostStyleParams {
|
|
144
|
+
description: string;
|
|
145
|
+
name?: string;
|
|
146
|
+
}
|
|
147
|
+
interface TextToSoundParams {
|
|
148
|
+
callback_url?: string;
|
|
149
|
+
model: SoundModel;
|
|
150
|
+
prompt: string;
|
|
151
|
+
sound_loop?: boolean;
|
|
152
|
+
sound_tempo?: number;
|
|
153
|
+
sound_key?: SoundKey;
|
|
154
|
+
grab_lyrics?: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface CreateMashupSimpleParams extends SunoBaseParams {
|
|
157
|
+
upload_url_list: [string, string];
|
|
158
|
+
custom_mode: false;
|
|
159
|
+
model?: SunoModel;
|
|
160
|
+
prompt: string;
|
|
161
|
+
instrumental?: boolean;
|
|
162
|
+
}
|
|
163
|
+
interface CreateMashupCustomParams extends SunoBaseParams {
|
|
164
|
+
upload_url_list: [string, string];
|
|
165
|
+
custom_mode: true;
|
|
166
|
+
model?: SunoModel;
|
|
167
|
+
style: string;
|
|
168
|
+
title: string;
|
|
169
|
+
prompt?: string;
|
|
170
|
+
instrumental?: boolean;
|
|
171
|
+
}
|
|
172
|
+
type CreateMashupParams = CreateMashupSimpleParams | CreateMashupCustomParams;
|
|
173
|
+
interface TaskCreateResponse {
|
|
174
|
+
id: string;
|
|
175
|
+
status?: string;
|
|
176
|
+
[key: string]: unknown;
|
|
177
|
+
}
|
|
178
|
+
interface Audio {
|
|
179
|
+
id: string;
|
|
180
|
+
audio_url?: string;
|
|
181
|
+
stream_audio_url?: string;
|
|
182
|
+
image_url?: string;
|
|
183
|
+
prompt?: string;
|
|
184
|
+
model_name?: string;
|
|
185
|
+
title?: string;
|
|
186
|
+
tags?: string[];
|
|
187
|
+
duration?: number;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}
|
|
190
|
+
interface AsyncTaskResponse {
|
|
191
|
+
id: string;
|
|
192
|
+
status: TaskStatus;
|
|
193
|
+
generation_stage?: GenerationStage;
|
|
194
|
+
error?: string;
|
|
195
|
+
[key: string]: unknown;
|
|
196
|
+
}
|
|
197
|
+
interface TextToMusicResponse extends AsyncTaskResponse {
|
|
198
|
+
audios?: Audio[];
|
|
199
|
+
}
|
|
200
|
+
interface ExtendMusicResponse extends AsyncTaskResponse {
|
|
201
|
+
original_task_id?: string;
|
|
202
|
+
audios?: Audio[];
|
|
203
|
+
}
|
|
204
|
+
interface GenerateArtworkResponse extends AsyncTaskResponse {
|
|
205
|
+
covers?: Array<{
|
|
206
|
+
url: string;
|
|
207
|
+
}>;
|
|
208
|
+
}
|
|
209
|
+
interface CoverAudioResponse extends AsyncTaskResponse {
|
|
210
|
+
audios?: Audio[];
|
|
211
|
+
}
|
|
212
|
+
interface AddInstrumentalResponse extends TextToMusicResponse {
|
|
213
|
+
}
|
|
214
|
+
interface AddVocalsResponse extends TextToMusicResponse {
|
|
215
|
+
}
|
|
216
|
+
interface TextToSoundResponse extends TextToMusicResponse {
|
|
217
|
+
}
|
|
218
|
+
interface SeparatedAudio {
|
|
219
|
+
vocal_url?: string;
|
|
220
|
+
instrumental_url?: string;
|
|
221
|
+
backing_vocals_url?: string;
|
|
222
|
+
bass_url?: string;
|
|
223
|
+
brass_url?: string;
|
|
224
|
+
drums_url?: string;
|
|
225
|
+
fx_url?: string;
|
|
226
|
+
guitar_url?: string;
|
|
227
|
+
keyboard_url?: string;
|
|
228
|
+
percussion_url?: string;
|
|
229
|
+
piano_url?: string;
|
|
230
|
+
strings_url?: string;
|
|
231
|
+
synth_url?: string;
|
|
232
|
+
woodwinds_url?: string;
|
|
233
|
+
}
|
|
234
|
+
interface SeparateAudioStemsResponse extends AsyncTaskResponse {
|
|
235
|
+
separated_audios?: SeparatedAudio;
|
|
236
|
+
}
|
|
237
|
+
interface MidiNote {
|
|
238
|
+
pitch: number;
|
|
239
|
+
start_time: number;
|
|
240
|
+
end_time: number;
|
|
241
|
+
velocity: number;
|
|
242
|
+
}
|
|
243
|
+
interface MidiInstrument {
|
|
244
|
+
name: string;
|
|
245
|
+
notes: MidiNote[];
|
|
246
|
+
}
|
|
247
|
+
interface GenerateMidiResponse extends AsyncTaskResponse {
|
|
248
|
+
instruments?: MidiInstrument[];
|
|
249
|
+
}
|
|
250
|
+
interface ConvertAudioResponse extends AsyncTaskResponse {
|
|
251
|
+
wav_url?: string;
|
|
252
|
+
original_task_id?: string;
|
|
253
|
+
}
|
|
254
|
+
interface VisualizeMusicResponse extends AsyncTaskResponse {
|
|
255
|
+
video_url?: string;
|
|
256
|
+
original_task_id?: string;
|
|
257
|
+
}
|
|
258
|
+
interface GenerateLyricsResponse extends AsyncTaskResponse {
|
|
259
|
+
lyrics?: Array<{
|
|
260
|
+
title?: string;
|
|
261
|
+
text: string;
|
|
262
|
+
}>;
|
|
263
|
+
}
|
|
264
|
+
interface AlignedWord {
|
|
265
|
+
word: string;
|
|
266
|
+
success: boolean;
|
|
267
|
+
start_time: number;
|
|
268
|
+
end_time: number;
|
|
269
|
+
palign: number;
|
|
270
|
+
}
|
|
271
|
+
interface GetTimestampedLyricsResponse {
|
|
272
|
+
aligned_words?: AlignedWord[];
|
|
273
|
+
waveform_data?: number[];
|
|
274
|
+
hoot_cer?: number;
|
|
275
|
+
is_streamed?: boolean;
|
|
276
|
+
[key: string]: unknown;
|
|
277
|
+
}
|
|
278
|
+
interface ReplaceSectionResponse extends AsyncTaskResponse {
|
|
279
|
+
track?: Audio;
|
|
280
|
+
}
|
|
281
|
+
interface Persona {
|
|
282
|
+
id: string;
|
|
283
|
+
name: string;
|
|
284
|
+
description: string;
|
|
285
|
+
[key: string]: unknown;
|
|
286
|
+
}
|
|
287
|
+
interface GeneratePersonaResponse {
|
|
288
|
+
persona: Persona;
|
|
289
|
+
error?: string;
|
|
290
|
+
[key: string]: unknown;
|
|
291
|
+
}
|
|
292
|
+
interface BoostStyleResponse {
|
|
293
|
+
style: string;
|
|
294
|
+
error?: string;
|
|
295
|
+
[key: string]: unknown;
|
|
296
|
+
}
|
|
297
|
+
interface CreateMashupResponse extends AsyncTaskResponse {
|
|
298
|
+
audios?: Audio[];
|
|
299
|
+
}
|
|
300
|
+
type CompletedTextToMusicResponse = TextToMusicResponse & {
|
|
301
|
+
status: 'completed';
|
|
302
|
+
audios: Audio[];
|
|
303
|
+
};
|
|
304
|
+
type CompletedExtendMusicResponse = ExtendMusicResponse & {
|
|
305
|
+
status: 'completed';
|
|
306
|
+
audios: Audio[];
|
|
307
|
+
};
|
|
308
|
+
type CompletedGenerateArtworkResponse = GenerateArtworkResponse & {
|
|
309
|
+
status: 'completed';
|
|
310
|
+
covers: Array<{
|
|
311
|
+
url: string;
|
|
312
|
+
}>;
|
|
313
|
+
};
|
|
314
|
+
type CompletedCoverAudioResponse = CoverAudioResponse & {
|
|
315
|
+
status: 'completed';
|
|
316
|
+
audios: Audio[];
|
|
317
|
+
};
|
|
318
|
+
type CompletedAddInstrumentalResponse = AddInstrumentalResponse & {
|
|
319
|
+
status: 'completed';
|
|
320
|
+
audios: Audio[];
|
|
321
|
+
};
|
|
322
|
+
type CompletedAddVocalsResponse = AddVocalsResponse & {
|
|
323
|
+
status: 'completed';
|
|
324
|
+
audios: Audio[];
|
|
325
|
+
};
|
|
326
|
+
type CompletedSeparateAudioStemsResponse = SeparateAudioStemsResponse & {
|
|
327
|
+
status: 'completed';
|
|
328
|
+
separated_audios: SeparatedAudio;
|
|
329
|
+
};
|
|
330
|
+
type CompletedGenerateMidiResponse = GenerateMidiResponse & {
|
|
331
|
+
status: 'completed';
|
|
332
|
+
instruments: MidiInstrument[];
|
|
333
|
+
};
|
|
334
|
+
type CompletedConvertAudioResponse = ConvertAudioResponse & {
|
|
335
|
+
status: 'completed';
|
|
336
|
+
wav_url: string;
|
|
337
|
+
};
|
|
338
|
+
type CompletedVisualizeMusicResponse = VisualizeMusicResponse & {
|
|
339
|
+
status: 'completed';
|
|
340
|
+
video_url: string;
|
|
341
|
+
};
|
|
342
|
+
type CompletedGenerateLyricsResponse = GenerateLyricsResponse & {
|
|
343
|
+
status: 'completed';
|
|
344
|
+
lyrics: Array<{
|
|
345
|
+
title?: string;
|
|
346
|
+
text: string;
|
|
347
|
+
}>;
|
|
348
|
+
};
|
|
349
|
+
type CompletedReplaceSectionResponse = ReplaceSectionResponse & {
|
|
350
|
+
status: 'completed';
|
|
351
|
+
track: Audio;
|
|
352
|
+
};
|
|
353
|
+
type CompletedCreateMashupResponse = CreateMashupResponse & {
|
|
354
|
+
status: 'completed';
|
|
355
|
+
audios: Audio[];
|
|
356
|
+
};
|
|
357
|
+
type CompletedTextToSoundResponse = TextToSoundResponse & {
|
|
358
|
+
status: 'completed';
|
|
359
|
+
audios: Audio[];
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
declare class TextToMusic {
|
|
363
|
+
private readonly http;
|
|
364
|
+
constructor(http: HttpClient);
|
|
365
|
+
run(params: TextToMusicParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToMusicResponse>;
|
|
366
|
+
create(params: TextToMusicParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
367
|
+
get(id: string, options?: RequestOptions): Promise<TextToMusicResponse>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare class ExtendMusic {
|
|
371
|
+
private readonly http;
|
|
372
|
+
constructor(http: HttpClient);
|
|
373
|
+
run(params: ExtendMusicParams, options?: RequestOptions & PollingOptions): Promise<CompletedExtendMusicResponse>;
|
|
374
|
+
create(params: ExtendMusicParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
375
|
+
get(id: string, options?: RequestOptions): Promise<ExtendMusicResponse>;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
declare class GenerateArtwork {
|
|
379
|
+
private readonly http;
|
|
380
|
+
constructor(http: HttpClient);
|
|
381
|
+
run(params: GenerateArtworkParams, options?: RequestOptions & PollingOptions): Promise<CompletedGenerateArtworkResponse>;
|
|
382
|
+
create(params: GenerateArtworkParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
383
|
+
get(id: string, options?: RequestOptions): Promise<GenerateArtworkResponse>;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
declare class CoverAudio {
|
|
387
|
+
private readonly http;
|
|
388
|
+
constructor(http: HttpClient);
|
|
389
|
+
run(params: CoverAudioParams, options?: RequestOptions & PollingOptions): Promise<CompletedCoverAudioResponse>;
|
|
390
|
+
create(params: CoverAudioParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
391
|
+
get(id: string, options?: RequestOptions): Promise<CoverAudioResponse>;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
declare class AddInstrumental {
|
|
395
|
+
private readonly http;
|
|
396
|
+
constructor(http: HttpClient);
|
|
397
|
+
run(params: AddInstrumentalParams, options?: RequestOptions & PollingOptions): Promise<CompletedAddInstrumentalResponse>;
|
|
398
|
+
create(params: AddInstrumentalParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
399
|
+
get(id: string, options?: RequestOptions): Promise<AddInstrumentalResponse>;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
declare class AddVocals {
|
|
403
|
+
private readonly http;
|
|
404
|
+
constructor(http: HttpClient);
|
|
405
|
+
run(params: AddVocalsParams, options?: RequestOptions & PollingOptions): Promise<CompletedAddVocalsResponse>;
|
|
406
|
+
create(params: AddVocalsParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
407
|
+
get(id: string, options?: RequestOptions): Promise<AddVocalsResponse>;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
declare class SeparateAudioStems {
|
|
411
|
+
private readonly http;
|
|
412
|
+
constructor(http: HttpClient);
|
|
413
|
+
run(params: SeparateAudioStemsParams, options?: RequestOptions & PollingOptions): Promise<CompletedSeparateAudioStemsResponse>;
|
|
414
|
+
create(params: SeparateAudioStemsParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
415
|
+
get(id: string, options?: RequestOptions): Promise<SeparateAudioStemsResponse>;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
declare class GenerateMidi {
|
|
419
|
+
private readonly http;
|
|
420
|
+
constructor(http: HttpClient);
|
|
421
|
+
run(params: GenerateMidiParams, options?: RequestOptions & PollingOptions): Promise<CompletedGenerateMidiResponse>;
|
|
422
|
+
create(params: GenerateMidiParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
423
|
+
get(id: string, options?: RequestOptions): Promise<GenerateMidiResponse>;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
declare class ConvertAudio {
|
|
427
|
+
private readonly http;
|
|
428
|
+
constructor(http: HttpClient);
|
|
429
|
+
run(params: ConvertAudioParams, options?: RequestOptions & PollingOptions): Promise<CompletedConvertAudioResponse>;
|
|
430
|
+
create(params: ConvertAudioParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
431
|
+
get(id: string, options?: RequestOptions): Promise<ConvertAudioResponse>;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
declare class VisualizeMusic {
|
|
435
|
+
private readonly http;
|
|
436
|
+
constructor(http: HttpClient);
|
|
437
|
+
run(params: VisualizeMusicParams, options?: RequestOptions & PollingOptions): Promise<CompletedVisualizeMusicResponse>;
|
|
438
|
+
create(params: VisualizeMusicParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
439
|
+
get(id: string, options?: RequestOptions): Promise<VisualizeMusicResponse>;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
declare class GenerateLyrics {
|
|
443
|
+
private readonly http;
|
|
444
|
+
constructor(http: HttpClient);
|
|
445
|
+
run(params: GenerateLyricsParams, options?: RequestOptions & PollingOptions): Promise<CompletedGenerateLyricsResponse>;
|
|
446
|
+
create(params: GenerateLyricsParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
447
|
+
get(id: string, options?: RequestOptions): Promise<GenerateLyricsResponse>;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
declare class GetTimestampedLyrics {
|
|
451
|
+
private readonly http;
|
|
452
|
+
constructor(http: HttpClient);
|
|
453
|
+
run(params: GetTimestampedLyricsParams, options?: RequestOptions): Promise<GetTimestampedLyricsResponse>;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
declare class ReplaceSection {
|
|
457
|
+
private readonly http;
|
|
458
|
+
constructor(http: HttpClient);
|
|
459
|
+
run(params: ReplaceSectionParams, options?: RequestOptions & PollingOptions): Promise<CompletedReplaceSectionResponse>;
|
|
460
|
+
create(params: ReplaceSectionParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
461
|
+
get(id: string, options?: RequestOptions): Promise<ReplaceSectionResponse>;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
declare class CreateMashup {
|
|
465
|
+
private readonly http;
|
|
466
|
+
constructor(http: HttpClient);
|
|
467
|
+
run(params: CreateMashupParams, options?: RequestOptions & PollingOptions): Promise<CompletedCreateMashupResponse>;
|
|
468
|
+
create(params: CreateMashupParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
469
|
+
get(id: string, options?: RequestOptions): Promise<CreateMashupResponse>;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
declare class TextToSound {
|
|
473
|
+
private readonly http;
|
|
474
|
+
constructor(http: HttpClient);
|
|
475
|
+
run(params: TextToSoundParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToSoundResponse>;
|
|
476
|
+
create(params: TextToSoundParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
477
|
+
get(id: string, options?: RequestOptions): Promise<TextToSoundResponse>;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
declare class GeneratePersona {
|
|
481
|
+
private readonly http;
|
|
482
|
+
constructor(http: HttpClient);
|
|
483
|
+
run(params: GeneratePersonaParams, options?: RequestOptions): Promise<GeneratePersonaResponse>;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
declare class BoostStyle {
|
|
487
|
+
private readonly http;
|
|
488
|
+
constructor(http: HttpClient);
|
|
489
|
+
run(params: BoostStyleParams, options?: RequestOptions): Promise<BoostStyleResponse>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Suno API client.
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* ```typescript
|
|
497
|
+
* const client = new SunoClient({
|
|
498
|
+
* apiKey: 'your-api-key',
|
|
499
|
+
* baseUrl: 'https://runapi.ai',
|
|
500
|
+
* });
|
|
501
|
+
*
|
|
502
|
+
* const result = await client.textToMusic.run({
|
|
503
|
+
* custom_mode: false,
|
|
504
|
+
* instrumental: false,
|
|
505
|
+
* prompt: 'A chill lo-fi beat with soft vocals',
|
|
506
|
+
* model: 'V4_5PLUS',
|
|
507
|
+
* });
|
|
508
|
+
* ```
|
|
509
|
+
*/
|
|
510
|
+
declare class SunoClient {
|
|
511
|
+
readonly textToMusic: TextToMusic;
|
|
512
|
+
readonly extendMusic: ExtendMusic;
|
|
513
|
+
readonly generateArtwork: GenerateArtwork;
|
|
514
|
+
readonly coverAudio: CoverAudio;
|
|
515
|
+
readonly addInstrumental: AddInstrumental;
|
|
516
|
+
readonly addVocals: AddVocals;
|
|
517
|
+
readonly separateAudioStems: SeparateAudioStems;
|
|
518
|
+
readonly generateMidi: GenerateMidi;
|
|
519
|
+
readonly convertAudio: ConvertAudio;
|
|
520
|
+
readonly visualizeMusic: VisualizeMusic;
|
|
521
|
+
readonly generateLyrics: GenerateLyrics;
|
|
522
|
+
readonly getTimestampedLyrics: GetTimestampedLyrics;
|
|
523
|
+
readonly replaceSection: ReplaceSection;
|
|
524
|
+
readonly createMashup: CreateMashup;
|
|
525
|
+
readonly textToSound: TextToSound;
|
|
526
|
+
readonly generatePersona: GeneratePersona;
|
|
527
|
+
readonly boostStyle: BoostStyle;
|
|
528
|
+
constructor(options?: ClientOptions);
|
|
529
|
+
}
|
|
530
|
+
|
|
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 };
|