API Reference
This section provides complete documentation for all Labs API endpoints.Base URL
Base URL:Authentication
All endpoints require Bearer token authentication:Response Format
All responses are JSON with consistent structure:Success Response
Error Response
Request IDs
Every response includes arequest_id for tracing and support:
- Success responses: top-level
request_idfield in the JSON body - Error responses:
data.request_idfield in the JSON body - All responses:
X-Request-IDresponse header
request_id when reporting issues.
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request — Invalid input |
| 401 | Unauthorized — Invalid or missing API key |
| 403 | Forbidden — No access to resource |
| 404 | Not Found — Resource doesn’t exist |
| 429 | Rate Limited — Too many requests |
| 500 | Server Error — Something went wrong |
Rate Limiting
Rate limits are included in response headers:| Header | Description |
|---|---|
X-RateLimit-Limit | Max requests per window |
X-RateLimit-Remaining | Requests left in window |
X-RateLimit-Reset | Unix timestamp when window resets |
Endpoint Categories
Catalog
Browse available collections and scenarios
Episodes
Multi-turn training sessions
Evaluation
Score conversations and compare responses