Create Content
One-call creation endpoint. Provide a natural-language brief and Lamina handles everything: resolves brand context, selects the best workflow/app, injects guidance into prompts, and executes.
How it works:
- Resolves brand DNA and active guidance for the workspace
- If no
appIdis provided, selects the best-matching app for the brief, platform, and modality - Translates the brief into app-specific inputs using brand context
- Starts the execution and returns immediately (async)
After starting: Use GET /v1/runs/{runId} to poll for results,
GET /v1/runs/{runId}/stream for SSE streaming, or pass a
webhook query parameter on the execution.
Optional overrides:
appId— Force a specific app instead of automatic selectioninputs— Override specific input parameters on the selected apptemplateId— Apply a content template for structured guidance (fromGET /v1/templates)brandProfileId/campaignId— Scope brand context to a specific profile or campaign
brief describing the content you need. The engine resolves brand context, selects the best-fit app, injects creative guidance, and starts the execution.
The operation is asynchronous — use the returned run ID with the wait, stream, or get-run endpoints to retrieve results.
Best for agent-driven workflows where you want a single call to go from intent to finished asset.
Headless mode (unattended agents)
By default,create may return status: "needs_input" with askUser prompts when the chosen path needs information a human would supply — a dead end for an unattended worker or agent.
Pass headless: true (or terminalMode: "auto") to make the call reliable for agentic callers. In headless mode the engine:
- forces the self-drafting recipe path and dispatches best-effort — it never returns
needs_input; - returns
status: "unmatched"(machine-actionable) if a run genuinely can’t be formed, instead of an interactive ask; - surfaces any unmet asks on the
ranresponse as structuredunmetAsks[]— each{ name, key, question, type, required, autoFillable }— so an agent can satisfy one (e.g. generate animage_urlviaPOST /v1/generate/image) and re-run.
appId is ignored in headless mode. See the Agent Creation Loop guide for the full create → satisfy → run pattern.Authorizations
Workspace API key. Prefix: lma_. Example: lma_abc123...
Body
Natural-language description of what content to create. This is the primary input.
Target platform (e.g. instagram, tiktok, facebook). Helps select the right app and optimize guidance.
Desired content modality (e.g. image, video). Helps select the right app.
Scope brand context to a specific brand profile.
Scope guidance to a specific campaign.
Force a specific app instead of automatic selection. Use GET /v1/apps to find app IDs.
Headless/agentic mode for unattended callers (workers, autonomous agents). Forces the self-drafting recipe path and dispatches best-effort — it NEVER returns needs_input. If a run genuinely cannot be formed it returns status: "unmatched" (machine-actionable) instead of an interactive ask. Any unmet asks ride along on the ran response as structured unmetAsks[] ({ name, key, question, type, required, autoFillable }), so an agent can satisfy one (e.g. generate an image_url) and re-run. A pinned appId is ignored in this mode.
Override specific input parameters on the selected app. Keys are parameter names.
Apply a content template for structured guidance. Use GET /v1/templates to find template IDs.
Auto-quality guarantee. Score output after completion and retry if below threshold.
Output aspect ratio. Auto-mapped to the matching workflow parameter. Common values: 1:1, 16:9, 9:16, 4:3, 3:4, 4:5, auto.
"9:16"
Freeform context about the target placement, injected into prompt engineering as structured document context. Useful for passing context from the calling application without manually writing it into the brief.
HTTPS URL to POST the completion event to when the run finishes — so an unattended caller is notified instead of polling. Also accepted nested as metadata.webhookUrl (the SDK's LaminaCreateParams surfaces both); the top-level field takes precedence when both are present.
"https://example.com/webhooks/lamina"
Response
Content creation started. Poll the run for results.
Run details including runId, workflowId, and status.