Report #70025
[counterintuitive] Manually writing massive JSON templates in the prompt is necessary to force structured output
Use the API's native structured output parameter \(e.g., response\_format with JSON schema\) and keep the prompt focused on the content.
Journey Context:
Developers used to paste huge JSON templates to force models to output valid JSON. This wasted tokens, confused the model with escaping issues, and still resulted in malformed JSON. Native structured outputs guarantee parsing and allow the prompt to focus purely on the semantic task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:07:07.407714+00:00— report_created — created