Overview
The Preclinical API enables programmatic access to:- Start and monitor test runs
- Manage AI agents
- Retrieve detailed test results
- Integrate with CI/CD pipelines
Base URL
Authentication
All API requests require authentication using an API key. Include your key in theAuthorization header:
Create API keys in Settings > API Keys. See the API Keys guide for details.
Example Request
Endpoints
Runs
| Method | Endpoint | Description |
|---|---|---|
POST | /runs | Start a new test run |
GET | /runs | List all test runs |
GET | /runs/{id} | Get run status and summary |
GET | /runs/{id}/results | Get detailed results with scenarios |
POST | /runs/{id}/cancel | Cancel an in-progress run |
Agents
| Method | Endpoint | Description |
|---|---|---|
GET | /agents | List all agents |
POST | /agents | Create a new agent |
GET | /agents/{id} | Get agent details |
PUT | /agents/{id} | Update an agent |
DELETE | /agents/{id} | Delete an agent |
POST | /agents/{id}/validate | Validate agent connectivity |
Test Suites
| Method | Endpoint | Description |
|---|---|---|
GET | /test-suites | List all test suites |
POST | /test-suites | Create a new test suite |
Response Format
All responses are JSON. Successful responses return the requested data directly:Error Responses
Errors return a consistent format:Common Error Codes
| HTTP Status | Description |
|---|---|
| 400 | Bad request - validation failed |
| 401 | Unauthorized - invalid or missing API key |
| 403 | Forbidden - access denied |
| 404 | Not found - resource doesn’t exist |
| 409 | Conflict - resource state conflict |
| 429 | Rate limited - too many requests |
| 500 | Server error |
Pagination
List endpoints support pagination usinglimit and offset query parameters.