Manage AI Applications
Add Application
To get started with protecting or validating an AI application with AI Defense, you'll need to use the Add Application command to save a connection to the AI application or model endpoint. You can select:
-
Gateway: An AI Defense Gateway acts as an intermediary to manage, monitor, and protect AI interactions. The gateway acts as a filter and security checkpoint for all AI traffic, ensuring safe and compliant operations.
-
API: An API connection allows your AI application to call the AI Defense Inspection API, enforcement of policies and rules.
|
When creating an application, you will need to select a Connection type, which refers to the enforcement mechanism for your guardrail policies. For more information, see the Connection Guide below. |
To add an application to AI Defense:
-
Click Applications on the left navigation pane. Click Add application button on the right top corner of the page.
-
On the Add Application dialog box, enter the Name for the application, Connection type (API or Gateway) and Description you would like to map.
The Description is optional, you can add details if required.
-
Click Continue and proceed to Add API Connection or Add Gateway Connection, below.
Add API Connection
The steps below must be done in an API-style application. If you don't have an application, create one now.
-
The application is created and now you can add a connection. Click Add Connection on the right top corner of the Applications page.
-
In the Add connection pane, enter connection name, click Add connection.
-
Click Add API Key.
-
In the Add API Key pane, enter the API key name , select expiration date and click Generate API key.
-
Once the key is generated, make a note of the API key, and click Add API Key.
The application is added with a connection and API key. Use the API key to connect to the AI Defense Inspection API as explained in the Inspection API documentation.
Add Gateway Connection
The steps below must be done in a gateway-style application. If you don't have an application, create one now.
-
Add a connection to your application: Click Add Connection on the right top corner of the Applications page.
-
Enter a Connection name.
-
Specify the model endpoint this connection will represent. In the Endpoint dropdown, choose an endpoint name. If no appropriate endpoint is available in the list, see Add Endpoint.
-
Click Add connection.
The application is added with a connection and its API endpoint.
|
To use the gateway, you must allowlist the public egress IP address for the AI Defense gateway service, as shown in IP addresses to allowlist for the AI Defense gateway. |
|
The connection guide provides a cURL command to update the proxy URL, ensuring that all AI interactions are effectively monitored. |
Add Endpoint
An endpoint represents the model endpoint of the LLM you're protecting with an AI Defense gateway. Defining it here allows AI Defense runtime protection to monitor traffic to and from the model.
To add a new endpoint:
-
In the Applications section of AI Defense, add or edit the gateway-style application that represents your AI model.
-
In the application inspection window for your application, in the Gateway connections list, click Add connection.
-
Give your connection a Connection name.
-
Click Add or manage endpoint.
-
In the Add or manage endpoints dialog box, click Add endpoint.
-
In the Add endpoint dialog box:
-
Select Model provider from the dropdown list.
-
Type the Endpoint domain name, such as
https://api.openapi.com
.
-
-
Click Save and click Done.
The endpoint is added, and you can choose it from the Endpoint dropdown in the Add Connection pane. Choose it and click Add connection.
Connection Guide
You can access the Connection Guide by clicking on the three dots in the same row as the Name of the application.
AI Defense provides two primary methods for integrating applications: API Method and Gateway Method. These methods enable developers to seamlessly secure and monitor AI interactions based on organizational requirements.
The connection guide provides step-by-step instructions to implement both methods:
-
API Method: The connection guide provides only the name of the application and connection. The API key is not visible because it is shown only once, when the key is created. Connect to the AI Defense Inspection API as explained in the Inspection API documentation.
-
Gateway Method: The guide outlines network or proxy configurations required to route traffic through the AI Gateway, ensuring seamless and secure application integration. The connection guide provides you with all the details of the connection and endpoint. You can edit the cURL code to add to your proxy server.