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

url = "https://api.senseaudio.cn/v1/realtime/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/realtime/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/realtime/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/realtime/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/realtime/agents")
  .header("Content-Type", "<content-type>")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.senseaudio.cn/v1/realtime/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": 10, "list": [ { "id": "690f53770e9d9d60d98ba7a8", "title": "今天天气怎么样", "avatar": "https://example.com/avatar1.jpg", "intro": "今天天气怎么样" }, { "id": "8bb494d52b152690f2ff6c58", "title": "今天天气怎么样", "avatar": "https://example.com/avatar2.jpg", "intro": "今天天气怎么样" } ] }

授权

Authorization
string
header
必填

格式:Bearer <API_KEY>

请求头

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

内容类型。固定为 application/json

示例:

"application/json"

查询参数

page
integer
默认值:1

分页页码

示例:

1

size
integer
默认值:10

每页数量

示例:

10

响应

成功响应

list
object[]

Agent 列表

total
integer

总数