查询可用模型列表
curl --request GET \
--url https://api.senseaudio.cn/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.senseaudio.cn/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.senseaudio.cn/v1/models', 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://api.senseaudio.cn/v1/models",
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://api.senseaudio.cn/v1/models"
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://api.senseaudio.cn/v1/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.senseaudio.cn/v1/models")
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{
"object": "list",
"data": [
{
"id": "sensenova-tts-2.0",
"display_name": "SenseNova TTS 2.0",
"object": "model",
"type": "model",
"mode": "tts",
"protocols": [
"http",
"websocket"
],
"created": 1757654400,
"owned_by": "senseaudio",
"desc": "高自然度语音合成模型"
}
],
"first_id": "sensenova-tts-2.0",
"last_id": "sensenova-tts-2.0",
"has_more": false
}API 说明
接口模型列表
查询当前 API Key 所属用户可调用的模型
GET
/
v1
/
models
查询可用模型列表
curl --request GET \
--url https://api.senseaudio.cn/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.senseaudio.cn/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.senseaudio.cn/v1/models', 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://api.senseaudio.cn/v1/models",
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://api.senseaudio.cn/v1/models"
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://api.senseaudio.cn/v1/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.senseaudio.cn/v1/models")
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{
"object": "list",
"data": [
{
"id": "sensenova-tts-2.0",
"display_name": "SenseNova TTS 2.0",
"object": "model",
"type": "model",
"mode": "tts",
"protocols": [
"http",
"websocket"
],
"created": 1757654400,
"owned_by": "senseaudio",
"desc": "高自然度语音合成模型"
}
],
"first_id": "sensenova-tts-2.0",
"last_id": "sensenova-tts-2.0",
"has_more": false
}/v1/models
说明
模型接口用于查询当前 API Key 所属用户可调用的模型。- 接入域名:
https://api.senseaudio.cn - 模型筛选:列表接口可通过
mode按模型类型筛选;筛选值会去除首尾空格并转为小写
授权
请求必须携带以下任一凭证:Authorization: Bearer <API_KEY>
查询参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
mode | string | 否 | 模型模式筛选。为空时返回全部可用模型;服务端按不区分大小写的精确匹配筛选。 |
支持的 mode
当前模型平台导出的模型模式及含义如下:| mode | 含义 |
|---|---|
tts | 语音合成 |
stt | 语音识别 |
llm | 文本生成 |
image | 图片生成 |
video | 视频生成 |
voice_isolation | 人声分离 |
sound_effect | 音效生成 |
music | 音乐生成 |
realtime_voice_dialog | 端到端语音模型 |
audio_generation | 音频生成 |
请求示例
curl https://api.senseaudio.cn/v1/models \
-H "Authorization: Bearer <API_KEY>"
curl "https://api.senseaudio.cn/v1/models?mode=TTS" \
-H "Authorization: Bearer <API_KEY>"
响应示例
{
"object": "list",
"data": [
{
"id": "sensenova-tts-2.0",
"display_name": "SenseNova TTS 2.0",
"object": "model",
"type": "model",
"mode": "tts",
"protocols": ["http", "websocket"],
"created": 1757654400,
"owned_by": "senseaudio",
"desc": "高自然度语音合成模型"
}
],
"first_id": "sensenova-tts-2.0",
"last_id": "sensenova-tts-2.0",
"has_more": false
}
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
object | string | 固定为 list |
data | ModelItem[] | 当前用户可调用的模型,按优先级降序排列 |
first_id | string | 列表第一条模型的 ID;列表为空时为空字符串 |
last_id | string | 列表最后一条模型的 ID;列表为空时为空字符串 |
has_more | boolean | 固定为 false |
ModelItem
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 模型 ID |
display_name | string | 模型名称 |
object | string | 固定为 model |
type | string | 固定为 model |
mode | string | 模型类型 |
protocols | string[] | 模型支持的接口协议 |
created | integer(int64) | 模型创建时间,Unix 时间戳 |
owned_by | string | 模型供应商 |
desc | string | 模型描述 |
响应与错误
成功响应的 HTTP 状态码为200,响应体直接返回 JSON。
常见错误状态码如下:
| HTTP 状态码 | 含义 |
|---|---|
401 | 未提供凭证、凭证无效、API Key 不存在或已停用 |
403 | 访问令牌没有接口权限或用户已禁用 |
429 | API Key 配额不足 |
500 | 模型平台或内部服务异常 |
授权
格式:Bearer <API_KEY>
查询参数
模型模式筛选。为空时返回全部可用模型;服务端按不区分大小写的精确匹配筛选。