BrowserStack AI Evals
Settings & Configuration

API Management

Register, test, and map your own HTTP API endpoints so they can be evaluated in experiments.

API Management

API Management is a built-in request composer for your own HTTP APIs. Use it to save a request specification for an endpoint (for example, the API that fronts your AI application), send a test request to confirm it works, and map the response so the endpoint can be used as the target of an experiment.

API Management is different from API Keys. API Keys authenticate calls made to BrowserStack AI Evals. API Management stores specifications for calls that the platform makes out to your own endpoints.

Access

Open Project settings and select API Management ↗. This opens the API Management workspace — a request composer with a sidebar of saved specifications and a request builder.

Save an API specification

A specification captures everything needed to call one endpoint. Build the request, then save it so it can be reused and selected as an experiment target.

Choose a method and URL

  • Method — one of GET, POST, PUT, PATCH, DELETE, HEAD, or OPTIONS.
  • URL — the endpoint to call.

Add parameters and headers

Add any query parameters and request headers as key–value pairs.

Set authentication

On the Authorization tab, choose no auth, a bearer token, basic auth, or an API-key header. The composer adds the corresponding Authorization (or custom) header for you.

Add a request body

For methods that send a payload, provide a JSON request body.

Name and save

Give the request a name and click Save API Spec. You'll see a "Specification Saved" (or "Specification Updated") confirmation.

Specification names must be unique within a project. Saving with a name that already exists updates the existing specification; saving a new name creates a new one.

Names must be unique per project. Saving over an existing name updates that specification rather than creating a duplicate — attempting to create a second specification with the same name is rejected with "An API specification with this name already exists in this project."

Send a test request

Send the request to confirm the endpoint responds as expected before you rely on it. Requests are executed server-side (so browser CORS restrictions don't apply), and the composer reports the response status and how long the call took.

The request URL must be a valid, absolute URL — otherwise the call is rejected with "A valid URL is required."

Map the response

To use an endpoint for evaluation, tell the platform where to find the relevant fields in its JSON response. Map response fields to:

  • llmOutput — the text your endpoint returns as the model's answer.
  • retrievedContexts — any retrieved or supporting context your endpoint returns (for retrieval-augmented flows).

These mappings are saved with the specification and let an experiment extract the model output (and contexts) from each response automatically.

Using a specification in an experiment

Saved API specifications become selectable targets when you create an experiment. In Step 2 — Dataset and Configuration of the Create an Experiment flow, choose the API option instead of a prompt, then pick your saved specification. The experiment calls your endpoint for each dataset item, and the response mappings determine which fields are evaluated.

See Create an Experiment for the full workflow.

  • API Keys — credentials for calling the BrowserStack AI Evals API (a separate concern from API Management).
  • Create an Experiment — evaluate a saved API specification against a dataset.