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
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
| In webhook payloads | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
jsonPayload | Map from string to JSON value | Optional | The validated JSON payload as a Struct (preserves types) |
schemaName | string | Optional | Schema identifier (from ResponseFormat.schema_name) |
healed | boolean | Optional | Whether response healing is reported for this structured message. Currently returned as false. |
In responses
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
jsonPayload | Map from string to JSON value | Optional | The validated JSON payload as a Struct (preserves types) |
schemaName | string | Optional | Schema identifier (from ResponseFormat.schema_name) |
healed | boolean | Optional | Whether response healing is reported for this structured message. Currently returned as false. |
In webhook payloads
Webhook JSON uses protobuf field names (snake_case).
| Field | Type | Presence | Meaning |
|---|---|---|---|
json_payload | Map from string to JSON value | Optional | The validated JSON payload as a Struct (preserves types) |
schema_name | string | Optional | Schema identifier (from ResponseFormat.schema_name) |
healed | boolean | Optional | Whether response healing is reported for this structured message. Currently returned as false. |
Where used
| Reference | Relationship |
|---|---|
| Append a message without generating | POST /api/v1/llm/append-message |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| List MCP resources | POST /api/v1/llm/mcp-list-resources |
| Read an MCP resource | POST /api/v1/llm/mcp-read-resource |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| llm.message_published | Webhook JSON uses protobuf field names (snake_case). |
| ContentPart | Nested in model |
| ContentPart | Nested in model |
| ContentPart | Nested in model |
Download the public reference contract.
Document: DOC-API-MODEL-structured-message.