Skip to main content
The Go SDK and docs are currently in beta. Report issues on GitHub.
JSON Schema response format for structured outputs

Fields

FieldTypeRequiredDescriptionExample
JSONSchemacomponents.ChatJSONSchemaConfig:heavy_check_mark:JSON Schema configuration object{"description": "A mathematical response","name": "math_response","schema": {"properties": {"answer": {"type": "number"}
},
“required”: [
“answer”
],
“type”: “object”
},
“strict”: true<br/>}
Typecomponents.ChatFormatJSONSchemaConfigType:heavy_check_mark:N/A