Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesOpenAI API from A to ZStructured Outputs and JSON Schema
Retries after a 429 error: each pause is twice as long, then successA workflow map: a Telegram message branches into command, voice and text and reaches the agentA form request lands in a spreadsheet row labelled “Complaint”
Course

OpenAI API from A to Z

Module 1 · API Basics
01SDK install and first call02Choosing an OpenAI model03Tokens, context, and cost
Module 2 · Chat Completions
04Developer messages, reasoning effort and sampling parameters05Structured Outputs and JSON Schema06Multimodality: vision, speech-to-text and voice
Module 3 · Assistants API v2
07From Assistants to Responses: conversation memory08File Search and vector store09Code Interpreter10Combining tools and tool_choice
Module 4 · Function Calling
11Function calling: the full cycle12Parallel function calls13Patterns: designing reliable functions
Module 5 · Production
14Streaming responses15Embeddings and semantic search16Production: limits, retries, monitoring
OpenAI API from A to Z · Lesson 5

Structured Outputs and JSON Schema

Structured Outputs with strict: true in the Responses API (text.format) and Chat Completions (response_format) vs the old JSON mode. Validation with Zod, refusal handling, and the Decisions API for simple labels.

24 min readUpdated Dec 2, 20263 questions in quizReady prompt included
🔒

Full lesson access

Structured Outputs and JSON Schema opens after free sign-up: 7 days of full access to every course, no card needed.

Start 7-day free trial
Then Pro: $9/mo or $79/yr

View plans →

One trial lesson is open without sign-up: what a large language model is →

In this lesson
WhyStructured Outputs (strict) — the recommended wayVia the SDK helper (Zod)In Chat CompletionsThe old JSON modeHandling refusalWhen the Decisions API is enoughPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free