Skip to main content
Route your Cerebras requests through the Inference Catalyst gateway to get cost tracking, latency monitoring, and analytics. Cerebras has a dedicated provider routing ID, so you use the OpenAI SDK with x-inference-provider: cerebras.
Prefer automatic setup? Run inf instrument to instrument your codebase in seconds. Learn more

Setup

1

Get your API keys

You need two keys:
2

Set environment variables

3

Update your code

Point the SDK at the gateway. Your project API key goes in apiKey, and your Cerebras key goes in x-inference-provider-api-key.