Skip to main content
The Pezzo client is an NPM package that allows you to easily integrate your application with Pezzo. The client was built with TypeScript and is type-safe.

Getting Started

Intall the Pezzo Client

Install the @pezzo/client NPM package:

Initialize the Pezzo Client

You only need to initialize the Pezzo client once, and then you can use it throughout your application.
Pezzo automatically looks for the following environment variables:
  • PEZZO_API_KEY: Your Pezzo API key
  • PEZZO_PROJECT_ID: Your Pezzo project ID
  • PEZZO_ENVIRONMENT: The environment you want to use (e.g. Production, which is the default environment created by Pezzo)
Variables found will be used automatically for configuration.

Use Pezzo with OpenAI

Learn how to use Pezzo to observe and manage your OpenAI API calls.

API Reference

Function
PezzoOptions
string
default:"process.env.PEZZO_API_KEY"
required
Pezzo API key
string
default:"process.env.PEZZO_PROJECT_ID"
required
Pezzo project ID
string
default:"process.env.PEZZO_ENVIRONMENT"
required
Pezzo environment name
string
default:"https://api.pezzo.ai"
required
Pezzo server URL
Function
string
The name of the prompt to retrieve. The prompt must be deployed to the current environment specified when initializing the Pezzo client.