# Cerebras

> Use fast open AI models on Cerebras: generate replies, continue conversations, pull fields out of text, sort text into categories, ask about images, and compare models by price and ability.

App · AI Models · 8 actions. Web page: https://docs.lodol.com/docs/integrations/cerebras

## Actions

### Ask about an image

Ask a question about an image, or have it described, such as reading a receipt, a chart or a screenshot.

**Inputs**

- Image (`image`, text, required): The image to ask about: upload a file, pick an image from an earlier step, or paste a link to one. PNG, JPEG, WebP and GIF all work.
- Question (`question`, text): What to ask about the image. Leave empty to get a detailed description.
- Model (`model`, text): Which model looks at the image. Leave empty to use one that can read images.
- Maximum response length (`max_tokens`, number): The longest the reply may be, in tokens (a token is about three quarters of a word). The model's thinking counts toward it. Leave empty for the model's own limit. At least 1.

**Outputs**

- `completion_tokens` (number): Tokens in the reply, including the model's thinking.
- `finish_reason` (text): Why the reply ended: 'stop' when it was complete, 'length' when it reached Maximum response length.
- `model` (text): The model that replied.
- `prompt_tokens` (number): Tokens in what was sent.
- `reasoning` (text): The model's thinking before it replied, when the model shares it. Empty otherwise.
- `response_seconds` (number): How long Cerebras took to answer, in seconds.
- `response_text` (text): The model's reply.
- `total_tokens` (number): Tokens billed in total.

**Example output**

```json
{
  "completion_tokens": 96,
  "finish_reason": "stop",
  "model": "qwen-3.8-27b",
  "prompt_tokens": 42,
  "reasoning": "",
  "response_seconds": 0.214,
  "response_text": "The receipt is from Corner Market; the total is $23.17.",
  "total_tokens": 138
}
```

### Classify text

Put a text into exactly one of the categories you list, with a one-sentence reason. Use it to route emails, tickets or leads.

**Inputs**

- Text (`text`, text, required): The text to read, such as an email, a message or a document.
- Categories (`categories`, list, required): The categories to choose from, at least two. The answer is always exactly one of these.
- Extra instructions (`instructions`, text): Optional guidance for tricky cases, in plain words.
- Model (`model`, text): Which model answers. Leave empty to use the model Cerebras recommends.

**Outputs**

- `category` (text): The category chosen, exactly as listed.
- `completion_tokens` (number): Tokens in the reply, including the model's thinking.
- `model` (text): The model used.
- `prompt_tokens` (number): Tokens in what was sent.
- `reason` (text): Why the model chose it, in one sentence.
- `response_seconds` (number): How long Cerebras took to answer, in seconds.
- `total_tokens` (number): Tokens billed in total.

**Example output**

```json
{
  "category": "Billing",
  "completion_tokens": 96,
  "model": "gpt-oss-120b",
  "prompt_tokens": 42,
  "reason": "The customer asks why they were charged twice.",
  "response_seconds": 0.214,
  "total_tokens": 138
}
```

### Continue a conversation

Send a conversation so far, oldest message first, and get the model's next reply. Use it for chat assistants that remember what was said.

**Inputs**

- Messages (`messages`, list, required): The conversation so far, oldest first. Each message has a role (user for the person, assistant for the model) and its text. The model writes the next reply.
- System instructions (`system_prompt`, text): Optional instructions that set the model's role, tone or format for every reply, e.g. 'You are a concise support agent. Reply in two sentences.'
- Model (`model`, text): Which model answers. Leave empty to use the model Cerebras recommends.
- Reasoning effort (`reasoning_effort`, text): How much the model thinks before it answers. More helps with hard problems but takes longer and uses more tokens. A model that cannot stop thinking uses its lightest setting when Off is chosen. One of: `default` (Model's default), `none` (Off), `low`, `medium`, `high`. Default: `default`.
- Maximum response length (`max_tokens`, number): The longest the reply may be, in tokens (a token is about three quarters of a word). The model's thinking counts toward it. Leave empty for the model's own limit. At least 1.
- Creativity (temperature) (`temperature`, number): How varied the wording is, from 0 (focused and repeatable) to 2 (most varied). Leave empty for the model's default. From 0 to 2.0.

**Outputs**

- `completion_tokens` (number): Tokens in the reply, including the model's thinking.
- `finish_reason` (text): Why the reply ended: 'stop' when it was complete, 'length' when it reached Maximum response length.
- `model` (text): The model that replied.
- `prompt_tokens` (number): Tokens in what was sent.
- `reasoning` (text): The model's thinking before it replied, when the model shares it. Empty otherwise.
- `response_seconds` (number): How long Cerebras took to answer, in seconds.
- `response_text` (text): The model's reply.
- `total_tokens` (number): Tokens billed in total.

**Example output**

```json
{
  "completion_tokens": 96,
  "finish_reason": "stop",
  "model": "gpt-oss-120b",
  "prompt_tokens": 42,
  "reasoning": "",
  "response_seconds": 0.214,
  "response_text": "Thanks for reaching out! Your order shipped this morning and should arrive by Thursday.",
  "total_tokens": 138
}
```

### Continue text

Have a model carry on writing from where a text leaves off, such as the start of a sentence, a list or a template. For questions and instructions, use 'Generate a Cerebras response'.

**Inputs**

- Text to continue (`text`, text, required): The beginning the model should carry on from.
- Model (`model`, text): Which model answers. Leave empty to use the model Cerebras recommends.
- Maximum response length (`max_tokens`, number): The longest the continuation may be, in tokens (a token is about three quarters of a word). Leave empty for up to 1,000. At least 1.
- Creativity (temperature) (`temperature`, number): How varied the wording is, from 0 (focused and repeatable) to 2 (most varied). Leave empty for the model's default. From 0 to 2.0.
- Stop at (`stop_sequences`, list): Up to 4 pieces of text that end the continuation as soon as the model writes one. Type \n for a line break.

**Outputs**

- `completion_tokens` (number): Tokens in the reply, including the model's thinking.
- `finish_reason` (text): Why it ended: 'stop' at a natural end or a Stop at entry, 'length' at Maximum response length.
- `full_text` (text): The start and the continuation together.
- `model` (text): The model used.
- `prompt_tokens` (number): Tokens in what was sent.
- `response_seconds` (number): How long Cerebras took to answer, in seconds.
- `text` (text): What the model wrote, without the start.
- `total_tokens` (number): Tokens billed in total.

**Example output**

```json
{
  "completion_tokens": 96,
  "finish_reason": "length",
  "full_text": "Five names for a coffee shop:\n1. Daily Grind\n2. Bean There\n3. Brew Haven",
  "model": "gpt-oss-120b",
  "prompt_tokens": 42,
  "response_seconds": 0.214,
  "text": " Daily Grind\n2. Bean There\n3. Brew Haven",
  "total_tokens": 138
}
```

### Extract data from text

Pull the pieces of information you name out of a text, such as a name, a date or an amount from an email or invoice. A field the text does not mention comes back empty rather than guessed.

**Inputs**

- Text (`text`, text, required): The text to read, such as an email, a message or a document.
- Fields to fill (`fields`, list, required): The pieces of information you want back, one per entry. Add what each means after a colon to steer it: 'total: the amount due in US dollars'.
- Extra instructions (`instructions`, text): Optional guidance for tricky cases, in plain words.
- Model (`model`, text): Which model answers. Leave empty to use the model Cerebras recommends.

**Outputs**

- `completion_tokens` (number): Tokens in the reply, including the model's thinking.
- `data` (object): Each field you named, with its value from the text, or empty when the text does not say.
- `found_fields` (list): The fields that were found.
- `missing_fields` (list): The fields the text does not mention.
- `model` (text): The model used.
- `prompt_tokens` (number): Tokens in what was sent.
- `response_seconds` (number): How long Cerebras took to answer, in seconds.
- `total_tokens` (number): Tokens billed in total.

**Example output**

```json
{
  "completion_tokens": 96,
  "data": {
    "customer name": "Dana Whitfield",
    "order number": "A-10442",
    "total": "$84.50"
  },
  "found_fields": [
    "customer name",
    "order number",
    "total"
  ],
  "missing_fields": [],
  "model": "gpt-oss-120b",
  "prompt_tokens": 42,
  "response_seconds": 0.214,
  "total_tokens": 138
}
```

### Generate a Cerebras response

Send a prompt to a model on Cerebras and get back its written response.

**Inputs**

- Prompt (`prompt`, text, required): The message or question to send to the model.
- System instructions (`system_prompt`, text): Optional instructions that set the model's role, tone or format for every reply, e.g. 'You are a concise support agent. Reply in two sentences.'
- Model (`model`, text): Which model answers. Leave empty to use the model Cerebras recommends.
- Reasoning effort (`reasoning_effort`, text): How much the model thinks before it answers. More helps with hard problems but takes longer and uses more tokens. A model that cannot stop thinking uses its lightest setting when Off is chosen. One of: `default` (Model's default), `none` (Off), `low`, `medium`, `high`. Default: `default`.
- Maximum response length (`max_tokens`, number): The longest the reply may be, in tokens (a token is about three quarters of a word). The model's thinking counts toward it. Leave empty for the model's own limit. At least 1.
- Creativity (temperature) (`temperature`, number): How varied the wording is, from 0 (focused and repeatable) to 2 (most varied). Leave empty for the model's default. From 0 to 2.0.

**Outputs**

- `completion_tokens` (number): Tokens in the reply, including the model's thinking.
- `finish_reason` (text): Why the reply ended: 'stop' when it was complete, 'length' when it reached Maximum response length.
- `model` (text): The model that replied.
- `prompt_tokens` (number): Tokens in what was sent.
- `reasoning` (text): The model's thinking before it replied, when the model shares it. Empty otherwise.
- `response_seconds` (number): How long Cerebras took to answer, in seconds.
- `response_text` (text): The model's reply.
- `total_tokens` (number): Tokens billed in total.

**Example output**

```json
{
  "completion_tokens": 96,
  "finish_reason": "stop",
  "model": "gpt-oss-120b",
  "prompt_tokens": 42,
  "reasoning": "",
  "response_seconds": 0.214,
  "response_text": "Thanks for reaching out! Your order shipped this morning and should arrive by Thursday.",
  "total_tokens": 138
}
```

### Get model details

Get one model's details: its name, what it costs, how much text it can take and what it can do.

**Inputs**

- Model (`model`, text, required): The model to look up.

**Outputs**

- `can_read_images` (true/false): Whether the model works with 'Ask about an image'.
- `can_reason` (true/false): Whether the model thinks before it answers.
- `context_length` (number): The most tokens a request and its reply can hold together.
- `deprecated` (true/false): Whether Cerebras is retiring the model.
- `description` (text): What the model is good at.
- `hugging_face_id` (text): The model's page on Hugging Face, as owner/name.
- `id` (text): The model's id, as steps use it.
- `input_price_per_million_tokens` (number): US dollars per million tokens sent.
- `max_output_tokens` (number): The longest reply the model can write, in tokens.
- `name` (text): The model's name.
- `output_price_per_million_tokens` (number): US dollars per million tokens written.
- `owned_by` (text): Who made the model.
- `preview` (true/false): Whether the model is in preview.
- `supports_structured_outputs` (true/false): Whether the model can answer in a fixed JSON shape.
- `supports_tool_calling` (true/false): Whether the model can call tools.

**Example output**

```json
{
  "can_read_images": false,
  "can_reason": true,
  "context_length": 131072,
  "deprecated": false,
  "description": "This model excels at efficient reasoning across science, math, and coding applications.",
  "hugging_face_id": "openai/gpt-oss-120b",
  "id": "gpt-oss-120b",
  "input_price_per_million_tokens": 0.35,
  "max_output_tokens": 40960,
  "name": "OpenAI GPT OSS",
  "output_price_per_million_tokens": 0.75,
  "owned_by": "OpenAI",
  "preview": false,
  "supports_structured_outputs": true,
  "supports_tool_calling": true
}
```

### List models

List the models your Cerebras account can use, with what each costs, how much text it can take and what it can do.

**Inputs**: None.

**Outputs**

- `count` (number): How many models.
- `model_ids` (list): Just the model ids.
- `models` (list): The models, in the order Cerebras lists them.

**Example output**

```json
{
  "count": 1,
  "model_ids": [
    "gpt-oss-120b"
  ],
  "models": [
    {
      "can_read_images": false,
      "can_reason": true,
      "context_length": 131072,
      "deprecated": false,
      "description": "This model excels at efficient reasoning across science, math, and coding applications.",
      "hugging_face_id": "openai/gpt-oss-120b",
      "id": "gpt-oss-120b",
      "input_price_per_million_tokens": 0.35,
      "max_output_tokens": 40960,
      "name": "OpenAI GPT OSS",
      "output_price_per_million_tokens": 0.75,
      "owned_by": "OpenAI",
      "preview": false,
      "supports_structured_outputs": true,
      "supports_tool_calling": true
    }
  ]
}
```
