What is an Endpoint Connection?
An Endpoint Connection in Galtea represents a reusable configuration for connecting to external API endpoints. Endpoint Connections are associated with a product and allow you to define how Galtea should communicate with your AI system during evaluations.Endpoint Connections are only available through the Galtea Dashboard. They are not currently accessible via the SDK.
Use Cases
Endpoint Connections are useful when you want to:- Automate evaluations - Configure how Galtea calls your AI endpoint for automated testing
- Standardize API calls - Define reusable endpoint configurations with consistent authentication and request formatting
- Manage multiple environments - Create separate connections for development, staging, and production endpoints
Creating an Endpoint Connection
To create an Endpoint Connection:- Navigate to your product in the Galtea Dashboard
- Go to the “Endpoint Connections” section
- Click “New Endpoint Connection”
- Configure the connection properties as described below
Endpoint Connection Properties
A unique name for the endpoint connection within the product. Example: “Production Chat API” or “Staging Summarizer”
A type that defines the purpose of the endpoint connection. Supported values:
INITIALIZATION- Connection used for initializing a sessionCONVERSATION- Connection used for conversational interactionsFINALIZATION- Connection used for finalizing a session
The full URL of the endpoint to connect to. Must be a valid HTTP or HTTPS URL. Example: “https://api.company.com/v1/chat”
The HTTP method to use when calling the endpoint. Supported values:
GETPOSTPUTPATCHDELETE
The authentication method to use. Supported values:
NONE- No authenticationBEARER- Bearer token authenticationAPI_KEY- API key authenticationBASIC- Basic HTTP authentication
The authentication token or credentials, depending on the selected auth type. This value is securely stored.
Optional custom headers to include with each request. Example:
A Jinja2 template string defining how to format the request body. This template is rendered before sending the request to your endpoint.Available placeholders:Example (Previous queries array):Example (Custom format):
{{ input }}- The test case input (required){{ context }}- The test case context{{ session_id }}- The external session ID (if available){{ test_case_id }}- The test case ID{{ test_id }}- The test ID{{ galtea_session_id }}- The Galtea session ID- Any field stored in session metadata (for example
{{ sessionId }},{{ tenant }},{{ conversation_token }}) {% for turn in past_turns %}...{% endfor %}- Loop through conversation history{{ turn.input }}- Previous user input{{ turn.output }}- Previous assistant response
When a loop is the last item in a JSON array, use
{% if not loop.last %},{% endif %} after each iteration to prevent a trailing comma. When there’s content after the loop (like in the OpenAI example above), trailing commas are valid and this pattern is not required.A JSON object defining how to extract values from the API response using JSONPath expressions.Required keys:
Example:
output- JSONPath expression to extract the main response (required)
retrieval_context- JSONPath expression to extract retrieval context- Any additional keys for extra properties to store in session metadata
| Expression | Description |
|---|---|
$ | Root object |
. | Child operator |
[] | Array index or child operator |
[*] | Wildcard (all elements) |
[0] | First array element |
[-1] | Last array element |
Request timeout in seconds. Must be between 1 and 300 seconds. Default: 30 seconds.
Optional rate limit for requests per minute. Use this to avoid exceeding your API’s rate limits.
Retry Configuration
Configure automatic retry behavior for failed requests. When enabled, Galtea will automatically retry requests that fail with specific HTTP status codes.Whether automatic retry is enabled. Default:
falseMaximum number of retry attempts. Default:
3Initial delay in milliseconds before the first retry. Default:
1000 (1 second)Strategy for increasing delay between retry attempts:
exponential- Delay doubles with each attempt (recommended)linear- Delay increases linearlyfixed- Constant delay between attempts
exponentialMaximum delay cap in milliseconds. Default:
30000 (30 seconds)HTTP status codes that should trigger a retry. Default:
[429, 500, 502, 503, 504]Best Practices
Use descriptive names
Use descriptive names
Choose names that clearly identify the endpoint’s purpose and environment, such as “Production Chat API” or “Staging Document Analyzer”.
Configure appropriate timeouts
Configure appropriate timeouts
Set timeouts based on your endpoint’s expected response time. For complex AI operations, you may need longer timeouts (60-120 seconds).
Use retry configuration
Use retry configuration
Configure retries for endpoints that may experience transient failures. Start with 2-3 retries with exponential backoff.
Secure your credentials
Secure your credentials
Never share your auth tokens. Galtea securely stores and encrypts all authentication credentials.