Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.uselamina.ai/llms.txt

Use this file to discover all available pages before exploring further.

Base URL: https://app.uselamina.ai Auth: x-api-key: lma_your_api_key Lamina is an agentic creative API for generating videos, movies, and images for products, brands, social, and ads. You send a brief, it creates content. Two paths depending on how much control you need.
The fastest way to create content. Describe what you want, the engine handles everything.

Create content from a brief

curl -X POST \
  -H "x-api-key: lma_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"brief": "Product hero shot of white sneakers on a marble surface, premium lighting"}' \
  https://app.uselamina.ai/v1/content/create
Response:
{
  "data": {
    "runId": "<execution-id>",
    "workflowId": "<selected-app-id>",
    "status": "queued"
  }
}

Wait for results

curl -H "x-api-key: lma_your_api_key" \
  "https://app.uselamina.ai/v1/runs/<execution-id>/wait?timeout=60"
When status is "completed", outputs contain your generated assets (image URLs, video URLs, text).
{
  "data": {
    "runId": "<execution-id>",
    "status": "completed",
    "outputs": [
      {
        "id": "node-1",
        "label": "AI Designer",
        "type": "image",
        "value": "https://storage.example.com/generated/hero-shot.png",
        "status": "completed",
        "error": null
      }
    ],
    "startedAt": "2026-03-23T12:22:41.694Z",
    "completedAt": "2026-03-23T12:24:15.000Z"
  },
  "timeout": false
}

That’s it

Two calls: create and wait. The engine selected the best app, resolved brand context, mapped inputs, and executed the workflow.

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

curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/v1/apps
Use search when you know the capability you want to build around:
curl -H "x-api-key: lma_your_api_key" \
  "https://app.uselamina.ai/v1/apps?search=catalog"
Pick an appId from the response.

2. Inspect the input schema

curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/v1/apps/{appId}
{
  "data": {
    "appId": "{appId}",
    "name": "Example Catalog App",
    "description": "Generate catalog images from product inputs",
    "parameters": [
      {
        "id": "front-image",
        "name": "Front",
        "type": "url",
        "required": true,
        "accept": ["image"]
      },
      {
        "id": "location",
        "name": "Location",
        "type": "options",
        "required": true,
        "options": ["Studio", "Urban", "Park"],
        "default": "Studio"
      },
      {
        "id": "prompt",
        "name": "Prompt",
        "type": "text",
        "required": true
      }
    ]
  }
}
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

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"
For local testing or simpler integrations, you can omit ?webhook= and poll or wait instead.
{
  "data": {
    "runId": "<execution-id>",
    "workflowId": "{appId}",
    "workflowName": "Example Catalog App",
    "status": "queued",
    "outputs": [
      { "id": "node-1", "label": "Catalog Output", "type": "pending", "value": null, "status": "pending", "error": null }
    ]
  }
}

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.
curl -H "x-api-key: lma_your_api_key" \
  "https://app.uselamina.ai/v1/runs/<execution-id>/wait?timeout=60"
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:
curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/v1/runs/<execution-id>
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:
{
  "data": {
    "runId": "<execution-id>",
    "status": "completed",
    "outputs": [
      {
        "id": "node-1",
        "label": "AI Designer",
        "type": "image",
        "value": "https://storage.example.com/generated/catalog-image.png",
        "status": "completed",
        "error": null
      }
    ],
    "errorMessage": null,
    "startedAt": "2026-03-23T12:22:41.694Z",
    "completedAt": "2026-03-23T12:24:15.000Z",
    "createdAt": "2026-03-23T12:22:40.552Z"
  }
}
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