Image and video exports
Resize images and convert animations, one asset at a time or as saved defaults for a mascot, project or folder. Exports spend no generation credits and never replace source files.
Export one image or video
curl -X POST https://api.masko.ai/v1/assets/ASSET_ID/exports \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: image-webp-256" \
-d '{"format":"webp","size":256}'Use the exact asset ID of the version you want (original image, transparent image or sticker). The asset must be completed, active and in an accessible mascot.
| Source | Formats | Size |
|---|---|---|
| Image, transparent image, sticker | png, webp | Maximum dimension, 32–2048 pixels |
| Video, WebM, HEVC | webm, hevc, prores, stacked_video, gif, animated_webp, lottie, dotlottie, png_sequence | Width, 32–1920 pixels |
| Video, WebM, HEVC | mkpk (ESP32 boards) | Exact width, a multiple of 16 from 32 to 1024 |
- Omit
sizefor the original delivery size. Nothing is enlarged. - Images keep their aspect ratio and alpha.
- Video export needs an existing transparent-video result and keeps the delivery crop and reverse direction.
animated_webpis a transparent, looping, lossy animated WebP with no file-size cap, for apps and websites that play WebP natively. For a WhatsApp sticker, addsticker_profile(below).
New work returns 202 with data.job_id, asset_id, status and poll_url. Poll GET /v1/jobs/{job_id}, then call GET /v1/assets/{id}/exports for signed file_url downloads, one current export per format and size. Signed URLs expire, so list again for fresh links.
Matching pending work is reused and a completed export returns 200. "force":true creates a replacement and leaves previous files unchanged. Retry with the same Idempotency-Key; a replay returns the original submission response, so poll for current status.
In the app, use Resize / export on an image, sticker, background or logo, or the animation export dialog.
Create an animated sticker
Turn a completed animation into one sticker with Telegram, WhatsApp, WeChat and Discord files. It costs no generation credits.
curl -X POST https://api.masko.ai/v1/assets/ANIMATION_ASSET_ID/sticker \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Masko-API-Version: 2026-09-26" \
-H "Content-Type: application/json" \
-d '{}'The source is a completed video, WebM or HEVC asset with a background-removal result. One sticker_animation asset appears in the Stickers library with four platform files. Repeating the call reuses the sticker and its cached files and retries failed versions; force:true requests new files while keeping pending work.
The response has data.id, data.asset_ids.sticker_animation, data.formats and data.poll_url, usually with 202. Poll GET /v1/assets/STICKER_ASSET_ID/sticker: each format has its own status and download URL, and overall status is processing, completed, partial_failure or failed.
Each completed format has a file_url. With asset hosting enabled it also has a permanent public_url (Telegram .webm, WhatsApp .webp, WeChat .gif, Discord .png APNG); private mascots get public_url:null. Hosted link JSON lists them under animated_stickers, grouped by sticker ID with its source animation ID, with formats keyed telegram, whatsapp, wechat and discord.
To retry one version, POST /v1/assets/STICKER_ASSET_ID/exports with that sticker_profile, such as telegram. Listing exports for the sticker ID returns its four versions. In the app, choose Sticker on an animation card.
Add stickers to Telegram
Open Get Links → Stickers → Telegram, click Prepare for Telegram, then Open in Telegram (or scan the QR code) and tap Add Stickers. Masko manages one pack per mascot with all ready image and animated stickers, up to Telegram's limit of 120, so you need no Telegram account or bot. Add to Telegram on an animated sticker opens the same pack.
- Closing the dialog pauses preparation; Prepare again resumes it and adds new stickers without duplicates.
- It is free and needs no public hosting, but anyone with the pack link can use the stickers.
- Deleting a sticker in Masko does not remove it from Telegram.
- Telegram import is Studio only; the v1 API covers creation, exports and file URLs.
Download on your phone for WeChat
Open Get Links → Stickers → WeChat, click Prepare and scan the QR code. It opens a mobile page to download each ready sticker (PNG or animated GIF) or a ZIP, which you add one by one through WeChat's custom sticker picker. It does not install a native sticker pack.
The link needs no login or public hosting, costs no credits and expires after one hour; anyone with the QR can download during that hour. Prepare again to renew it or include new stickers. Get Links has no WhatsApp option; download WhatsApp files from each sticker's page.
Animated chat stickers
Export one platform version from a completed video asset with a background-removal result, or from an animated sticker asset ID:
curl -X POST https://api.masko.ai/v1/assets/ASSET_ID/exports \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sticker_profile":"telegram"}'sticker_profile picks the chat app, and the app fixes the file type, canvas, duration cap and compression, so omit size. format can be left out; if you send it, it must be that app's file type, such as {"format":"animated_webp","sticker_profile":"whatsapp"}. A name without a version means the current one (telegram is telegram-v1 today); add the version to pin it. The formats sticker-telegram-v1, sticker-whatsapp-v1, sticker-wechat-v1 and sticker-discord-v1 do the same. Files keep 10% size headroom and are validated and checksum-verified before download; a file that cannot meet its budget fails.
sticker_profile | Output | Canvas | File budget | Duration cap |
|---|---|---|---|---|
telegram | VP9 WebM, no audio | 512 × 512 | 230,400 bytes | 3 seconds |
whatsapp | Animated WebP | 512 × 512 | 450,000 bytes | 10 seconds |
wechat | Looping GIF | 240 × 240 | 450,000 bytes | 3 seconds |
discord | Looping APNG | 320 × 320 | 471,859 bytes | 5 seconds |
Longer inputs are retimed to keep their full loop (WeChat's 3-second cap is Masko's v1 policy). Compression keeps at least 12 fps, and GIF uses binary transparency. The receipt includes sticker_profile, poster_url and validation metadata; cached results are invalidated when the source changes. WhatsApp import requires at least three animated stickers in a pack.
ProRes 4444 for video editing
prores exports a MOV with alpha for After Effects and other editors; files are much larger than WebM or HEVC. In the app, pick ProRes 4444 with alpha (.mov) in an animation's Export dialog.
To export future animations automatically (off by default), enable Get Links → Settings → Video editing exports, or save:
{
"publish_params": {
"prores_exports": { "enabled": true }
}
}Each future animation gets one original-size file, queued after background removal, usually on the next minute's queue pass. For existing animations, call POST /v1/mascots/:id/exports with {"types":["video"]}; this also backfills enabled animation size variants. Disabling stops future exports and keeps existing files.
.mkpk for ESP32 boards
mkpk exports one animation as a .mkpk pack, the format the ESP32 Masko SDK plays: a 64-byte header, a frame index, then baseline JPEG frames. It makes exactly what you ask for and decides nothing on its own.
curl -X POST https://api.masko.ai/v1/assets/ANIMATION_ASSET_ID/exports \
-H "Authorization: Bearer masko_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"format":"mkpk","size":384,"mkpk":{"screen_width":466,"screen_height":466,"fps":24,"quality":75,"background_color":"#000000"}}'| Setting | Values | Default |
|---|---|---|
size | Frame width, a multiple of 16 from 32 to 1024, never wider than the animation | Required |
mkpk.screen_width, mkpk.screen_height | The screen the frames are centred on, together | The frame size |
mkpk.fps | 1 to 60 | 24 |
mkpk.quality | JPEG quality, 1 to 100 | 75 |
mkpk.background_color | The colour behind the mascot, #RRGGBB | #000000 |
Nothing is enlarged or shrunk for you: for a round screen, choose a width that keeps the mascot inside the circle. Reversed animations are refused because the player plays the forward pack backwards. The receipt repeats the settings under mkpk, and a completed export's metadata has bytes, sha256, frame_count and the frame position x and y. A published mascot also gets a permanent public_url that serves byte ranges, so a board can stream frames. In the app, pick ESP32 boards (.mkpk) in an animation's Export dialog.
To give every future animation a pack with the same settings, enable Get Links → Settings → ESP32 board exports, or save:
{
"publish_params": {
"mkpk_exports": { "enabled": true, "size": 384, "screen_width": 466, "screen_height": 466, "fps": 24, "quality": 75, "background_color": "#000000" }
}
}Packs are queued after background removal. For existing animations, call POST /v1/mascots/:id/exports with {"types":["video"]}. Disabling stops future packs and keeps existing files.
Save mascot image defaults
{
"publish_params": {
"image_exports": {
"enabled": true,
"sources": ["original", "transparent", "sticker"],
"formats": ["png", "webp"],
"sizes": [256, 512]
}
}
}Pick versions, formats and up to five sizes. Only existing versions are exported (transparent does not trigger background removal). Exports queue when future images finish; disabling stops future scheduling and keeps existing files.
Image settings leave video settings unchanged. Video sizes in publish_params.animation_sizes backfill when they change; see size variants. Image backfill is explicit:
{ "types": ["image", "video"], "force": false }Omit types for both; disabled sections are skipped. The returned batch job completes once exports are scheduled, not when files are ready, so check each asset's export list. In the app, turn on Smaller PNG and WebP in the Settings tab of Get Links, then press Sync.
Apply settings to a project or folder
{
"folder_id": "FOLDER_UUID",
"publish_params": {
"image_exports": {
"enabled": true,
"sources": ["transparent", "sticker"],
"formats": ["webp"],
"sizes": [256, 512]
}
},
"apply_to_existing": true
}Omit folder_id for the whole project. Settings merge into the mascots currently in scope, keeping omitted settings; mascots created later do not inherit them. apply_to_existing backfills enabled image and video sections, and the response has updated_count and optional backfill jobs.
Personal keys reach personal workspace assets and organization keys reach their organization's. Read-only keys can list exports but cannot create them or change settings.
