Every Mosio video is one HTML document, a Hyperframes composition. Layout, type, colour, and motion are all in the page. In Claude, the connector teaches this through get_composition_guide (with a recipe for the look’s plan, art direction and example code) and a library of motion-design guides, so you can simply describe the video you want; from code, you send the HTML yourself.
The shape of a composition
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link href="https://fonts.googleapis.com/css2?family=Anton&display=swap" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
<style>
html, body { width: 1080px; height: 1920px; margin: 0; overflow: hidden; background: #0c152a; }
#root { position: relative; width: 100%; height: 100%; overflow: hidden; color: #fff; }
#title { position: absolute; left: 80px; right: 80px; top: 600px; font: 220px/1 "Anton", sans-serif; }
</style>
</head>
<body>
<div id="root" data-composition-id="main" data-start="0" data-duration="10"
data-width="1080" data-height="1920" data-fps="30">
<div id="title">Weekend sale</div>
</div>
<script>
const tl = gsap.timeline({ paused: true });
tl.from("#title", { yPercent: 40, opacity: 0, duration: 0.8, ease: "power3.out" }, 0.2);
window.__timelines = window.__timelines || {};
window.__timelines["main"] = tl;
</script>
</body>
</html>The rules that matter:
- One root with
data-composition-id,data-width,data-height, anddata-duration(seconds, up to 60). The duration is what you pay in credits. - One paused GSAP timeline, registered as
window.__timelines["main"]. The renderer steps through it frame by frame. - No clocks or randomness.
setTimeout,requestAnimationFrame, CSS animations,Date.now(), and unseededMath.random()do not follow the timeline, so the video would differ from the preview. - No network at render time. See the next section for what you can load.
What you can load
| Asset | How |
|---|---|
| GSAP 3.14 | Any jsdelivr, cdnjs, or unpkg URL, or vendor/gsap.min.js. Mosio uses its own copy. |
| GSAP plugins | CustomEase, CustomBounce, CustomWiggle, DrawSVG, EasePack, Flip, MorphSVG, MotionPath, Physics2D, PhysicsProps, ScrambleText, SplitText, Text: from a CDN URL or vendor/<Name>.min.js. |
| Google Fonts | A normal fonts.googleapis.com link or @import. Mosio downloads the Latin subsets when it checks the page. |
| Built-in fonts | Bebas Neue, Archivo Black, Poppins, Playfair Display, Space Grotesk, Caveat, Noto Sans, from vendor/. |
| Images | Inline SVG, CSS, small data: images, or the workspace’s photos (below). |
| Your media | Photos, footage and sound uploaded in the dashboard’s Media page, by the path list_media (or GET /v1/media) gives; see below. |
| Registry components and blocks | data-composition-src="compositions/components/<name>.html" or "compositions/<name>.html"; see below. |
| Sound effects | 1,036 bundled effects, synthesized in code (whooshes, pops, clicks, ticks, keys, dings, chimes, risers, hits) and CC0 recordings (foley, coins, cards, footsteps, interface sounds, arcade tones, jingles), from assets/sfx/<file>.flac; see below. |
Anything else (other URLs, other video or audio, iframes) is refused before rendering.
Recipes
A recipe is a look with its own motion plan, for promos, creator content, explainers and stories alike: the dashboard’s Recipes page, and list_recipes in Claude. get_composition_guide with a recipe returns its plan (a technique for each part of the storyboard, and the seconds each part gets), its art direction (materials, colour, type, motion, camera), and its example code, which Claude rewrites for your content rather than sending as is.
Every recipe example draws its colours and fonts from twelve CSS custom properties on :root: --latar (background), --latar-2 (cards and panels), --utama (main colour) and --aksen (accent) for fills, --teks and --teks-redup (text on the background), --teks-di-utama and --teks-di-aksen (text on those colours), --utama-di-latar and --aksen-di-latar (coloured words on the background, readable for any brand), --font-judul and --font-isi. With a brand, the guide gives the brand’s values for them, so a whole video takes the brand by swapping one block. Writing your own HTML the same way keeps it easy to re-colour.
The recipe gives the structure and the timing; the brand wins on colours, fonts, logo, words, and the feel of the motion.
The brand
Claude reads the brand (set in the dashboard under Brand, with get_brand) before it writes anything: business name, voice, colours, fonts, motion style, contact, and products with prices. A workspace can have several brands; then each request names one with brand_id (GET /v1/brands lists them).
The logo is at assets/brand/logo.<ext> (the exact path is in the brand). A composition that references it gets the file in the preview, Studio, and the render.
Your photos, footage and sound
Files uploaded in the dashboard’s Media page (photos up to 8 MB, MP4 or MOV up to 300 MB, MP3, M4A or WAV up to 50 MB) are prepared for video on Mosio’s render servers: footage becomes H.264 at 30 fps with the long side at most 1920 px (a phone’s rotation applied, HDR mapped to normal colour), sound becomes AAC, photos become JPEG or PNG, and location data is removed. Each one then has a path such as assets/media/upl_….mp4:
<video id="clip" class="clip" src="assets/media/upl_3f2a9c1e-7b4d-4e8a-9c21-5d6e7f8a9b0c.mp4"
muted data-start="0" data-duration="4" data-media-start="2.5" data-track-index="0"
playsinline style="width:100%;height:100%;object-fit:cover"></video>
<audio src="assets/media/upl_8c1b2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e.m4a"
data-start="0" data-duration="15" data-volume="0.6"></audio>data-startanddata-durationplace a clip on the video’s timeline;data-media-startskips into the file;data-playback-ratechanges its speed.- Every
<video>ismutedor keeps its sound withdata-has-audio="true". Music or a voice recording plays from<audio>, each with its ownid. Mosio has no music of its own; its bundled sound effects play the same way, fromassets/sfx/<file>.flac. - Photos:
<img src="assets/media/upl_….jpg">or CSSurl(). - A path that is not the workspace’s, or not prepared yet, comes back as
media_not_foundormedia_not_ready; a clip that runs past the end of its file is amedia_too_shortwarning. - Sources longer than 5 minutes, or long 4K footage, are not prepared: trim or export at 1080p first. They stay usable for social posts.
Sound effects
Mosio bundles 1,036 sound effects: 458 from the earshot sound bank (MIT), synthesized in code, the ones a video repeats in two or three takes, and 578 CC0 recordings from Kenney’s audio packs. Listen to all of them at mosio.me/en/audio. get_composition_guide gives the rules and a kit (one sound per role, picked by the brand’s motion style); the full catalog is skill_library mosio/video-composition/sfx.md.
<audio id="sfx-3" src="assets/sfx/whoosh_fast-crisp.flac"
data-start="2.24" data-duration="1.06" data-volume="0.5" data-track-index="20"></audio>- Each file has a lead: the seconds from its start to its attack (or, for whooshes and risers, its loudest moment). To land it on a moment
t, setdata-starttot − lead. - Every
<audio>needs its ownid; writedata-durationtoo. Overlapping effects go on differentdata-track-indexvalues. - A name not in the catalog comes back as
sfx_not_found, more than 80 effects assfx_too_many, and adata-volumeabove 1 as asfx_too_loudwarning (a mix that peaks too high is turned down as a whole). - The card’s preview plays without sound; the MP4 has it.
Registry components
Mosio carries the components of the Hyperframes registry (text effects, transitions, overlays, UI cards, charts, captions) and its blocks that stand alone in one file (whole scenes: lower thirds, scene transitions, code and chart scenes; most are 1920×1080). Mosio adds its own library, usemosio/blocks (MIT): 1,059 blocks of text effects, word-timed captions, transitions, WebGL shader backdrops and filters, motion graphics, maps, carousels, short templates, UI and animated icons (ported from remocn, the Hyperframes blocks that need adapting, lucide-animated and CodePen), plus shop moments (prices, receipts, vouchers, order tracking, ratings) made by Mosio, each filling its host frame so it works in vertical and landscape videos. Items marked webgl render slower, because the render machines draw WebGL without a GPU; their resolution variable keeps that cost down. In Claude, the search_registry and get_registry_item tools find them. Load one as a sub-composition and Mosio supplies the file:
<div data-composition-id="scramble-reveal"
data-composition-src="compositions/components/scramble-reveal.html"
data-variable-values='{"text":"KOPI SENJA","accent":"violet"}'
data-start="3" data-duration="3" data-width="1459" data-height="432"></div>Checking and fixing
Mosio checks every composition before it renders or spends credits: assets, the root element, and the Hyperframes lint rules. A failed check returns invalid_composition with a list of problems, each with a code and usually a hint:
{
"error": "invalid_composition",
"details": {
"problems": [
{ "code": "non_deterministic_code", "message": "Math.random() ...", "hint": "Use a seeded PRNG ..." }
]
}
}In Claude this loop is automatic: Claude reads the problems, fixes the HTML, and checks again.
Rendering
- In Claude:
preview_compositionshows a free moving preview; Buat video in the card renders it. - From code:
POST /v1/compositionswith the HTML. See Render a composition.