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.

PropertyValue
Provider idcerebras
Pluginofficial external package (@openclaw/cerebras-provider)
Auth env varCEREBRAS_API_KEY
Onboarding flag--auth-choice cerebras-api-key
Direct CLI flag--cerebras-api-key <key>
APIOpenAI-compatible (openai-completions)
Base URLhttps://api.cerebras.ai/v1
Default modelcerebras/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 refNameReasoningNotes
cerebras/gpt-oss-120bGPT OSS 120ByesDefault; 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_KEY reaches that process, for example via ~/.openclaw/.env or through env.shellEnv. A key exported only in an interactive shell is of no use to a managed service unless the env is imported separately.

813 words · updated Oct 25, 2026