Apps

Generate or edit an app from a text instruction

Analyze a plain-language instruction with the configured workflow planner, assemble a validated workflow graph from the node catalog, and auto-publish it as a private, immediately-runnable app. Returns the app schema; run it via POST /apps/{appId}/runs. Pass baseAppId to EDIT an existing generated app in place instead of building a new one.

post/workflows/generate

Request

  • Base URL: https://app.uselamina.ai/v1
  • URL: https://app.uselamina.ai/v1/workflows/generate
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Request body

instructionstring required

What the app should create — or, with baseAppId, the change to apply (e.g. "add a 9:16 crop output").

baseAppIdstring

Edit mode. The appId of a generated app to modify in place (same appId, run history preserved). The planner starts from its current graph and applies the instruction as a targeted edit. Requires creator or workspace owner/admin. Omit to build a new app.

opsobject[]

Edit mode cheap path: explicit edit operations applied deterministically (no planner LLM call, no credit charge). Requires baseAppId; instruction becomes optional. Each item is one of setNodeData / addNode / removeNode / addEdge / removeEdge / addParameter / removeParameter / setParameter.

namestring

Optional preferred app name.

visibility'private' | 'shared' | 'public'
provider'claude' | 'openai'

Planner LLM provider override. Defaults to WFGEN_PROVIDER, then OpenAI.

brandProfileIdstring

Bake a specific brand profile's voice, visual anchors, and guardrails into the generated app so it produces on-brand output. Omit to use the workspace's active brand.

runboolean

One-shot: after generating the app, immediately start a run using inputs. Returns a run object with the runId — poll GET /runs/{runId}.

inputsobject

Input values keyed by the generated app's parameter key (media as URLs, options as labels). Used only when run is true.

testboolean

Sandbox mode (or send header X-Lamina-Test: true): validate the request and return a stub app — no planner LLM call, nothing persisted, no credits charged.

Response

App generated and published

Changes

No recorded changes to this operation across all 1 revision of this API.