Share via


TextResponseFormatJsonSchema interface

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

Extends

Properties

description

A description of what the response format is for, used by the model to determine how to respond in the format.

name

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

schema

The JSON Schema describing the response format.

strict

Whether to enforce strict validation.

type

The type of response format being defined. Always json_schema.

Property Details

description

A description of what the response format is for, used by the model to determine how to respond in the format.

description?: string

Property Value

string

name

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

name: string

Property Value

string

schema

The JSON Schema describing the response format.

schema: Record<string, any>

Property Value

Record<string, any>

strict

Whether to enforce strict validation.

strict?: boolean

Property Value

boolean

type

The type of response format being defined. Always json_schema.

type: "json_schema"

Property Value

"json_schema"