Endpoint
A complete configuration for calling an external API that represents the AI services or APIs you want to test.
Overview
Endpoints represent the AI services or APIs that you want to test. They define how Rhesis connects to your application, sends test inputs, and receives responses for evaluation.
Why Endpoints?
Endpoints enable you to test AI applications without hardcoding API details into every test. By configuring an endpoint once, you can reuse it across hundreds of tests without duplication. This gives you the flexibility to switch between different models, environments, or providers without modifying your test cases. You can run identical tests against multiple endpoints to compare performance across different configurations. Endpoint versioning lets you track how configuration changes impact test results over time, while centralized credential management keeps your API keys and authentication tokens secure in one place.
How Endpoints Work
When you run tests, Rhesis:
- Takes your test prompt or input
- Formats it according to your endpoint's request template
- Sends the request to your API
- Receives the response
- Evaluates the response against your metrics
Configuration Components
Basic Settings:
- URL: The API endpoint to send requests to
- Protocol: REST or WebSocket
- Method: HTTP method (typically POST)
- Headers: Authentication tokens, content types, etc.
Request Body Template: Templates use Jinja2 syntax for dynamic values. Use the filter for proper JSON formatting:
Response Mapping: Extract specific fields from the API response:
Or with JSONPath functions:
Platform-Managed Fields: Rhesis actively uses certain mapped fields:
- : The main response text from your API (required)
- : Additional context or reasoning from the response
- Conversation tracking fields for multi-turn conversations
Conversation Tracking
Rhesis automatically tracks conversation state across multiple turns when you include a conversation identifier in your response mappings. Simply map one of the supported fields in your response mapping configuration, and Rhesis will automatically extract and maintain that identifier across all turns of a multi-turn test.
Tier 1 - Most Common (covers ~90% of APIs):
Tier 2 - Common Variants (covers ~8% of APIs):
Rhesis detects these fields automatically through convention-based detection. When your endpoint returns any of these fields in its response and you've mapped them in your response mapping configuration, Rhesis will automatically use that field to track conversation continuity across test turns. On the first turn, Rhesis sends the request without a conversation identifier and extracts it from your API's response. On subsequent turns, Rhesis includes the conversation identifier in the request template, allowing your API to maintain conversation context.
Creating an Endpoint
From Scratch: Create an endpoint from scratch with full control over all settings. Configure the endpoint name, description, project assignment, and environment.
Import from Swagger: Click Import Swagger, enter your Swagger/OpenAPI specification URL, and click Import. This automatically populates request templates and response structures.
Testing Your Endpoint
Before running full test suites, navigate to the Test Connection tab, enter sample input data, and click Test Endpoint to verify your configuration.
Environment Management
Organize endpoints by environment:
- Development: Local or development servers for quick iteration
- Staging: Pre-production systems for validation
- Production: Live production APIs for regression testing
Best Practices
- Test connectivity: Verify endpoint configuration before running test sets
- Use environment tags: Identify which endpoints are production-critical
- Create multiple endpoints: Compare models or environments
- Secure credentials: Store API tokens securely