Skip to content

Glossary · AI

Structured output

Also called: JSON mode, structured outputs, LLM JSON output

Structured output is a model response in a predefined, machine-readable format, typically a JSON object matching a schema, so the next steps of a workflow can use the fields directly instead of parsing prose.

A human can read "The vendor is Acme and the total looks like about $4,200." A router can't. Structured output asks the model for:

{ "vendor": "Acme Ltd", "total": 4200, "currency": "USD", "po_number": "" }

and the rest of the workflow reads total like any other value.

How to get it

  1. Ask precisely. Name every field, its type and what to do when it's missing ("empty string, never a guess").
  2. Use the provider's JSON features where available. Many APIs offer a JSON mode or schema-constrained output that guarantees parseable JSON.
  3. Validate anyway. Parseable isn't correct. Check required fields, types and ranges against a JSON schema before any action uses the data.
  4. Route the failures. A response that fails validation should go to a retry or a person, not quietly continue.

Pitfalls

  • Wrapping the JSON in prose or code fences ("Here's the JSON: …"). Instruct against it and strip fences defensively.
  • Numbers as strings ("4,200"). Specify "number, no currency symbols or separators".
  • Invented values to fill required fields. Allow empty values explicitly, or the model will make something up.

In Fluxo Flow

AI Generate steps can return JSON, which later steps read as {{input.json.field}}. A Validator node checks data against rules or a JSON schema and routes to pass or fail, so bad output never reaches a CRM or an email. Every template's AI step ends its prompt with "Reply with one JSON object only. No markdown, no code fences." and names each field.

All 40 glossary terms

Build your first workflow today.

Build and Dry Run on the Free plan, no credit card. Run live on a paid plan, on your own AI key at cost.

Free to explore · No credit card · 30-day money-back guarantee on paid plans