<!-- BusyBot node reference — https://busybot.net/tools/simple-llm/ -->

> Node: Simple LLM (`simple_llm`) · Action · v1
> Category: AI · Credentials: none
> Updated: 2026-08-16

# Simple LLM

> Generate text with AI

## Overview

Call OpenAI's API to process items with AI. Supports system prompts, user prompts with expressions, configurable model parameters, and optional web search.

**Category:** AI  
**Tool Name:** `simple_llm`  
**Version:** 1

**Appearance:** Icon: `brain` | Color: `#667eea`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool does not require any credentials.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| System Prompt | `string` | No | `You are a helpful assistant.` | System message that sets the behavior of the assistant. Supports expressions like {{ $json.field }}. |
| User Prompt | `string` | Yes | `{{ $json.text }}` | The user message to send to the LLM. Supports expressions like {{ $json.field }}. |
| Model | `options` | No | `gpt-4.1-mini` | The OpenAI model to use for completion. |
| | | | | Options: `gpt-5.2`, `gpt-5`, `gpt-5-mini`, `gpt-5-nano`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano` |
| Web Search | `boolean` | No | `false` | Enable built-in web search. When true, the model can search the web for up-to-date information before responding. |
| Max Concurrency | `number` | No | `50` | Maximum number of concurrent API calls to OpenAI. |
| Include Input in Output | `boolean` | No | `true` | If true, includes the original input data in the output item. |
| Response Field Name | `string` | No | `llmResponse` | The field name to store the LLM response in the output item. |

## Output Data

One output item per input item. The generated text is written to the field named by Response Field Name (`llmResponse` by default), alongside an `llmMetadata` block. With Include Input in Output on — the default — the original item fields are kept underneath; turn it off to return only the response and its metadata. Binary data is forwarded either way.

```json
{
  "llmResponse": "The article argues that ...",
  "llmMetadata": {
    "model": "gpt-4.1-mini",
    "usage": { "inputTokens": 812, "outputTokens": 143, "totalTokens": 955 },
    "status": "completed",
    "webSearchUsed": false,
    "processedAt": 1765432100000
  }
}
```

- `usage` reports the token counts for that single call, which is what the run is billed on.
- `webSearchUsed` says whether the model actually ran a web search for this item, not merely whether Web Search was enabled. A model given the tool may still answer without it.
- `processedAt` is a millisecond timestamp taken when the item finished.

Reference the result downstream by expression, e.g. `{{ $json.llmResponse }}`.

## Usage Examples

- generate a summary of the article
- ask AI to write a response email
- use LLM to analyze the feedback
- create a product description
- compose a personalized message

## Example Configuration

Send each item's `text` field to the model and store the reply on `llmResponse`:

```json
{
  "type": "simple_llm",
  "parameters": {
    "systemPrompt": "You are a helpful assistant.",
    "userPrompt": "{{ $json.text }}",
    "model": "gpt-4.1-mini",
    "webSearch": false,
    "maxConcurrency": 50,
    "includeInput": true,
    "responseFieldName": "llmResponse"
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Sends a prompt to a language model (GPT) and returns the generated text response. Supports optional built-in web search for up-to-date information. Use when you need AI-generated content — summaries, analysis, rewrites, classifications, or any free-text generation task. Produces one item per input item containing the LLM response text.