Skip to main content
Base URL: https://app.uselamina.ai Auth: x-api-key: lma_your_api_key Lamina is an agentic creative API for generating videos, movies, images, and audio. High-level briefs use one plan → approve → execute lifecycle; direct app APIs remain available when you already know exactly what to run.

1. Plan from a brief

Read data.canonicalStatus and data.plan:
  • needs_clarification / needs_input: collect questions and plan again with answers in inputs.
  • awaiting_choice: present alternatives, then call POST /v1/content/plans/{planId}/choose.
  • awaiting_approval: show the steps, warnings, estimated cost, and ask for approval.

2. Execute the exact frozen plan

The fingerprint prevents a changed plan from being executed after approval. maxCredits is a hard ceiling. If cost is unknown, execution also requires allowUnknownCost: true.

3. Read durable status

The snapshot contains progress, per-step state, final outputs, cancellation state, and typed errors. For a trusted unattended worker, POST /v1/content/create with headless: true provides a compatibility shortcut, but still requires Idempotency-Key, maxCredits, and an approval-ready plan. It never bypasses clarification or route choice.

Path 2: Full control (choose the app yourself)

When you need to pick a specific app, inspect its parameters, and provide exact inputs.

1. Discover an app

Use search when you know the capability you want to build around:
Pick an appId from the response.

2. Inspect the input schema

Use the parameter name as the key when sending inputs. For options, send the label from the options array. This lets your backend or UI adapt to different apps without changing the execution contract.

3. Start execution

For local testing or simpler integrations, you can omit ?webhook= and poll or wait instead.

4. Get results

Three options depending on your integration: Via wait (simplest for agents): Block until the execution finishes or the timeout expires. No polling loop needed.
Use timeout=60 for image workflows, timeout=120 for video. If it times out, timeout: true is returned alongside the current state — call again or fall back to polling. Via webhook: If you passed ?webhook=, your callback URL receives a POST with the results when the execution completes. The payload has the same structure as the polling response below, signed with ED25519 headers for verification. Via polling: Poll every 3-5 seconds:
Status flow: queued -> running -> completed or failed When status is "completed", output type changes from "pending" to "image", "video", or "text", and value contains the result:
If status is "failed", check errorMessage and each output’s error field.

Score and distribute (optional)

After creation, you can:
  • Score content: POST /v1/content/score — evaluate quality against brand context before publishing
  • Publish: POST /v1/publishing/publish — send to connected social channels
  • Transfer to CDN: POST /v1/publishing/transfer-asset — permanent hosting on your own infrastructure

What’s next