curl --request PUT \
--url https://sreagent.app/api/v1/config/ai_providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"auto_upgrade_model": true,
"base_url": "<string>",
"enabled": true,
"max_tokens": 123,
"model": "<string>",
"model_overrides": {},
"name": "<string>",
"priority": 123,
"rate_limit_rpm": 123,
"temperature": 123,
"timeout_ms": 123
}
'import requests
url = "https://sreagent.app/api/v1/config/ai_providers/{id}"
payload = {
"api_key": "<string>",
"auto_upgrade_model": True,
"base_url": "<string>",
"enabled": True,
"max_tokens": 123,
"model": "<string>",
"model_overrides": {},
"name": "<string>",
"priority": 123,
"rate_limit_rpm": 123,
"temperature": 123,
"timeout_ms": 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({
api_key: '<string>',
auto_upgrade_model: true,
base_url: '<string>',
enabled: true,
max_tokens: 123,
model: '<string>',
model_overrides: {},
name: '<string>',
priority: 123,
rate_limit_rpm: 123,
temperature: 123,
timeout_ms: 123
})
};
fetch('https://sreagent.app/api/v1/config/ai_providers/{id}', 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_providers/{id}",
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([
'api_key' => '<string>',
'auto_upgrade_model' => true,
'base_url' => '<string>',
'enabled' => true,
'max_tokens' => 123,
'model' => '<string>',
'model_overrides' => [
],
'name' => '<string>',
'priority' => 123,
'rate_limit_rpm' => 123,
'temperature' => 123,
'timeout_ms' => 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_providers/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"auto_upgrade_model\": true,\n \"base_url\": \"<string>\",\n \"enabled\": true,\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"model_overrides\": {},\n \"name\": \"<string>\",\n \"priority\": 123,\n \"rate_limit_rpm\": 123,\n \"temperature\": 123,\n \"timeout_ms\": 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_providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"auto_upgrade_model\": true,\n \"base_url\": \"<string>\",\n \"enabled\": true,\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"model_overrides\": {},\n \"name\": \"<string>\",\n \"priority\": 123,\n \"rate_limit_rpm\": 123,\n \"temperature\": 123,\n \"timeout_ms\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ai_providers/{id}")
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 \"api_key\": \"<string>\",\n \"auto_upgrade_model\": true,\n \"base_url\": \"<string>\",\n \"enabled\": true,\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"model_overrides\": {},\n \"name\": \"<string>\",\n \"priority\": 123,\n \"rate_limit_rpm\": 123,\n \"temperature\": 123,\n \"timeout_ms\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Update an AI provider
Change one provider, named by the id list_ai_providers reports; omitted fields keep their value. An omitted api_key keeps the stored key, and an empty one is refused rather than read as a way to remove it. model_overrides merges per purpose, so a partial map keeps the pins it does not name, and an empty string under a purpose clears that pin. Needs the plan’s bring-your-own-provider feature.
curl --request PUT \
--url https://sreagent.app/api/v1/config/ai_providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"auto_upgrade_model": true,
"base_url": "<string>",
"enabled": true,
"max_tokens": 123,
"model": "<string>",
"model_overrides": {},
"name": "<string>",
"priority": 123,
"rate_limit_rpm": 123,
"temperature": 123,
"timeout_ms": 123
}
'import requests
url = "https://sreagent.app/api/v1/config/ai_providers/{id}"
payload = {
"api_key": "<string>",
"auto_upgrade_model": True,
"base_url": "<string>",
"enabled": True,
"max_tokens": 123,
"model": "<string>",
"model_overrides": {},
"name": "<string>",
"priority": 123,
"rate_limit_rpm": 123,
"temperature": 123,
"timeout_ms": 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({
api_key: '<string>',
auto_upgrade_model: true,
base_url: '<string>',
enabled: true,
max_tokens: 123,
model: '<string>',
model_overrides: {},
name: '<string>',
priority: 123,
rate_limit_rpm: 123,
temperature: 123,
timeout_ms: 123
})
};
fetch('https://sreagent.app/api/v1/config/ai_providers/{id}', 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_providers/{id}",
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([
'api_key' => '<string>',
'auto_upgrade_model' => true,
'base_url' => '<string>',
'enabled' => true,
'max_tokens' => 123,
'model' => '<string>',
'model_overrides' => [
],
'name' => '<string>',
'priority' => 123,
'rate_limit_rpm' => 123,
'temperature' => 123,
'timeout_ms' => 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_providers/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"auto_upgrade_model\": true,\n \"base_url\": \"<string>\",\n \"enabled\": true,\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"model_overrides\": {},\n \"name\": \"<string>\",\n \"priority\": 123,\n \"rate_limit_rpm\": 123,\n \"temperature\": 123,\n \"timeout_ms\": 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_providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"auto_upgrade_model\": true,\n \"base_url\": \"<string>\",\n \"enabled\": true,\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"model_overrides\": {},\n \"name\": \"<string>\",\n \"priority\": 123,\n \"rate_limit_rpm\": 123,\n \"temperature\": 123,\n \"timeout_ms\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ai_providers/{id}")
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 \"api_key\": \"<string>\",\n \"auto_upgrade_model\": true,\n \"base_url\": \"<string>\",\n \"enabled\": true,\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"model_overrides\": {},\n \"name\": \"<string>\",\n \"priority\": 123,\n \"rate_limit_rpm\": 123,\n \"temperature\": 123,\n \"timeout_ms\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Authorizations
An sre_ak_* API key holding the api:admin scope (or api:config_read, which every write refuses with read_only_key).
Path Parameters
The resource's id.
Body
The provider's key. Write-only: it is never answered by any tool here, an omitted one keeps the stored key, and an empty one is refused rather than read as a way to remove it. To remove it, delete the provider. Paste the key itself; a URL goes in base_url and is refused here.
Whether the platform may move model on to a successor once the configured one drops out of the provider's list. Off by default: a pinned model stays pinned.
Where to send the calls, for a gateway or a self-hosted endpoint. null uses the provider's own.
Whether the router may route to this provider at all. A disabled row keeps its key and its pins and is skipped.
The ceiling on one answer's length. null uses the platform's own.
The model to use, spelled as the provider spells it. null leaves the choice to the platform's own default.
A model per purpose, keyed by purpose: investigation, suggestion, report_generation, alert_grouping, context_compaction, pr_review, remediation, oversight, config_watch, finops, slack_assistant, board_assistant, runbook_suggestion, sli_suggestion, capacity_planning, status_page_draft, ticket_synthesis, security_triage. Merged into what is stored, so a map naming one purpose leaves the rest alone; an empty string under a purpose clears that pin. The value "auto" hands the choice to the platform's own model selection for that purpose.
What this provider is called here, unique within the organization. It is a label for the people reading the list, not anything the provider sees.
The order the router tries this organization's providers in, lowest first. At least 1.
Which provider this row talks to: anthropic, openai, openrouter, ollama, bedrock, gemini, portkey, langchain.
anthropic, openai, openrouter, ollama, bedrock, gemini, portkey, langchain Requests per minute this provider will accept. null means no limit.
0 to 2. null leaves the provider's own default in place.
How long one request may take, at most 600000. null uses the platform's own.
Response
Updated.

