AI Connections
AI Provider Connections
Description
An AI Connection (shown in the UI as an AI Provider Connection) is a Connection record that includes an aiProvider and the authentication details required to call that provider through Contextual’s AI Gateway. AI Connections are used by:
Creating an AI Connection
In your tenant workspace, go to Components → Connections
Click Create Connection
Choose AI Provider Connection
Provide a Connection ID, Connection Name, choose an AI Provider, and complete the provider-specific configuration
Save
Required Information
All AI Connections require:
Connection ID (
apiId) - Lower case letters, numbers, and dashes (^[a-z0-9-]+$)Connection Name (
name)AI Provider (
aiProvider)
Provider-specific requirements:
OpenAI
API Key (
bearerToken)Endpoint (default:
https://api.openai.com/v1)Underlying Connection type:
bearer
Anthropic
API Key (stored in headers as
x-api-key)Endpoint (default:
https://api.anthropic.com/v1)Underlying Connection type:
public
Azure OpenAI
Resource Name (
aiProviderData.resourceName)API Key (stored in headers as
api-key)Endpoint is generated from the Resource Name (default:
https://{resourceName}.openai.azure.com/openai) and can be overriddenUnderlying Connection type:
public
Google AI (Gemini)
API Key (stored in headers as
x-goog-api-key)Endpoint (default:
https://generativelanguage.googleapis.com/v1beta)Underlying Connection type:
public
Vertex AI
Project ID (
aiProviderData.projectId)Location (
aiProviderData.location, for exampleus-central1orglobal)Service Account Key (JSON) (
key)Endpoint is generated from Project ID + Location and can be overridden
Underlying Connection type:
google-service-account(uses scopehttps://www.googleapis.com/auth/cloud-platform)
Vertex AI Anthropic
Same requirements as Vertex AI, but routes to Anthropic models through Vertex AI’s Anthropic publisher endpoint. Anthropic models need to be explicitly enabled for each Vertex AI account, so make sure you are opted in to the particular Anthropic model you want to access through Vertex.
Headers Note
Additional headers you add to a Connection are included in requests made by HTTP Nodes, but are not used in requests made through AI Routes / the AI Gateway.
Usage
AI Routes only allow selecting Connections that have an
aiProviderconfigured (AI Connections).Use the Connection’s Endpoint as the base URL when making manual provider calls from HTTP nodes (if needed).
AI Connections are standard Contextual Connections, so they can be used anywhere a Connection is accepted (for example, selecting the AI Connection in an HTTP Request/HTTP node to call the provider API directly without using an AI Route or the AI Generate node).
Last updated
Was this helpful?