SDK
Software development kit: a ready-made library for calling a service from your code, such as Anthropic's Python SDK.
An SDK (software development kit) is a ready-made library for calling an API. The official SDKs wrap this same feature. In Python,
client.messages.parse()lets you describe the shape as a Python class instead of a schema dictionary. It hands back an object that's already parsed and type-checked. Underneath, it sends the sameoutput_config.format.
Try it now
An example response with structured output, trimmed. The JSON is a string inside the text block. A thinking block comes before it, and your code still needs to skip that.
Learn it properly
Structured output · Get reliable JSON back that your code can use. About 30 minutes.
Other terms from the same lesson
- JSON schema: A precise description of the JSON you expect: which fields, what type each is, and which are required.
- structured output: Asking a model to answer in an exact format, such as JSON with set fields, so code can use it.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.