Animation presets
A preset is a ready-made move, such as the 6 7 gesture. More are coming. Instead of describing the motion, you name the preset. Masko rewrites it for your mascot's body first (paws, little nubs, a robot's hard arms), draws its start pose, and animates it at the preset's fixed length and timing. Every preset is a loop that starts and ends on the same pose.
1. List the presets
curl https://api.masko.ai/v1/animation-presets \
-H "Authorization: Bearer $MASKO_API_KEY"Each preset has its id, name, group (everyday, mood, props or trend), its duration in seconds, what it is for (use) and what it looks like (reads_as).
2. Animate with one
curl -X POST https://api.masko.ai/v1/mascots/MASCOT_ID/generate \
-H "Authorization: Bearer $MASKO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"type": "animation", "preset": "six-seven"}'The receipt is a job, as for any animation: follow its poll_url. The item is named after the preset unless you send name.
- Start from your own pose: send
item_idorsource_image_asset_id, and that picture is the first and last frame instead of the preset's start pose. - What the preset sets: the length, the loop, the motion and the start pose. Sending
animation_prompt,image_prompt,duration,loop, an end image,reverse,speechorsoundwith a preset returns 400. - Price: an animation of the preset's length on the standard model, plus $0.125 when its start pose is drawn.
How a preset fits your mascot
Each preset says what the move must look like and, for bodies that cannot do it as written, what it becomes: short arms, no arms, a rigid body. Before anything is drawn, Masko reads your mascot's pictures and description and rewrites the start pose and every step for that body, keeping the timing. The job's generation_context.timeline records the preset, its version and the text that was sent.
