Skip to Content

Schema

Get the full JSON Schema for the page spec. Useful for validation in external tools, code generation, or LLM function calling.

GET /api/schema

Authentication

None required. This is a public endpoint.

Response

Status: 200 OK

Returns a JSON Schema (draft-2020-12) object describing the complete pageSpecSchema.

Cache: public, max-age=3600 (1 hour)

Usage

Validate locally

Use the schema with any JSON Schema validator:

curl -s https://chatblocks.app/api/schema > chatblocks-schema.json

LLM function calling

Pass the schema to an LLM as a function definition to generate valid page specs:

{ "name": "create_chatblocks_page", "parameters": "... (paste schema here)" }

Code generation

Use the schema with tools like json-schema-to-typescript to generate types for your language.

Last updated on