BrowserStack AI Evals

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.com

Authentication

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 paramTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger50Items 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

CodeMeaning
200OK
201Created
400Bad Request — validation error
401Unauthorized — invalid or missing API key
403Forbidden — key lacks required permissions
404Not Found
405Method Not Allowed
429Rate Limit Exceeded
500Internal 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/traces

Use the same Basic auth or Bearer token credentials.

Resources