update

Create/edit private models with full definitions or surgical changes.

tl;dr Use update for private model mutations. Prefer modelId for deterministic targeting. It supports full modelDefinition writes and surgical changes[], including page paths.

Parameters

ParameterTypeRequiredDescription
modelIdstringNoPreferred private model identifier for updates. Routes updates by ID when provided.
namestringNoName fallback when ID is not provided. If both modelId and name are provided, they must refer to the same model.
modelDefinitionobjectNoFull model definition for create/replace flows. With a target (modelId or name), this replaces the existing private model in place. Without a target, this creates a new model.
changesarrayNoUnified operations: add, replace, remove.
normalizeInputbooleanNoNormalizes smart quotes/dashes in page patch input. Default true.
validatestringNo"auto" (default), "always", or "never".
allowDeletesbooleanNoRequired for remove operations.
deleteConfirmationstringNoRequired confirmation token for delete operations.

Page path support

changes[] supports page-specific paths:

  • /page
  • /page/components/<ComponentName>
  • /page/code
  • /page/version
  • /page/schema
  • /page/schema/...

Use valueBase64 when payloads contain characters that can break JSON escaping.

Examples

  • Replace a token: update { modelId: "priv_1", changes: [{ op: "replace", path: "/principles/primary/$value", value: "oklch(0.7 0.2 250)" }] }
  • Replace a page component: update { modelId: "priv_1", changes: [{ op: "replace", path: "/page/components/HeroSection", valueBase64: "<base64-jsx>" }] }
  • Replace page fields in one operation: update { modelId: "priv_1", changes: [{ op: "replace", path: "/page", value: { version: "2.0.0", schema: { ... } } }] }

Better prototypes with less prompting

Start creating