列出音乐模型
GEThttps://api.knoxstudio.ai/v1/music/models
返回公开的音乐模型目录。将 id 用作作曲及相关端点的 model_id。见 音乐生成 指南。
认证是可选的:
- 不携带 API key — 公开目录,每分钟 60 次,最多缓存 5 分钟。
- Bearer /
xi-api-key— 仅返回该 token 允许的模型。
请求
此端点不需要请求参数。
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | String | 否 | 可选 Bearer <token>。公开目录请省略。也接受 xi-api-key。 |
cURL 示例
curl -X GET https://api.knoxstudio.ai/v1/music/models
curl -X GET https://api.knoxstudio.ai/v1/music/models \
-H "Authorization: Bearer $KNOXCHAT_API_KEY"
响应
成功响应 (200)
{
"data": [
{
"id": "music_v2_5",
"canonical_slug": "music_v2_5",
"name": "ElevenLabs Music v2.5",
"created": 1756684800,
"description": "Latest ElevenLabs music model with the best quality and control. Up to 5 minutes per generation.",
"chinese_description": "最新一代 ElevenLabs 音乐模型,音质与可控性最佳,单次最长 5 分钟。",
"max_duration_seconds": 300,
"pricing": {
"per_minute": "0.20",
"finetune": "2.00"
},
"architecture": {
"modality": "audio",
"input_modalities": ["text", "audio", "video"],
"output_modalities": ["audio"],
"tokenizer": "elevenlabs"
}
}
]
}
同时列出 music_v1 和 music_v2。
响应 Schema
| 名称 | 类型 | 描述 |
|---|---|---|
| data | array | 音乐模型。 |
| data[].id | string | 作为 model_id 发送。 |
| data[].max_duration_seconds | integer | 始终为 300(5 分钟)。 |
| data[].pricing.per_minute | string | 每生成分钟的美元价格(0.20)。 |
| data[].pricing.finetune | string | 创建微调的美元价格(2.00)。 |
错误响应
校验失败返回 HTTP 422:
{
"detail": [
{
"loc": ["body", "field"],
"msg": "…",
"type": "value_error"
}
]
}
其他错误使用 { "detail": "message" }。
| 状态 | 何时 |
|---|---|
400 | 未携带 Upgrade: websocket 访问 WebSocket 路径。 |
401 | 缺少或无效的 API key。 |
402 | 余额不足。 |
403 | Token 无权使用该模型。 |
404 | 资源不存在。 |
422 | 校验错误。 |
429 | 超出速率限制。 |
500 | 服务器内部错误。 |