Skip to main content
This guide shows how to run OpenLIT evaluations programmatically from your own code - the same evaluation engine, evaluators, and Rule Engine used for online/auto evaluations, called directly via the SDK.
1

Get an API key

In OpenLIT, go to Settings → API Keys and create a key. Programmatic evaluations run against your OpenLIT server, so you’ll need this key plus your OpenLIT URL.
2

Run an evaluation

You can also set the URL and API key via OPENLIT_URL / OPENLIT_API_KEY environment variables instead of init().
3

Evaluate a whole dataset

Pass a list of prompt/response pairs to run them concurrently - useful as a CI/CD quality gate:
Evaluations run programmatically use the exact same evaluators, custom types, and Rule Engine context matching configured in your OpenLIT dashboard - trace attributes like service.name and deployment.environment are auto-resolved from openlit.init() for rule matching, or you can pass your own via the attributes parameter.

Full SDK reference

Parameters, result objects, batch evaluation, and Rule Engine attribute resolution in depth

CI/CD integration

Use evaluations as quality gates in your test suite or pipeline

LLM-as-a-judge

Automatically add evaluation scoring to production traces

Integrations

60+ AI integrations with automatic instrumentation and performance tracking

Destinations

Send telemetry to Datadog, Grafana, New Relic, and other observability stacks