AI Chat
ai.chat AI v0.1.0 Sends one chat completion to any OpenAI-compatible endpoint (OpenAI, OpenRouter, local Ollama at http://localhost:11434/v1, LM Studio). The prompt comes from an input field or a {{ }} template; outputs the reply, finish reason, and token usage.
Ports
| Direction | Port | Label |
|---|---|---|
| Input | input | Payload |
| Output | output | Reply |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
CredentialcredentialId | credential | "" | Use a stored credential for this connection — its fields are filled in at run start. Pick "None" to enter the connection details manually. accepts credential templates: openai-compat |
Base URLbaseUrl | string | "https://api.openai.com/v1" | OpenAI-compatible API base. Examples: https://api.openai.com/v1, http://localhost:11434/v1 (Ollama), http://localhost:1234/v1 (LM Studio). |
API keyapiKey | string | "" | Bearer key — supports ${credential.openai-compat.apiKey}. Leave blank for local servers. |
Modelmodel | string | "" | Model name, e.g. gpt-4o-mini or qwen2.5:0.5b. |
System promptsystemPrompt | string | "" | Optional system message prepended to the conversation. |
Prompt frompromptMode | select | "field" | Read the prompt from an input field, or build it from a {{ }} template. fieldtemplate |
Prompt fieldpromptField | string | "" | Dot-path to the prompt text on the input. Leave blank to send the whole payload (stringified). Shown when (promptMode ?? "field") === "field" |
Prompt templateprompt | string | "" | Prompt with {{ }} expressions over the input, e.g. Summarize: {{ $json.article }} — same semantics as the Set node. Shown when promptMode === "template" |
Temperaturetemperature | string | "" | Sampling temperature, e.g. 0.2. Leave blank to omit (the server default). |
Max tokensmaxTokens | int | 0 | Cap on generated tokens. 0 = omit (the server default). |
JSON modejsonMode | boolean | false | Ask the model for a JSON object (response_format json_object) and parse the reply into replyJson. |
Timeout (ms)timeoutMs | int | 120000 | Abort the completion after this many milliseconds. |
This page is generated from the node registry by gen-node-docs.mjs on every
site build — ports, properties, defaults and visibility rules cannot drift from the code.