Update the AI settings
curl --request PUT \
--url https://sreagent.app/api/v1/config/ai_settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"anonymization_enabled": true,
"multi_agent_investigation": true,
"own_providers_only": true,
"retry_budget": 123
}
'import requests
url = "https://sreagent.app/api/v1/config/ai_settings"
payload = {
"anonymization_enabled": True,
"multi_agent_investigation": True,
"own_providers_only": True,
"retry_budget": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
anonymization_enabled: true,
multi_agent_investigation: true,
own_providers_only: true,
retry_budget: 123
})
};
fetch('https://sreagent.app/api/v1/config/ai_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://sreagent.app/api/v1/config/ai_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'anonymization_enabled' => true,
'multi_agent_investigation' => true,
'own_providers_only' => true,
'retry_budget' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sreagent.app/api/v1/config/ai_settings"
payload := strings.NewReader("{\n \"anonymization_enabled\": true,\n \"multi_agent_investigation\": true,\n \"own_providers_only\": true,\n \"retry_budget\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sreagent.app/api/v1/config/ai_settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"anonymization_enabled\": true,\n \"multi_agent_investigation\": true,\n \"own_providers_only\": true,\n \"retry_budget\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ai_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"anonymization_enabled\": true,\n \"multi_agent_investigation\": true,\n \"own_providers_only\": true,\n \"retry_budget\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}ai_settings
Update the AI settings
Change one or more of those switches; omitted ones keep their value. own_providers_only cannot be turned on while this organization has no enabled provider of its own, because every AI feature would then fail rather than fall back; turning it off is never refused.
PUT
/
ai_settings
Update the AI settings
curl --request PUT \
--url https://sreagent.app/api/v1/config/ai_settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"anonymization_enabled": true,
"multi_agent_investigation": true,
"own_providers_only": true,
"retry_budget": 123
}
'import requests
url = "https://sreagent.app/api/v1/config/ai_settings"
payload = {
"anonymization_enabled": True,
"multi_agent_investigation": True,
"own_providers_only": True,
"retry_budget": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
anonymization_enabled: true,
multi_agent_investigation: true,
own_providers_only: true,
retry_budget: 123
})
};
fetch('https://sreagent.app/api/v1/config/ai_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://sreagent.app/api/v1/config/ai_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'anonymization_enabled' => true,
'multi_agent_investigation' => true,
'own_providers_only' => true,
'retry_budget' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sreagent.app/api/v1/config/ai_settings"
payload := strings.NewReader("{\n \"anonymization_enabled\": true,\n \"multi_agent_investigation\": true,\n \"own_providers_only\": true,\n \"retry_budget\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sreagent.app/api/v1/config/ai_settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"anonymization_enabled\": true,\n \"multi_agent_investigation\": true,\n \"own_providers_only\": true,\n \"retry_budget\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ai_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"anonymization_enabled\": true,\n \"multi_agent_investigation\": true,\n \"own_providers_only\": true,\n \"retry_budget\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Authorizations
Body
application/json
The EXTRA attempts one provider leg may spend on a transient failure (a rate limit, an overload, a 5xx, a timeout), from 0 to 5. At 0 a provider is tried once and the router moves on to the next one, which it does at every value once the attempts are spent. A value outside the range is refused rather than clamped.
Response
Updated.
Was this page helpful?