Suno API

TTAPI Suno service, building a future where anyone can make great music.

Generate Music

POST https://api.ttapi.io/suno/v1/music


Generate music through text prompts or custom lyrics. Task results is async

Headers

NameTypeRequiredDescription
TT-API-KEYStringtrueYour API Key in TT API used for request authorization

Request Body

NameTypeRequiredDescription
mvStringtrueThe model used to generate the music audio ,
chirp-v3-0
chirp-v3-5
chirp-v4
default is chirp-v4
custombooleantrueThe flag indicates the music audio is custom or not, if true, the audio will be generated from the lyric, otherwise, the audio will be generated from the prompt
instrumentalbooleantrueNo lyrics option, default is false, when it is true will ignore the lyric input above.
gpt_description_promptStringfalseInspiration mode prompt words
Automatically generate lyrics based on this prompt word
promptStringfalseLyrics, for custom mode only
titleStringfalseTitle, for custom mode only
tagsStringfalseStyle tag, for custom mode only
music_idStringfalseSong ID, use this field when you need to extend the song
continue_atintfalseSong extension time, unit: seconds
hookUrlStringfalseSend a request to the address for task completion or failed notification. If not set you need to request fetch endpoint to get response

Example Request

import requests
endpoint = "https://api.ttapi.io/suno/v1/music"
headers = {
    "TT-API-KEY": your_key
}
data = {
    "mv": "chirp-v4",
    "custom": true,
    "instrumental": false,
    "prompt":"a cat"
}
response = requests.post(endpoint, headers=headers, json=data)
print(response.status_code)
print(response.json())

Example Response

{
    "status": "SUCCESS",
    "message": "",
    "data": {
        "jobId": "ed1a1b01-7d64-4c8a-acaa-71185d23a2f3"
    }
}

Generate lyrics

POST https://api.ttapi.io/suno/v1/lyrics


Generate lyrics based on prompt words. Task results is async

Headers

NameTypeRequiredDescription
TT-API-KEYStringtrueYour API Key in TT API used for request authorization

Request Body

NameTypeRequiredDescription
promptStringtruePrompt word
hookUrlStringfalseSend a request to the address for task completion or failed notification. If not set you need to request fetch endpoint to get response

Example Request

import requests
endpoint = "https://api.ttapi.io/suno/v1/lyrics"
headers = {
    "TT-API-KEY": your_key
}
data = {
    "prompt":"a cat"
}
response = requests.post(endpoint, headers=headers, json=data)
print(response.status_code)
print(response.json())

Example Response

{
    "status": "SUCCESS",
    "message": "",
    "data": {
        "jobId": "ed1a1b01-7d64-4c8a-acaa-71185d23a2f3"
    }
}

Fetch Suno Result

POST https://api.ttapi.io/suno/v1/fetch


Query the music & lyrics generation results by jobId, free endpoint

Headers

NameTypeDescription
TT-API-KEY*StringYour API Key in TT API used for request authorization

Query param

NameTypeRequiredDescription
jobIdStringtrueed1a1b01-7d64-4c8a-acaa-71185d23a2f3

Example Request

import requests
endpoint = "https://api.ttapi.io/suno/v1/fetch"
headers = {
    "TT-API-KEY": your_key
}
data = {
    "jobId": "f11a93ac-128d-4b09-9b43-2a7e60488f9c",
}
response = requests.post(endpoint, headers=headers, json=data)
print(response.status_code)
print(response.json())

Async callback & fetch json

{
    "status": "SUCCESS",
    "message": "success",
    "jobId": "34505837-41f0-4c68-b830-e8e051b72148",
    "data": {
        "jobId": "34505837-41f0-4c68-b830-e8e051b72148",
        "action": "extend",
        "progress": "100%",
        "mv": "chirp-v3-0",
        "quota": "5",
        "hookUrl": null,
        "musics": [
            {
                "musicId": "a7d3712d-2507-4d87-80d0-b60bb375a049",
                "prompt": "[Verse]\n远方你的微笑\n穿越时空寻找\n夜晚的风轻飘\n心跳为你燃烧\n\n[Bridge]\n梦里花落几场\n想你思念成霜\n星光作伴凄凉\n入骨相思难忘\n\n[Chorus]\n思念入骨髓\n心已随风飞\n两地相隔泪\n只为与你归",
                "title": "思念入骨髓 (Longing in My Bones)",
                "tags": "harmonized melancholic traditional chinese",
                "imageUrl": "https://cdn2.suno.ai/image_a7d3712d-2507-4d87-80d0-b60bb375a049.jpeg",
                "imageLargeUrl": "https://cdn2.suno.ai/image_large_a7d3712d-2507-4d87-80d0-b60bb375a049.jpeg",
                "audioUrl": "https://cdn1.suno.ai/a7d3712d-2507-4d87-80d0-b60bb375a049.mp3",
                "videoUrl": "https://cdn1.suno.ai/a7d3712d-2507-4d87-80d0-b60bb375a049.mp4"
            },
            {
                "musicId": "ab763675-b371-44d5-ae1b-6aea35fe4403",
                "prompt": "[Verse]\n远方你的微笑\n穿越时空寻找\n夜晚的风轻飘\n心跳为你燃烧\n\n[Bridge]\n梦里花落几场\n想你思念成霜\n星光作伴凄凉\n入骨相思难忘\n\n[Chorus]\n思念入骨髓\n心已随风飞\n两地相隔泪\n只为与你归",
                "title": "思念入骨髓 (Longing in My Bones)",
                "tags": "harmonized melancholic traditional chinese",
                "imageUrl": "https://cdn2.suno.ai/image_ab763675-b371-44d5-ae1b-6aea35fe4403.jpeg",
                "imageLargeUrl": "https://cdn2.suno.ai/image_large_ab763675-b371-44d5-ae1b-6aea35fe4403.jpeg",
                "audioUrl": "https://cdn1.suno.ai/ab763675-b371-44d5-ae1b-6aea35fe4403.mp3",
                "videoUrl": "https://cdn1.suno.ai/ab763675-b371-44d5-ae1b-6aea35fe4403.mp4"
            }
        ]
    }
}