接口信息(ai_tts_x) 正常
总调用 18 次
首次添加 2026-09-06
最后更新 2026-09-09
计费 ¥0.0300/次
请求信息 GET
请求地址
https://ecyapi.cn/API/ai_tts_x.php
请求示例
https://ecyapi.cn/API/ai_tts_x.php?role=1&msg=你好&apikey=API秘钥
请求参数
参数名类型必填说明
role integer 角色ID序号,1-124
msg string 合成内容,支持各种语言,不填默认为 你好 ,限制为100个字符,内容越长合成速度越慢
apikey string API秘钥
状态码说明
状态码说明
200请求成功,服务器已成功处理了请求
403服务器拒绝请求可能是缺少认证凭据(如API密钥)或权限不足
404请求的资源未找到请检查请求地址是否正确
429请求过于频繁您已超出速率限制,请稍后再试
500服务器内部错误服务器在执行请求时遇到了问题
在线测试
响应结果
点击“发送测试”查看返回结果...
调用示例
<?php
$url = 'https://ecyapi.cn/API/ai_tts_x.php';
$params = ['role' => 'YOUR_VALUE', 'msg' => 'YOUR_VALUE', 'apikey' => 'YOUR_VALUE', ];
$url .= '?' . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests

url = "https://ecyapi.cn/API/ai_tts_x.php"
params = {
    'role': 'YOUR_VALUE',
    'msg': 'YOUR_VALUE',
    'apikey': 'YOUR_VALUE',
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://ecyapi.cn/API/ai_tts_x.php');
const params = {
    'role': 'YOUR_VALUE',
    'msg': 'YOUR_VALUE',
    'apikey': 'YOUR_VALUE',
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

fetch(url)
    .then(response => response.text())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));