Skip to main content
POST
/
api
/
v1
/
lyrics
Generate Lyrics
curl --request POST \
  --url https://api.api.box/api/v1/lyrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A song about peaceful night in the city",
  "callBackUrl": "https://api.example.com/callback"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e"
  }
}

Usage Guide

  • This endpoint generates only lyrics content based on your prompt
  • Multiple lyrics variations will be returned for you to choose from
  • Generated lyrics typically include song structure markers (e.g., [Verse], [Chorus])

Developer Notes

  1. Generated lyrics are retained for 15 days
  2. Callback has only one stage: complete (generation complete)
  3. Use this endpoint when you only need lyrics creation without music
  4. Results can be used as input for the Generate Music endpoint in custom mode

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. Visit the API Key Management Page to obtain your API Key

Usage

Add to request headers:

Authorization: Bearer YOUR_API_KEY

⚠️ Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately from the management page

Body

application/json
prompt
string
required

Detailed description of the desired lyrics content.

  • Be specific about themes, moods, styles, and song structure you want.
  • The more detailed your prompt, the more closely the generated lyrics will match your vision.
  • The maximum word limit is 200 words.
Example:

"A song about peaceful night in the city"

callBackUrl
string<uri>
required

The URL to receive lyrics generation results when complete.

  • Required.
  • Unlike music generation, lyrics callback has only one stage: complete (generation finished).

For detailed callback format and implementation guide, see Lyrics Generation Callbacks

  • Alternatively, you can use the Get Lyrics Generation Details interface to poll task status
Example:

"https://api.example.com/callback"

Response

Request successful

code
enum<integer>

Status Codes

  • ✅ 200 - Request successful
  • ⚠️ 400 - Invalid parameters
  • ⚠️ 401 - Unauthorized access
  • ⚠️ 404 - Invalid request method or path
  • ⚠️ 405 - Rate limit exceeded
  • ⚠️ 413 - Theme or prompt too long
  • ⚠️ 429 - Insufficient credits
  • ⚠️ 430 - Your call frequency is too high. Please try again later.
  • ⚠️ 455 - System maintenance
  • ❌ 500 - Server error
Available options:
200,
400,
401,
404,
405,
413,
429,
430,
455,
500
Example:

200

msg
string

Error message when code != 200

Example:

"success"

data
object
I