An export renders a mascot (and, for animated formats, one of its animations) to a file. Exports are jobs because video encoding takes a few seconds, but they never call a model and never cost credits. Vector formats come straight from the rig, so they stay sharp at any size and weigh kilobytes.
Formats#
Animated#
These need an animation: an animation id, an animation name, or any preset id such as wave (presets are fitted to the rig on the fly, even if you never saved one).
| format | Output | Notes |
|---|---|---|
lottie | application/json | True vector: every part is a named layer, no embedded bitmaps. Plays in lottie-web, iOS, Android. |
animated-svg | image/svg+xml | Self-contained SVG with CSS keyframes. No JavaScript needed. |
webm | video/webm | VP9 with an alpha channel: transparent video. |
mp4 | video/mp4 | H.264, no alpha. Background defaults to white. |
gif | image/gif | Works everywhere, heaviest per second. |
webp | image/webp | Animated WebP with transparency. |
apng | image/apng | Animated PNG with transparency (.png extension). |
sprite | image/png | One PNG sheet: frames left to right, then top to bottom, on a grid of ceil(√frames) columns. The API returns the sheet only, not a JSON atlas. |
Stills#
animation is optional here: with it, the still is posed at time t of that animation; without it you get the rest pose.
| format | Output | Notes |
|---|---|---|
png | image/png | Transparent unless you pass background. |
svg | image/svg+xml | The posed drawing as plain vector. |
sticker | image/png | Die-cut: a thick white border and a soft shadow. |
logo | image/svg+xml | Vector badge: the head in a circle of the mascot's main colour. |
logo-png | image/png | The same badge, rasterised at size. |
Export options#
POST/mascots/{id}/exports
| Name | Type | Description |
|---|---|---|
formatrequired | string | One of the formats above. |
animation | string | Animation id, name, or preset id. Required for animated formats. |
size | integer | Output width in px for raster formats, 64–2048. Default 512. |
fps | integer | Frames per second for animated formats, 6–60. Default 30. |
background | string | A #rrggbb fill. Omit for transparency (mp4 falls back to white). |
t | number | For stills: seconds into the animation to capture. |
version_id | string | Render an older version without restoring it. |
curl -X POST https://lumorig.com/api/v1/mascots/msc_…/exports -H "Authorization: Bearer $LUMORIG_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "format": "webm", "animation": "wave", "size": 768, "fps": 30 }'
# 202 → { "id": "job_…", "type": "export", "status": "queued", … }
curl "https://lumorig.com/api/v1/jobs/job_…?wait=60" -H "Authorization: Bearer $LUMORIG_API_KEY"
# → { "status": "succeeded", "result": { "file": { "id": "file_…", "url": "/api/v1/files/file_…", "mime": "video/webm", "bytes": … } } }Downloading files#
A finished export job has result.file. Its url is relative to the API origin and, like every file endpoint, needs your API key.
GET/files/{id}
| Name | Type | Description |
|---|---|---|
download | query | Any value (e.g. ?download=1) sends Content-Disposition: attachment with a filename like lumorig-file_….webm. Without it the file is served inline. |
curl -L "https://lumorig.com/api/v1/files/file_…?download=1" -H "Authorization: Bearer $LUMORIG_API_KEY" -o pip-wave.webmFiles are immutable, so responses carry a year-long private cache header. Store the bytes on your own CDN if you serve them to users.
Previews#
For thumbnails and quick checks there is a synchronous still renderer. It answers in the request (no job), works with an API key or, for public mascots, with no key at all.
GET/mascots/{id}/preview
| Name | Type | Description |
|---|---|---|
format | string | png (default), svg, sticker or logo. |
animation | string | Pose from this animation (id, name or preset). |
t | number | Seconds into that animation. |
size | number | Width in px, default 512. |
v | string | A version id. With it the response is cacheable forever; mascot.preview_url already includes it. |
<img src="https://lumorig.com/api/v1/mascots/msc_…/preview?animation=wave&t=0.6&size=256" alt="Pip waving" />Choosing a format#
Measured on one character, a two-second wave at 30 fps and 512 px. Your numbers will vary with the drawing, but the ratios hold.
| Format | Size | Pick it when |
|---|---|---|
| lottie | 48.0 KB · 4.4 KB gzipped | You ship to web, iOS or Android and want the smallest, sharpest file. |
| animated-svg | 48.5 KB · 8.6 KB gzipped | You want motion on a web page with no player script at all. |
| mp4 | 98.0 KB | Social posts, decks, anywhere video goes and transparency doesn't matter. |
| webm | 147.0 KB | Transparent video over your own UI. |
| gif | 686.0 KB | Chat apps, READMEs and places that only take GIFs. |
| webp · apng | 675.0 KB · 1.76 MB | Transparent animated images where GIF's edges look rough. |
| sprite | one PNG sheet | Game engines and canvas renderers. |