AI Prompt
ai.prompt AI v0.1.0 Runs one prompt through an AI model and returns the text reply — use it to generate, rewrite, answer, summarize, or analyze. Works with any OpenAI-compatible endpoint (OpenAI, OpenRouter, local Ollama at http://localhost:11434/v1, LM Studio) or Anthropic. The prompt comes from an input field or a {{ }} template; outputs the reply, finish reason, and token usage.
Finding it in the library
Search the builder's node library for AI Prompt (it lives under AI). A single click opens the in-editor docs panel shown here — description, ports, and every property, without leaving the canvas. Double-click (or drag) to add it to the workflow.
Wired up in the builder
AI Prompt in a real, runnable flow — captured live from the Studio editor, exactly as it looks on your canvas. The ◈ ports carry the AI Model provider you wire in. This is the same workflow used for the example input & output below.
How it’s configured
The node’s Configure panel as it opens in the builder when you select the step — every setting laid out with real values. Click any field to edit it.
Ports
Ports are the node’s contract with its neighbours. In the editor a port label renders bold when wired and italic when optional; ◈ ports accept attachment carriers rather than data wires.
| Direction | Port | Label | What flows through it |
|---|---|---|---|
| Input | input | Input | |
| Output | output | Reply |
How data flows through it
AI Prompt consumes the content of the incoming envelope — when it is fed directly by a trigger, the trigger’s wrapper is unwrapped at the node boundary so the node sees the actual data, not the metadata shell. Its output becomes the payload for the next node, while the envelope (trace ids, correlation, binary refs) rides along untouched. In the Runs view you always see the whole envelope for both sides of this node.
Expressions in the config
String-typed properties accept {{ }} expressions evaluated against the
incoming item at run time — e.g. {{ $json.customer.email }}. On this node
that’s systemPrompt, prompt. JSON- and code-typed fields never interpolate — they are passed through literally.
Build it with AI
Every node in this reference is reachable through Flowdrome’s
AI Copilot and the
MCP tools — say what you want, and the graph surgery
happens server-side. Node types resolve fuzzily, so the catalog label
(AI Prompt) works as well as the exact type id (ai.prompt).
In the Copilot panel (or any connected AI):
add a ai prompt node after the trigger As a step in a create_chain_workflow call:
{"type":"AI Prompt","config":{}} Raw MCP call — add this node to a workflow with add_node
curl -s -X POST http://localhost:48170/mcp -H "content-type: application/json" -d '{ "jsonrpc": "2.0", "id": "1", "method": "tools/call", "params": { "name": "add_node", "arguments": { "workflowId": "<id>", "type": "AI Prompt" } } }' Example input & output
Captured from a real test run of the workflow above — this is what you see in the run data panel after pressing Test workflow.
Input — what the node received
body.Output — what the node produced
Property reference
Every setting, with its type and default — the same fields shown configured in the panel above.
| Property | Type | Default | Description |
|---|---|---|---|
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 | field | "" | 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" |
Image field (vision)imageField | field | "" | Optional dot-path to an image URL or data: URL (or an array of them) sent alongside the prompt for vision models, e.g. gpt-4o / claude-3.5. Blank = text-only. |
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. |
Cache repliescache | boolean | false | Reuse the reply for identical requests (same input, prompt, and settings) — cuts cost and latency. Never used for streamed turns. |
Cache TTL (seconds)cacheTtlSec | int | 300 | How long a cached reply stays fresh. Shown when cache === true |
Run budget ($)budgetUsd | double | 0 | Halt the run with BUDGET_EXCEEDED once its AI spend reaches this many dollars (built-in per-model prices; unknown models count $0). 0 = no dollar budget. FLOWDROME_AI_BUDGET_USD sets an app-wide default. |
Run budget (tokens)budgetTokens | int | 0 | Halt the run once its total AI tokens (prompt + completion) reach this count. 0 = no token budget. |
Using it
One completion, any OpenAI-compatible server
AI Prompt is the “one prompt in, one reply out” node. Point Base URL at any OpenAI-compatible
endpoint — https://api.openai.com/v1, http://localhost:11434/v1 for a local Ollama,
http://localhost:1234/v1 for LM Studio — set the Model, and pick where the prompt comes
from:
- Prompt mode = field: read the prompt text from a dot-path on the input
(Prompt field =
qreads$json.q). Leave the field blank and the node sends the whole payload, stringified — handy for “summarize whatever arrives”. - Prompt mode = template: build the prompt with
{{ }}expressions, same semantics as the Set node — e.g.Summarize in one sentence: {{ $json.article }}.
The output (see the capture above) is a flat object: reply, the finish reason, and token
usage — so the next node reads {{ $json.reply }} directly.
Auth without pasting keys
Pick a stored credential in the node’s credential picker (template openai-compat) — the
API key field then carries ${credential.<name>.apiKey}, a vault reference resolved at run
start, never the literal key. Local servers need no key at all: leave it blank.
Structured answers
Turn on JSON mode to request response_format: json_object — the node parses the reply into
replyJson so downstream nodes can read fields without a script step. Pair it with a system
prompt that names the fields you expect.
Tips
- Temperature is a string on purpose — leave it blank to use the server’s default rather than forcing one.
- Use the AI in Flowdrome guide (/docs/using/ai/) for the local-Ollama setup and a full worked example with screenshots.
- For multi-turn conversations, tool calling, or memory, step up to the AI Agent node — AI Prompt is deliberately stateless.
Related nodes
The rest of the AI group — the same folder you’d scan in the editor’s library.
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.
The screenshots and example data are captured from a live Flowdrome by
npm run shots:nodes and npm run gen:examples.
The hand-authored notes above are merged in.