Update model provider config
curl --request PUT \
--url https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {}
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}"
payload = {
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {}
}
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({
base_url: '<string>',
endpoint_path: '<string>',
request_timeout_ms: 1073741824,
idle_timeout_ms: 1073741824,
auth_options: {header_name: '<string>', service: '<string>', region: '<string>'},
credential_secret_id: '<string>',
headers: {},
secret_headers: {}
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}', 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.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
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([
'base_url' => '<string>',
'endpoint_path' => '<string>',
'request_timeout_ms' => 1073741824,
'idle_timeout_ms' => 1073741824,
'auth_options' => [
'header_name' => '<string>',
'service' => '<string>',
'region' => '<string>'
],
'credential_secret_id' => '<string>',
'headers' => [
],
'secret_headers' => [
]
]),
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://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"credential_secret_id\": \"<string>\",\n \"headers\": {},\n \"secret_headers\": {}\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://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"credential_secret_id\": \"<string>\",\n \"headers\": {},\n \"secret_headers\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}")
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 \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"credential_secret_id\": \"<string>\",\n \"headers\": {},\n \"secret_headers\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"management_kind": "tenant",
"name": "<string>",
"api_format": "openai-responses",
"api_variant": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 123,
"idle_timeout_ms": 123,
"auth_kind": "<string>",
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Models
Update model provider config
Updates a model provider config’s connection settings, such as its credential and headers, and returns the updated config; omitted fields keep their values. The credential secret is checked to exist and match auth_kind, but the provider isn’t contacted, so a credential the provider rejects isn’t caught here.
PUT
/
orgs
/
{orgID}
/
model-provider-configs
/
{modelProviderConfigID}
Update model provider config
curl --request PUT \
--url https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {}
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}"
payload = {
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {}
}
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({
base_url: '<string>',
endpoint_path: '<string>',
request_timeout_ms: 1073741824,
idle_timeout_ms: 1073741824,
auth_options: {header_name: '<string>', service: '<string>', region: '<string>'},
credential_secret_id: '<string>',
headers: {},
secret_headers: {}
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}', 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.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
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([
'base_url' => '<string>',
'endpoint_path' => '<string>',
'request_timeout_ms' => 1073741824,
'idle_timeout_ms' => 1073741824,
'auth_options' => [
'header_name' => '<string>',
'service' => '<string>',
'region' => '<string>'
],
'credential_secret_id' => '<string>',
'headers' => [
],
'secret_headers' => [
]
]),
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://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"credential_secret_id\": \"<string>\",\n \"headers\": {},\n \"secret_headers\": {}\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://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"credential_secret_id\": \"<string>\",\n \"headers\": {},\n \"secret_headers\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}")
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 \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"credential_secret_id\": \"<string>\",\n \"headers\": {},\n \"secret_headers\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"management_kind": "tenant",
"name": "<string>",
"api_format": "openai-responses",
"api_variant": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 123,
"idle_timeout_ms": 123,
"auth_kind": "<string>",
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
bearerAuthbrowserSessionCookie & csrfHeader
Path Parameters
Body
application/json
Update a provider config. Omitted fields keep their current values.
Response
Route response.