Cerebras Provider Setup: Auth and Model Selection
Configure the Cerebras provider for OpenClaw, including plugin installation, API key authentication, and model selection. Useful for operators setting up the OpenAI-compatible Cerebras endpoint.
Read this when
- You want to use Cerebras with OpenClaw
- You need the Cerebras API key env var or CLI auth choice
Cerebras runs inference on custom hardware and exposes it through an OpenAI-compatible, high-speed API. Model metadata and pricing are discovered natively by the plugin, and a bundled catalog covers the offline case.
| Property | Value |
|---|---|
| Provider id | cerebras |
| Plugin | official external package (@openclaw/cerebras-provider) |
| Auth env var | CEREBRAS_API_KEY |
| Onboarding flag | --auth-choice cerebras-api-key |
| Direct CLI flag | --cerebras-api-key <key> |
| API | OpenAI-compatible (openai-completions) |
| Base URL | https://api.cerebras.ai/v1 |
| Default model | cerebras/gpt-oss-120b |
Install plugin
openclaw plugins install @openclaw/cerebras-provider
If the Gateway is running, installation is applied to it automatically; if not, it takes effect at the next startup. See Apply changes and inspect.
Getting started
Get an API key
Generate an API key in the Cerebras Cloud Console.
Run onboarding
openclaw onboard --auth-choice cerebras-api-key
openclaw onboard --non-interactive --accept-risk --skip-health \
--auth-choice cerebras-api-key \
--cerebras-api-key "$CEREBRAS_API_KEY"
export CEREBRAS_API_KEY=csk-...
Verify models are available
openclaw models list --provider cerebras
Shows the Cerebras models that are configured. When CEREBRAS_API_KEY cannot be resolved, openclaw models status --json reports the missing credential under auth.unusableProfiles.
Non-interactive setup
openclaw onboard --non-interactive --accept-risk --skip-health \
--mode local \
--auth-choice cerebras-api-key \
--cerebras-api-key "$CEREBRAS_API_KEY"
Because --mode defaults to local, this run is identical to the Direct flag command above. Execute it on the Gateway host: onboarding of a remote client (--mode remote) only sets up the local client connection and does not configure provider credentials on the server.
Discovery and pricing
Provided Cerebras auth is configured and the inference base URL is the official https://api.cerebras.ai/v1, OpenClaw fetches GET /public/v1/models. Only public headers are used for this request: neither inference API keys nor discovery credentials are ever sent to the metadata endpoint. When a custom base URL is set, this public discovery is skipped, so a proxy's catalog is never mixed with Cerebras metadata. The runtime provider remains inactive if no Cerebras credential exists. Being listed in public metadata does not prove account entitlement.
Native context and completion limits, reasoning and vision capabilities, and prompt/completion prices all come from live rows. Cerebras reports those prices as USD per-token strings, which OpenClaw converts to USD per million tokens. No separate cache tariff is published in the public feed, so cache reads are priced by OpenClaw at the input price, which matches Cerebras' standard input billing for cached tokens.
Catalogs that load successfully are cached for 60 seconds. When discovery fails, comes back empty, or contains no usable model rows, the bundled offline seed is used instead. Under the default models.mode: "merge", generated model rows and prices are not copied into your config by fresh onboarding, which lets prices refresh. Costs and model rows you authored explicitly are left untouched. Under models.mode: "replace", discovery is turned off and the offline seed is kept by onboarding as explicit config.
Built-in catalog
The offline fallback model offers a 131,072-token context window and a 40,960-token max output. Its prices were refreshed from the native public feed on August 31, 2026.
| Model ref | Name | Reasoning | Notes |
|---|---|---|---|
cerebras/gpt-oss-120b | GPT OSS 120B | yes | Default; production reasoning model |
GPT OSS 120B is chosen by fresh onboarding. The bundled catalog leaves out models that Cerebras has retired; explicit selections that already exist are not rewritten.
Prompt caching
Matching prompt prefixes are cached automatically by Cerebras. On the native API, OpenClaw sends a stable prompt_cache_key per conversation to improve cache routing. Cached tokens cut prompt processing and uncached-token rate-limit usage, and they are billed at the standard input token price. See Cerebras prompt caching.
Manual config
For most setups the API key is all you need. To override model metadata in mode: "merge", use explicit models.providers.cerebras config; keep models empty if you want discovered rows without pinning generated prices:
{
env: { vars: { CEREBRAS_API_KEY: "csk-..." } },
agents: {
defaults: {
model: { primary: "cerebras/gpt-oss-120b" },
},
},
models: {
mode: "merge",
providers: {
cerebras: {
baseUrl: "https://api.cerebras.ai/v1",
apiKey: "${CEREBRAS_API_KEY}",
api: "openai-completions",
models: [],
},
},
},
}
Note
When the Gateway runs as a daemon (launchd, systemd, Docker), confirm that
CEREBRAS_API_KEYreaches that process, for example via~/.openclaw/.envor throughenv.shellEnv. A key exported only in an interactive shell is of no use to a managed service unless the env is imported separately.
Related
-
Model providers, How to pick providers, model refs, and failover behavior.
-
Thinking modes, Reasoning effort levels available for the Cerebras models.
-
Configuration reference, Agent defaults and model configuration.
-
Models FAQ, Auth profiles, switching models, and fixing "no profile" errors.