> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cerebras

> Use the Cerebras LLM plugin in a Zero Runtime pipeline for fast inference. Setup, options, and usage in Python and JavaScript.

Cerebras is an **LLM** plugin built for fast inference. It takes the transcribed
conversation and generates the reply, running open models such as Llama and Qwen on
Cerebras hardware.

## Setup

Set your Cerebras API key in the worker environment. Generate a key from the [Cerebras cloud](https://cloud.cerebras.ai/):

```bash theme={null}
export CEREBRAS_API_KEY=<key>
```

## Usage

Import the plugin and pass it to the pipeline's `llm` slot.

<CodeGroup>
  ```python Python theme={null}
  from zeroruntime.plugins import CerebrasLLM

  llm = CerebrasLLM(
      model="llama3.3-70b",
      temperature=0.7,
  )

  # Pipeline(llm=llm, ...)
  ```

  ```typescript Node JS theme={null}
  import { CerebrasLLM } from '@zeroruntime/js-sdk/plugins';

  const llm = CerebrasLLM({
    model: 'llama3.3-70b',
    temperature: 0.7,
  });

  // Pipeline({ llm, ... })
  ```
</CodeGroup>

## Configuration Options

*Constructor parameters for `CerebrasLLM`. The Python and Node JS SDKs share these field names.*

| Parameter | Type | Default | Description |
| - | - | - | - |
| `api_key` | `str` | `None` | Cerebras API key. Falls back to the `CEREBRAS_API_KEY` environment variable when unset. |
| `model` | `str` | `"llama3.3-70b"` | Cerebras model used to generate replies (e.g. `gpt-oss-120b`, `zai-glm-4.7`, `llama3.3-70b`). |
| `temperature` | `float` | `0.7` | Sampling randomness; lower is more deterministic. |
| `tool_choice` | `str` | `"auto"` | How the model decides when to call tools (`"auto"`, `"none"`, or `"required"`). |
| `max_completion_tokens` | `int` | `None` | Caps the length of each reply. |
| `top_p` | `float` | `None` | Nucleus-sampling probability cutoff. |
| `seed` | `int` | `None` | Seed for reproducible sampling. |
| `stop` | `str` | `None` | Stop sequence that halts generation. |
| `user` | `str` | `None` | End-user identifier passed to the API. |

## Import paths

| SDK | Import | Constructor |
| - | - | - |
| Python | `from zeroruntime.plugins import CerebrasLLM` | `CerebrasLLM(...)` |
| Node JS | `import { CerebrasLLM } from '@zeroruntime/js-sdk/plugins'` | `CerebrasLLM({ ... })` |

The reply is streamed to the [text-to-speech](/runtime-sdk/plugins/tts/cartesia) plugin, which
synthesizes the agent's voice.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.