wrap() function.
OpenAI
Wrap your OpenAI client to automatically trace all API calls:Supported Methods
The OpenAI integration automatically traces:chat.completions.create()(streaming and non-streaming)embeddings.create()images.generate(),images.edit(),images.createVariation()audio.transcriptions.create(),audio.translations.create()
Vercel AI SDK
Wrap the Vercel AI SDK module to trace all AI operations:Supported Methods
The Vercel AI SDK integration automatically traces:generateText(),streamText()generateObject(),streamObject()embed(),embedMany()generateImage()transcribe()generateSpeech()
LangChain / LangGraph
Use the callback handler for LangChain and LangGraph applications:Auto-Detection
Thewrap() function automatically detects which client you’re wrapping:
If
ze.init() hasn’t been called and ZEROEVAL_API_KEY is set in your environment, the SDK will automatically initialize when you first use wrap().Using with Prompts
The integrations automatically extract ZeroEval metadata from prompts created withze.prompt():
Need help? Check out our GitHub examples or reach out on Discord.