Skip to Content
Page SpecOverview

Page Spec

The Page Spec is the canonical JSON format for ChatBlocks pages. Every page, manual or AI-generated, is validated against this structure.

Structure

{ "slug": "my-page", "title": "My Page Title", "description": "Optional description for SEO", "components": [ { "type": "hero", "props": { "headline": "Welcome" } }, { "type": "text", "props": { "content": "Page body here" } } ], "theme": { "preset": "clean-modern", "overrides": { "primary": "#ff3333" } }, "customCss": ".cb-page h1 { letter-spacing: 0.05em; }", "meta": { "ogImage": "https://example.com/og.png", "favicon": "https://example.com/favicon.ico" } }

Top-level fields

FieldTypeRequiredDescription
slugstringYesURL path segment. 2-60 chars, lowercase alphanumeric + hyphens, cannot start/end with hyphen
titlestringNoPage title, max 200 chars
descriptionstringNoSEO description, max 2000 chars
componentsarrayOne of components or promptArray of typed component objects, max 50
promptstringOne of components or promptAI generation prompt, max 5000 chars
modelstringNoPrompt mode model key: gpt-5-mini or gpt-5.2
themeobjectNoTheme preset and/or overrides
customCssstringNoScoped CSS, max 10240 chars
metaobjectNoMetadata like ogImage and favicon

Slug rules

  • Minimum 2 characters, maximum 60
  • Lowercase letters, numbers, and hyphens only
  • Must start and end with a letter or number
  • Regex: ^[a-z0-9][a-z0-9-]*[a-z0-9]$

Schema endpoint

Get the full JSON Schema (draft-2020-12):

GET /api/schema

Useful for external validators, typed clients, and LLM function calling.

Last updated on