Guida all'integrazione dell'API di generazione dei testi Suno

Se vuoi generare una canzone personalizzata, ma non hai molta voglia di scrivere tu stesso il testo, puoi utilizzare l'API di generazione dei testi fornita da 羲云科技 per generare il testo tramite un prompt: l'API è Suno Lyrics Generation API.

Fatturazione: dopo una generazione riuscita, il costo standard per ogni richiesta è di 0,08 crediti. Quando una richiesta restituisce più testi candidati, viene comunque addebitata una sola volta; gli sconti applicabili sono indicati nella fattura effettiva, mentre le richieste non riuscite non vengono addebitate.

Il principale parametro di input di questa API è prompt; è facoltativo model (valori disponibili: default, remi-v1; valore predefinito: default). Ecco un esempio di compilazione:

Corrisponde a Create → Songs → Advanced → Lyrics → Help me write lyrics sul sito ufficiale.

Nell'assistente per i testi del sito ufficiale di Suno è stato inserito lo stesso prompt della richiesta sottostante

Qui viene inserito un prompt su una lanterna in riva al mare.

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

Fai clic su Esegui; il risultato è il seguente:

{
  "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
  }
}

Come si può vedere, data è un array che restituisce ogni volta più testi candidati, in cui il campo text di ogni elemento contiene il testo della canzone, title è il titolo e tags contiene le etichette degli stili musicali consigliati.

Una volta ottenuto il testo, possiamo utilizzare Suno Audios Generation API per generare una canzone personalizzata.