# Using connector templates

> Create custom Integration Service connectors for AI Trust Layer LLM configurations using templates for AWS Bedrock, Azure OpenAI, and other providers.

:::note
This capability is currently generally available for enterprise customers upon request.
:::

Connector templates are predefined Integration Service connector configurations for common LLM providers. When you create a custom connector through AI Trust Layer, selecting a template pre-populates the connector with the required API resources, authentication setup, and JavaScript hooks for that provider, reducing manual configuration.

## Create a custom connector from a template

1. Navigate to **Admin** > **AI Trust Layer** > **LLM configurations** and select **Add configuration**.
2. Select the **Tenant**, **Product**, and **Feature** values for the configuration.
3. Under **Model Configuration**, configure the **LLM Name** and **API Type** fields.
4. In the **Connector** field, select **Create custom connector**.
5. In the **Create custom connector** dialog, select one of the available templates.
6. Select **Create connector**. You are redirected to Connector Builder, where you can edit the configuration, save it, and [publish the connector](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/connector-builder-publishing).

### Result

The custom connector is created and pre-configured based on the selected template. You can edit the connector's JavaScript hooks to further customize the LLM request and response behavior.

## Available templates

The templates available in the **Create custom connector** dialog depend on the **API Type** you selected in the model configuration.

### AWS Bedrock

**Available for API type:** AWS Bedrock

**When to use:** Use this template when connecting to your own Amazon Bedrock LLM instance and you need to control or modify LLM request and response attributes.

**Authentication:** This template follows the standard [AWS Bedrock authentication](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/uipath-aws-bedrock-authentication), based on API key.

### Azure OpenAI

**Available for API type:** OpenAI

**When to use:** Use this template when connecting to your own Azure OpenAI LLM instance and you need to control or modify LLM request and response attributes.

**Authentication:** This template follows the standard [Azure OpenAI authentication](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/uipath-microsoft-azureopenai-authentication).

### Google Vertex AI

**When to use:** Use this template when connecting to your own Google Vertex AI LLM instance and you need to control or modify LLM request and response attributes.

**Authentication:** This template follows the standard [Google Vertex AI authentication](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/uipath-google-vertex-authentication), based on API key.

### OpenAI V1 Compatible

**Available for API type:** OpenAI

**When to use:** Use this template when connecting to your own OpenAI or OpenAI V1 Compatible instance — for example, Fireworks — and you need to control or modify LLM request and response attributes.

**Authentication:** This template follows the standard [OpenAI V1 Compatible authentication](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/uipath-openai-openaiv1compliant-authentication), based on API key.

### Custom AI Gateway

**Available for API type:** All

**When to use:** Use this template when your LLMs are behind an AI Gateway.

**Authentication:** For configuration details, refer to the [Connector Builder authentication documentation](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/authentication-configuration).

The template includes two API resources required for the **Custom** authentication type:

- `/onProvision` — Called when the Integration Service connection is created. Fetches a temporary token from your Identity Provider and saves it on the connection together with an expiration time.
- `/onRefresh` — Used to refresh the token. The target URL, pre-request hook, and post-request hook must match those configured for `/onProvision`.

If you choose an authentication type other than **Custom**, remove the `/onRefresh` and `/onProvision` API resources from the connector.

## Edit the JavaScript hooks

After creating a connector from a template, you can customize its behavior by editing the pre-request and post-request JavaScript scripts. For an overview of Connector Builder, refer to the [Connector Builder documentation](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/connector-builder-about).

:::note
Because this capability is generally available upon request, editing the scripts requires assistance from UiPath Support. Contact UiPath Support to enable and configure the JavaScript hooks for your connector.
:::

Before editing the scripts, review the available code snippets and the documentation for each reserved keyword.
