lets create a gradio app i can use to generate a song using suno docs and then be able to play the tracks, also if i wanted to make it a saas app specific to southafrica, give advice there too...

my endpoint is 
https://suno-api-ivory-chi.vercel.app/
API Docs
https://suno-api-ivory-chi.vercel.app/ currently mainly implements the following APIs:

- `/api/generate`: Generate music
- `/v1/chat/completions`: Generate music - Call the generate API in a format 
  that works with OpenAI’s API.
- `/api/custom_generate`: Generate music (Custom Mode, support setting lyrics, 
  music style, title, etc.)
- `/api/generate_lyrics`: Generate lyrics based on prompt
- `/api/get`: Get music information based on the id. Use “,” to separate multiple 
    ids.  If no IDs are provided, all music will be returned.
- `/api/get_limit`: Get quota Info
- `/api/extend_audio`: Extend audio length
- `/api/clip`:  Get clip information based on ID passed as query parameter `id`
- `/api/concat`: Generate the whole song from extensions
Feel free to explore the detailed API parameters and conduct tests on this page.

Details of the API and testing it online
This is just a demo, bound to a test account. Please do not use it frequently, so that more people can test online.

suno-api
 1.1.0 
OAS 3.0
Use API to call the music generation service of Suno.ai and easily integrate it into agents like GPTs.

default


POST
/api/generate
Generate audio based on Prompt.

It will automatically fill in the lyrics.

2 audio files will be generated for each request, consuming a total of 10 credits.

wait_audio can be set to API mode:

• By default, it is set to false, which indicates the background mode. It will only return audio task information, and you will need to call the get API to retrieve detailed audio information.

• If set to true, it simulates synchronous mode. The API will wait for a maximum of 100s until the audio is generated, and will directly return the audio link and other information. Recommend using in GPTs and other agents.

Parameters
Try it out
No parameters

Request body

application/json
Example Value
Schema
{
  "prompt": "A popular heavy metal song about war, sung by a deep-voiced male singer, slowly and melodiously. The lyrics depict the sorrow of people after the war.",
  "make_instrumental": false,
  "model": "chirp-v3-5|chirp-v3-0",
  "wait_audio": false
}
Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
[
  {
    "0": {
      "id": "string",
      "title": "string",
      "image_url": "string",
      "lyric": "string",
      "audio_url": "string",
      "video_url": "string",
      "created_at": "string",
      "model_name": "string",
      "status": "string",
      "gpt_description_prompt": "string",
      "prompt": "string",
      "type": "string",
      "tags": "string"
    },
    "1": {
      "id": "string",
      "title": "string",
      "image_url": "string",
      "lyric": "string",
      "audio_url": "string",
      "video_url": "string",
      "created_at": "string",
      "model_name": "string",
      "status": "string",
      "gpt_description_prompt": "string",
      "prompt": "string",
      "type": "string",
      "tags": "string"
    }
  }
]
No links

POST
/v1/chat/completions
Generate audio based on Prompt - OpenAI API format compatibility.

Convert the /api/generate API to be compatible with the OpenAI /v1/chat/completions API format.

Generally used in OpenAI compatible clients.

Parameters
Try it out
No parameters

Request body

application/json
Example Value
Schema
{
  "prompt": "A popular heavy metal song about war, sung by a deep-voiced male singer, slowly and melodiously. The lyrics depict the sorrow of people after the war."
}
Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
{
  "data": "string"
}
No links

POST
/api/custom_generate
Generate Audio - Custom Mode

The custom mode enables users to provide additional details about the music, such as music genre, lyrics, and more.

2 audio files will be generated for each request, consuming a total of 10 credits.

wait_audio can be set to API mode:

• By default, it is set to false, which indicates the background mode. It will only return audio task information, and you will need to call the get API to retrieve detailed audio information.

• If set to true, it simulates synchronous mode. The API will wait for a maximum of 100s until the audio is generated, and will directly return the audio link and other information. Recommend using in GPTs and other agents.

Parameters
Try it out
No parameters

Request body

application/json
Example Value
Schema
{
  "prompt": "[Verse 1]\nCruel flames of war engulf this land\nBattlefields filled with death and dread\nInnocent souls in darkness, they rest\nMy heart trembles in this silent test\n\n[Verse 2]\nPeople weep for loved ones lost\nBattered bodies bear the cost\nSeeking peace and hope once known\nOur grief transforms to hearts of stone\n\n[Chorus]\nSilent battlegrounds, no birds' song\nShadows of war, where we don't belong\nMay flowers of peace bloom in this place\nLet's guard this precious dream with grace\n\n[Bridge]\nThrough the ashes, we will rise\nHand in hand, towards peaceful skies\nNo more sorrow, no more pain\nTogether, we'll break these chains\n\n[Chorus]\nSilent battlegrounds, no birds' song\nShadows of war, where we don't belong\nMay flowers of peace bloom in this place\nLet's guard this precious dream with grace\n\n[Outro]\nIn unity, our strength will grow\nA brighter future, we'll soon know\nFrom the ruins, hope will spring\nA new dawn, we'll together bring",
  "tags": "pop metal male melancholic",
  "title": "Silent Battlefield",
  "make_instrumental": false,
  "model": "chirp-v3-5|chirp-v3-0",
  "wait_audio": false
}
Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
[
  {
    "0": {
      "id": "string",
      "title": "string",
      "image_url": "string",
      "lyric": "string",
      "audio_url": "string",
      "video_url": "string",
      "created_at": "string",
      "model_name": "string",
      "status": "string",
      "gpt_description_prompt": "string",
      "prompt": "string",
      "type": "string",
      "tags": "string"
    },
    "1": {
      "id": "string",
      "title": "string",
      "image_url": "string",
      "lyric": "string",
      "audio_url": "string",
      "video_url": "string",
      "created_at": "string",
      "model_name": "string",
      "status": "string",
      "gpt_description_prompt": "string",
      "prompt": "string",
      "type": "string",
      "tags": "string"
    }
  }
]
No links

POST
/api/extend_audio
Extend audio length.

Extend audio length.

Parameters
Try it out
No parameters

Request body

application/json
Example Value
Schema
{
  "audio_id": "e76498dc-6ab4-4a10-a19f-8a095790e28d",
  "prompt": "[lrc]Silent battlegrounds, no birds' song\nShadows of war, where we don't belong\nMay flowers of peace bloom in this place\nLet's guard this precious dream with grace\n[endlrc]",
  "continue_at": "109.96",
  "title": "",
  "tags": "",
  "model": "chirp-v3-5|chirp-v3-0"
}

POST
/api/generate_lyrics
Generate lyrics based on Prompt.

Generate lyrics based on Prompt.

Parameters
Try it out
No parameters

Request body

application/json
Example Value
Schema
{
  "prompt": "A soothing lullaby"
}
Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
{
  "text": "string",
  "title": "string",
  "status": "string"
}
No links

GET
/api/get
Get audio information

Parameters
Try it out
Name	Description
ids
string
(query)
Audio IDs, separated by commas. Leave blank to return a list of all music.

ids
Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
[
  {
    "0": {
      "id": "string",
      "title": "string",
      "image_url": "string",
      "lyric": "string",
      "audio_url": "string",
      "video_url": "string",
      "created_at": "string",
      "model_name": "string",
      "status": "string",
      "gpt_description_prompt": "string",
      "prompt": "string",
      "type": "string",
      "tags": "string"
    },
    "1": {
      "id": "string",
      "title": "string",
      "image_url": "string",
      "lyric": "string",
      "audio_url": "string",
      "video_url": "string",
      "created_at": "string",
      "model_name": "string",
      "status": "string",
      "gpt_description_prompt": "string",
      "prompt": "string",
      "type": "string",
      "tags": "string"
    }
  }
]
No links

GET
/api/get_limit
Get quota information.

Parameters
Try it out
No parameters

Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
{
  "credits_left": 0,
  "period": "string",
  "monthly_limit": 0,
  "monthly_usage": 0
}
No links

GET
/api/clip
Get clip information based on ID.

Retrieve specific clip information using the provided clip ID as a query parameter.

Parameters
Try it out
Name	Description
id *
string
(query)
Clip ID

id
Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
{
  "id": "string",
  "title": "string",
  "image_url": "string",
  "lyric": "string",
  "audio_url": "string",
  "video_url": "string",
  "created_at": "string",
  "model_name": "string",
  "status": "string",
  "gpt_description_prompt": "string",
  "prompt": "string",
  "type": "string",
  "tags": "string"
}
No links
400	
Missing parameter id

Media type

application/json
Example Value
Schema
{
  "error": "Missing parameter id"
}
No links
500	
Internal server error

Media type

application/json
Example Value
Schema
{
  "error": "Internal server error"
}
No links

POST
/api/concat
Generate the whole song from extensions.

Concatenate audio clips to generate a complete song using the provided clip ID.

Parameters
Try it out
No parameters

Request body

application/json
Example Value
Schema
{
  "clip_id": "string"
}
Responses
Code	Description	Links
200	
success

Media type

application/json
Controls Accept header.
Example Value
Schema
{
  "id": "string",
  "title": "string",
  "image_url": "string",
  "lyric": "string",
  "audio_url": "string",
  "video_url": "string",
  "created_at": "string",
  "model_name": "string",
  "status": "string",
  "gpt_description_prompt": "string",
  "prompt": "string",
  "type": "string",
  "tags": "string"
}
No links
400	
Clip id is required

Media type

application/json
Example Value
Schema
{
  "error": "Clip id is required"
}
No links
402	
Payment required

Media type

application/json
Example Value
Schema
{
  "error": "Payment required"
}
No links
500	
Internal server error

Media type

application/json
Example Value
Schema
{
  "error": "Internal server error"
}
No links

Schemas
audio_info{
description:	
Audio Info

id*	string
audio id

title*	string
music title

image_url*	string
music cover image

lyric*	string
music lyric

audio_url*	string
music download url

video_url*	string
Music video download link, can be used to share

created_at*	string
Create time

model_name*	string
suno model name, chirp-v3

status*	string
The generated states include submitted, queue, streaming, complete.

gpt_description_prompt*	string
Simple mode on user input prompt, Suno will generate formal prompts, lyrics, etc.

prompt*	string
The final prompt for executing the generation task, customized by the user in custom mode, automatically generated by Suno in simple mode.

type*	string
Type

tags*	string
Music genre. User-provided in custom mode, automatically generated by Suno in simple mode.

}