Instruções de integração da API de geração de letras do Suno

Se você quiser gerar músicas personalizadas, mas não quiser escrever as letras por conta própria, pode usar a API de geração de letras oferecida pela orchats para gerar letras por meio de um prompt. A API é a Suno Lyrics Generation API.

Cobrança: após uma geração bem-sucedida, o custo padrão por solicitação é de 0,08 Credits. Quando uma solicitação retorna várias opções de letras, a cobrança continua sendo feita apenas uma vez; os descontos aplicáveis ao consumo são determinados pela fatura efetiva, e solicitações com falha não são cobradas.

O principal parâmetro de entrada dessa API é prompt, com model opcional (valores possíveis: default, remi-v1; padrão: default). Veja um exemplo de preenchimento abaixo:

Corresponde a Create → Songs → Advanced → Lyrics → Help me write lyrics no site oficial.

Assistente de letras do site oficial do Suno preenchido com o mesmo prompt da solicitação abaixo

Aqui, insira um prompt sobre uma lanterna à beira-mar.

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

Clique para executar, e o resultado será o seguinte:

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

Como pode ser visto, data é um array que retorna várias opções de letras a cada solicitação. Em cada elemento, o campo text contém a letra, title é o título e tags são as tags de estilos musicais recomendados.

Com a letra em mãos, podemos usar a Suno Audios Generation API para gerar músicas personalizadas.