LLM
Category: AI & ML
Node id: llm
General-purpose LLM inference supporting multiple providers
What it does
- Multi-provider LLM inference (OpenAI, Anthropic, Hunyuan)
- System prompt customization
- Temperature and token limit control
- Token usage tracking
- Configurable model selection
Use cases
- General-purpose text generation and completion
- Question answering with custom system prompts
- Content creation across multiple LLM providers
Runtime
- Performance tier:
variable
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
prompt | text | Yes | The user prompt to send to the LLM |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Main result containing response, usage statistics, and max_tokens |
success | boolean | No | Whether the operation succeeded |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Provider | provider | enum | No | openai | openai, anthropic, hunyuan | LLM provider to use |
| Model | model | string | No | gpt-4 | Model name to use | |
| System Prompt | system_prompt | text | No | "" | System prompt to prepend |
Auth
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| API Key | api_key | secret | Yes | API key for the LLM provider |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Temperature | temperature | number | No | 0.7 | min 0; max 2 | Sampling temperature |
| Max Tokens | max_tokens | number | No | 1000 | Maximum tokens to generate |
Errors
| Code | Description |
|---|---|
PROMPT_REQUIRED | No prompt input was provided |
INVALID_PROVIDER | Provider must be openai, anthropic, or hunyuan |
API_KEY_MISSING | API key is required but not configured |
Runtime notes
- The LLM text output is in result.response as a plain string, NOT a structured object. Parse it downstream if you need JSON.
- result.usage contains token counts; use result.usage.total_tokens for cost tracking.
- Streaming is handled internally — the node collects the full response before emitting output.
- The hunyuan provider uses OpenAI-compatible format; set base_url in config to point to the Hunyuan endpoint.
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
Quelque chose n'est pas clair ? Envoyez vos commentaires sur la documentation par courriel.