Skip to main content
POST
Compose

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corpo

application/json

DTO for the admin HTTP layer (cms_ai/router.py).

The engine itself takes explicit keyword arguments (DB-agnostic); this model only shapes the request envelope the router validates and translates into a compose_blocks(...) call.

ANTI-INJECTION: brand, locales, default_locale and page_type are resolved SERVER-SIDE from the tenant (active languages, store name/voice, the page's slug). They stay on the model for the engine's own re-use, but the router ignores any client-sent value for them — a caller can never steer the brand voice, spoof the active locales, or downgrade a legal page's review gate. Only instruction, current_blocks, scope, page_id and max_retries are honoured from the request body.

instruction
string
obbligatorio
Required string length: 1 - 8000
current_blocks
Current Blocks · object[]
page_type
string
predefinito:standard
scope
enum<string>
predefinito:page
Opzioni disponibili:
page,
block
brand
BrandContext · object | null

Brand signals that steer CONTENT and VOICE only — never styling.

The F0 schema exposes no colour/style props, so brand can never leak into the design by construction; this only shapes the words the model writes.

locales
string[] | null
default_locale
string | null
max_retries
integer
predefinito:2
Intervallo richiesto: 0 <= x <= 5
page_id
string<uuid> | null
locale
string | null
Maximum string length: 10

Risposta

Successful Response

data
ComposeResult · object | null

The engine's output: a VALID tree plus the "what I did" for chat/inline.

meta
PaginationMeta · object | null
error
string | null
error_code
string | null