All glossary terms
Cross-cutting

JSON mode

JSON mode is an LLM API parameter that guarantees the response is valid JSON, even when no specific schema is provided. It's the lighter version of structured output: the response will parse, but the shape isn't validated. Useful when the application can handle any well-formed JSON or when iterating before committing to a fixed schema.

JSON mode predates structured-output features and remains useful for prototyping and for applications where the response shape varies legitimately. The trade-offs vs full structured output: JSON mode doesn't constrain field names or types, so the consuming code must still validate; the same instructions that would shape the response in a structured-output schema must be encoded into the prompt manually. Most production applications have migrated from JSON mode to structured output as the latter becomes available on all major providers; JSON mode remains the right choice for free-form structured responses or for older API versions.