跳转到主要内容
GET
/
v1
/
realtime
/
status
查询 Agent 状态
curl --request GET \
  --url https://api.senseaudio.cn/v1/realtime/status \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>'
import requests

url = "https://api.senseaudio.cn/v1/realtime/status"

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/status', 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/status",
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/status"

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

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

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
{
  "status": "RUNNING"
}

授权

Authorization
string
header
必填

格式:Bearer <API_KEY>

请求头

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

内容类型。固定为 application/json

示例:

"application/json"

查询参数

room_id
string
默认值:lO81loRAfmUMFIwY
必填

房间 ID,从「创建对话式 Agent」接口返回值中获取

示例:

"lO81loRAfmUMFIwY"

响应

成功响应

status
enum<string>
必填

Agent 状态。RUNNING: 运行中;STOPPED: 已停止

可用选项:
RUNNING,
STOPPED
示例:

"RUNNING"