Structured Output

Make the robot answer in a shape your code accepts.

▶ the lesson · ~35s · narrated · tap for sound

the intro

Free text is hard to program against. Structured output makes the model answer in JSON that matches a schema you define, so your code can parse and use it reliably. Combine the schema with validation and a retry, and AI features become dependable.

fun fact ✦

Structured output turned “AI features” into “normal features with an AI step”.

the docs

quick hits about Structured Output

15-second answers · interviews, tips, trivia & hidden gems

🎤 interview

JSON mode or function calling?

📚 tutorial

Why does free text break apps?

🔧 useful

The reliability loop

💎 deep

Need one of exactly three answers?

💎 deep

Schema + retry = dependable