Skip to Content
API ReferenceCreate Page Job

Create Page Job

Submit a page creation request (manual spec or prompt mode). Processing happens asynchronously.

POST /api/page-jobs

Authentication

Required. API key or browser session.

Required headers

  • Idempotency-Key: required, non-empty.

Request body

Exactly one of components or prompt must be provided.

{ "slug": "my-page", "title": "My Page", "components": [ { "type": "hero", "props": { "headline": "Hello" } } ], "theme": { "preset": "clean-modern" } }

Prompt mode example:

{ "slug": "ai-page", "prompt": "A portfolio page for a photographer with a dark theme", "model": "gpt-5.2" }

Response

Status: 202 Accepted

{ "job": { "id": "uuid", "type": "single", "status": "queued", "parentJobId": null, "triggerRunId": "run_123", "attemptCount": 0, "maxAttempts": 3, "pageId": null, "result": null, "error": null, "createdAt": "2026-02-23T00:00:00.000Z", "startedAt": null, "completedAt": null } }

Job status values

  • queued
  • running
  • succeeded
  • failed
  • cancelled

Errors

StatusErrorWhen
400Missing Idempotency-Key / invalid bodyInput invalid
401Not authenticatedMissing or invalid auth
409Idempotency conflictSame key reused with different payload
429Prompt rate limit exceededPrompt requests exceeded hourly limit
503Rate limit check failedTemporary backend issue
Last updated on