选用预置音色
返回预置音色在当前账号下对应的音色资产,可在生成请求中通过 voice_asset_id 引用。同一预置音色版本重复调用返回同一音色资产,不收费。
认证
API Key:X-API-Key: <API Key> 或 Authorization: Bearer <API Key>。
示例中的凭证为占位值,请替换后在服务器端运行。
代码示例
curl -X POST 'https://shixux.com/api/voice-presets/preset_id_example/use' \ -H 'X-API-Key: yb_xxx_yyy'{ "id": "example", "display_name": "example", "original_filename": "example", "size_bytes": 1, "uploaded_at": "2026-10-06T10:00:00Z", "retained_until": "2026-10-06T10:00:00Z"}preset_id*stringMatch
^vp_[a-f0-9]{24}$音色已就绪,可以使用
application/json- response
id*Iddisplay_name*Display Nameoriginal_filename*string|nullsize_bytes*|音色文件大小(字节)。
uploaded_at*Uploaded At格式
date-timeretained_until*|素材或结果文件的保留截止时间。下载地址过期后可重新获取。
permanent?booleansource?string可选值
"uploaded""designed""preset"preset_id?string该音色对应的预置音色 ID;不是由预置音色得到的音色不返回此字段。
description?stringduration_seconds?number