curl --request POST \
--url https://app.uselamina.ai/v1/compose/plan \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data @- <<EOF
{
"script": "Here's how our analytics dashboard turns raw events into decisions in seconds.",
"aspectRatio": "16:9"
}
EOFimport requests
url = "https://app.uselamina.ai/v1/compose/plan"
payload = {
"script": "Here's how our analytics dashboard turns raw events into decisions in seconds.",
"aspectRatio": "16:9"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
script: 'Here\'s how our analytics dashboard turns raw events into decisions in seconds.',
aspectRatio: '16:9'
})
};
fetch('https://app.uselamina.ai/v1/compose/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.uselamina.ai/v1/compose/plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'script' => 'Here\'s how our analytics dashboard turns raw events into decisions in seconds.',
'aspectRatio' => '16:9'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.uselamina.ai/v1/compose/plan"
payload := strings.NewReader("{\n \"script\": \"Here's how our analytics dashboard turns raw events into decisions in seconds.\",\n \"aspectRatio\": \"16:9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.uselamina.ai/v1/compose/plan")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": \"Here's how our analytics dashboard turns raw events into decisions in seconds.\",\n \"aspectRatio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.uselamina.ai/v1/compose/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"script\": \"Here's how our analytics dashboard turns raw events into decisions in seconds.\",\n \"aspectRatio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ready": true,
"format": {
"id": "motion_graphics",
"label": "Motion-graphics explainer",
"available": true,
"reason": "data/how-to content — clarity beats footage"
},
"cost": {
"tier": "low",
"estimatedCredits": 35
},
"estimatedDurationSec": 12,
"aspectRatio": "16:9",
"beatCount": 3,
"beats": [
{
"index": 0,
"treatment": "static_card",
"effect": "slide_up",
"transition": "fade",
"motion": false,
"imagePrompt": "Clean dashboard hero with a rising line chart"
}
],
"requiredInputs": [],
"missingInputs": []
}
}{
"error": "script is too long (~160s of narration; max 90s). Shorten the script.",
"code": "VALIDATION_ERROR",
"retryable": false,
"details": {
"reason": "SCRIPT_TOO_LONG",
"estimatedDurationSec": 160,
"maxScriptDurationSec": 90
}
}{
"error": "Invalid API key"
}"Too many requests from this IP, please try again in a minute"Plan Compose Video
Preview what POST /v1/compose/video will do for a script — the
format it routes to, the estimated cost, and the per-beat storyboard —
without generating any media or spending a credit. Fast (one LLM
call). Use it to show the plan + cost and confirm before committing.
ready: false with missingInputs / blockers tells you exactly what to
supply before dispatching. Accepts the same steering fields as
/v1/compose/video (format, direction, sections, inputs,
aspectRatio).
curl --request POST \
--url https://app.uselamina.ai/v1/compose/plan \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data @- <<EOF
{
"script": "Here's how our analytics dashboard turns raw events into decisions in seconds.",
"aspectRatio": "16:9"
}
EOFimport requests
url = "https://app.uselamina.ai/v1/compose/plan"
payload = {
"script": "Here's how our analytics dashboard turns raw events into decisions in seconds.",
"aspectRatio": "16:9"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
script: 'Here\'s how our analytics dashboard turns raw events into decisions in seconds.',
aspectRatio: '16:9'
})
};
fetch('https://app.uselamina.ai/v1/compose/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.uselamina.ai/v1/compose/plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'script' => 'Here\'s how our analytics dashboard turns raw events into decisions in seconds.',
'aspectRatio' => '16:9'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.uselamina.ai/v1/compose/plan"
payload := strings.NewReader("{\n \"script\": \"Here's how our analytics dashboard turns raw events into decisions in seconds.\",\n \"aspectRatio\": \"16:9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.uselamina.ai/v1/compose/plan")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": \"Here's how our analytics dashboard turns raw events into decisions in seconds.\",\n \"aspectRatio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.uselamina.ai/v1/compose/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"script\": \"Here's how our analytics dashboard turns raw events into decisions in seconds.\",\n \"aspectRatio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ready": true,
"format": {
"id": "motion_graphics",
"label": "Motion-graphics explainer",
"available": true,
"reason": "data/how-to content — clarity beats footage"
},
"cost": {
"tier": "low",
"estimatedCredits": 35
},
"estimatedDurationSec": 12,
"aspectRatio": "16:9",
"beatCount": 3,
"beats": [
{
"index": 0,
"treatment": "static_card",
"effect": "slide_up",
"transition": "fade",
"motion": false,
"imagePrompt": "Clean dashboard hero with a rising line chart"
}
],
"requiredInputs": [],
"missingInputs": []
}
}{
"error": "script is too long (~160s of narration; max 90s). Shorten the script.",
"code": "VALIDATION_ERROR",
"retryable": false,
"details": {
"reason": "SCRIPT_TOO_LONG",
"estimatedDurationSec": 160,
"maxScriptDurationSec": 90
}
}{
"error": "Invalid API key"
}"Too many requests from this IP, please try again in a minute"ready: false with missingInputs / blockers tells you exactly what to supply. Accepts the same steering fields as the compose call: format, direction, sections, inputs, aspectRatio.Authorizations
Workspace API key. Prefix: lma_. Example: lma_abc123...
Body
Shared input for POST /v1/compose/plan and POST /v1/compose/video. The user picks a format (never a model) and steers the render via the script — direction + sections — not by naming models.
The narration to speak (a hook + one insight + a CTA). Its spoken length must be ≤ the maxScriptDurationSec capability (~90s).
4000Video title.
One-paragraph visual brief for the shots.
A format id from GET /v1/compose/formats. Omit to auto-route the script to the best available format.
Free-text creative direction ("open on the product, fast cuts, end on the logo") — steers the render without naming models.
Structured per-span storyboard hints, for a prescriptive caller.
Show child attributes
Show child attributes
A format's required inputs, keyed by input key (e.g. a presenterImage key mapping to an https URL). See each format's inputs in GET /v1/compose/formats.
16:9, 9:16, 1:1, 4:5, 4:3 ElevenLabs voice id for the narration. Omit and the narration director picks a voice whose tone fits the script. (compose/video only.)
Add ElevenLabs v3 audio tags for stronger, more human inflection. Prosody/pacing is always applied; this adds emotional tags. Default false. (compose/video only.)
Condition the render on-brand — the brand DNA steers the style bible, the narration voice (Brand Kit), and the caption color/font. On compose/plan it conditions the previewed storyboard too (response includes brand.applied). Omit for a generic look. Fail-soft; a brand miss never blocks the render.
Target per-clip length within the capability window.
Dedupe retries — a repeated key returns the same run (no double charge). (compose/video only.)
Response
The dry-run plan.