生成作曲计划

创建用于音乐生成的编曲计划。使用此端点不消耗额度,但会根据套餐受到速率限制。

请求头

xi-api-keystring可选

请求

This endpoint expects an object.
promptstring必需<=4100 characters

用于编写计划的简单文本提示词。

music_length_msinteger or null可选3000-600000

要生成的作曲计划长度,单位为 ms。必须介于 3000ms 和 600000ms 之间。可选;未提供时,模型将根据提示词选择长度。

source_composition_planobject or null可选

可选的作曲计划,用作新作曲计划的来源。

model_idenum可选默认为 music_v1

用于生成的模型。

允许的值:

响应

成功响应

MusicPromptobject

Composition plan for the music_v1 model. Using this field with any other model will result in an error.

OR
CompositionPlanobject

Composition plan for the music_v2 and music_v2_5 models. Using this field with any other model will result in an error.

错误

422
Unprocessable Entity Error