Probefish allows you to test HTTP endpoints alongside LLM prompts. This guide covers how to configure and test endpoints.
- Navigate to your project
- Click the Endpoints tab
- Click New Endpoint
- Configure the endpoint settings
| Field | Description |
|---|---|
| Name | Descriptive name for the endpoint |
| URL | The endpoint URL (supports variables: {{baseUrl}}/api/users) |
| Method | HTTP method: GET, POST, PUT, PATCH, DELETE |
Select the authentication method:
| Type | Configuration |
|---|---|
| None | No authentication |
| Bearer Token | Token value (supports variables) |
| API Key | Header name and key value |
| Basic Auth | Username and password |
Add custom headers as key-value pairs:
Content-Type: application/json
X-Custom-Header: {{customValue}}
Headers support variable substitution using {{variableName}} syntax.
For POST, PUT, and PATCH requests, define the body template:
{
"name": "{{userName}}",
"email": "{{userEmail}}",
"role": "user"
}Variables are replaced with values from test cases at runtime.
Extract specific values from JSON responses using JSON path:
| Field | Description |
|---|---|
| Content Path | JSON path to extract (e.g., data.result, items[0].name) |
If not specified, the entire response body is used for validation.
- Open the endpoint
- Click Test in the header
- Fill in any required variables
- Click Send Request
- View the response, status code, and timing
- Go to Test Suites tab
- Click New Test Suite
- Select Endpoint as target type
- Choose your endpoint
- Add test cases with variable values
Each test case defines:
| Field | Description |
|---|---|
| Name | Test case identifier |
| Variables | Key-value pairs for URL, headers, and body substitution |
| Expected Output | (Optional) Expected response content |
For an endpoint POST /api/assistant/query with body template:
{
"query": "{{query}}",
"user_id": "{{userId}}"
}Test case variables:
query: How do I reset my password?
userId: test-user-123
Apply validation rules to endpoint responses:
| Rule | Description | Example |
|---|---|---|
| Contains | Response contains text | "success": true |
| Excludes | Response does not contain text | error |
| Min Length | Minimum response length | 100 |
| Max Length | Maximum response length | 5000 |
| Regex | Match regular expression | "id":\s*"\w+" |
| JSON Schema | Validate against JSON schema | See below |
| Max Response Time | Response time limit (ms) | 2000 |
Validate response structure:
{
"type": "object",
"required": ["id", "name", "email"],
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"email": { "type": "string", "format": "email" }
}
}Enable LLM-based evaluation for semantic validation:
- Define scoring criteria (e.g., "Data completeness", "Response relevance")
- Add judge validation rules (e.g., "Response must contain valid user data")
- Set minimum score threshold
- Open the test suite
- Click Run Tests
- View results for each test case:
- Response content
- Response time
- Validation results
- Judge scores (if enabled)
This example shows how to test a custom AI assistant (e.g., a RAG-based support bot, knowledge base assistant, or AI agent).
Name: Support Assistant
URL: https://api.example.com/assistant/query
Method: POST
Auth: API Key - X-API-Key: {{apiKey}}
Headers:
Content-Type: application/json
Body template:
{
"query": "{{query}}",
"conversation_id": "{{conversationId}}",
"user_id": "{{userId}}"
}Response content path: answer
Target: "Support Assistant" endpoint
Test Case 1: Product Information Query
Variables:
apiKey: your-api-key
query: What are the pricing plans available?
conversationId: test-conv-001
userId: test-user
Expected: Information about pricing tiers
Test Case 2: Technical Support Query
Variables:
apiKey: your-api-key
query: How do I reset my password?
conversationId: test-conv-002
userId: test-user
Expected: Step-by-step password reset instructions
Test Case 3: Out-of-Scope Query
Variables:
apiKey: your-api-key
query: What is the weather in Tokyo?
conversationId: test-conv-003
userId: test-user
Expected: Polite deflection to relevant topics
Test Case 4: Follow-up Query
Variables:
apiKey: your-api-key
query: Can you tell me more about the enterprise plan?
conversationId: test-conv-001
userId: test-user
Expected: Detailed enterprise plan information with context from previous query
Static Rules:
- Excludes:
I don't know(severity: warning) - Excludes:
error(severity: fail) - Min Length:
50(severity: warning) - Max Response Time:
3000(severity: warning)
LLM Judge Configuration:
- Enable LLM Judge
- Provider: OpenAI, Model: gpt-4o-mini
Scoring Criteria:
- Relevance (40%): Does the answer address the user's query?
- Accuracy (30%): Is the information factually correct?
- Helpfulness (30%): Does it provide actionable guidance?
Judge Validation Rules:
- "Response must directly answer the user's question" (severity: fail)
- "Response must not hallucinate product features" (severity: fail)
- "Response should maintain professional tone" (severity: warning)
Execute the test suite and review:
- Assistant responses to each query
- Response latency
- Static validation results
- Judge scores and reasoning
- Context handling in follow-up queries
- Use variables for environment-specific values - Base URLs, API keys, and test data should be variables
- Test error cases - Include test cases for invalid inputs, missing auth, etc.
- Set appropriate timeouts - Use Max Response Time to catch performance regressions
- Use JSON Schema for structure validation - Ensures API contract compliance
- Combine with webhooks - Get notified when endpoint tests fail