Skip to main content
POST
/
v1
/
generation
/
music
/
generate
curl --request POST \
  --url https://api.weryai.com/v1/generation/music/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "VOCAL_SONG",
  "description": "A cheerful pop song about summer vacation",
  "lyrics": "Sunshine on my face, wind in my hair\nSummer days without a care",
  "gender": "f",
  "styles": {
    "POP": "pop",
    "HAPPY": "happy",
    "GUITAR": "guitar"
  },
  "webhook_url": "https://your-server.com/webhook"
}
'
{
  "status": 0,
  "desc": "success",
  "message": "success",
  "data": {
    "task_id": "task_abc123",
    "task_status": "waiting"
  }
}

Authorizations

Authorization
string
header
required

Authenticate using Bearer token. Get your API Key from the WeryAI Console.

Example: Authorization: Bearer sk-xxxxxxxxxxxxxxxx

Body

application/json

At least one of description or styles must be provided.

type
enum<string>
required

Music type

Available options:
VOCAL_SONG,
ONLY_MUSIC
Example:

"VOCAL_SONG"

description
string

Describe the song style, mood, instruments, etc. Used as the generation prompt. Required if styles is not provided.

Example:

"A cheerful pop song about summer vacation"

lyrics
string

Lyrics content. If not provided, AI will auto-generate lyrics. Not applicable for ONLY_MUSIC type.

Example:

"Sunshine on my face, wind in my hair\nSummer days without a care"

reference_audio
string<uri>

Reference audio file URL for style guidance

Example:

"https://example.com/reference.mp3"

audio_name
string

Name of the reference audio file

Example:

"reference_track"

gender
enum<string>

Singer gender, recommended for VOCAL_SONG type

Available options:
m,
f
Example:

"f"

styles
object

Music style tags as key-value pairs. Keys must be valid style enum names (uppercase), values are the style descriptions used in generation.

Required if description is not provided.

Available style keys by category:

CategoryAvailable Keys
GenrePOP, ROCK, RAP, ELECTRONIC, RNB, JAZZ, FOLK, CLASSIC, WORLD
EmotionHAPPY, RELAXED, WARM, ROMANTIC, TOUCHING, SAD, LONELY, DEPRESSED, TENSE, EXCITED, EPIC, MYSTERIOUS
InstrumentPIANO, GUITAR, BASS, DRUMS, STRINGS, WIND, SYNTHESIZER, ELECTRONIC_SOUND, FOLK_INSTRUMENT, MIXED_ORCHESTRATION

You can combine multiple styles across categories.

Example:
{
"POP": "pop",
"HAPPY": "happy",
"PIANO": "piano"
}
webhook_url
string<uri>

Callback URL where results will be sent when task completes

Example:

"https://your-server.com/webhook"

caller_id
integer<int64>

Caller ID (for business association)

Response

Task submitted successfully

status
integer

Business status code (0 indicates success)

Example:

0

desc
string

Status description

Example:

"success"

message
string

Multi-language message

Example:

"success"

data
object