Music Generation
此内容尚不支持你的语言。
Generate original music with vocals in any style using Suno through HiAPI.
Quick Example
Section titled “Quick Example”curl -X POST https://api.hiapi.ai/v1/audio/generations \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "suno", "prompt": "upbeat pop song about summer", "duration": 60 }'import requests
response = requests.post( "https://api.hiapi.ai/v1/audio/generations", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, json={ "model": "suno", "prompt": "upbeat pop song about summer", "duration": 60 })
print(response.json()["url"])const response = await fetch("https://api.hiapi.ai/v1/audio/generations", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ model: "suno", prompt: "upbeat pop song about summer", duration: 60 })});
const data = await response.json();console.log(data.url);Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
model | string | "suno" |
prompt | string | Describe the style, mood, and lyrics |
duration | number | Length in seconds (up to 120) |
Prompt Tips
Section titled “Prompt Tips”- Specify genre: “jazz ballad”, “electronic dance”, “acoustic folk”
- Describe mood: “melancholic”, “upbeat”, “dramatic”
- Include lyrics: Add specific lyrics in your prompt for vocal tracks
- Reference style: “in the style of 80s synthwave” or “lo-fi hip hop beat”
Pricing
Section titled “Pricing”50 credits per song generation.