@acedatacloud/sdk 2026.728.0 → 2026.804.0
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 +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/providers/suno.ts +4 -1
package/package.json
CHANGED
|
@@ -33,6 +33,8 @@ export interface SunoGenerateOptions {
|
|
|
33
33
|
prompt?: Record<string, unknown>;
|
|
34
34
|
/** Audio ID used for generating additional audio based on existing audio. This field is required when `action` is `extend` or `concat`. */
|
|
35
35
|
audioId?: string;
|
|
36
|
+
/** Target length of the generated track in seconds, given as an integer, typically between 10 and 360. It is mainly used for generation in custom mode (`custom` is `true`); some models or actions may not support it, in which case the value is ignored or an error is returned. It is a target only — the finished length is reported by the `duration` field in the response and may differ slightly. */
|
|
37
|
+
duration?: number;
|
|
36
38
|
/** The "Weirdness" advanced parameter in the Suno official custom mode has a value range of 0 to 1, with higher values resulting in more creative and experimental outputs. It is only effective in custom mode. */
|
|
37
39
|
weirdness?: number;
|
|
38
40
|
/** A list of reference audio URLs for inspiration, requiring 1 to 4 publicly accessible audio addresses. This field is mandatory when `action` is `inspo`. */
|
|
@@ -227,6 +229,7 @@ export class Suno {
|
|
|
227
229
|
if (options.custom !== undefined) body["custom"] = options.custom;
|
|
228
230
|
body["prompt"] = options.prompt ?? "A song for Christmas";
|
|
229
231
|
if (options.audioId !== undefined) body["audio_id"] = options.audioId;
|
|
232
|
+
if (options.duration !== undefined) body["duration"] = options.duration;
|
|
230
233
|
if (options.weirdness !== undefined) body["weirdness"] = options.weirdness;
|
|
231
234
|
body["audio_urls"] = options.audioUrls ?? ["https://cdn1.suno.ai/b481b17a-bf50-4e10-8adc-4d5635050893.mp3"];
|
|
232
235
|
if (options.personaId !== undefined) body["persona_id"] = options.personaId;
|
|
@@ -248,7 +251,7 @@ export class Suno {
|
|
|
248
251
|
if (options.underpaintingStart !== undefined) body["underpainting_start"] = options.underpaintingStart;
|
|
249
252
|
if (options.replaceSectionStart !== undefined) body["replace_section_start"] = options.replaceSectionStart;
|
|
250
253
|
for (const [key, value] of Object.entries(options)) {
|
|
251
|
-
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "styleNegative", "title", "underpaintingEnd", "underpaintingStart", "variationCategory", "vocalGender", "wait", "weirdness"].includes(key) && value !== undefined) {
|
|
254
|
+
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "duration", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "styleNegative", "title", "underpaintingEnd", "underpaintingStart", "variationCategory", "vocalGender", "wait", "weirdness"].includes(key) && value !== undefined) {
|
|
252
255
|
body[key] = value;
|
|
253
256
|
}
|
|
254
257
|
}
|