PromptEval
Getting Started

Installation

Install the PromptEval SDK and configure your environment.

Node.js / TypeScript

Requires Node.js 18 or later.

npm
1npm install @prompteval/sdk
yarn
1yarn add @prompteval/sdk
pnpm
1pnpm add @prompteval/sdk

Python

Requires Python 3.9 or later.

pip
1pip install prompteval
uv
1uv add prompteval

API key

Create a key in the Dashboard under Project → API Keys. Keys are project-scoped — create one per environment (dev/staging/prod).

.env
1PROMPTEVAL_API_KEY=pe_live_...

Never commit your API key to version control. The SDK reads PROMPTEVAL_API_KEY from the environment automatically; you can also pass it explicitly.

Initializing the client

TypeScript

client.ts
1import { PromptEval } from "@prompteval/sdk"
2
3// Key read from PROMPTEVAL_API_KEY env var automatically
4const client = new PromptEval()
5
6// Or pass explicitly
7const client = new PromptEval({ apiKey: "pe_live_..." })

Python

client.py
1from prompteval import PromptEval
2
3# Key read from PROMPTEVAL_API_KEY env var automatically
4client = PromptEval()
5
6# Or pass explicitly
7client = PromptEval(api_key="pe_live_...")

Version pinning

Pin the SDK version in production to avoid unexpected behavior from updates.

package.json
1{
2 "dependencies": {
3 "@prompteval/sdk": "1.4.2"
4 }
5}

Custom base URL

If you're running PromptEval behind a corporate proxy or on a self-hosted deployment, you can override the base URL:

client.ts
1const client = new PromptEval({
2 apiKey: process.env.PROMPTEVAL_API_KEY,
3 baseURL: "https://eval.internal.yourcompany.com",
4})

Verify the setup

ping.ts
1import { PromptEval } from "@prompteval/sdk"
2
3const client = new PromptEval()
4const status = await client.ping()
5console.log(status) // { ok: true, project: "my-project" }