GET
/
prompt_to_lyrics
Convert Prompt to Lyrics
curl --request GET \
  --url https://api.musicgpt.com/api/public/v1/prompt_to_lyrics \
  --header 'Authorization: <api-key>'
{
  "success": true,
  "task_id": "task-lyrics-2345",
  "message": "Lyrics generated successfully",
  "lyrics": "Under the silver moonlight we sway...\n...\n",
  "credit_estimate": 10
}

Endpoint

GET /prompt_to_lyrics

Request Parameters

ParameterTypeRequiredDescription
promptString✅ YesThe theme or idea you’d like lyrics generated for.
e.g., “A hopeful song about starting over”
💡 Note: The prompt must be between 1 and 280 characters.

Sample Request

cURL

curl -X GET "https://api.musicgpt.com/api/public/v1/prompt_to_lyrics?prompt=A hopeful song about starting over" \
  -H "Authorization: <API_KEY>" \
  -H "accept: application/json"

Python

import requests

url = "https://api.musicgpt.com/api/public/v1/prompt_to_lyrics"

querystring = {"prompt":"<input_prompt>"}

headers = {"Authorization": "<API KEY>"}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)

Sample Response

Success (200 OK)

{
  "success": true,
  "task_id": "task-lyrics-2345",
  "message": "Lyrics generated successfully",
  "lyrics": "Under the silver moonlight we sway...\n...\n",
  "credit_estimate": 0.01
}

Error Responses

400 Bad Request

{
  "success": false,
  "error": "Prompt must be between 1 and 280 characters."
}

500 Internal Server Error

{
  "success": false,
  "error": "Internal Server Error"
}

Use Case Examples

  • “A romantic song under the stars”
  • “A pop song about achieving your dreams”
  • “Grunge-style lyrics reflecting heartbreak”

Output

Generated lyrics are returned directly in the lyrics field of the response. They may be multi-paragraph and suited for use with vocal synthesis or songwriting tools.
The /prompt_to_lyrics endpoint is ideal for songwriting, music composition tools, or creative text generation workflows.

Authorizations

Authorization
string
header
required

Query Parameters

prompt
string
required

The theme or idea you'd like lyrics generated for.

Required string length: 1 - 1000
Example:

"A hopeful song about starting over"

Response

200
application/json

Lyrics generated successfully

The response is of type object.