跳转到主要内容
GET
/
v1
/
agents
获取自定义 Agent 列表
curl --request GET \
  --url https://api.senseaudio.cn/v1/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>'
import requests

url = "https://api.senseaudio.cn/v1/agents"

headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'}
};

fetch('https://api.senseaudio.cn/v1/agents', 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/agents",
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>",
"Content-Type: <content-type>"
],
]);

$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/agents"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Content-Type", "<content-type>")
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/agents")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.senseaudio.cn/v1/agents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "total": 1,
  "list": [
    {
      "id": "69b6ac2100000d8dbf84289c",
      "title": "小助理",
      "char_prompt": "你是公司小助理,你可以帮忙播报今日日程",
      "op_statement": "你是公司小助理,你可以帮忙播报今日日程",
      "llm_model": "senseaudio-vl-lite-1.0-260319",
      "speech_model": "senseaudio-tts-1.0",
      "created_at": 1773579297,
      "updated_at": 1773579297
    }
  ]
}

授权

Authorization
string
header
必填

格式:Bearer <API_KEY>

请求头

Content-Type
string
默认值:application/json
必填

内容类型。固定为 application/json

示例:

"application/json"

查询参数

page
integer
默认值:1

分页页码

示例:

1

size
integer
默认值:10

每页数量

示例:

10

响应

成功响应

total
integer
必填

Agent 总数

示例:

1

list
object[]
必填

Agent 列表