Skip to main content
POST
/
api
/
v1
/
style
/
generate
Boost Music Style
curl --request POST \
  --url https://api.kie.ai/api/v1/style/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "content": "Pop, Mysterious"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "<string>",
    "param": "<string>",
    "result": "<string>",
    "creditsConsumed": 123,
    "creditsRemaining": 123,
    "successFlag": "<string>",
    "errorCode": 400,
    "errorMessage": "",
    "createTime": "<string>"
  }
}
This is an exclusive capability of V4_5. The style functionality of V4_5 has been significantly enhanced, as stated on the official website:
One of the many advantages of the new 4.5 model is its ability to accommodate more detailed style instructions. In previous models, it was necessary to prioritize specific genre and style details, but now instructions can incorporate a more conversational prompt. Previously, optimal results might have been achieved with a prompt like: ‘deep house, emotional, melodic.’ Now, you can provide a prompt such as: ‘Create a melodic, emotional deep house song featuring organic textures and hypnotic rhythms. Begin with soft ambient layers, natural sounds, and a deep, steady groove. Gradually build with flowing melodic synths, warm basslines, and intricate, subtle percussion.’
The ‘Boost Your Style’ feature will significantly enhance users’ ability to describe and control style. It is recommended for use.

Parameter Description

  • content: Required, string type. Style description is required.

Authorizations

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header: 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 in the management page

Body

application/json
content
string
required

Style description. Please describe in concise and clear language the music style you expect to generate. Example: 'Pop, Mysterious'

Example:

"Pop, Mysterious"

Response

Request successful

code
enum<integer>

Response status code

  • 200: Success - Request has been processed successfully
  • 401: Unauthorized - Authentication credentials are missing or invalid
  • 402: Insufficient Credits - Account does not have enough credits to perform the operation
  • 404: Not Found - The requested resource or endpoint does not exist
  • 409: Conflict - WAV record already exists
  • 422: Validation Error - The request parameters failed validation checks
  • 429: Rate Limited - Request limit has been exceeded for this resource
  • 451: Unauthorized - Failed to fetch the image. Kindly verify any access limits set by you or your service provider.
  • 455: Service Unavailable - System is currently undergoing maintenance
  • 500: Server Error - An unexpected error occurred while processing the request
Available options:
200,
401,
402,
404,
409,
422,
429,
451,
455,
500
msg
string

Error message when code != 200

Example:

"success"

data
object
I