Skip to Content
Getting StartedQuickstart

Quickstart

Create your first page in about 60 seconds.

1. Get an API key

Sign in at chatblocks.app/settings and create an API key. You will get a key prefixed with cb_live_. Copy it immediately; full keys are shown once.

2. Create a page job (manual mode)

curl -X POST https://chatblocks.app/api/page-jobs \ -H "Authorization: Bearer cb_live_YOUR_KEY" \ -H "Idempotency-Key: create-hello-world-v1" \ -H "Content-Type: application/json" \ -d '{ "slug": "hello-world", "title": "My First Page", "components": [ { "type": "hero", "props": { "headline": "Hello, World!", "subheadline": "Built with ChatBlocks" } }, { "type": "linkList", "props": { "links": [ { "label": "GitHub", "href": "https://github.com" }, { "label": "Twitter", "href": "https://twitter.com" } ] } } ], "theme": { "preset": "clean-modern" } }'

3. Poll job status

The response includes a job.id:

{ "job": { "id": "job-uuid-here", "status": "queued" } }

Poll until status is succeeded:

curl -X GET https://chatblocks.app/api/page-jobs/job-uuid-here \ -H "Authorization: Bearer cb_live_YOUR_KEY"

4. Try prompt mode

Instead of writing components, send a prompt and optional model:

curl -X POST https://chatblocks.app/api/page-jobs \ -H "Authorization: Bearer cb_live_YOUR_KEY" \ -H "Idempotency-Key: create-portfolio-v1" \ -H "Content-Type: application/json" \ -d '{ "slug": "my-portfolio", "prompt": "A portfolio page for a photographer with a hero section, image gallery, testimonial, and contact card", "model": "gpt-5.2" }'

Supported model keys:

  • gpt-5-mini (default)
  • gpt-5.2

Next steps

Last updated on