POST
/
api
/
v1
/
generate
{
  "customMode": false,
  "instrumental": false,
  "prompt": "A chill lo-fi beat with soft vocals",
  "model": "V3_5",
  "callBackUrl": "https://example.com/callback",
  "vocalGender": "m",
  "styleWeight": 0.61,
  "weirdnessConstraint": 0.72,
  "audioWeight": 0.65
}
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e"
  }
}

Usage Guide

  • This endpoint creates music based on your text prompt
  • Multiple variations will be generated for each request
  • You can control detail level with custom mode and instrumental settings

Parameter Details

  • In Custom Mode (customMode: true):
    • If instrumental: true: style and title are required
    • If instrumental: false: style, prompt, and title are required
    • Character limits vary by model:
      • V3_5 & V4: prompt 3000 characters, style 200 characters
      • V4_5 & V4_5PLUS: prompt 5000 characters, style 1000 characters
    • title length limit: 80 characters (all models)
  • In Non-custom Mode (customMode: false):
    • Only prompt is required regardless of instrumental setting
    • prompt length limit: 400 characters
    • Other parameters should be left empty

Optional parameters

The following fields are optional controls available for this endpoint:
  • vocalGender (string): Preferred vocal gender. Allowed values: m (male), f (female)
  • styleWeight (number): Style adherence weight in range 0–1 (recommended two decimals)
  • weirdnessConstraint (number): Creativity/novelty constraint in range 0–1 (recommended two decimals)
  • audioWeight (number): Relative weight of audio consistency in range 0–1 (recommended two decimals)
{
  "customMode": false,
  "instrumental": false,
  "prompt": "A chill lo-fi beat with soft vocals",
  "model": "V3_5",
  "callBackUrl": "https://example.com/callback",
  "vocalGender": "m",
  "styleWeight": 0.61,
  "weirdnessConstraint": 0.72,
  "audioWeight": 0.65
}

Developer Notes

  • Recommendation for new users: Start with customMode: false for simpler usage
  • Generated files are retained for 14 days
  • Callback process has three stages: text (text generation), first (first track complete), complete (all tracks complete)

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

Response

200
application/json

Request successful

The response is of type object.