Skip to main content

Overview

Response schema types define the structure that LLM outputs must conform to, enabling structured data extraction.

ResponseSchema

JSON schema definition for constraining and validating LLM response format.
Properties:
  • name - Schema name (alphanumeric + underscore, 1-64 chars)
  • description - Schema description (up to 4096 chars)
  • strict - Whether to enforce strict schema adherence
  • schema - The JSON schema structure
Example:
JSON:

ResponseSchemaStructure

Root JSON schema structure for validating LLM structured outputs.
Properties:
  • type - Must be ‘object’
  • required - Array of required property names
  • $defs - Schema definitions for reuse (optional)
  • properties - Object properties
  • additionalProperties - Must be false for strict schemas
Example:

ResponseSchemaProperty

JSON schema property definition for structured response validation.
Properties: Standard JSON Schema property fields Example:

Complete Example


Import


Message Types

Messages in prompts

Tool Types

Similar parameter schemas