- OpenAI
- Anthropic
- Gemini
- Other AI providers
- SDK integrations
OpenAI provides access to GPT models including GPT-5 and other cutting-edge language models. Braintrust integrates seamlessly with OpenAI through direct API access, wrapper functions for automatic tracing, and proxy support.
1. Configure your API keys
You need both Braintrust and OpenAI API keys to set up logging OpenAI LLM calls.- To create a new OpenAI API key, visit OpenAI’s API platform
- To create a Braintrust API key, navigate to Settings > API keys and select Create new API key
API keys are encrypted using 256-bit AES-GCM encryption and are not stored or logged by Braintrust.
2. Install Braintrust and OpenAI libraries
Install the Braintrust and OpenAI libraries for your programming language.3. Send logs to Braintrust
Braintrust provides automatic tracing for OpenAI API calls, handling streaming, metrics collection, and other details.- TypeScript & Python: Use
wrapOpenAI/wrap_openaiwrapper functions - Go: Use the tracing middleware with the OpenAI client
- Ruby: Use
Braintrust::Trace::OpenAI.wrapto wrap the OpenAI client - Java: Use the tracing interceptor with the OpenAI client
4. View your logs
Select Logs in the Braintrust dashboard to view your log traces.Next steps
- View, filter, and query your logs
- Create a custom dashboard to visualize log metrics
- Create a dataset from a subset of your logs and use it to write and run an eval
- Learn more about what’s in a log trace