获取WAV转换详情
curl --request GET \
--url https://apibox.erweima.ai/api/v1/wav/record-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://apibox.erweima.ai/api/v1/wav/record-info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apibox.erweima.ai/api/v1/wav/record-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apibox.erweima.ai/api/v1/wav/record-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apibox.erweima.ai/api/v1/wav/record-info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apibox.erweima.ai/api/v1/wav/record-info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/wav/record-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "988e****c8d3",
"musicId": "8551****662c",
"musicIndex": 0,
"callbackUrl": "https://api.example.com/callback",
"completeTime": "2025-01-01 00:10:00",
"response": {
"audioWavUrl": "https://example.com/s/04e6****e727.wav"
},
"successFlag": "SUCCESS",
"createTime": "2025-01-01 00:00:00",
"errorCode": null,
"errorMessage": null
}
}WAV Conversion
获取WAV转换详情
获取WAV格式转换任务的详细信息,包括状态和下载链接。
GET
/
api
/
v1
/
wav
/
record-info
获取WAV转换详情
curl --request GET \
--url https://apibox.erweima.ai/api/v1/wav/record-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://apibox.erweima.ai/api/v1/wav/record-info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apibox.erweima.ai/api/v1/wav/record-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apibox.erweima.ai/api/v1/wav/record-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apibox.erweima.ai/api/v1/wav/record-info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apibox.erweima.ai/api/v1/wav/record-info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/wav/record-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "988e****c8d3",
"musicId": "8551****662c",
"musicIndex": 0,
"callbackUrl": "https://api.example.com/callback",
"completeTime": "2025-01-01 00:10:00",
"response": {
"audioWavUrl": "https://example.com/s/04e6****e727.wav"
},
"successFlag": "SUCCESS",
"createTime": "2025-01-01 00:00:00",
"errorCode": null,
"errorMessage": null
}
}状态说明
- PENDING: 任务正在等待处理
- SUCCESS: WAV转换成功完成
- CREATE_TASK_FAILED: 创建转换任务失败
- GENERATE_WAV_FAILED: 转换为WAV格式失败
- CALLBACK_EXCEPTION: 回调过程中发生错误
开发者注意事项
- 使用此接口检查转换状态,而不必等待回调
- 当状态为SUCCESS时,响应中包含WAV文件下载URL
- 响应中包含任务创建和完成时间
授权
🔑 API 认证说明
所有接口都需要通过 Bearer Token 方式进行认证。
获取 API Key
- 访问 API Key 管理页面 获取您的 API Key
使用方式
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
⚠️ 注意:
- 请妥善保管您的 API Key,不要泄露给他人
- 如果怀疑 API Key 泄露,请立即在管理页面重置
查询参数
从转换为WAV格式接口返回的任务ID。用于获取转换过程的详细信息,包括状态和可用的下载URL。
响应
请求成功
状态码
- ✅ 200 - 请求成功
- ⚠️ 400 - 无效参数
- ⚠️ 401 - 未授权访问
- ⚠️ 404 - 无效的请求方法或路径
- ⚠️ 405 - 超出速率限制
- ⚠️ 409 - 冲突 - WAV记录已存在
- ⚠️ 413 - 主题或提示词过长
- ⚠️ 429 - 积分不足
- ⚠️ 430 - 您的调用频率过高,请稍后重试
- ⚠️ 455 - 系统维护中
- ❌ 500 - 服务器错误
可用选项:
200, 400, 401, 404, 405, 409, 413, 429, 430, 455, 500 当 code != 200 时,展示错误信息
示例:
"success"
Show child attributes
Show child attributes
