Lamina Labs

Documentation

Getting started

Create an API key and generate your first video over HTTP.

The Simi API generates narrated whiteboard explainer videos from a prompt, optionally grounded in a document you upload. The base URL is https://api.laminalabs.ai, and every response is wrapped in a data envelope.

1. Create an API key

Log in to the Simi app, open API Keys from your workspace, and create a key. Keys look like lamina_xxxxxxxx — treat them like passwords and keep them out of client-side code. Authenticate with the X-Api-Key header; the key is shown once, at creation.

API keys require an active Max or Business plan. On other plans, creating or using a key returns 403 ACCOUNT_API_SCOPE_REQUIRED. API usage is billed at 3× credits.

2. Submit a job

curl
curl -X POST https://api.laminalabs.ai/v1/jobs \
  -H "X-Api-Key: $LAMINA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payload": {
      "prompt": "Explain how photosynthesis works, for a middle-school class.",
      "options": { "duration": 1, "aspect_ratio": "16:9" }
    }
  }'

duration is in whole minutes, 1 to 5. Other options are aspect_ratio (16:9, 9:16, 1:1), language, and voice; unknown option names are rejected rather than ignored. Pass an Idempotency-Key header to make a retry safe.

The call returns 202 with the created job. Keep data.job_id — that is what you poll.

202 response (abridged)
{
  "data": {
    "job_id": "3f1c8a02-5d6e-4b71-9c33-8ad0f2e7b915",
    "status": "queued",
    "prompt": "Explain how photosynthesis works, for a middle-school class.",
    "duration": 60,
    "video_url": null
  }
}

3. Poll the job

curl
curl https://api.laminalabs.ai/v1/jobs/$JOB_ID \
  -H "X-Api-Key: $LAMINA_API_KEY"

data.status moves through queued, processing, and then complete — or error or cancelled. data.progress is a fraction from 0 to 1. A one-minute explainer takes about 40 seconds, so poll every few seconds rather than in a tight loop.

4. Download the video

The video endpoint returns JSON describing where the file lives, not the file itself. Read data.src, then fetch it — that URL is already signed, so it needs no API key and may redirect to a CDN.

curl
curl https://api.laminalabs.ai/v1/jobs/$JOB_ID/video \
  -H "X-Api-Key: $LAMINA_API_KEY"

# {"data":{"src":"/v1/media/jobs/.../final.mp4?expires=...","src_available":true,...}}

curl -L "https://api.laminalabs.ai$SRC" -o out.mp4

Check src_available before downloading: while a job is still rendering, stream_src and stream_available describe the live stream instead. data.expires_at is when the signed URL stops working.

5. Ground a video in a document

Upload the file first, then reference the returned asset id when you create the job. PDF, Word, PowerPoint, Markdown, plain text, and JSON are accepted, up to 25 MB.

curl
curl -X POST https://api.laminalabs.ai/v1/assets \
  -H "X-Api-Key: $LAMINA_API_KEY" \
  -F kind=document \
  -F file=@refund-policy.pdf

# {"data":{"asset":{"asset_id":"9c0e...","status":"ready",...}}}

curl -X POST https://api.laminalabs.ai/v1/jobs \
  -H "X-Api-Key: $LAMINA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payload": {
      "prompt": "Walk a new support hire through this refund policy.",
      "asset_ids": ["9c0e..."],
      "options": { "duration": 2 }
    }
  }'