Apply llm-providers by stable key
curl --request PUT \
--url http://api.den.local/v1/llm-providers/by-key/{externalKey} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"providerId": "<string>",
"modelIds": [
"<string>"
],
"customConfigText": "<string>",
"customConfig": "<unknown>",
"credentialMode": "shared",
"apiKey": "<string>",
"apiKeys": {},
"memberIds": [
"<string>"
],
"teamIds": [
"<string>"
],
"allMembers": false
}
'import requests
url = "http://api.den.local/v1/llm-providers/by-key/{externalKey}"
payload = {
"name": "<string>",
"providerId": "<string>",
"modelIds": ["<string>"],
"customConfigText": "<string>",
"customConfig": "<unknown>",
"credentialMode": "shared",
"apiKey": "<string>",
"apiKeys": {},
"memberIds": ["<string>"],
"teamIds": ["<string>"],
"allMembers": False
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
providerId: '<string>',
modelIds: ['<string>'],
customConfigText: '<string>',
customConfig: '<unknown>',
credentialMode: 'shared',
apiKey: '<string>',
apiKeys: {},
memberIds: ['<string>'],
teamIds: ['<string>'],
allMembers: false
})
};
fetch('http://api.den.local/v1/llm-providers/by-key/{externalKey}', 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 => "http://api.den.local/v1/llm-providers/by-key/{externalKey}",
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([
'name' => '<string>',
'providerId' => '<string>',
'modelIds' => [
'<string>'
],
'customConfigText' => '<string>',
'customConfig' => '<unknown>',
'credentialMode' => 'shared',
'apiKey' => '<string>',
'apiKeys' => [
],
'memberIds' => [
'<string>'
],
'teamIds' => [
'<string>'
],
'allMembers' => false
]),
CURLOPT_HTTPHEADER => [
"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 := "http://api.den.local/v1/llm-providers/by-key/{externalKey}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"providerId\": \"<string>\",\n \"modelIds\": [\n \"<string>\"\n ],\n \"customConfigText\": \"<string>\",\n \"customConfig\": \"<unknown>\",\n \"credentialMode\": \"shared\",\n \"apiKey\": \"<string>\",\n \"apiKeys\": {},\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"allMembers\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
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("http://api.den.local/v1/llm-providers/by-key/{externalKey}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"providerId\": \"<string>\",\n \"modelIds\": [\n \"<string>\"\n ],\n \"customConfigText\": \"<string>\",\n \"customConfig\": \"<unknown>\",\n \"credentialMode\": \"shared\",\n \"apiKey\": \"<string>\",\n \"apiKeys\": {},\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"allMembers\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.den.local/v1/llm-providers/by-key/{externalKey}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"providerId\": \"<string>\",\n \"modelIds\": [\n \"<string>\"\n ],\n \"customConfigText\": \"<string>\",\n \"customConfig\": \"<unknown>\",\n \"credentialMode\": \"shared\",\n \"apiKey\": \"<string>\",\n \"apiKeys\": {},\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"allMembers\": false\n}"
response = http.request(request)
puts response.read_body{
"llmProvider": {
"memberCredential": {
"state": "missing"
}
}
}{
"llmProvider": {
"memberCredential": {
"state": "missing"
}
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}LLM Providers
Apply llm-providers by stable key
Creates or replaces an organization-scoped resource. Names do not identify resources; existing unkeyed resources are never adopted automatically. Assignments are replaced. Omitted write-only secrets are preserved. Concurrent writes are last-write-wins; conditional headers are not supported on this route.
PUT
/
v1
/
llm-providers
/
by-key
/
{externalKey}
Apply llm-providers by stable key
curl --request PUT \
--url http://api.den.local/v1/llm-providers/by-key/{externalKey} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"providerId": "<string>",
"modelIds": [
"<string>"
],
"customConfigText": "<string>",
"customConfig": "<unknown>",
"credentialMode": "shared",
"apiKey": "<string>",
"apiKeys": {},
"memberIds": [
"<string>"
],
"teamIds": [
"<string>"
],
"allMembers": false
}
'import requests
url = "http://api.den.local/v1/llm-providers/by-key/{externalKey}"
payload = {
"name": "<string>",
"providerId": "<string>",
"modelIds": ["<string>"],
"customConfigText": "<string>",
"customConfig": "<unknown>",
"credentialMode": "shared",
"apiKey": "<string>",
"apiKeys": {},
"memberIds": ["<string>"],
"teamIds": ["<string>"],
"allMembers": False
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
providerId: '<string>',
modelIds: ['<string>'],
customConfigText: '<string>',
customConfig: '<unknown>',
credentialMode: 'shared',
apiKey: '<string>',
apiKeys: {},
memberIds: ['<string>'],
teamIds: ['<string>'],
allMembers: false
})
};
fetch('http://api.den.local/v1/llm-providers/by-key/{externalKey}', 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 => "http://api.den.local/v1/llm-providers/by-key/{externalKey}",
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([
'name' => '<string>',
'providerId' => '<string>',
'modelIds' => [
'<string>'
],
'customConfigText' => '<string>',
'customConfig' => '<unknown>',
'credentialMode' => 'shared',
'apiKey' => '<string>',
'apiKeys' => [
],
'memberIds' => [
'<string>'
],
'teamIds' => [
'<string>'
],
'allMembers' => false
]),
CURLOPT_HTTPHEADER => [
"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 := "http://api.den.local/v1/llm-providers/by-key/{externalKey}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"providerId\": \"<string>\",\n \"modelIds\": [\n \"<string>\"\n ],\n \"customConfigText\": \"<string>\",\n \"customConfig\": \"<unknown>\",\n \"credentialMode\": \"shared\",\n \"apiKey\": \"<string>\",\n \"apiKeys\": {},\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"allMembers\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
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("http://api.den.local/v1/llm-providers/by-key/{externalKey}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"providerId\": \"<string>\",\n \"modelIds\": [\n \"<string>\"\n ],\n \"customConfigText\": \"<string>\",\n \"customConfig\": \"<unknown>\",\n \"credentialMode\": \"shared\",\n \"apiKey\": \"<string>\",\n \"apiKeys\": {},\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"allMembers\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.den.local/v1/llm-providers/by-key/{externalKey}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"providerId\": \"<string>\",\n \"modelIds\": [\n \"<string>\"\n ],\n \"customConfigText\": \"<string>\",\n \"customConfig\": \"<unknown>\",\n \"credentialMode\": \"shared\",\n \"apiKey\": \"<string>\",\n \"apiKeys\": {},\n \"memberIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"allMembers\": false\n}"
response = http.request(request)
puts response.read_body{
"llmProvider": {
"memberCredential": {
"state": "missing"
}
}
}{
"llmProvider": {
"memberCredential": {
"state": "missing"
}
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Path Parameters
Pattern:
^[a-z0-9][a-z0-9._-]{0,127}$Body
application/json
Required string length:
1 - 255Available options:
models_dev, custom Required string length:
1 - 255Minimum array length:
1Required string length:
1 - 255Minimum string length:
1Available options:
shared, per_member Maximum string length:
65535Show child attributes
Show child attributes
Maximum array length:
500Den TypeID with 'om_' prefix and a 26-character base32 suffix.
Required string length:
29Maximum array length:
500Den TypeID with 'tem_' prefix and a 26-character base32 suffix.
Required string length:
30Response
The existing resource was replaced.
Show child attributes
Show child attributes
Was this page helpful?