设置
获取设置
读取当前用户的偏好设置。
GET
/
api
/
v1
/
settings
获取设置
curl --request GET \
--url https://api.example.com/api/v1/settingsimport requests
url = "https://api.example.com/api/v1/settings"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/settings', 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.example.com/api/v1/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/settings"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/settings")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"default_mode": "<string>",
"personality": "<string>",
"timezone": "<string>",
"theo_branding": true
}响应
string
发送
auto 时使用的默认路由模式。取值为以下之一:auto、fast、think、code、research、image、video、roast。string
Theo 的人格模式。
"theo"(默认)或 "none"(中性)。string
IANA 时区字符串(例如
"America/Guayaquil")。boolean
当为
false 时,API 响应中会去除 Theo 的人格、背景故事、吉祥物表情符号以及带品牌标识的模型名称。默认值:true。身份验证
需要提供 API 密钥或仪表盘会话。示例
curl
curl https://www.hitheo.ai/api/v1/settings \
-H "Authorization: Bearer $THEO_API_KEY"
响应
{
"default_mode": "auto",
"personality": "theo",
"timezone": "America/Guayaquil",
"theo_branding": true
}
此页面对您有帮助吗?
获取设置
curl --request GET \
--url https://api.example.com/api/v1/settingsimport requests
url = "https://api.example.com/api/v1/settings"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/settings', 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.example.com/api/v1/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/settings"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/settings")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"default_mode": "<string>",
"personality": "<string>",
"timezone": "<string>",
"theo_branding": true
}