Skip to main content

StructuredMessage

A structured message whose JSON payload has been validated against a declared schema. Consumers can trust that json_payload conforms to the schema identified by schema_name.

Inspect the run outcome before treating any message as complete. Current structured metadata is attached to a text content part through structuredMessage; ordinary text is still present. structuredMessage can be absent. Use an object at the schema root and validate the exact final response your application consumes; server validation covers only the first model choice. For integers that your JSON client cannot represent exactly, define string-valued fields in your schema instead of converting them through floating point.

Usage profiles​

UsageFields and validation
In requestsView fields
In responsesView fields
In webhook payloadsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
jsonPayloadMap from string to JSON valueOptionalThe validated JSON payload as a Struct (preserves types)
schemaNamestringOptionalSchema identifier (from ResponseFormat.schema_name)
healedbooleanOptionalWhether response healing is reported for this structured message. Currently returned as false.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
jsonPayloadMap from string to JSON valueOptionalThe validated JSON payload as a Struct (preserves types)
schemaNamestringOptionalSchema identifier (from ResponseFormat.schema_name)
healedbooleanOptionalWhether response healing is reported for this structured message. Currently returned as false.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
json_payloadMap from string to JSON valueOptionalThe validated JSON payload as a Struct (preserves types)
schema_namestringOptionalSchema identifier (from ResponseFormat.schema_name)
healedbooleanOptionalWhether response healing is reported for this structured message. Currently returned as false.

Where used​

ReferenceRelationship
Append a message without generatingPOST /api/v1/llm/append-message
Send a message to a conversationPOST /api/v1/llm/send-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Withdraw your rating on a messagePOST /api/v1/llm/delete-message-rating
Get full conversation statePOST /api/v1/llm/conversation-state
List MCP resourcesPOST /api/v1/llm/mcp-list-resources
Read an MCP resourcePOST /api/v1/llm/mcp-read-resource
Rate an assistant messagePOST /api/v1/llm/rate-message
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
llm.message_publishedWebhook JSON uses protobuf field names (snake_case).
ContentPartNested in model
ContentPartNested in model
ContentPartNested in model

Download the public reference contract.

Document: DOC-API-MODEL-structured-message.