Create a large language model together with its credentials and Gateway Config Set (EXPERIMENTAL)
Experimental and temporary. Introduced for the C26 unified LLM configuration page.
The internal model is expected to change once all large language models are managed as
Gateway Config Sets; this route may change or be removed without a major version bump.
Use POST /v2.0/connections + POST /v2.0/largelanguagemodels for anything that must
remain stable.
Creates the large language model AND its underlying credentials (or re-points it at
existing credentials, via credentials.mode) in a single, atomic operation, then pushes
the resulting configuration to the LLM Gateway as a Config Set when the organisation and
provider are eligible. The response’s configSet block reports whether that push
happened and, if not, why. credentials.mode: "reuse" with an unknown or out-of-scope
referenceId returns 404, never a silent create.
There is no unified GET — read the created resources back via
GET /v2.0/largelanguagemodels/{id} and GET /v2.0/connections/{id}. There is no
/test either — use the existing POST /v2.0/largelanguagemodels/{id}/test once the
large language model has been created.
curl --request POST \
--url https://api-trial.cognigy.ai/new/v2.0/llmconfigurations \
--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": "create",
"name": "My OpenAI credentials",
"type": "OpenAiProvider",
"fields": {
"fields": {
"some-key-from-connection-schema": "x123sdfu12312"
}
}
},
"resourceLevel": "project",
"projectId": "<string>"
}
'import requests
url = "https://api-trial.cognigy.ai/new/v2.0/llmconfigurations"
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": "create",
"name": "My OpenAI credentials",
"type": "OpenAiProvider",
"fields": { "fields": { "some-key-from-connection-schema": "x123sdfu12312" } }
},
"resourceLevel": "project",
"projectId": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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: 'create',
name: 'My OpenAI credentials',
type: 'OpenAiProvider',
fields: {fields: {'some-key-from-connection-schema': 'x123sdfu12312'}}
},
resourceLevel: 'project',
projectId: '<string>'
})
};
fetch('https://api-trial.cognigy.ai/new/v2.0/llmconfigurations', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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' => 'create',
'name' => 'My OpenAI credentials',
'type' => 'OpenAiProvider',
'fields' => [
'fields' => [
'some-key-from-connection-schema' => 'x123sdfu12312'
]
]
],
'resourceLevel' => 'project',
'projectId' => '<string>'
]),
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"
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\": \"create\",\n \"name\": \"My OpenAI credentials\",\n \"type\": \"OpenAiProvider\",\n \"fields\": {\n \"fields\": {\n \"some-key-from-connection-schema\": \"x123sdfu12312\"\n }\n }\n },\n \"resourceLevel\": \"project\",\n \"projectId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations")
.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\": \"create\",\n \"name\": \"My OpenAI credentials\",\n \"type\": \"OpenAiProvider\",\n \"fields\": {\n \"fields\": {\n \"some-key-from-connection-schema\": \"x123sdfu12312\"\n }\n }\n },\n \"resourceLevel\": \"project\",\n \"projectId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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\": \"create\",\n \"name\": \"My OpenAI credentials\",\n \"type\": \"OpenAiProvider\",\n \"fields\": {\n \"fields\": {\n \"some-key-from-connection-schema\": \"x123sdfu12312\"\n }\n }\n },\n \"resourceLevel\": \"project\",\n \"projectId\": \"<string>\"\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 Body
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
Credentials for the large language model being configured. mode is explicit rather than inferred from the presence of referenceId.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
General scope of the resource.
organisation, project 24^[a-z0-9]{24}$Response
Returns the created 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 POST \
--url https://api-trial.cognigy.ai/new/v2.0/llmconfigurations \
--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": "create",
"name": "My OpenAI credentials",
"type": "OpenAiProvider",
"fields": {
"fields": {
"some-key-from-connection-schema": "x123sdfu12312"
}
}
},
"resourceLevel": "project",
"projectId": "<string>"
}
'import requests
url = "https://api-trial.cognigy.ai/new/v2.0/llmconfigurations"
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": "create",
"name": "My OpenAI credentials",
"type": "OpenAiProvider",
"fields": { "fields": { "some-key-from-connection-schema": "x123sdfu12312" } }
},
"resourceLevel": "project",
"projectId": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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: 'create',
name: 'My OpenAI credentials',
type: 'OpenAiProvider',
fields: {fields: {'some-key-from-connection-schema': 'x123sdfu12312'}}
},
resourceLevel: 'project',
projectId: '<string>'
})
};
fetch('https://api-trial.cognigy.ai/new/v2.0/llmconfigurations', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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' => 'create',
'name' => 'My OpenAI credentials',
'type' => 'OpenAiProvider',
'fields' => [
'fields' => [
'some-key-from-connection-schema' => 'x123sdfu12312'
]
]
],
'resourceLevel' => 'project',
'projectId' => '<string>'
]),
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"
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\": \"create\",\n \"name\": \"My OpenAI credentials\",\n \"type\": \"OpenAiProvider\",\n \"fields\": {\n \"fields\": {\n \"some-key-from-connection-schema\": \"x123sdfu12312\"\n }\n }\n },\n \"resourceLevel\": \"project\",\n \"projectId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations")
.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\": \"create\",\n \"name\": \"My OpenAI credentials\",\n \"type\": \"OpenAiProvider\",\n \"fields\": {\n \"fields\": {\n \"some-key-from-connection-schema\": \"x123sdfu12312\"\n }\n }\n },\n \"resourceLevel\": \"project\",\n \"projectId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/new/v2.0/llmconfigurations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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\": \"create\",\n \"name\": \"My OpenAI credentials\",\n \"type\": \"OpenAiProvider\",\n \"fields\": {\n \"fields\": {\n \"some-key-from-connection-schema\": \"x123sdfu12312\"\n }\n }\n },\n \"resourceLevel\": \"project\",\n \"projectId\": \"<string>\"\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": {}
}