Documentation Index
Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
SUNO tillåter oss att mata in promptord för att generera förstärkta låtstilar. Detta dokument förklarar hur man integrerar den relaterade API:n.
Denna API har endast en inparametrar, nämligen prompt, som är stilpromptordet som behöver optimeras.
Här är vår inmatade prompt: A song for Christmas.
import requests
url = "https://api.xhuoapi.ai/v1/suno/style"
headers = {
"accept": "application/json",
"authorization": "Bearer {token}",
"content-type": "application/json"
}
payload = {
"prompt": "A song for Christmas"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
Resultatet ser ut som följer:
{
"success": true,
"task_id": "8e887548-7185-48a9-b7cb-e51754f7b87b",
"trace_id": "ac4ec363-4245-400b-9643-0b6fed8c6b20",
"data": {
"upsampled_tags": "Bright, festive bells and crisp acoustic guitar open, with sleigh bells and warm upright piano filling the verse. Lush strings sweep in for the pre-chorus, leading to a soaring full-band chorus enhanced by brass accents. The bridge softens with glockenspiel, then returns to a jubilant finale."
}
}
Man kan se att data fältet upsampled_tags är de stilparametrar som har optimerats baserat på promptordet.