API Reference
Complete REST API reference for BrowserStack AI Evals, organized by resource.
API Reference
The BrowserStack AI Evals REST API provides programmatic access to all platform resources: traces, scores, datasets, experiments, prompts, evaluators, annotation queues, sessions, and more.
Base URL
All API endpoints are relative to:
https://evals-api.browserstack.comAuthentication
The API uses HTTP Basic Authentication. Your credentials are the public_key and secret_key from your project settings page.
curl https://evals-api.browserstack.com/api/public/traces \
-u "pk-lf-...:sk-lf-..."Or pass the Authorization header directly:
# Base64-encode "public_key:secret_key"
curl https://evals-api.browserstack.com/api/public/traces \
-H "Authorization: Basic $(echo -n 'pk-lf-...:sk-lf-...' | base64)"Write-Only Keys
For SDK ingestion (tracing only, no read access), use a write-only key as a Bearer token:
curl https://evals-api.browserstack.com/api/public/ingestion \
-H "Authorization: Bearer wk-lf-..."Write-only keys are accepted on all ingestion endpoints (POST /api/public/ingestion, POST /api/public/traces, POST /api/public/scores, etc.).
Pagination
List endpoints use page-based pagination:
| Query param | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
limit | integer | 50 | Items per page (max 100) |
Paginated responses include a meta object:
{
"data": [...],
"meta": {
"page": 1,
"limit": 50,
"totalItems": 243,
"totalPages": 5
}
}Response Format
All responses are JSON. Successful responses return the requested resource or list directly. Errors return an object with a message field:
{ "message": "Unauthorized" }Common HTTP Status Codes
| Code | Meaning |
|---|---|
200 | OK |
201 | Created |
400 | Bad Request — validation error |
401 | Unauthorized — invalid or missing API key |
403 | Forbidden — key lacks required permissions |
404 | Not Found |
405 | Method Not Allowed |
429 | Rate Limit Exceeded |
500 | Internal Server Error |
OTEL Ingestion
In addition to the REST API, the platform accepts OpenTelemetry traces at:
POST https://evals-api.browserstack.com/api/public/otel/v1/tracesUse the same Basic auth or Bearer token credentials.
Resources
Authentication
API key types, creation, and header format
Ingestion
Batch event ingestion and OTEL endpoint
Traces
Create, list, and retrieve traces
Observations
Spans, generations, and events
Scores
Create and query evaluation scores
Datasets
Dataset and dataset item management
Experiments
Create and track experiments
Evaluators
Evaluator CRUD and evaluator lists
Prompts
Prompt management and versioning
Sessions
Session management
Annotation Queues
Human review queue management
Models & Media
Model definitions and media uploads