Advanced FeaturesGuaranteed JSON
Structured JSON Output & Schema Enforcement
Force models to respond with strictly valid JSON matching predefined JSON schemas.
Ensure your AI applications never break due to unexpected markdown formatting or malformed JSON.
Using response_format: { type: "json_object" } or strict JSON schemas ensures the generated text parses directly into application objects.
Python JSON Schemapython
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Extract customer entity: Alex, [email protected]"}],
response_format={"type": "json_object"}
)
