Skip to main content

Lamina API — Quick Start

Base URL: https://app.uselamina.ai Auth header: x-api-key: lma_your_api_key

1. List apps

curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/api/apps
Pick an appId from the response.

2. Get app parameters

curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/api/apps/173692dd-0258-41bd-8a56-2cf9bbe89910
{
  "data": {
    "appId": "173692dd-0258-41bd-8a56-2cf9bbe89910",
    "name": "Full Set Catalog Generation",
    "description": "Just upload front and back image of your garment and see the full catalog come to life with Images and videos",
    "parameters": [
      {
        "name": "Front",
        "type": "url",
        "required": false,
        "accept": ["image"],
        "default": "https://media.getmason.io/api/assetlib/1b2854fd-e126-4096-9bb0-050583d36ed5.jpg"
      },
      {
        "name": "Back",
        "type": "url",
        "required": false,
        "accept": ["image"],
        "default": "https://media.getmason.io/api/assetlib/d81ce1a8-4a36-4fcd-b506-3a852670104f.jpg"
      },
      {
        "name": "Model Gender",
        "type": "options",
        "required": false,
        "options": ["Male", "Female"]
      },
      {
        "name": "Model  Ethnicity",
        "type": "options",
        "required": false,
        "options": ["Caucasian", "Asian", "African", "Latin American", "South Asian", "Middle Eastern"]
      },
      {
        "name": "Model Body type",
        "type": "options",
        "required": false,
        "options": ["Standard ", "Plus Size", "Muscular"]
      },
      {
        "name": "Model Hair color",
        "type": "options",
        "required": false,
        "options": ["Blonde", "Black", "Brunette", "Red hair", "Ginger", "White"]
      },
      {
        "name": "Model Hair Style",
        "type": "options",
        "required": false,
        "options": ["Straight ", "Curly"]
      },
      {
        "name": "Model Hair Length",
        "type": "options",
        "required": false,
        "options": ["Short", "Medium", "Long"]
      },
      {
        "name": "Location",
        "type": "options",
        "required": false,
        "options": ["Studio", "Urban", "Park", "Indoors", "Beach"]
      }
    ]
  }
}
All parameters are optional. Use the name as the key when sending inputs.

3. Run the app

Optionally pass ?webhook=<url> to receive results pushed to your server when complete. You can still poll the execution status regardless — webhooks and polling work side by side.
curl -X POST \
  -H "x-api-key: lma_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": {
      "Front": "https://media.getmason.io/api/assetlib/1b2854fd-e126-4096-9bb0-050583d36ed5.jpg",
      "Back": "https://media.getmason.io/api/assetlib/d81ce1a8-4a36-4fcd-b506-3a852670104f.jpg",
      "Model Gender": "Female",
      "Model  Ethnicity": "South Asian",
      "Model Body type": "Standard ",
      "Model Hair color": "Black",
      "Model Hair Style": "Straight ",
      "Model Hair Length": "Long",
      "Location": "Studio"
    }
  }' \
  "https://app.uselamina.ai/api/apps/173692dd-0258-41bd-8a56-2cf9bbe89910/executions?webhook=https://your-server.com/callback"
{
  "data": {
    "executionId": "<execution-id>",
    "workflowId": "173692dd-0258-41bd-8a56-2cf9bbe89910",
    "workflowName": "Full Set Catalog Generation",
    "status": "queued",
    "outputs": [
      { "id": "node-1", "label": "AI Designer", "type": "pending", "value": null, "status": "pending", "error": null },
      { "id": "node-2", "label": "AI Designer", "type": "pending", "value": null, "status": "pending", "error": null }
    ]
  }
}

4. Get results

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: If not using webhooks, poll every 3-5 seconds:
curl -H "x-api-key: lma_your_api_key" \
  https://app.uselamina.ai/api/executions/<execution-id>
Status flow: queuedrunningcompleted or failed When status is "completed", output type changes from "pending" to "image", "video", or "text", and value contains the result:
{
  "data": {
    "executionId": "<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.

Discover other apps

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

# Search
curl -H "x-api-key: lma_your_api_key" \
  "https://app.uselamina.ai/api/apps?search=cartoon"
Pick any appId and follow the same 3 steps.