Skip to content
maskostudioDocs

All pages

  • Overview/docs/use-cases
  • Mobile app/docs/use-cases#mobile
  • Website/docs/use-cases#website
  • Desktop/docs/use-cases#desktop
  • AI agents/docs/use-cases#agents
  • Videos/docs/use-cases#videos
  • Brand/docs/use-cases#brand
  • Start building/docs/ai-agents
  • Set up once/docs/ai-agents#set-up-once
  • Ask in plain words/docs/ai-agents#ask-in-plain-words
  • What your agent does/docs/ai-agents#what-your-agent-does
  • MCP server/docs/mcp
  • Masko for Cursor/docs/ai-tools/cursor
  • Masko in ChatGPT/docs/ai-tools/chatgpt
  • Start here/docs/tutorials#start-here
  • All tutorials/docs/tutorials
  • Create your first mascot/docs/tutorials/first-mascot
  • Create an animated character/docs/tutorials/first-animation
  • Make a character talk/docs/tutorials/make-it-talk
  • Put your mascot on your website/docs/tutorials/mascot-on-your-website
  • Guide onboarding with a talking mascot/docs/tutorials/web-onboarding-mascot
  • Add a mascot that celebrates progress and welcomes users back/docs/tutorials/web-progress-companion
  • Add a talking support mascot in the bottom right/docs/tutorials/web-support-mascot
  • Show a mascot while your AI thinks/docs/tutorials/ai-loading-mascot
  • Give your AI agent a face/docs/tutorials/ai-agent-face
  • Animate the mascot you already have/docs/tutorials/animate-your-mascot
  • How to make Telegram stickers/docs/tutorials/telegram-stickers
  • How to make Discord stickers/docs/tutorials/discord-stickers
  • Quickstart: your first animation/docs/quickstart
  • Terminal quickstart/docs/terminal
  • API keys and workspaces/docs/authentication
  • CLI browser login/docs/authentication/cli
  • How mascots work/docs/how-mascots-work
  • Credits and costs/docs/credits
  • From text/docs/create/from-text
  • From an image/docs/create/from-image
  • From a website/docs/create/from-website
  • From a brand book/docs/create/from-brand-book
  • Reference images/docs/manage/references
  • What you can generate/docs/generation
  • Pose-to-animation walkthrough/docs/generate/workflow
  • Images and poses/docs/generate/images
  • Animations/docs/generate/animations
  • Talking animations/docs/generate/talking
  • Logos, backgrounds and stickers/docs/generate/design-assets
  • Cursor follower/docs/generate/cursor-follower
  • Batch generation/docs/generate/batch
  • Image and video exports/docs/manage/media-exports
  • Canvases and releases/docs/canvas
  • Build a canvas/docs/canvas/build
  • Canvas templates/docs/canvas/templates
  • Generate canvas assets/docs/canvas/generate-all
  • Export a canvas/docs/canvas/export
  • Overview and demo/docs/player
  • Play one animation/docs/player/one-animation
  • Play a canvas/docs/player/canvas
  • Hosting and file formats/docs/generate/cdn
  • File sizes/docs/generate/file-sizes
  • Float a mascot on your Mac/docs/integrations/desktop
  • Jobs and polling/docs/manage/jobs
  • Webhooks/docs/manage/webhooks
  • Manage mascots and assets/docs/manage/collections
  • All endpoints/docs/reference
  • Requests and responses/docs/reference/conventions
  • Errors and recovery/docs/reference/errors
  • Command line reference/docs/terminal/commands
  • TypeScript SDK/docs/sdk/typescript
  • Changelog/docs/reference/changelog
  • Migrate to mascots and canvases/docs/manage/studio-migration
Get an API key
Documentation

Hosting and file formats

Pick the file your platform plays with transparency, then serve it from Masko's CDN or your own.

File formats

TypeFileUse it for
webmWebM (VP9 with alpha)Transparent video in Chrome, Firefox and Edge
hevcMOV (HEVC with alpha)Transparent video in Safari, on iPhone, iPad and Mac
stacked_videoMP4, color and alpha stacked verticallyAndroid apps, with the Masko player
stacked_video_av1MP4 in AV1, color and alpha stacked verticallyThe Masko player in iPhone, iPad, Mac and Android apps, two to three times lighter than HEVC or the stacked MP4 at the same look
videoMP4 (H.264)Anywhere, but with an opaque background
transparent_imagePNGA still pose with a transparent background

Apple browsers need HEVC for transparency, others WebM, and Android apps the stacked MP4. The Masko player picks the right file and loops it:

<div id="mascot" style="width: 240px; height: 240px"></div>
<script src="https://cdn.jsdelivr.net/npm/@masko/player@0.1/dist/masko-player.js"></script>
<script>
  MaskoPlayer.mount(document.getElementById('mascot'), {
    clip: { webm: 'https://assets.masko.ai/.../wave.webm', hevc: 'https://assets.masko.ai/.../wave.mov' }
  });
</script>

A talking animation plays its own voice. Browsers allow sound only after the person's first click or key press on the page: until then it plays muted, and its voice is heard from the next loop. Pass sound: false to keep it silent.

Hosted CDN URLs

With hosting on, generation returns CDN URLs before the files exist. Each serves a branded placeholder until the real file replaces it at the same URL.

URL format

https://assets.masko.ai/{user_prefix}/{mascot_slug}/{item_slug}-{hash}.{ext}

Example:
https://assets.masko.ai/fda8417d/felix-the-fox/waving-hello-a1b2c3d4.png

user_prefix is your account prefix, mascot_slug comes from the mascot's slug field, item_slug from the item name at creation, and ext from the asset type (png, mp4, webm or mov).

Size variants

Free size variants add the size before the extension. The file size calculator shows what each size weighs.

URLs look like this:

# Original (full resolution)
https://assets.masko.ai/u/felix-the-fox/waving-a1b2.webm

# 480px variant
https://assets.masko.ai/u/felix-the-fox/waving-c3d4-480.webm

# 360px variant
https://assets.masko.ai/u/felix-the-fox/waving-e5f6-360.webm

Get variant URLs instantly

Pass sizes when generating to get the variant URLs in the response:

{
  "type": "animation",
  "name": "wave",
  "image_prompt": "standing and waving",
  "animation_prompt": "waving hello",
  "animation_model": "standard",
  "duration": 5,
  "sizes": [480, 360]
}

urls then adds keys such as webm_480 for sizes enabled in animation_sizes, serving placeholders until ready; poll the job's size_variants.status.

Check CDN status

GET /v1/mascots/:id returns cdn_status, with each published asset's URL, size and status.

curl https://api.masko.ai/v1/mascots/MASCOT_ID \
  -H "Authorization: Bearer masko_YOUR_API_KEY"

List mascot assets

Each asset has cdn_url when hosted, otherwise a signed file_url, and file_size in bytes once it is completed. Add ?include_file_urls=false to skip signing for metadata-only lists.

curl https://api.masko.ai/v1/mascots/MASCOT_ID/assets \
  -H "Authorization: Bearer masko_YOUR_API_KEY"

Turn on hosting

Mascots created with the API start with hosting on. Mascots made in Studio or through the MCP server start with it off. Turn it on with the Get Links switch in Studio, or with this call. Every finished image and video gets a permanent public URL, and files finished later are hosted automatically.

Anyone with a URL can open the file, so an agent should ask the mascot's owner before it calls this.

curl -X POST https://api.masko.ai/v1/mascots/MASCOT_ID/publish \
  -H "Authorization: Bearer masko_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Calling it again on a hosted mascot changes nothing and returns changed: false. Send {"force": true} to host finished files that are missing. It returns 400 when the mascot has no finished file yet. Hosting costs no credits up to 50,000 views a month, then 1 credit per 1,000 views.

GET /v1/mascots/:id/cdn-export returns the Get Links JSON of the mascot page: images, transparent images, videos, size variants, logos and stickers by item name. animated_stickers have telegram, whatsapp, wechat and discord keys in formats.

Only ready, hosted versions appear. While hosting is off, or before any file is hosted, it returns 409 cdn_export_not_ready with a message that says which one: turn on hosting, or wait for the jobs to finish.

curl https://api.masko.ai/v1/mascots/MASCOT_ID/cdn-export \
  -H "Authorization: Bearer masko_YOUR_API_KEY"

Change the slug

A new slug changes only future asset paths. Slugs are 2 to 50 lowercase letters, digits and dashes, unique across all mascots.

curl -X PATCH https://api.masko.ai/v1/mascots/MASCOT_ID \
  -H "Authorization: Bearer masko_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "felix"
  }'

Turn off hosting

Set settings.cdn_enabled: false when creating the mascot. Assets are still generated, with signed storage URLs from the jobs endpoint.