Structured Output
Structured output is a way of making a large language model (LLM) answer in a format defined in advance by a schema, usually JSON Schema, so that downstream code can parse and check the answer safely. Major model APIs implement it with constrained decoding: while the model generates, tokens that would break the schema are blocked.[1][2] Developers can often write the schema as a code type, such as a Pydantic or Zod model, and let the SDK convert it.[1][9]