BuildStructured outputs

Structured outputs

⚠️
Preview — this feature is being built; the design below is the spec.

Structured outputs make the model’s reply machine-readable. Syntic offers two mechanisms, and this section goes deeper on using them well.

MechanismFieldWhat it constrainsReference
JSON outputresponse_formatThe assistant’s reply textJSON output
Strict toolstools[].function.strictArguments the model passes to your functionsStrict tool arguments

Which one to use

  • The reply is the data (classification, extraction, scoring): use response_format with json_schema.
  • The model should decide whether to act and with what values (search, book, refund): use tools, and make them strict.
  • You need both reasoning shown to a person and data for your code: let the model write normally and call a strict record_result tool at the end.

Pages in this section

PageCovers
Design schemasEnums, nullable fields, arrays, descriptions that steer the model.
SDK helpersDefining schemas as Pydantic models or Zod objects and getting typed results back.
Stream structured outputShowing partial JSON as it arrives.
Refusals and cut-offsWhat happens when the model declines or runs out of tokens.
JSON mode or schema?When the looser json_object mode is enough.
Was this page helpful?