API parameters for the Fun-Music music generation model.
User guide: For model overview and selection guidance, see Music generation.
This model is currently in invitational preview. Apply for access in the Models page before use. This feature is available only in the Chinese mainland deployment scope (Beijing region).
Prerequisites
An API key is required. To get one, see Get an API key.
Endpoint
POST https://dashscope.aliyuncs.com/api/v1/services/audio/music/generation
Protocol: HTTPS. For streaming output, set the X-DashScope-SSE request header to enable SSE (Server-Sent Events).
Request headers
|
Parameter |
Type |
Required |
Description |
|
Authorization |
string |
Yes |
|
|
Content-Type |
string |
Yes |
|
|
X-DashScope-SSE |
string |
No |
Set to |
Request body |
Non-streaming
Streaming
|
|
model Model name. Allowed values:
|
|
|
input Input parameters. |
Response object |
Non-streaming
Streaming (intermediate message)
Streaming (final message)
|
|
request_id Request ID, used for troubleshooting and log tracing. |
|
|
output Model output. |
|
|
usage Billing information for this request. |