Setup
To use Cerebras models, configure your Cerebras API key in Braintrust:- Get a Cerebras API key from Cerebras Cloud
- Add the Cerebras API key as an organization or project AI provider.
- Set the Cerebras API key and your Braintrust API key as environment variables
.env
API keys are stored as one-way cryptographic hashes, never in plaintext.
Use Cerebras with Braintrust gateway
The Braintrust gateway allows you to access Cerebras models through a unified interface. Use any supported provider’s SDK to call Cerebras models. Install thebraintrust and openai packages.
Trace logs with Cerebras
Trace your Cerebras LLM calls for observability and monitoring. When using the Braintrust gateway, API calls are automatically logged to the specified project.Evaluate with Cerebras
Evaluations distill the non-deterministic outputs of Cerebras models into an effective feedback loop that enables you to ship more reliable, higher quality products. BraintrustEval is a simple function composed of a dataset of user inputs, a task, and a set of scorers. To learn more about evaluations, see the Experiments guide.