跳转到主要内容
Generate AI music tracks using the Suno API through Ace Data Cloud.

Quick start

import requests

API_KEY = "YOUR_API_KEY"

# Generate a song from a text prompt
response = requests.post(
    "https://api.acedata.cloud/suno/audios",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "prompt": "An upbeat pop song about summer adventures",
        "model": "chirp-v4",
        "action": "generate",
    },
)

songs = response.json()["data"]
for song in songs:
    print(f"Title: {song['title']}")
    print(f"Audio: {song['audio_url']}")
    print(f"Duration: {song['duration']}s")

Custom lyrics and style

response = requests.post(
    "https://api.acedata.cloud/suno/audios",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "model": "chirp-v4",
        "custom": True,
        "action": "generate",
        "title": "Summer Dreams",
        "style": "pop, upbeat, energetic",
        "lyric": "[Verse]\nSunshine on my face\nRunning through the waves\n\n[Chorus]\nSummer dreams are calling me",
    },
)

Extend a song

Continue an existing song from a specific point:
response = requests.post(
    "https://api.acedata.cloud/suno/audios",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "model": "chirp-v4",
        "action": "extend",
        "audio_id": "SONG_ID_HERE",
        "continue_at": 120,  # Continue from 2 minutes
    },
)

Available actions

ActionDescription
generateCreate new songs from prompt
extendContinue an existing song
coverCreate a cover in a different style
stemsSeparate vocals and instruments
mashupCombine multiple songs
remasterEnhance audio quality

Next steps