Anleitung zur Integration der Suno-API zur Liedtextgenerierung

Wenn du die Generierung eines Songs anpassen möchtest, aber nicht unbedingt selbst den Liedtext schreiben willst, kannst du die von 羲云科技 bereitgestellte API zur Liedtextgenerierung verwenden, um anhand eines Prompts Liedtexte zu generieren. Die API ist die Suno Lyrics Generation API.

Abrechnung: Nach erfolgreicher Generierung beträgt die Standardgebühr pro Anfrage 0.08 Credits. Wenn eine Anfrage mehrere Liedtextvorschläge zurückgibt, wird sie dennoch nur einmal berechnet; maßgeblich für anwendbare Rabatte ist die tatsächliche Abrechnung. Fehlgeschlagene Anfragen werden nicht berechnet.

Der wichtigste Eingabeparameter dieser API ist prompt, optional ist model (mögliche Werte: default, remi-v1; Standardwert: default). Ein Beispiel für die Eingabe:

Dies entspricht auf der offiziellen Website Create → Songs → Advanced → Lyrics → Help me write lyrics.

Im Liedtextassistenten auf der offiziellen Suno-Website ist derselbe Prompt wie in der folgenden Anfrage eingegeben

Hier wird ein Prompt über eine Laterne am Meer eingegeben.

{
  "prompt": "Write an original acoustic folk chorus about a lantern on the shore."
}

Klicke auf „Ausführen“, das Ergebnis sieht wie folgt aus:

{
  "success": true,
  "task_id": "063f0ad3-3933-4655-94a5-166fde41524f",
  "data": [
    {
      "text": "[Chorus]\nLantern on the shore\nLantern on the shore\nIt keeps my footsteps sure\nWhen the dark rolls in for more\n\nLantern on the shore\nLantern on the shore\nI follow that small gold flame\nAnd I don’t feel lost anymore",
      "title": "Shore Lantern",
      "status": "complete",
      "tags": [
        "Acoustic folk with fingerpicked guitar, brushed hand percussion, and a loping 6/8 sway; chorus opens wide after a sparse verse feel, then settles into a warm refrain with stacked harmony on the anchor line. Lead vocal is close-mic and intimate, with a soft double on the last words and a few airy ad-libs. Vinyl crackle intro, tide-foam ambience between phrases, wide but earthy mix.",
        "folk",
        "acoustic"
      ]
    },
    {
      "text": "[Chorus]\nLantern on the shore\nLantern on the shore\nGuide me home once more\nTill the dark lets go\n\n[Chorus]\nLantern on the shore\nLantern on the shore\nBurn for me once more\nTill the waves say no",
      "title": "Lantern on the Shore",
      "status": "complete",
      "tags": [
        "Acoustic folk with fingerpicked guitar, brushed kick and airy room harmonies; chorus opens sparse then widens with low humming doubles and a soft fiddle lift, pre-chorus feel implied by a gentle build into the hook, final chorus adds handclaps and a tidal swell of backing vocals. Warm, intimate, close-mic mix with a natural wooden glow.",
        "folk",
        "acoustic"
      ]
    }
  ],
  "started_at": 1796061011.339,
  "finished_at": 1796061021.686,
  "elapsed": 10.347,
  "cost": {
    "amount": 0.072,
    "currency": "credit",
    "list_amount": 0.08
  }
}

Wie zu sehen ist, ist data ein Array, das bei jeder Anfrage mehrere Liedtextvorschläge zurückgibt. Dabei enthält das Feld text jedes Elements den Liedtext, title ist der Titel und tags sind die empfohlenen Musikstil-Tags.

Sobald wir den Liedtext haben, können wir die Suno Audios Generation API verwenden, um die Songgenerierung anzupassen.