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 that the response must conform to.

strict

Whether the response must strictly conform to the schema.

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 that the response must conform to.

schema: Record<string, unknown>

Property Value

Record<string, unknown>

strict

Whether the response must strictly conform to the schema.

strict?: boolean

Property Value

boolean

type

The type of response format being defined. Always json_schema.

type: "json_schema"

Property Value

"json_schema"