获取歌词生成详情
curl --request GET \
--url https://apibox.erweima.ai/api/v1/lyrics/record-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://apibox.erweima.ai/api/v1/lyrics/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/lyrics/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/lyrics/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/lyrics/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/lyrics/record-info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/lyrics/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": "11dc****8b0f",
"param": "{\"prompt\":\"A song about peaceful night in the city\"}",
"response": {
"taskId": "11dc****8b0f",
"data": [
{
"text": "[Verse]\n我穿越城市黑暗夜\n心中燃烧梦想的烈火",
"title": "钢铁侠",
"status": "complete",
"errorMessage": ""
}
]
},
"status": "SUCCESS",
"type": "LYRICS",
"errorCode": null,
"errorMessage": null
}
}Lyrics Generation
获取歌词生成详情
获取歌词生成任务的详细信息,包括状态、参数和结果。
GET
/
api
/
v1
/
lyrics
/
record-info
获取歌词生成详情
curl --request GET \
--url https://apibox.erweima.ai/api/v1/lyrics/record-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://apibox.erweima.ai/api/v1/lyrics/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/lyrics/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/lyrics/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/lyrics/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/lyrics/record-info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apibox.erweima.ai/api/v1/lyrics/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": "11dc****8b0f",
"param": "{\"prompt\":\"A song about peaceful night in the city\"}",
"response": {
"taskId": "11dc****8b0f",
"data": [
{
"text": "[Verse]\n我穿越城市黑暗夜\n心中燃烧梦想的烈火",
"title": "钢铁侠",
"status": "complete",
"errorMessage": ""
}
]
},
"status": "SUCCESS",
"type": "LYRICS",
"errorCode": null,
"errorMessage": null
}
}状态说明
- PENDING: 任务正在等待处理
- SUCCESS: 歌词生成成功
- CREATE_TASK_FAILED: 创建任务失败
- GENERATE_LYRICS_FAILED: 生成歌词失败
- CALLBACK_EXCEPTION: 回调过程中发生错误
- SENSITIVE_WORD_ERROR: 内容包含禁用词
开发者注意事项
- 使用此接口检查任务状态,而不必等待回调
- 返回单个任务中生成的所有歌词变体
- 每个歌词变体包括标题和完整的歌词文本
授权
🔑 API 认证说明
所有接口都需要通过 Bearer Token 方式进行认证。
获取 API Key
- 访问 API Key 管理页面 获取您的 API Key
使用方式
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
⚠️ 注意:
- 请妥善保管您的 API Key,不要泄露给他人
- 如果怀疑 API Key 泄露,请立即在管理页面重置
查询参数
从生成歌词接口返回的任务ID。用于获取特定歌词生成任务的详细信息。
响应
请求成功
状态码说明
- ✅ 200 - 请求成功
- ⚠️ 400 - 参数错误
- ⚠️ 401 - 没有访问权限
- ⚠️ 404 - 请求方式或者路径错误
- ⚠️ 405 - 调用超过限制
- ⚠️ 413 - 主题或者prompt过长
- ⚠️ 429 - 积分不足
- ⚠️ 430 - 您的调用频率过高。请稍后再试。
- ⚠️ 455 - 网站维护
- ❌ 500 - 服务器异常
可用选项:
200, 400, 401, 404, 405, 413, 429, 430, 455, 500 示例:
200
当 code != 200 时,展示错误信息
示例:
"success"
Show child attributes
Show child attributes
