Skip to main content
POST
音色复刻

Authorizations

Authorization
string
header
required

标准的 HTTP Bearer 认证方式,在 API Keys 页面获取密钥。

Body

application/json
model
enum<string>
default:glm-tts-clone
required

模型

Available options:
glm-tts-clone
Example:

"glm-tts-clone"

voice_name
string
required

指定唯一的音色名称

Example:

"my_custom_voice_001"

input
string
required

生成试听音频的目标文本内容

Example:

"欢迎使用我们的音色复刻服务,这将生成与示例音频相同音色的语音。"

file_id
string
required

示例音频的file_id,通过文件接口上传获取。大小限制不超过10M,建议音频时长在3秒到30秒之间。

Example:

"file_abc123def456ghi789"

text
string

示例音频的文本内容,选填

Example:

"你好,这是一段示例音频的文本内容,用于音色复刻参考。"

request_id
string

请求唯一标识符。由用户端传递,ID长度要求:最少6个字符,最多64个字符,建议使用UUID格式确保唯一性,若未提供平台将自动生成。

Required string length: 6 - 64

Response

业务处理成功

voice
string

音色

Example:

"voice_clone_20240315_143052_001"

file_id
string

音频试听文件ID

Example:

"file_xyz789abc456def123"

file_purpose
string

文件 purpose,固定为voice-clone-output

Example:

"voice-clone-output"

request_id
string

请求 ID

Example:

"voice_clone_req_20240315_143052_001"