This model card illustartes the steps to use Suno API's endpoint.
You can also check out other model cards:
Developed by the Suno team in Cambridge, MA, Suno is a leading-edge text-to-music model. While it doesn't have an official API service, PiAPI has introduced an unofficial Suno API, allowing developers globally to integrate Suno’s music creation capabilities into their applications.
Below we share the code snippets on how to use the Suno API's "Generate Full Song" endpoint.
1
2 [object Object] http.client
3
4 conn = http.client.HTTPSConnection([object Object])
5
6 payload = [object Object]
7
8 headers = {
9 [object Object], //Insert your API Key here
10 [object Object],
11 [object Object]
12 }
13
14 conn.request("POST", "/api/suno/v1/music/concat", payload, headers)
15
16 res = conn.getresponse()
17 data = res.read()
18
19 [object Object](data.decode("utf-8"))
1
2 {
3 [object Object]: 200,
4 [object Object]: {
5 [object Object]: "5440b19a*****************e92de94d5110" //Record the taskID provided in your response terminal
6 },
7 [object Object]: "success"
8 }
1
2 [object Object] http.client
3
4 conn = http.client.HTTPSConnection([object Object])
5
6
7 headers = {
8 [object Object],
9 [object Object]
10 }
11
12 conn.request("GET", "/api/suno/v1/music/task_id", headers=headers) //Replace the "task_id" with your task ID
13
14 res = conn.getresponse()
15 data = res.read()
16
17 [object Object](data.decode("utf-8"))
For fetch endpoint responses - Refer to our
documentation for more detailed information.