Skip to main content

What Is The Creative Engine

Lamina is a headless creative engine. Instead of calling models directly, you call apps — packaged multi-node workflows that may internally chain image generation, video generation, LLM reasoning, compositing, upscaling, and audio synthesis. Each app has a typed input schema. You send inputs, the engine handles orchestration, brand context injection, and output delivery. The parallel to headless CMS is direct. Sanity stores and delivers structured content through schemas, APIs, and delivery endpoints. Lamina creates and delivers structured creative assets through the same pattern — schema-first, API-first, channel-agnostic — applied to generative media instead of documents. The engine sits between your application and the models. Your code never needs to know which providers run behind an app, how nodes are wired, or where outputs are hosted. You work with five primitives, and the engine handles everything else.

The Five Primitives

PrimitiveWhat It IsCMS Analogy
AppA packaged workflow with a typed input schemaContent type / document schema
ExecutionOne async run of an app that produces outputsDocument creation / mutation
IntelligenceBrand context, predictions, recommendationsEditorial strategy / content rules
TemplatePre-configured starting point for a content typeContent template / blueprint
ChannelA connected publishing destinationFrontend / delivery endpoint
Apps define what you can create. Executions are the act of creating. Intelligence makes the output smarter. Templates accelerate setup. Channels deliver the result. This is the full content lifecycle through one API: discover, create, evaluate, distribute.

Two Ways To Create

One call: let the engine decide

curl -X POST \
  -H "x-api-key: lma_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "brief": "A premium hero shot of a leather handbag on marble, warm studio lighting",
    "contentType": "product_image"
  }' \
  https://app.uselamina.ai/v1/content/create
One call. The engine resolves brand context, selects the best-fit app, maps inputs, and starts the execution. You get back a run ID and collect results the same way as any other execution. This is the path for agents and automation — go from intent to asset without manual orchestration.

Step by step: you pick the app

# 1. Discover
curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/v1/apps

# 2. Inspect
curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/v1/apps/{appId}

# 3. Execute
curl -X POST \
  -H "x-api-key: lma_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": {
      "Front": "https://example.com/front.jpg",
      "Location": "Studio"
    }
  }' \
  "https://app.uselamina.ai/v1/apps/{appId}/runs?webhook=https://your-server.com/callback"
You choose the app, inspect its schema, provide exact inputs. Full control over every parameter. Both paths produce the same execution object, the same output structure, and the same delivery options. The difference is who does the thinking — your code or the engine.

The Execution Lifecycle

Every creation in Lamina — whether started via content/create or apps/{appId}/runs — follows the same lifecycle:
1

Queued

The execution is accepted and waiting for capacity. You receive a run ID immediately.
2

Running

The workflow nodes are executing. For multi-step apps, individual nodes complete in sequence or parallel.
3

Completed or Failed

Terminal state. Outputs resolve from pending placeholders to concrete image, video, or text values.
Four ways to get results:
MethodWhen to use
Wait endpointSimplest. GET /v1/runs/{id}/wait blocks until done. Best for agents.
SSE streamReal-time progress. GET /v1/runs/{id}/stream sends events as nodes complete.
WebhookProduction workloads. Pass ?webhook=<url> at execution time. Signed with ED25519.
PollingFallback. Poll GET /v1/runs/{id} every 3-5 seconds.
See Handle Long-Running Executions for implementation patterns.

Intelligence Layer

The intelligence endpoints are the editorial brain of the engine. They make creation smarter over time.
EndpointWhat it provides
GET /v1/intelligence/brand-contextBrand DNA, visual guidelines, tone, creative constraints
POST /v1/intelligence/predictPerformance prediction before you publish
GET /v1/intelligence/recommendationsActionable content suggestions based on brand and performance data
GET /v1/intelligence/trendsTrend signals for your categories
When you use POST /v1/content/create, the engine queries brand context automatically and injects it into the execution. When you use the step-by-step path, you can fetch brand context yourself and use it to inform your input choices. Intelligence is what separates a creative engine from a model proxy. The engine knows your brand, predicts what will perform, and recommends what to create next.

Distribution Layer

Channels are connected publishing destinations — social accounts, CDN endpoints, storage targets.
EndpointWhat it does
GET /v1/publishing/channelsList connected social accounts and destinations
POST /v1/publishing/publishPublish content to one or more channels
POST /v1/publishing/transfer-assetTransfer assets to external CDN or storage
GET /v1/publishing/historyView publish history and job status
The pattern is the same as a headless CMS delivering to frontends: your content is created once, stored as structured data, and delivered to any channel from one API. No per-channel integration work on your side.

What This Means For Agents

The Creative Engine is designed for programmatic consumption. If you are building an agent — whether with Claude, GPT, LangChain, or your own orchestrator — the API gives you:
  • Schema-first discovery. Every app has a typed input contract you can inspect at runtime. No guessing.
  • Async-native execution. Executions return immediately. Results arrive via webhook, SSE, wait endpoint, or polling.
  • Intelligence grounding. Brand context and performance data are API-accessible. Your agent can make informed creative decisions, not blind ones.
  • One-call creation. POST /v1/content/create goes from a text brief to a finished asset without manual app selection or input mapping.
  • Structured outputs. Every result is typed (image, video, text) with a stable schema. Parse once, handle every app.
If you are building an agent, start with Create Content. If you are building a product integration, start with Quick Start.