> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM Integration API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/automation/api-list)</Badge>

Use the LLM Integration API to enable, update, and delete LLM Integrations for an app. You can configure System LLMs (Azure OpenAI, OpenAI, Anthropic, Amazon Bedrock, and Google Gemini), Custom LLMs, and Kore.ai XO GPT integrations through the API.

| Field | Value |
| - | - |
| **Method** | `PUT` – Enables a new LLM Integration or updates an existing configuration.<br />`DELETE` – Deletes an existing LLM Integration configuration. |
| **Endpoint** | `https://{{host}}/api/public/stream/{{streamId}}/llmIntegration/` |
| **Content Type** | `application/json` |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction#generating-the-jwt-token). |
| **API Scope** | Bot Builder: LLM Integration (Automation AI) |

**The API supports:**

* System LLM integrations: OpenAI, Azure OpenAI, Anthropic, Gemini, Amazon Bedrock, and Kore.ai XO GPT.
* Custom LLM integrations.
* Token usage limits and usage notifications.
* Partial updates for existing integrations.
* Deletion of configured integrations.

### Path Parameters

| Parameter | Required | Description |
| - | - | - |
| `botId/streamId` | Required | App ID or Bot ID. Access it via **App Settings** → **App Profile**. |

### Body Parameters

For `PUT`, use the following parameters to configure or update an LLM Integration.

| Parameter | Required | Type | Description |
| - | - | - | - |
| `integrationId` | Required | String | Identifier of the LLM Integration. Supported values are `korexo`, `openai`, `azure`, `anthropic`, `gemini`, `amazon_bedrock`, and `custom_llm`. |
| `integrationName` | Conditional | String | Name of the LLM Integration. |
| `apiKey` | Conditional | String | API key for the LLM provider. |
| `previousName` | Conditional | String | To edit the existing multi-instance integration name. |

For `DELETE`, use the following parameters to delete an LLM Integration configuration.

| Parameter | Required | Type | Description |
| - | - | - | - |
| `integrationId` | Required | String | Identifier of the LLM Integration to delete. Supported values are `korexo`, `openai`, `azure`, `anthropic`, `gemini`, `amazon_bedrock`, and `custom_llm`. |
| `integrationName` | Conditional | String | Required only for OpenAI, Azure, Bedrock, and Custom LLM. |

### Sample Request for PUT

* In `dynamicConfig`, `name`, and `description` shouldn't be passed for system models.
* To edit the name of an existing multi-instance integration (OpenAI, Azure OpenAI, Bedrock, Custom LLMs), pass the previous name as `previousName`, and the latest name as `integrationName`.

```bash theme={null}
curl --location --request PUT 'https://{{host}}/api/public/stream/{{streamId}}/llmIntegration/' \
--header 'auth: {{jwt-token}}' \
--header 'bot-language: {{language-code}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "integrationId": "openai",
  "integrationName": "newOpenAiIntegration",
  "apiKey": "<apiKey>",
  "previousName": "originalPreviousName",
  "dynamicModelConfig": [
    {
      "type": "custom",
      "name": "<modelName>",
      "modelId": "<modelId>",
      "desc": "<description>",
      "deployementId": "<deployementId>"
    }
  ],
  "tokenUsageConfig": {
    "isUsageLimitsConfigured": true,
    "usageNotifications": {
      "isUsageNotificationsEnabled": true,
      "percentageToNotify": 50,
      "mailIds": [
        "<mailIds>"
      ]
    },
    "tokenUsageMetrics": {
      "startDate": "2026-09-30T18:30:00.000Z",
      "maxTokens": 10000,
      "duration": 20,
      "cycleStartDate": "2026-09-30T18:30:00.000Z",
      "cycleEndDate": "2026-10-20T18:30:00.000Z"
    }
  }
}'
```

### Sample Request for DELETE

* Only `integrationId` is required for `korexo`, `gemini`, and `anthropic` integrations.

```bash theme={null}
curl --location --request DELETE 'https://{{host}}/api/public/stream/{{streamId}}/llmIntegration/' \
--header 'auth: {{jwt-token}}' \
--header 'bot-language: {{language-code}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "integrationId": "openai",
  "integrationName": "newOpenAiIntegration"
}'
```

### Enabling Token Usage

* Use the following sample token usage payload to enable token usage.

```json expandable=true theme={null}
"tokenUsageConfig": {
  "isUsageLimitsConfigured": true,
  "usageNotifications": {
    "isUsageNotificationsEnabled": true,
    "percentageToNotify": 50,
    "mailIds": [
      "<mailId>"
    ]
  },
  "tokenUsageMetrics": {
    "startDate": "2026-09-30T18:30:00.000Z",
    "maxTokens": 10000,
    "duration": 20,
    "cycleStartDate": "2026-09-30T18:30:00.000Z",
    "cycleEndDate": "2026-10-20T18:30:00.000Z"
  }
}
```

* If you don't want to enable token usage, use the following payload.

```json theme={null}
"tokenUsageConfig": {
  "isUsageLimitsConfigured": false
}
```

### Request Body Examples

**OpenAI**

* Use `openai` as the `integrationId`.
* In OpenAI, `dynamicModelConfig` is only for custom models.
* To enable custom models in OpenAI, the following fields are mandatory for first-time creation: `type`, `name`, `modelId`, `desc`.
* To edit the existing integration name, you need to pass `previousName`.

```json theme={null}
{
  "integrationId": "openai",
  "integrationName": "newOpenAiIntegration-edited",
  "previousName": "newOpenAiIntegration",
  "apiKey": "<apiKey>",
  "dynamicModelConfig": [
    {
      "type": "custom",
      "name": "<modelName>",
      "modelId": "<modelId>",
      "desc": "<description>"
    }
  ],
  "tokenUsageConfig": {
    "isUsageLimitsConfigured": false
  }
}
```

**Azure OpenAI**

* Use `azure` as the `integrationId`.
* To enable system and custom models in Azure OpenAI, use `dynamicModelConfig`.
* `dynamicModelConfig` is mandatory when enabling Azure OpenAI for the first time.
* You can save the config only when at least one of the models is enabled (`toggle: true`).
* In the payload, the `tenant` is a subdomain.
* To enable custom models in Azure OpenAI, the following fields are mandatory for first-time creation: `type`, `name`, `modelId`, `desc`, `toggle`, `deploymentId`.
* To enable system models in Azure OpenAI, the following fields are mandatory for first-time creation: `type`, `modelId`, `toggle`, `deploymentId`.
* The following are the supported system model IDs for Azure OpenAI integration:
  * GPT-3.5 Turbo
  * GPT-4
  * GPT-4-32K
  * GPT-4 Turbo
  * GPT-4o
  * GPT-4o-mini
  * GPT-5.4
  * GPT-5-mini
  * GPT-5.1
  * GPT-5.2
  * GPT-5.4 Mini
  * GPT-5.4 Nano

```json expandable=true theme={null}
{
  "integrationId": "azure",
  "integrationName": "newAzureOpenAiIntegration",
  "apiKey": "<apiKey>",
  "tenant": "<tenant>",
  "dynamicModelConfig": [
    {
      "type": "system",
      "modelId": "<modelId>",
      "toggle": true,
      "deploymentId": "<deploymentId>"
    },
    {
      "type": "custom",
      "name": "<modelName>",
      "modelId": "<modelId>",
      "desc": "<description>",
      "toggle": true,
      "deploymentId": "<deploymentId>"
    }
  ],
  "tokenUsageConfig": {
    "isUsageLimitsConfigured": false
  }
}
```

**Anthropic**

* Use `anthropic` as the `integrationId`.
* No need to pass `integrationName` for Anthropic integration.
* To enable system and custom models in Anthropic, use `dynamicModelConfig`.
* `dynamicModelConfig` is mandatory when enabling Anthropic for the first time.
* To enable custom models in Anthropic, the following fields are mandatory for first-time creation: `type`, `name`, `modelId`, `desc`, `toggle`.
* To enable system models in Anthropic, the following fields are mandatory for first-time creation: `type`, `modelId`, `toggle`.
* The following are the supported system model IDs for Anthropic integration:
  * Claude Haiku 4.5
  * Claude Opus 4.6
  * Claude Sonnet 4.5
  * Claude Sonnet 4.6

```json expandable=true theme={null}
{
  "integrationId": "anthropic",
  "apiKey": "<apiKey>",
  "dynamicModelConfig": [
    {
      "type": "system",
      "modelId": "<modelId>",
      "toggle": true
    },
    {
      "type": "custom",
      "name": "<modelName>",
      "modelId": "<modelId>",
      "desc": "<description>",
      "toggle": true
    }
  ],
  "tokenUsageConfig": {
    "isUsageLimitsConfigured": false
  }
}
```

**Google Gemini**

* Use `gemini` as the `integrationId`.
* No need to pass `integrationName` for Gemini integration.
* To enable system and custom models in Gemini, use `dynamicModelConfig`.
* `dynamicModelConfig` is mandatory when enabling Gemini for the first time.
* To enable custom models in Gemini, the following fields are mandatory for first-time creation: `type`, `name`, `modelId`, `desc`, `toggle`.
* To enable system models in Gemini, the following fields are mandatory for first-time creation: `type`, `modelId`, `toggle`.
* The following are the supported system model IDs for Gemini integration:
  * Gemini 2.5 Flash
  * Gemini 2.5 Flash-Lite
  * Gemini 2.5 Pro
  * Gemini 3 Flash Preview
  * Gemini 3.1 Pro Preview

```json expandable=true theme={null}
{
  "integrationId": "gemini",
  "apiKey": "<apiKey>",
  "dynamicModelConfig": [
    {
      "type": "system",
      "modelId": "<modelId>",
      "toggle": true
    },
    {
      "type": "custom",
      "name": "<modelName>",
      "modelId": "<modelId>",
      "desc": "<description>",
      "toggle": true
    }
  ],
  "tokenUsageConfig": {
    "isUsageLimitsConfigured": false
  }
}
```

**Amazon Bedrock**

* Use `amazon_bedrock` as the `integrationId`.
* For Amazon Bedrock, provide the model configuration in the request payload to validate the model.
* Use `isTestCall` to validate the Bedrock model configuration.

```json expandable=true theme={null}
{
  "integrationId": "amazon_bedrock",
  "integrationName": "newBedRockIntegration",
  "IAMRoleARN": "<IAMRoleARN>",
  "AmazonSTSAPI": "<AmazonSTSAPI>",
  "AmazonResourceName": "<AmazonResourceName>",
  "endPoint": "<endPoint>",
  "payload": {
    "type": "raw",
    "value": {
      "modelId": "<modelId>",
      "contentType": "application/json",
      "accept": "application/json",
      "body": {
        "anthropic_version": "<anthropic_version>",
        "max_tokens": 1000,
        "messages": [
          {
            "role": "user",
            "content": [
              {
                "type": "text",
                "text": "what is the capital of Australia?"
              }
            ]
          }
        ]
      }
    }
  },
  "models": [
    "ABR"
  ],
  "method": "POST",
  "headers": [],
  "idp": "none",
  "tokenUsageConfig": {
    "isUsageLimitsConfigured": false
  }
}
```

**Custom LLM**

* Use `custom_llm` as the `integrationId`.
* For Custom LLMs, provide the model configuration in the request payload to validate the model.

```json expandable=true theme={null}
{
  "integrationId": "custom_llm",
  "integrationName": "newcustomLLM",
  "name": "Azure GPT",
  "endPoint": "<endPoint>",
  "payload": {
    "type": "raw",
    "value": {
      "messages": [
        {
          "role": "system",
          "content": ""
        },
        {
          "role": "user",
          "content": "What is capital of india?"
        }
      ],
      "model": "gpt-4",
      "temperature": 0.7,
      "top_p": 1,
      "frequency_penalty": 0,
      "presence_penalty": 0
    }
  },
  "models": [
    "gpt-4"
  ],
  "method": "POST",
  "headers": [
    {
      "key": "api-key",
      "value": "<apiKeyValue>"
    },
    {
      "key": "content-type",
      "value": "application/json"
    }
  ],
  "idp": "none",
  "tokenUsageConfig": {
    "isUsageLimitsConfigured": false
  }
}
```

**Sample response to isTestCall for Bedrock and custom LLMs**

```json theme={null}
{
  "msg": "Test call to newcustomLLM is successfully made."
}
```

**Kore.ai XO GPT**

* Use `korexo` as the `integrationId`.
* Use the following flags to enable the respective models:
  * `textrephrase` – Text Rephrasing
  * `conversationsummary` – Summarizing Conversation
  * `aa_conversationsummary` – Summarizing AgentAI Conversation
  * `vectorGeneration` – Embeddings
  * `dialogGPT` – DialogGPT
  * `answerGeneration` – Answer Generation

```json theme={null}
{
  "integrationId": "korexo",
  "textrephrase": true,
  "conversationsummary": true,
  "aa_conversationsummary": true,
  "vectorGeneration": true,
  "dialogGPT": true,
  "answerGeneration": true
}
```

### Sample Response for PUT

```json expandable=true theme={null}
{
  "status": "saved",
  "integrationId": "anthropic",
  "integrationName": "anthropic",
  "integration": {
    "dynamicModelConfig": [
      {
        "name": "Claude Opus 4.6",
        "modelId": "claude-opus-4-6",
        "desc": "Anthropic's most capable model with a 1M token context window; best for deep reasoning, complex multi-step tasks, long-horizon agentic work, and advanced coding.",
        "type": "system",
        "toggle": true,
        "verifyStatus": {
          "value": true,
          "message": "Claude Opus 4.6 is supported"
        }
      },
      {
        "name": "Claude Sonnet 4.6",
        "modelId": "claude-sonnet-4-6",
        "desc": "Near-Opus-level performance at a fraction of the cost; upgraded skills in coding, computer use, long-context reasoning, and agent planning - the recommended default for most use cases.",
        "type": "system",
        "toggle": false,
        "verifyStatus": {
          "value": false,
          "message": ""
        }
      },
      {
        "name": "Claude Sonnet 4.5",
        "modelId": "claude-sonnet-4-5-20250929",
        "desc": "Balanced intelligence and efficiency for everyday professional tasks - writing, analysis, coding, and agent workflows.",
        "type": "system",
        "toggle": false,
        "verifyStatus": {
          "value": false,
          "message": ""
        }
      },
      {
        "name": "Claude Haiku 4.5",
        "modelId": "claude-haiku-4-5-20251001",
        "desc": "Fastest and most cost-efficient model; ideal for high-volume, real-time applications like customer service, content moderation, and automation.",
        "type": "system",
        "toggle": false,
        "verifyStatus": {
          "value": false,
          "message": ""
        }
      }
    ],
    "tokenUsageConfig": {
      "isUsageLimitsConfigured": true,
      "usageNotifications": {
        "isUsageNotificationsEnabled": true,
        "mailIds": [
          "<mailId>"
        ],
        "percentageTags": [
          {
            "value": 50,
            "label": "50%",
            "isSelected": true,
            "isDefault": true
          },
          {
            "value": 75,
            "label": "75%",
            "isSelected": false,
            "isDefault": true
          },
          {
            "value": 80,
            "label": "80%",
            "isSelected": false,
            "isDefault": true
          },
          {
            "value": 90,
            "label": "90%",
            "isSelected": false,
            "isDefault": true
          }
        ]
      },
      "tokenUsageMetrics": {
        "maxTokens": 10000,
        "duration": 20,
        "cycleStartDate": "2026-09-30T18:30:00.000Z",
        "cycleEndDate": "2026-10-20T18:30:00.000Z",
        "startDate": "2026-09-30T18:30:00.000Z",
        "endDate": "2026-10-20T18:30:00.000Z",
        "remainingDays": 26,
        "tokensUsed": 0,
        "remainingTokens": 10000,
        "tokensPercentageUsed": 0,
        "maxLimitReached": false
      },
      "isDisabled": false
    },
    "modelConfig": {
      "Toggle-Claude Opus 4.6": true,
      "Toggle-Claude Sonnet 4.6": false,
      "Toggle-Claude Sonnet 4.5": false,
      "Toggle-Claude Haiku 4.5": false
    },
    "Guidelines": true
  }
}
```

### Sample Response for DELETE

```json theme={null}
{
  "status": "deleted",
  "integration": "openAI_Integration"
}
```
