All nodes/AI/LLM

Structured Output LLM

Calls an LLM and returns the response strictly in JSON format according to a given schema (structured output). Used when you need typed output rather than free text. Takes its model from the Model port. A Messages array on the Message port (e.g. from Chat History) reaches the model whole.

Structured Output LLM▶
ModelStructured data
Message
System

Type in the graph: structured_output_llm

Exec

An error output can be enabled to handle failures on their own path.

Ports can be split into separate execution and data handles.

Try it

Minimal working scenario

Entry
Structured Output LLM▶
LLM▦
Exit▶
  • Execute + Data
  • LLM
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

Runs as pasted

When to use it

Reach for this node when the model’s answer has to travel on as data rather than as text: splitting an email into fields, classifying a request, pulling out an amount and a date, producing a list of tags. The model must answer with an object matching your JSON Schema, so the next node receives a ready object instead of a string to parse. For free text in a chat use LLM Response; for a model that acts on its own use the AI Agent.

How it works

The schema goes in the “Structured output schema” field. Its fields are available downstream as {{ nodes.<id>.output.<field> }}, and the whole object travels along the edge. The default schema has a single string field result, so a freshly dropped node runs immediately; replace it with your own shape.

The top-level schema must be an object. An array or a scalar is wrapped automatically into an object with one value field, and the result then has to be read as {{ nodes.<id>.output.value }}.

Field descriptions are read by the model as instructions. One precise field description often does more than a paragraph in the system prompt.

The node does not stream: the answer arrives whole, once the model has finished it.

Common mistakes

  • The System port is wired but the prompt did not change. “System prompt source” defaults to “Template”, and a connected port is not read in that mode. Switch it to the connected System port, or to Auto.
  • Sending the object straight to Exit. The chat then shows JSON. If a human needs to read it, assemble the text with a Template node — or add a text field to the schema and let Exit show that.
  • An exotic schema. Not every model accepts pattern, format, oneOf/anyOf/allOf or deeply nested $ref. If the node fails saying no structured-output method worked, simplify the schema or change the model.
  • An empty result. The model returned a refusal instead of an object: check that the schema is an object at the top level and that the prompt really asks for those fields.

Inputs

PortWirePayloadNotes
ModelllmLLMlink_llm—

LLM config from llm node (registry or workspace connection)

MessagemessageExecute + Dataexecute_datamessage

Text, a Message or a Messages array. A Messages array (e.g. from Chat History) reaches the model whole — that is how the conversation history gets in.

SystemsystemDatadata—

System prompt override

Outputs

PortWirePayloadNotes
Structured dataoutputExecute + Dataexecute_dataobject

Configuration

FieldTypeDefaultDescription
Message sourcemessage_sourcestringauto

auto -- use connected input if available, else template; connected -- always from edge; template -- always from template

Options: auto — Auto (connected input, else template), connected — Connected input, template — Template

User Message Templateuser_prompt_templatestring""

Used when source=template or no edge connected. Supports {{inputs.message}}, {{nodes.xxx.output.yyy}}

supports templates

System Prompt Sourcesystem_sourcestringtemplate

auto -- use connected system input if available, else template

Options: auto — Auto (connected System port, else template), connected — Connected System port, template — Template

System promptsystem_promptstring""

System prompt template

supports templates

Structured Output Schemastructured_outputobject{"type":"object","properties":{"result":{"type":"string","description":"The m…

JSON Schema object the model must answer with; the top-level title is optional (it becomes the API tool name). Defaults to a single string 'result' field so a freshly dropped node runs — replace it with your shape.

Advanced
De-identify sensitive datamask_sensitive_datastring""

Replace recognised personal data with markers in the text sent to the model, and restore the originals in its answer. Does not cover attachments, knowledge bases, web search or HTTP node calls. Recognition is not guaranteed to be complete.

Options: — Workspace default, on — De-identify, off — Do not de-identify

Shared fields

Every node has these three — the platform adds them, not the node author.

  • expose_error_output — When enabled, show an execution output to connect nodes that run if this step fails.
  • split_ports_in — Show separate execution and data input handles instead of one combined port.
  • split_ports_out — Show separate execution and data output handles instead of one combined port.

Ready-made examples using this node