This walks the whole loop once: describe a character, wait while Claude draws and rigs it, give it a motion, export a Lottie file, and drop the live version into a page. Pick a tab once and every example on these pages follows it.
Before you start#
- An API key. Create one in the studio under Settings → API keys. Keys start with
lr_sk_and are shown once. See Authentication. - Credits. A new character costs 80 credits and a custom motion 20; the Free plan's monthly allowance covers this whole guide. Presets and exports are free.
export LUMORIG_API_KEY=lr_sk_…1. Create a mascot#
Send a prompt (who the character is) and optionally a style. The request returns right away with the mascot, in status generating, and the job that is drawing it.
curl -X POST https://lumorig.com/api/v1/mascots -H "Authorization: Bearer $LUMORIG_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "prompt": "a sleepy moth who guards the docs", "style": "outlined" }'
# 202 → { "mascot": { "id": "msc_…", "status": "generating", … }, "job": { "id": "job_…", "type": "generate", "status": "queued", … } }2. Wait for the job#
Generation usually takes one to four minutes. Long-poll the job with ?wait= (up to 120 seconds per request), stream its events over SSE, or register a webhook. When the job is succeeded, the mascot is ready and already has idle and wave saved.
# returns when the job finishes or after 60 s; repeat until status is succeeded/failed/canceled
curl "https://lumorig.com/api/v1/jobs/job_…?wait=60" -H "Authorization: Bearer $LUMORIG_API_KEY"
# or watch it draw
curl -N "https://lumorig.com/api/v1/jobs/job_…/events" -H "Authorization: Bearer $LUMORIG_API_KEY"3. Add a motion#
Presets are fitted to the rig on the spot, return 201 with the animation, and cost nothing. Describe anything else in words for a custom motion (20 credits, a job). See Animate.
curl -X POST https://lumorig.com/api/v1/mascots/msc_…/animations -H "Authorization: Bearer $LUMORIG_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "preset": "celebrate" }'
# 201 → { "animation": { "id": "anm_…", "name": "Celebrate", "source": "preset", … } }4. Export a file#
Exports are jobs (rendering video takes a few seconds) but never cost credits. Animated formats need an animation: an animation id, its name, or any preset id. The finished job's result.file.url downloads with your key.
curl -X POST https://lumorig.com/api/v1/mascots/msc_…/exports -H "Authorization: Bearer $LUMORIG_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "format": "lottie", "animation": "wave" }'
# 202 → { "id": "job_…", "type": "export", … }
curl "https://lumorig.com/api/v1/jobs/job_…?wait=60" -H "Authorization: Bearer $LUMORIG_API_KEY" # → result.file.id
curl -o moth.json "https://lumorig.com/api/v1/files/file_…" -H "Authorization: Bearer $LUMORIG_API_KEY"5. Embed it live#
Or skip files: <lumorig-player> loads the mascot's bundle (the rig, every saved animation, every preset and its canvases) and plays it in the page. Bundles of public mascots need no key; for private ones, create an expiring share link.
# make it public so the embed never expires…
curl -X PATCH https://lumorig.com/api/v1/mascots/msc_… -H "Authorization: Bearer $LUMORIG_API_KEY" \
-H "Content-Type: application/json" -d '{ "public": true }'
# …or mint a signed bundle URL (ttl_seconds, max 30 days)
curl -X POST https://lumorig.com/api/v1/mascots/msc_…/share -H "Authorization: Bearer $LUMORIG_API_KEY" \
-H "Content-Type: application/json" -d '{ "ttl_seconds": 86400 }'<script type="module" src="https://lumorig.com/player.js"></script>
<lumorig-player
src="https://lumorig.com/api/v1/mascots/msc_…/bundle"
animation="wave"
trigger="hover"
follow-cursor>
</lumorig-player>