Update Structured Output
Authentication
Retrieve your API Key from Dashboard.
Path parameters
Query parameters
Request
This is the type of structured output.
- ‘ai’: Uses an LLM to extract structured data from the conversation (default).
- ‘regex’: Uses a regex pattern to extract data from the transcript without an LLM.
This is the regex pattern to match against the transcript.
Only used when type is ‘regex’. Supports both raw patterns (e.g. ‘\d+’) and regex literal format (e.g. ’/\d+/gi’). Uses RE2 syntax for safety.
The result depends on the schema type:
- boolean: true if the pattern matches, false otherwise
- string: the first match or first capture group
- number/integer: the first match parsed as a number
- array: all matches
This is the model that will be used to extract the structured output.
To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages.
Between the system or user messages, you must reference either ‘transcript’ or ‘messages’ with the {{}} syntax to access the conversation history.
Between the system or user messages, you must reference a variation of the structured output with the {{}} syntax to access the structured output definition.
i.e.:
{{structuredOutput}}
{{structuredOutput.name}}
{{structuredOutput.description}}
{{structuredOutput.schema}}
If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. If messages or required fields are not specified, the default system and user prompts will be used.
This is the JSON Schema definition for the structured output.
Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:
- Objects and nested properties
- Arrays and array validation
- String, number, boolean, and null types
- Enums and const values
- Validation constraints (min/max, patterns, etc.)
- Composition with allOf, anyOf, oneOf
Response
This is the ISO 8601 date-time string of when the structured output was created.
This is the ISO 8601 date-time string of when the structured output was last updated.
This is the JSON Schema definition for the structured output.
Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:
- Objects and nested properties
- Arrays and array validation
- String, number, boolean, and null types
- Enums and const values
- Validation constraints (min/max, patterns, etc.)
- Composition with allOf, anyOf, oneOf
This is the type of structured output.
- ‘ai’: Uses an LLM to extract structured data from the conversation (default).
- ‘regex’: Uses a regex pattern to extract data from the transcript without an LLM.
This is the regex pattern to match against the transcript.
Only used when type is ‘regex’. Supports both raw patterns (e.g. ‘\d+’) and regex literal format (e.g. ’/\d+/gi’). Uses RE2 syntax for safety.
The result depends on the schema type:
- boolean: true if the pattern matches, false otherwise
- string: the first match or first capture group
- number/integer: the first match parsed as a number
- array: all matches
This is the model that will be used to extract the structured output.
To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages.
Between the system or user messages, you must reference either ‘transcript’ or ‘messages’ with the {{}} syntax to access the conversation history.
Between the system or user messages, you must reference a variation of the structured output with the {{}} syntax to access the structured output definition.
i.e.:
{{structuredOutput}}
{{structuredOutput.name}}
{{structuredOutput.description}}
{{structuredOutput.schema}}
If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. If messages or required fields are not specified, the default system and user prompts will be used.