AI Prompt
Send one prompt to a model, without a saved agent — text, a fixed JSON shape, or your own schema.
The AI Prompt node (ai_prompt) sends one prompt to a model you pick and passes the answer on. Use it for single, self-contained steps — summarise, translate, extract fields, read a scanned document — where a full AI Agent with tools and memory would be more than you need.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
llm_config_id | string | — | The LLM provider connection to use, from Settings → LLM Configurations. |
model_id | string | — | The model on that connection. |
instructions | string | '' | The system prompt. May contain {{ }} references. Studio keeps a version history of it; the active version is what runs. |
inputExpression | string | '' | The user message, with {{ }} references. Empty forwards what reached the node, the same way the AI Agent node does. |
attachmentExpression | string | '' | One uploaded file for the model, for example {{ trigger.body.scan }} from a Form file field or {{ upstream.download.output.file }} from an FTP download. An image or PDF is sent as the file itself, and the model must be marked vision-capable. Any other file (Word, Excel, CSV, text) is sent as its text, after the input, and works with any model. |
temperature | number 0–2 | 0.7 | Sampling temperature. Lower is more repeatable. |
maxTokens | integer 1–128000 | 4096 | The answer's token limit. |
outputFormat | text | structured | custom | text | Text passes the answer through. Structured asks for, and checks, one of three fixed JSON shapes. Custom asks for, and checks, your own JSON Schema. |
structuredSchemaId | classification | sentiment | extraction | — | The fixed shape for Structured: classification is { category, confidence, summary }, sentiment is { sentiment, confidence }, extraction is { fields: { … } }. |
customJsonSchema | string | — | A JSON Schema for Custom. It may itself be a {{ }} reference, so a caller can supply the schema per run. |
To tell the model what day it is, put {{ run.startedAt }} in the instructions or the input.
Output
| Field | Type | Description |
|---|---|---|
completionText | string | The model's answer as text. |
structuredOutput | unknown | The parsed, validated JSON, for Structured and Custom. Read fields as {{ upstream.<id>.output.structuredOutput.category }}. |
modelUsed | string | The model that answered. |
tokenUsage.prompt | number | Prompt tokens. |
tokenUsage.completion | number | Completion tokens. |
latencyMs | number | How long the call took. |
The output also carries promptSent, the full prompt sent — the system and user halves, labelled — which the node's editor shows for debugging, and estimatedCostUsd, the call's estimated cost (absent when the model has no price).
Limits and errors
The node fails, naming the reason, when:
- no LLM configuration or model is selected, or the configuration belongs to another organization;
- the output format is Structured with no shape picked, or the answer does not match the shape (or your Custom schema) — the node never passes on an unchecked blob;
attachmentExpressionpoints at an image or PDF and the model is not vision-capable, does not resolve to exactly one uploaded file, or the upload has expired;- the attachment is not an image or PDF and no text could be read from it (convert it to PDF, or run the step that produced it again).
A code fence around a JSON answer is removed before it is checked.
Example
OCR a scanned invoice from a form, then map it to fields:
name: Read invoice
description: Reads an uploaded invoice scan into fields.
graph:
nodes:
- id: upload
type: trigger_form
position: { x: 0, y: 0 }
data:
authMode: none
fields:
- {
name: scan,
label: Invoice scan,
type: file,
required: true,
acceptedExtensions: [pdf, png, jpg],
}
- id: read
type: ai_prompt
position: { x: 280, y: 0 }
data:
llm_slot: vision-model
model_id: gpt-4o
instructions: Extract the invoice number, date, supplier and total.
inputExpression: 'Today is {{ run.startedAt }}.'
attachmentExpression: '{{ trigger.body.scan }}'
temperature: 0
maxTokens: 1024
outputFormat: structured
structuredSchemaId: extraction
edges:
- { id: upload-to-read, source: upload, target: read }In a Package
The LLM connection does not travel: it becomes an llm Slot the installer binds to one of their own LLM configurations.
- Travels:
model_id,instructions,inputExpression,attachmentExpression,temperature,maxTokens,outputFormat,structuredSchemaId,customJsonSchema - Converted:
llm_config_id→llm_slot(anllmSlot id) - Never carried: none
slots:
- id: vision-model
type: llm
required: true