Update a large language model together with its credentials and Gateway Config Set (EXPERIMENTAL)
Experimental and temporary — see POST /v2.0/llmconfigurations.
Updates the large language model in the same atomic operation as its credentials
(credentials.mode: "update" patches the existing credentials’ fields in place;
"reuse" re-points the large language model at a different, already-existing set of
credentials). Omitting credentials entirely means “credentials unchanged” — a Config
Set push is still triggered, since the large language model’s own configuration may
have changed.
credentials.mode: "create" is rejected with a 400. Re-keying an existing large
language model onto brand-new credentials via PATCH would either silently orphan its
previous Connection or require new cascade-delete logic. Create a new LLM configuration
(POST) instead if fresh credentials are needed. credentials.mode: "reuse" or
"update" with an unknown or out-of-scope referenceId returns 404, never a silent
create. The route itself returns 404 when the large language model does not exist.
curl --request PATCH \
--url https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"largeLanguageModel": {
"name": "Large language model for customer service",
"description": "<string>",
"isCustomModel": true,
"isDefault": true,
"areFallbacksEnabled": true,
"fallbacks": [
{
"isFallbackEnabled": true,
"fallbackLLMReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immediateFallBack": {
"failedRequests": 123,
"durationInMinutes": 123,
"emailNotificationList": [
"<string>"
]
}
}
],
"openAI": {},
"anthropic": {},
"azureOpenAI": {},
"googleVertexAI": {},
"googleGemini": {},
"googleGenAI": {},
"alephAlpha": {},
"openAICompatible": {},
"awsBedrock": {},
"mistral": {}
},
"credentials": {
"mode": "reuse",
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
'import requests
url = "https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}"
payload = {
"largeLanguageModel": {
"name": "Large language model for customer service",
"description": "<string>",
"isCustomModel": True,
"isDefault": True,
"areFallbacksEnabled": True,
"fallbacks": [
{
"isFallbackEnabled": True,
"fallbackLLMReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immediateFallBack": {
"failedRequests": 123,
"durationInMinutes": 123,
"emailNotificationList": ["<string>"]
}
}
],
"openAI": {},
"anthropic": {},
"azureOpenAI": {},
"googleVertexAI": {},
"googleGemini": {},
"googleGenAI": {},
"alephAlpha": {},
"openAICompatible": {},
"awsBedrock": {},
"mistral": {}
},
"credentials": {
"mode": "reuse",
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
largeLanguageModel: {
name: 'Large language model for customer service',
description: '<string>',
isCustomModel: true,
isDefault: true,
areFallbacksEnabled: true,
fallbacks: [
{
isFallbackEnabled: true,
fallbackLLMReferenceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
immediateFallBack: {
failedRequests: 123,
durationInMinutes: 123,
emailNotificationList: ['<string>']
}
}
],
openAI: {},
anthropic: {},
azureOpenAI: {},
googleVertexAI: {},
googleGemini: {},
googleGenAI: {},
alephAlpha: {},
openAICompatible: {},
awsBedrock: {},
mistral: {}
},
credentials: {mode: 'reuse', referenceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
})
};
fetch('https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}', 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-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'largeLanguageModel' => [
'name' => 'Large language model for customer service',
'description' => '<string>',
'isCustomModel' => true,
'isDefault' => true,
'areFallbacksEnabled' => true,
'fallbacks' => [
[
'isFallbackEnabled' => true,
'fallbackLLMReferenceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'immediateFallBack' => [
'failedRequests' => 123,
'durationInMinutes' => 123,
'emailNotificationList' => [
'<string>'
]
]
]
],
'openAI' => [
],
'anthropic' => [
],
'azureOpenAI' => [
],
'googleVertexAI' => [
],
'googleGemini' => [
],
'googleGenAI' => [
],
'alephAlpha' => [
],
'openAICompatible' => [
],
'awsBedrock' => [
],
'mistral' => [
]
],
'credentials' => [
'mode' => 'reuse',
'referenceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}"
payload := strings.NewReader("{\n \"largeLanguageModel\": {\n \"name\": \"Large language model for customer service\",\n \"description\": \"<string>\",\n \"isCustomModel\": true,\n \"isDefault\": true,\n \"areFallbacksEnabled\": true,\n \"fallbacks\": [\n {\n \"isFallbackEnabled\": true,\n \"fallbackLLMReferenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"immediateFallBack\": {\n \"failedRequests\": 123,\n \"durationInMinutes\": 123,\n \"emailNotificationList\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"openAI\": {},\n \"anthropic\": {},\n \"azureOpenAI\": {},\n \"googleVertexAI\": {},\n \"googleGemini\": {},\n \"googleGenAI\": {},\n \"alephAlpha\": {},\n \"openAICompatible\": {},\n \"awsBedrock\": {},\n \"mistral\": {}\n },\n \"credentials\": {\n \"mode\": \"reuse\",\n \"referenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"largeLanguageModel\": {\n \"name\": \"Large language model for customer service\",\n \"description\": \"<string>\",\n \"isCustomModel\": true,\n \"isDefault\": true,\n \"areFallbacksEnabled\": true,\n \"fallbacks\": [\n {\n \"isFallbackEnabled\": true,\n \"fallbackLLMReferenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"immediateFallBack\": {\n \"failedRequests\": 123,\n \"durationInMinutes\": 123,\n \"emailNotificationList\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"openAI\": {},\n \"anthropic\": {},\n \"azureOpenAI\": {},\n \"googleVertexAI\": {},\n \"googleGemini\": {},\n \"googleGenAI\": {},\n \"alephAlpha\": {},\n \"openAICompatible\": {},\n \"awsBedrock\": {},\n \"mistral\": {}\n },\n \"credentials\": {\n \"mode\": \"reuse\",\n \"referenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"largeLanguageModel\": {\n \"name\": \"Large language model for customer service\",\n \"description\": \"<string>\",\n \"isCustomModel\": true,\n \"isDefault\": true,\n \"areFallbacksEnabled\": true,\n \"fallbacks\": [\n {\n \"isFallbackEnabled\": true,\n \"fallbackLLMReferenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"immediateFallBack\": {\n \"failedRequests\": 123,\n \"durationInMinutes\": 123,\n \"emailNotificationList\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"openAI\": {},\n \"anthropic\": {},\n \"azureOpenAI\": {},\n \"googleVertexAI\": {},\n \"googleGemini\": {},\n \"googleGenAI\": {},\n \"alephAlpha\": {},\n \"openAICompatible\": {},\n \"awsBedrock\": {},\n \"mistral\": {}\n },\n \"credentials\": {\n \"mode\": \"reuse\",\n \"referenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n}"
response = http.request(request)
puts response.read_body{
"largeLanguageModel": {
"name": "Large language model for customer service",
"modelType": "gpt-3.5-turbo",
"provider": "azureOpenAI",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "Large language model for customer-facing AI Agents.",
"modelGroup": "chat",
"apiType": "chatCompletion",
"isCustomModel": true,
"openAI": {
"customModel": "gpt-4-32k-0613"
},
"anthropic": {
"customModel": "claude-sonnet-4-6"
},
"azureOpenAI": {
"resourceName": "<string>",
"deploymentName": "<string>",
"apiVersion": "<string>",
"baseCustomUrl": [
"https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/chat/completions?api-version=<apiVersion>",
"https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/completions?api-version=<apiVersion>",
"https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/embeddings?api-version=<apiVersion>"
],
"useDeploymentNameAsModel": true
},
"googleVertexAI": {
"location": "<string>",
"apiEndpoint": "<string>",
"publisher": "<string>"
},
"googleGemini": {
"location": "<string>"
},
"googleGenAI": {
"location": "<string>"
},
"alephAlpha": {
"customModel": "luminous-003",
"baseCustomUrl": "https://api.aleph-alpha.com"
},
"openAICompatible": {
"customModel": "luminous-003",
"baseCustomUrl": "https://own-llm-deployment.company.com/openai/v1",
"customAuthHeader": "Ocp-Apim-Subscription-Key"
},
"resourceLevel": "project",
"isDefault": false,
"fallbacks": [
{
"isFallbackEnabled": true,
"fallbackLLMReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immediateFallBack": {
"failedRequests": 123,
"durationInMinutes": 123,
"emailNotificationList": [
"<string>"
]
}
}
],
"isInPlatformLlm": false,
"useCases": [
"<string>"
],
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_id": "<string>",
"createdAt": 1694518620,
"lastChanged": 1694518620,
"createdBy": "<string>",
"lastChangedBy": "<string>"
},
"credentials": {
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"configSet": {
"status": "synced",
"configSetId": "<string>",
"skippedReason": "providerUnsupported"
}
}{
"type": "Bad Request",
"title": "Bad Request Error",
"status": 400,
"detail": "Validation failed. Missing payload.",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Unauthorized",
"title": "Unauthorized Error",
"status": 401,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 401,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Payment Required",
"title": "Payment Required Error",
"status": 402,
"detail": "Validation failed. Missing payload.",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 402,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Forbidden",
"title": "Forbidden Error",
"status": 403,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Not Found",
"title": "Not Found Error",
"status": 404,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {},
"logLevel": "error"
}{
"type": "Method Not Allowed",
"title": "Method Not Allowed Error",
"status": 405,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Conflict",
"title": "Conflict Error",
"status": 409,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1004,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Payload Too Large",
"title": "Payload Too Large Error",
"status": 413,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Internal Server Error",
"title": "Internal Server Error",
"status": 500,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Not Implemented",
"title": "Not Implemented Error",
"status": 501,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1009,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Bad Gateway",
"title": "Bad Gateway Error",
"status": 502,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Service Unavailable",
"title": "Service Unavailable Error",
"status": 503,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 503,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Gateway Timeout",
"title": "Gateway Timeout Error",
"status": 504,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}Authorizations
Supply the API Key in the HTTP-Header
Headers
The Accept header specifies the media type that the client expects in the response. Available options: application/json, application/hal+json, application/xml, text/xml, text/csv. The default value is application/json.
application/json, application/hal+json, application/xml, text/xml, text/csv Path Parameters
The unique identifier for the large language model.
24^[a-z0-9]{24}$Body
largeLanguageModel must contain at least one property, even when the only intent is
to change credentials — this is a constraint of the underlying RPC schema, not a
REST-layer choice.
The large language model half of the unified LLM configuration request. Same field
set as the plain largelanguagemodels resource, minus connectionId (always derived
server-side from credentials) and every server-managed field (configSetId,
isInPlatformLlm, useCases, ...).
Show child attributes
Show child attributes
Same union as ILlmConfigurationCredentials_2_0, but mode: "create" is rejected
on PATCH with a 400 — re-keying an existing large language model onto brand-new
credentials would either orphan its previous Connection or require new cascade-delete
logic. Create a new LLM configuration (POST) instead if you need fresh credentials.
- Option 1
- Option 2
Show child attributes
Show child attributes
Response
Returns the updated large language model, a summary of its credentials (never the field values), and the Config Set sync outcome.
The IEntityMeta defines meta information every entity within the system has. These are dates when a resource was created and modified as well as information about the user who initially created a resource and who modified it the last time.
- Option 1
- Option 2
Show child attributes
Show child attributes
Never includes fields — credential values are never echoed back by this route.
Show child attributes
Show child attributes
Whether a Gateway Config Set was created/updated for this large language model, or why it was skipped.
Show child attributes
Show child attributes
curl --request PATCH \
--url https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"largeLanguageModel": {
"name": "Large language model for customer service",
"description": "<string>",
"isCustomModel": true,
"isDefault": true,
"areFallbacksEnabled": true,
"fallbacks": [
{
"isFallbackEnabled": true,
"fallbackLLMReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immediateFallBack": {
"failedRequests": 123,
"durationInMinutes": 123,
"emailNotificationList": [
"<string>"
]
}
}
],
"openAI": {},
"anthropic": {},
"azureOpenAI": {},
"googleVertexAI": {},
"googleGemini": {},
"googleGenAI": {},
"alephAlpha": {},
"openAICompatible": {},
"awsBedrock": {},
"mistral": {}
},
"credentials": {
"mode": "reuse",
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
'import requests
url = "https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}"
payload = {
"largeLanguageModel": {
"name": "Large language model for customer service",
"description": "<string>",
"isCustomModel": True,
"isDefault": True,
"areFallbacksEnabled": True,
"fallbacks": [
{
"isFallbackEnabled": True,
"fallbackLLMReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immediateFallBack": {
"failedRequests": 123,
"durationInMinutes": 123,
"emailNotificationList": ["<string>"]
}
}
],
"openAI": {},
"anthropic": {},
"azureOpenAI": {},
"googleVertexAI": {},
"googleGemini": {},
"googleGenAI": {},
"alephAlpha": {},
"openAICompatible": {},
"awsBedrock": {},
"mistral": {}
},
"credentials": {
"mode": "reuse",
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
largeLanguageModel: {
name: 'Large language model for customer service',
description: '<string>',
isCustomModel: true,
isDefault: true,
areFallbacksEnabled: true,
fallbacks: [
{
isFallbackEnabled: true,
fallbackLLMReferenceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
immediateFallBack: {
failedRequests: 123,
durationInMinutes: 123,
emailNotificationList: ['<string>']
}
}
],
openAI: {},
anthropic: {},
azureOpenAI: {},
googleVertexAI: {},
googleGemini: {},
googleGenAI: {},
alephAlpha: {},
openAICompatible: {},
awsBedrock: {},
mistral: {}
},
credentials: {mode: 'reuse', referenceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
})
};
fetch('https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}', 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-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'largeLanguageModel' => [
'name' => 'Large language model for customer service',
'description' => '<string>',
'isCustomModel' => true,
'isDefault' => true,
'areFallbacksEnabled' => true,
'fallbacks' => [
[
'isFallbackEnabled' => true,
'fallbackLLMReferenceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'immediateFallBack' => [
'failedRequests' => 123,
'durationInMinutes' => 123,
'emailNotificationList' => [
'<string>'
]
]
]
],
'openAI' => [
],
'anthropic' => [
],
'azureOpenAI' => [
],
'googleVertexAI' => [
],
'googleGemini' => [
],
'googleGenAI' => [
],
'alephAlpha' => [
],
'openAICompatible' => [
],
'awsBedrock' => [
],
'mistral' => [
]
],
'credentials' => [
'mode' => 'reuse',
'referenceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}"
payload := strings.NewReader("{\n \"largeLanguageModel\": {\n \"name\": \"Large language model for customer service\",\n \"description\": \"<string>\",\n \"isCustomModel\": true,\n \"isDefault\": true,\n \"areFallbacksEnabled\": true,\n \"fallbacks\": [\n {\n \"isFallbackEnabled\": true,\n \"fallbackLLMReferenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"immediateFallBack\": {\n \"failedRequests\": 123,\n \"durationInMinutes\": 123,\n \"emailNotificationList\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"openAI\": {},\n \"anthropic\": {},\n \"azureOpenAI\": {},\n \"googleVertexAI\": {},\n \"googleGemini\": {},\n \"googleGenAI\": {},\n \"alephAlpha\": {},\n \"openAICompatible\": {},\n \"awsBedrock\": {},\n \"mistral\": {}\n },\n \"credentials\": {\n \"mode\": \"reuse\",\n \"referenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"largeLanguageModel\": {\n \"name\": \"Large language model for customer service\",\n \"description\": \"<string>\",\n \"isCustomModel\": true,\n \"isDefault\": true,\n \"areFallbacksEnabled\": true,\n \"fallbacks\": [\n {\n \"isFallbackEnabled\": true,\n \"fallbackLLMReferenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"immediateFallBack\": {\n \"failedRequests\": 123,\n \"durationInMinutes\": 123,\n \"emailNotificationList\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"openAI\": {},\n \"anthropic\": {},\n \"azureOpenAI\": {},\n \"googleVertexAI\": {},\n \"googleGemini\": {},\n \"googleGenAI\": {},\n \"alephAlpha\": {},\n \"openAICompatible\": {},\n \"awsBedrock\": {},\n \"mistral\": {}\n },\n \"credentials\": {\n \"mode\": \"reuse\",\n \"referenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations/{largeLanguageModelId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"largeLanguageModel\": {\n \"name\": \"Large language model for customer service\",\n \"description\": \"<string>\",\n \"isCustomModel\": true,\n \"isDefault\": true,\n \"areFallbacksEnabled\": true,\n \"fallbacks\": [\n {\n \"isFallbackEnabled\": true,\n \"fallbackLLMReferenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"immediateFallBack\": {\n \"failedRequests\": 123,\n \"durationInMinutes\": 123,\n \"emailNotificationList\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"openAI\": {},\n \"anthropic\": {},\n \"azureOpenAI\": {},\n \"googleVertexAI\": {},\n \"googleGemini\": {},\n \"googleGenAI\": {},\n \"alephAlpha\": {},\n \"openAICompatible\": {},\n \"awsBedrock\": {},\n \"mistral\": {}\n },\n \"credentials\": {\n \"mode\": \"reuse\",\n \"referenceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n}"
response = http.request(request)
puts response.read_body{
"largeLanguageModel": {
"name": "Large language model for customer service",
"modelType": "gpt-3.5-turbo",
"provider": "azureOpenAI",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "Large language model for customer-facing AI Agents.",
"modelGroup": "chat",
"apiType": "chatCompletion",
"isCustomModel": true,
"openAI": {
"customModel": "gpt-4-32k-0613"
},
"anthropic": {
"customModel": "claude-sonnet-4-6"
},
"azureOpenAI": {
"resourceName": "<string>",
"deploymentName": "<string>",
"apiVersion": "<string>",
"baseCustomUrl": [
"https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/chat/completions?api-version=<apiVersion>",
"https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/completions?api-version=<apiVersion>",
"https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/embeddings?api-version=<apiVersion>"
],
"useDeploymentNameAsModel": true
},
"googleVertexAI": {
"location": "<string>",
"apiEndpoint": "<string>",
"publisher": "<string>"
},
"googleGemini": {
"location": "<string>"
},
"googleGenAI": {
"location": "<string>"
},
"alephAlpha": {
"customModel": "luminous-003",
"baseCustomUrl": "https://api.aleph-alpha.com"
},
"openAICompatible": {
"customModel": "luminous-003",
"baseCustomUrl": "https://own-llm-deployment.company.com/openai/v1",
"customAuthHeader": "Ocp-Apim-Subscription-Key"
},
"resourceLevel": "project",
"isDefault": false,
"fallbacks": [
{
"isFallbackEnabled": true,
"fallbackLLMReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"immediateFallBack": {
"failedRequests": 123,
"durationInMinutes": 123,
"emailNotificationList": [
"<string>"
]
}
}
],
"isInPlatformLlm": false,
"useCases": [
"<string>"
],
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_id": "<string>",
"createdAt": 1694518620,
"lastChanged": 1694518620,
"createdBy": "<string>",
"lastChangedBy": "<string>"
},
"credentials": {
"referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"configSet": {
"status": "synced",
"configSetId": "<string>",
"skippedReason": "providerUnsupported"
}
}{
"type": "Bad Request",
"title": "Bad Request Error",
"status": 400,
"detail": "Validation failed. Missing payload.",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Unauthorized",
"title": "Unauthorized Error",
"status": 401,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 401,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Payment Required",
"title": "Payment Required Error",
"status": 402,
"detail": "Validation failed. Missing payload.",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 402,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Forbidden",
"title": "Forbidden Error",
"status": 403,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Not Found",
"title": "Not Found Error",
"status": 404,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {},
"logLevel": "error"
}{
"type": "Method Not Allowed",
"title": "Method Not Allowed Error",
"status": 405,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Conflict",
"title": "Conflict Error",
"status": 409,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1004,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Payload Too Large",
"title": "Payload Too Large Error",
"status": 413,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Internal Server Error",
"title": "Internal Server Error",
"status": 500,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Not Implemented",
"title": "Not Implemented Error",
"status": 501,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1009,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Bad Gateway",
"title": "Bad Gateway Error",
"status": 502,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Service Unavailable",
"title": "Service Unavailable Error",
"status": 503,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 503,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}{
"type": "Gateway Timeout",
"title": "Gateway Timeout Error",
"status": 504,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}