Endpoint Catalog
Base URL
All API requests are relative to the deployment environment. For the Supervised AI platform testing environment, the base URL is:
https://api.supervised.ai/v1/testing
Authentication
The Testing API requires a valid Bearer Token for all requests. Authentication ensures that test results are mapped to the correct workspace and user profile.
Authorization: Bearer <YOUR_ACCESS_TOKEN>
Endpoint Catalog
System Status
GET /status
Retrieves the current operational status of the testing infrastructure. Use this endpoint to verify connectivity before initiating heavy batch tests.
Response
- Status Code:
200 OK - Type:
application/json
{
"status": "ready",
"version": "1.2.0",
"environment": "production-testing",
"uptime": "259200s"
}
Model Validation
POST /validate-inference
Validates a specific model's output against a set of predefined schemas or constraints. This is a critical step in the Supervised AI CI/CD pipeline.
Request Body
| Field | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| model_id | string | Yes | The UUID of the model to be tested. |
| input_payload | object | Yes | The raw input data to pass to the model. |
| expected_schema | object | No | A JSON schema to validate the model's response structure. |
Example Request
curl -X POST https://api.supervised.ai/v1/testing/validate-inference \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_id": "mod_88291",
"input_payload": { "text": "Analyze sentiment of this text." },
"expected_schema": { "type": "object", "required": ["sentiment", "confidence"] }
}'
Response
{
"valid": true,
"latency_ms": 142,
"output": {
"sentiment": "positive",
"confidence": 0.98
}
}
Batch Testing
POST /suite/run
Triggers a full execution of a predefined test suite. This endpoint is asynchronous and returns a job ID to track progress.
Parameters
- Query Param:
async(boolean, default:true) — If false, the request will hang until the suite completes.
Request Body
| Field | Type | Description |
| :--- | :--- | :--- |
| suite_id | string | The ID of the test suite configured in the Supervised AI Dashboard. |
| variables | object | Key-value pairs to override suite-level environment variables. |
Example Usage
curl -X POST https://api.supervised.ai/v1/testing/suite/run \
-H "Authorization: Bearer $API_KEY" \
-d '{
"suite_id": "suite_regression_v4",
"variables": { "threshold": 0.85 }
}'
Response
{
"job_id": "job_abc123",
"status": "queued",
"estimated_completion": "2023-11-01T14:30:00Z"
}
Results & Metrics
GET /results/{job_id}
Retrieves the detailed logs and pass/fail metrics for a specific test job.
Path Parameters
job_id(string): The unique identifier returned by the/suite/runendpoint.
Response
- 200 OK: Job completed.
- 202 Accepted: Job still in progress.
Output Schema
{
"job_id": "job_abc123",
"summary": {
"total_tests": 50,
"passed": 48,
"failed": 2
},
"failures": [
{
"test_name": "Check Hallucination Rate",
"reason": "Metric 0.12 exceeded threshold 0.10",
"timestamp": "2023-11-01T14:28:10Z"
}
]
}
Configuration (Internal Only)
POST /config/refresh
Internal Use Only. This endpoint forces a cache invalidation of the testing configurations. While public, it is restricted to administrative tokens and is used by the Supervised AI platform to sync changes between the UI and the Testing API.
Note: Regular users should not call this endpoint; configuration updates are handled automatically via webhook.