z3t.ai

JSON Schema Extensions

Z3T.ai schemas are standard JSON Schema plus a small set of extension keys.

Every platform-specific annotation uses the x-z3t- prefix. Because they're outside the JSON Schema vocabulary, generic tooling ignores them — but the Z3T.ai frontend reads them to decide how to render each field.

The core rule

Keep validation and presentation separate.

  • format constrains a value — it's for validation. See the Schema Specification.
  • x-z3t-* describes presentation and behaviour — it never changes what values are valid.

x-z3t-display answers "how do I render this field's value?" — the widget for a single field.

x-z3t-layout answers "how do I arrange this container's children?" — spatial structure.

They're orthogonal: a field can have both.

Extension keys

KeyApplies toPurpose
x-z3t-hintany fieldShort helper text shown below the field
x-z3t-orderany fieldExplicit sort position within the form
x-z3t-groupany fieldVisual grouping label for adjacent fields
x-z3t-displayscalar / objectRendering widget hint — see values below
x-z3t-code-languagestring with x-z3t-display: 'code'Syntax-highlight language
x-z3t-min / x-z3t-maxdate, datetimeMin/max bounds (as ISO strings)
x-z3t-color-mapenumMap of enum value → badge color, e.g. { ACTIVE: 'green' }
x-z3t-acceptz3t-file-uriAccepted MIME types for the upload widget
x-z3t-max-size-mbz3t-file-uriMax upload size hint (MB)
x-z3t-taxonomy-slugz3t-taxonomy-refPre-select a specific taxonomy
x-z3t-integration-providerz3t-integration-refFilter the integration dropdown to one provider
x-z3t-table-sortable / x-z3t-table-searchablearray with x-z3t-display: 'table'Table interaction flags

x-z3t-display values

The widget used for a single field's value.

ValueField typeEffect
'textarea'stringMulti-line text input (form)
'markdown'stringMarkdown editor (form) / rendered Markdown (output)
'html'stringRendered sanitized HTML (output)
'code'stringCode editor / highlighted block — use with x-z3t-code-language
'json'stringPretty-printed JSON block (output)
'image'stringInline image (output); value is a URL or z3t://files/{id}
'hidden'stringField is hidden in the form
'range'number / integerSlider input (form)
'percent'numberPercentage bar (output); value must be 0–1
'toggle'booleanToggle switch instead of a checkbox (form)
'radio'enumRadio buttons instead of a dropdown (form)
'table'arraySortable / searchable table (output)
'file-list'arrayList of download links for file-URI items (output)
'file-output'stringAgent-produced file — download button (output)
'pdf-reference'objectClickable chip that opens a PDF preview
'typed-value'objectSelf-describing { format, value } rendered by inner format

Example

A field with both a rendering hint and metadata:

{
  "type": "string",
  "title": "Summary",
  "x-z3t-display": "markdown",
  "x-z3t-hint": "Written for a non-technical reader",
  "x-z3t-order": 1,
  "x-z3t-group": "Results"
}

An enum rendered as colored badges in the output:

{
  "type": "string",
  "enum": ["pass", "warn", "fail"],
  "x-z3t-color-map": { "pass": "green", "warn": "amber", "fail": "red" }
}

You rarely write these by hand — the schema builder emits them for you. This page is the reference for what it produces and what the platform accepts.


Continue learning

SDK Reference

For creators