Endpoint Reference
Base URL
All API requests should be directed to the following base URL:
https://api.supervised.ai/v1/testing
Authentication
The Testing API uses API Keys to authenticate requests. You can view and manage your API keys in the Supervised AI Dashboard.
Requests must include the X-API-KEY header.
| Header | Value | Description |
| :--- | :--- | :--- |
| X-API-KEY | your_api_key_here | Your unique platform access token. |
| Content-Type | application/json | Required for all POST/PUT requests. |
Test Management
These endpoints allow you to trigger, monitor, and retrieve results for automated testing suites.
Run Test Suite
Triggers a specific testing suite against a target model or dataset.
Method: POST
Endpoint: /suites/run
Request Body:
| Parameter | Type | Description |
| :--- | :--- | :--- |
| suite_id | string | The unique identifier of the test suite. |
| model_id | string | The ID of the model to be tested. |
| environment | string | The target environment (e.g., staging, production). |
Example Request:
{
"suite_id": "suite_99b12",
"model_id": "model_v2_res_net",
"environment": "staging"
}
Example Response (202 Accepted):
{
"job_id": "job_550e8400",
"status": "queued",
"estimated_completion": "2023-10-27T10:05:00Z"
}
Get Test Results
Retrieves the status and metrics of a specific test execution.
Method: GET
Endpoint: /results/{job_id}
Parameters:
job_id(Path): The unique ID returned when the test was triggered.
Example Response (200 OK):
{
"job_id": "job_550e8400",
"status": "completed",
"metrics": {
"accuracy": 0.945,
"f1_score": 0.92,
"latency_ms": 120
},
"passed": true
}
Dataset Management
Endpoints for managing the datasets used during the testing and validation phase.
List Test Datasets
Returns a list of all datasets currently available for testing.
Method: GET
Endpoint: /datasets
Example Response (200 OK):
[
{
"dataset_id": "ds_01",
"name": "Gold_Standard_Validation",
"record_count": 5000,
"type": "image_classification"
}
]
Upload Test Data
Uploads a new JSON-formatted dataset for ad-hoc validation.
Method: POST
Endpoint: /datasets/upload
Request Body:
| Parameter | Type | Description |
| :--- | :--- | :--- |
| name | string | Friendly name for the dataset. |
| data | array | List of objects containing features and ground truth. |
Example Request:
{
"name": "Edge_Case_Batch_05",
"data": [
{ "input": "...", "expected_output": "cat" },
{ "input": "...", "expected_output": "dog" }
]
}
Health and Status
System Health Check
Check the availability of the Testing API service.
Method: GET
Endpoint: /health
Example Response (200 OK):
{
"status": "healthy",
"version": "1.0.4",
"uptime": "14d 6h 22m"
}
Error Codes
The API uses standard HTTP response codes to indicate the success or failure of an API request.
| Code | Meaning | Description |
| :--- | :--- | :--- |
| 200 | OK | The request was successful. |
| 202 | Accepted | The request has been accepted for processing (async). |
| 400 | Bad Request | The request was unacceptable, often due to missing parameters. |
| 401 | Unauthorized | No valid API Key provided. |
| 404 | Not Found | The requested resource (Job ID or Suite ID) doesn't exist. |
| 500 | Server Error | Something went wrong on the Supervised AI side. |