Skip to main content
Back to API List Use the Connections API to programmatically manage external model connections for OpenAI, Azure OpenAI, Anthropic, custom API providers, and other integrations. Prerequisites Before using these APIs, ensure your API App has the following scopes enabled:
  • View Connections – Required for viewing connection details
  • Manage Connections – Required for creating and updating connections

Base URL

https://{host}/api/public

Common Request Headers

HeaderRequiredDescription
x-api-keyYesAPI key for authentication
Content-TypeYesapplication/json

API List

APIDescriptionMethodEndpoint
List All ConnectionsRetrieves all configured connectionsGET/connections
Get Connection by IDRetrieves a specific connectionGET/connections/{connectionId}
Create ConnectionCreates a new connectionPOST/connections
Update ConnectionUpdates an existing connectionPATCH/connections/{connectionId}

List All Connections

Retrieves a list of all configured connections with optional filtering.
MethodEndpoint
GEThttps://{{host}}/api/public/connections

Query Parameters

ParameterRequiredTypeDescription
providerNoStringFilter by provider. Accepted values: Open AI, Anthropic, Azure Open AI, API
statusNoStringFilter by status. Accepted values: ACTIVE, INACTIVE
limitNoIntegerMaximum number of results to return

Sample Request

curl --location 'https://{{host}}/api/public/connections?limit=10' \
--header 'x-api-key: {{apiKey}}' \
--header 'Content-Type: application/json'

Sample Response

{
  "connections": [
    {
      "connectionId": "cn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "connectionName": "OpenAI GPT-4o",
      "provider": "Open AI",
      "model": "gpt-4o",
      "status": "ACTIVE",
      "createdOn": "2024-01-15T10:30:00.000Z",
      "modifiedOn": "2024-01-15T10:30:00.000Z"
    }
  ],
  "total": 1
}

Get Connection by ID

Retrieves the details of a specific connection using its unique identifier.
MethodEndpoint
GEThttps://{{host}}/api/public/connections/{connectionId}

Path Parameters

ParameterRequiredTypeDescription
connectionIdYesStringThe unique identifier of the connection

Sample Request

curl --location 'https://{{host}}/api/public/connections/{{connectionId}}' \
--header 'x-api-key: {{apiKey}}' \
--header 'Content-Type: application/json'

Sample Response

{
  "connectionId": "cn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "connectionName": "OpenAI GPT-4o",
  "provider": "Open AI",
  "model": "gpt-4o",
  "status": "ACTIVE",
  "fields": {
    "API_KEY": "sk-***************"
  },
  "createdOn": "2024-01-15T10:30:00.000Z",
  "modifiedOn": "2024-01-15T10:30:00.000Z"
}

Create Connection

Creates a new connection to an external model provider. Supports creation of Custom API, OpenAI, Azure OpenAI, Anthropic, and other external model connections.
MethodEndpoint
POSThttps://{{host}}/api/public/connections
Body Parameters
ParameterRequiredTypeDescription
providerYesStringThe provider type. Accepted values: API, Open AI, Azure Open AI, or Anthropic
connectionNameYesStringDisplay name for the connection
modelConditionalStringModel identifier. Required for Open AI, Azure Open AI, and Anthropic providers
modelTypeConditionalStringSet to EASY_INTEGRATION for Azure Open AI and Anthropic providers
fieldsYesObjectProvider-specific configuration fields

Sample Request – Custom API Connection - Default Provider

curl --location '{{BASE_URL}}/api/public/connections' \
--header 'x-api-key: {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
  "model": "CustomProvider",
  "provider": "API",
  "connectionName": "CustomProvider",
  "promptVars": [
    {
      "name": "prompt",
      "displayName": "Prompt",
      "status": true,
      "dataType": "String",
      "elementType": "textBox",
      "defaultValue": "hlo",
      "required": true
    },
    {
      "name": "system_prompt",
      "displayName": "System prompt",
      "status": false,
      "dataType": "String",
      "elementType": "textBox",
      "defaultValue": "",
      "required": false
    },
    {
      "name": "examples",
      "displayName": "Examples",
      "status": false,
      "dataType": "String",
      "elementType": "textBox",
      "examples": true,
      "defaultValue": "",
      "required": false
    }
  ],
  "customVars": [],
  "endpointUrl": "{{LLM_API_URL}}",
  "headers": [
    {
      "key": "x-api-key",
      "value": "{{LLM_API_KEY}}"
    }
  ],
  "payload": {
    "model": "{{MODEL_NAME}}",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "What is the weather like in San Francisco?"
      }
    ]
  },
  "outputPath": "content[0].text",
  "inputTokensPath": "usage.input_tokens",
  "outputTokensPath": "usage.output_tokens",
  "status": "FINALIZED",
  "isEnable": true
}'
Custom API Fields (provider: "API")
FieldRequiredTypeDescription
fields.BASE_URLYesStringBase URL of the API endpoint
fields.API_KEYYesStringAPI key for authentication
fields.MODEL_NAMEYesStringModel name
LLM_API_URLYesStringURL for the model endpoint
LLM_API_KEYYesStringAPI key of the model

Sample Request – Custom API Connection - Existing Provider

curl --location '{{BASE_URL}}/api/public/connections' \
--header 'x-api-key: {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
  "model": "{{MODEL_NAME}}",
  "provider": "API",
  "connectionName": "Custom_Existingnew",
  "endpointUrl": "{{LLM_API_URL}}",
  "headers": [
    {
      "key": "x-api-key",
      "value": "{{LLM_API_KEY}}"
    }
  ],
  "status": "FINALIZED",
  "isEnable": true,
  "idp": "none",
  "bodyTab": "providerReferences",
  "mapProvider": "anthropicModel",
  "llmFeatures": {
    "toolCalling": false,
    "supportTools": true,
    "parallelToolCalling": true,
    "structuredResponse": true,
    "dataGeneration": false,
    "streaming": true
  },
  "IOMappings": [
    "textToText",
    "textToImage"
  ]
}'
Custom API Fields (provider: "API")
FieldRequiredTypeDescription
fields.BASE_URLYesStringBase URL of the API endpoint
fields.API_KEYYesStringAPI key for authentication
fields.MODEL_NAMEYesStringModel name
LLM_API_URLYesStringURL for the model endpoint
LLM_API_KEYYesStringAPI key of the model
fields.IOMappingYesStringSupported values: textToText, textToImage, imageToText, and audioToText
fields.mapProviderYesStringSupported values: anthropicModel, geminiModel, and openAIModel

Sample Request – OpenAI Connection

curl --location 'https://{{host}}/api/public/connections' \
--header 'x-api-key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--data '{
  "provider": "Open AI",
  "connectionName": "OpenAI GPT-4o",
  "model": "gpt-4o",
  "fields": {
    "API_KEY": "sk-***************"
  }
}'
OpenAI Field (provider: "Open AI")
FieldRequiredTypeDescription
fields.API_KEYYesStringYour OpenAI API key

Sample Request – Azure OpenAI Connection

curl --location 'https://{{host}}/api/public/connections' \
--header 'x-api-key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--data '{
  "connectionName": "Azure GPT-4",
  "provider": "Azure Open AI",
  "model": "GPT-4",
  "fields": {
    "API_KEY": "***************",
    "api_version": "2024-08-01-preview",
    "your_resource_name": "your-azure-resource",
    "deployment_id": "your-deployment-id"
  },
  "modelType": "EASY_INTEGRATION"
}'
Azure OpenAI Fields (provider: "Azure Open AI")
FieldRequiredTypeDescription
fields.API_KEYYesStringYour Azure OpenAI API key
fields.api_versionYesStringAPI version (for example, 2024-08-01-preview)
fields.your_resource_nameYesStringYour Azure resource name
fields.deployment_idYesStringYour deployment ID

Sample Request – Anthropic Connection

curl --location 'https://{{host}}/api/public/connections' \
--header 'x-api-key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--data '{
  "connectionName": "Anthropic Claude",
  "provider": "Anthropic",
  "model": "claude-3-5-haiku-20241022",
  "fields": {
    "API_KEY": "***************"
  },
  "modelType": "EASY_INTEGRATION"
}'
Anthropic Field (provider: "Anthropic")
FieldRequiredTypeDescription
fields.API_KEYYesStringYour Anthropic API key

Sample Response

{
  "connectionId": "cn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "fields": {
    "API_KEY": "sk***************MQAA"
  },
  "connectionName": "OpenAI GPT-4o",
  "provider": "Open AI",
  "model": "gpt-4o",
  "status": "ACTIVE",
  "createdOn": "2024-01-15T10:30:00.000Z"
}

Update Connection

Updates the configuration of an existing connection. Supported only for external provider connections where provider is not API.
MethodEndpoint
PATCHhttps://{{host}}/api/public/connections/{connectionId}
Path Parameters
ParameterRequiredTypeDescription
connectionIdYesStringThe unique identifier of the connection

Sample Request

curl --location --request PATCH 'https://{{host}}/api/public/connections/{{connectionId}}' \
--header 'x-api-key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--data '{
  "fields": {
    "API_KEY": "sk-***************************"
  }
}'
Body Parameters
ParameterRequiredTypeDescription
fieldsYesObjectUpdated configuration field, API_KEY

Sample Response

{
  "connectionId": "cn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "fields": {
    "API_KEY": "sk*****************MQAA"
  },
  "connectionName": "OpenAI GPT-4o",
  "provider": "Open AI",
  "model": "gpt-4o",
  "status": "ACTIVE",
  "modifiedOn": "2024-01-16T14:45:00.000Z"
}

Custom API Connection

Custom API connections let you integrate external models by configuring your own API endpoint. You control the endpoint URL, authentication, request payload, and response mappings. This functionality applies only when the provider type is set to API.

Connection Types

Custom API connections come in two types: Default Provider
  • You define the complete request structure from scratch.
  • Full control over payload format, variable placeholders, and response parsing.
  • Use when integrating with a custom or proprietary API that doesn’t follow standard LLM provider formats.
Existing Provider
  • Uses an existing provider’s request/response format such as OpenAI, Anthropic, Cohere, or Gemini.
  • You only specify the endpoint and which provider format to use.
  • Use when integrating with OpenAI-compatible APIs (like Groq, Together AI) or other providers that follow standard formats.
Endpoint
MethodEndpointUpdate TypeDescription
PATCHhttps://{{host}}/api/public/connections/{connectionId}PartialModifies only specified fields; preserves everything else.
PUThttps://{{host}}/api/public/connections/{connectionId}FullReplaces the entire config. Requires all mandatory fields.

Path Parameters
ParameterRequiredTypeDescription
connectionIdYesStringThe unique identifier of the Custom API connection

Partial Update (PATCH)

Use PATCH for quick changes, such as rotating an API key or updating a model name, without sending the entire configuration object. Only the fields you include in the request will be updated.

Sample Request: Default Provider (Updating Endpoint and Headers)

This example shows how to update connections where you define the complete request structure.
curl --request PATCH 'https://{{host}}/api/public/connections/{connectionId}' \
  --header 'x-api-key: {{apiKey}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "connectionName": "Updated Custom Provider",
    "endpointUrl": "https://api.example.com/v2",
    "headers": [{"key": "x-api-key", "value": "new-key-123"}],
    "outputPath": "result.text"
  }'
Body Parameters
ParameterTypeDescription
connectionNameStringDisplay name for the connection
modelStringModel identifier
endpointUrlStringAPI endpoint URL
headersArrayHTTP headers to include in requests
statusStringConnection status: DRAFT or FINALIZED
API Fields
FieldTypeDescription
promptVarsarrayVariable definitions for prompts
customVarsarrayCustom variable definitions
payloadobjectRequest body template with variable placeholders
outputPathstringJSONPath to extract response text
inputTokensPathstringJSONPath to extract input token count
outputTokensPathstringJSONPath to extract output token count

Sample Request: Existing Provider (Updating Features)

This example shows how to update connections that use standard provider formats (OpenAI, Anthropic, etc.).
curl --request PATCH 'https://{{host}}/api/public/connections/{connectionId}' \
  --header 'x-api-key: {{apiKey}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "connectionName": "Groq LLaMA Updated",
    "model": "llama3-8b-8192",
    "llmFeatures": {
      "toolCalling": true,
      "streaming": true,
      "supportTools": true,
      "parallelToolCalling": false,
      "structuredResponse": false,
      "dataGeneration": false
    }
  }'
Body Parameters
ParameterTypeDescription
connectionNameStringDisplay name for the connection
modelStringModel identifier
endpointUrlStringAPI endpoint URL
headersArrayHTTP headers to include in requests
statusStringConnection status: DRAFT or FINALIZED
API Fields
FieldTypeDescription
mapProviderStringTells the system which template to use: openAIModel or anthropicModel.
llmFeaturesObjectA set of boolean flags (e.g., streaming: true, toolCalling: true).
IOMappingsArrayList of supported modalities (e.g., ["textToText", "imageToText"]).
idpstringIdentity provider setting; usually set to "none".

Full Replace (PUT)

Use PUT when you need to completely reconfigure a connection or when moving a connection status from DRAFT to FINALIZED. You must provide all mandatory fields for the connection type.

Sample Request: Default Provider (Full Payload)

This example shows how to use PUT for a Default Provider connection. You must include the complete configuration, including all prompt variables, payload structure, and output paths.
curl --request PUT 'https://{{host}}/api/public/connections/{connectionId}' \
  --header 'x-api-key: {{apiKey}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "CustomProvider-v2",
    "connectionName": "Fully Updated Custom Provider",
    "endpointUrl": "https://api.newprovider.com/v1/completions",
    "headers": [
      {"key": "Authorization", "value": "Bearer new-secret-key"},
      {"key": "Content-Type", "value": "application/json"}
    ],
    "promptVars": [
      {"name": "prompt", "displayName": "Prompt", "status": true, "dataType": "String", "elementType": "textBox", "defaultValue": "", "required": true},
      {"name": "system_prompt", "displayName": "System Prompt", "status": true, "dataType": "String", "elementType": "textBox", "defaultValue": "You are a helpful assistant", "required": false},
      {"name": "examples", "displayName": "Examples", "status": false, "dataType": "String", "elementType": "textBox", "examples": true, "defaultValue": "", "required": false}
    ],
    "customVars": [],
    "payload": {
      "model": "gpt-4-turbo",
      "max_tokens": 4096,
      "temperature": 0.8,
      "messages": [
        {"role": "system", "content": "{{system_prompt}}"},
        {"role": "user", "content": "{{prompt}}"}
      ]
    },
    "outputPath": "choices[0].message.content",
    "inputTokensPath": "usage.prompt_tokens",
    "outputTokensPath": "usage.completion_tokens",
    "status": "FINALIZED"
  }'
Body Parameters
ParameterTypeDescription
connectionNameStringDisplay name for the connection
modelStringModel identifier
endpointUrlStringAPI endpoint URL
headersArrayHTTP headers to include in requests
statusStringConnection status: DRAFT or FINALIZED
API Fields
FieldTypeDescription
promptVarsarrayVariable definitions for prompts
customVarsarrayCustom variable definitions
payloadobjectRequest body template with variable placeholders
outputPathstringJSONPath to extract response text
inputTokensPathstringJSONPath to extract input token count
outputTokensPathstringJSONPath to extract output token count

Sample Request: Existing Provider (Full Payload)

This example shows how to use PUT for an Existing Provider connection. You must specify the provider format to use and the LLM capabilities.
curl --request PUT 'https://{{host}}/api/public/connections/{connectionId}' \
  --header 'x-api-key: {{apiKey}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "llama3-70b-8192-updated",
    "connectionName": "Groq LLaMA Full Update",
    "endpointUrl": "https://api.groq.com/openai/v1/chat/completions",
    "headers": [
      {"key": "Authorization", "value": "Bearer gsk_newkey12345"},
      {"key": "Content-Type", "value": "application/json"}
    ],
    "mapProvider": "openAIModel",
    "llmFeatures": {
      "toolCalling": true,
      "supportTools": true,
      "parallelToolCalling": true,
      "structuredResponse": true,
      "dataGeneration": false,
      "streaming": true
    },
    "IOMappings": ["textToText", "imageToText"],
    "status": "FINALIZED",
    "idp": "none"
  }'
Body Parameters
ParameterTypeDescription
connectionNameStringDisplay name for the connection
modelStringModel identifier
endpointUrlStringAPI endpoint URL
headersArrayHTTP headers to include in requests
statusStringConnection status: DRAFT or FINALIZED
API Fields
FieldTypeDescription
mapProviderStringTells the system which template to use: openAIModel or anthropicModel.
llmFeaturesObjectA set of boolean flags (for example: streaming: true, toolCalling: true).
IOMappingsArrayList of supported modalities (for example: ["textToText", "imageToText"]).
idpstringIdentity provider setting; usually set to "none".