Skip to content
Masko logomasko
Docs
Documentation

Image and video exports

Export one asset, save automatic image settings for a mascot, or apply settings across a project or folder. Exports do not spend generation credits or 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. There is no source switch in this request. Only completed, active assets belonging to an accessible mascot can be exported.

SourceFormatsSize
Image, transparent image, stickerpng, webpMaximum dimension, 32–2048 pixels
Video, WebM, HEVCwebm, hevc, prores, stacked_video, gif, lottie, dotlottie, png_sequenceWidth, 32–1920 pixels

Omit size for the source's original delivery size. Images keep their aspect ratio and alpha channel and are never enlarged. Video export requires an existing transparent-video processing result and retains the delivery crop and reverse direction. A selected smaller video variant is not enlarged.

New work returns 202 with data.job_id, asset_id, status and poll_url. Poll GET /v1/jobs/{job_id} until completed or failed, then call GET /v1/assets/{id}/exports for signed file_url downloads. The list contains the current export for each format and size created through this interface. Signed URLs expire; fetch the list again for fresh links.

Matching pending work is reused. Completed exports return 200. Add "force":true to create a replacement output; previous files remain unchanged. Use the same Idempotency-Key when retrying a submission. A replay returns the original submission response, so use the polling endpoints for current status.

The app exposes the same controls under Resize / export for an image version, sticker, scene or logo, and in the animation export dialog.

Create an animated sticker

Create one sticker in the mascot’s Stickers library from a completed animation:

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 can be a completed video, WebM or HEVC asset with an existing background-removal result. Creation reuses the source video and mask and prepares Telegram, WhatsApp, WeChat and Discord versions in one CPU batch. It costs no generation credits. One sticker_animation asset appears in the library, with four platform files underneath it. Repeating creation reuses that sticker and its cached files; failed versions are retried. force:true requests new completed files while retaining already pending work.

The response contains data.id, data.asset_ids.sticker_animation, data.formats and data.poll_url. New exports normally return 202. Poll GET /v1/assets/STICKER_ASSET_ID/sticker for progress. Each format has its own status and download URL; a failed version does not hide successfully prepared files. Overall status is processing, completed, partial_failure or failed.

Each completed format has a file_url. When the mascot has asset hosting enabled, it also has a permanent public_url: Telegram .webm, WhatsApp .webp, WeChat .gif and Discord .png (APNG). Private mascots receive expiring signed downloads and public_url:null. Enable hosting through the existing publishing flow to obtain public URLs. Hosted link JSON includes animated_stickers, grouped by sticker ID with its source animation ID. Each sticker's formats map uses the platform keys telegram, whatsapp, wechat and discord for these URLs. Versioned identifiers such as sticker-telegram-v1 are used by individual export requests and receipts.

To retry a single version, call POST /v1/assets/STICKER_ASSET_ID/exports with that sticker format. Listing exports with the sticker ID returns its four platform versions.

In the app, choose Sticker on an animation card, then open its card in Stickers. The detail page shows previews and downloads for all four platforms under Available Formats. Use Get Links to enable public hosting and retrieve their URLs. The mascot's main Get Links also includes all four versions. Hosted files have a Copy URL action beside Download. Existing image sticker creation continues generating its own artwork; animated creation reuses existing movement.

Add stickers to Telegram

To add a mascot's full collection, open Get Links → Stickers. Masko prepares one Telegram pack with all ready image and animated stickers. Choose Open in Telegram, or scan its QR code on your phone, then tap Add Stickers. This tab shows progress while the pack is prepared. Closing and reopening it resumes the import; new ready stickers are included when you open it again. Telegram supports up to 120 stickers in one pack.

In Studio, open an animated sticker and choose Add to Telegram beside its Telegram format. Masko prepares the mascot’s pack and opens it directly in Telegram. Tap Add Stickers to use it in your chats. On desktop, choose Show QR code and scan it with your phone camera to open the same pack.

You do not need to connect a Telegram account or visit the Masko bot. Masko manages the pack. Adding more stickers from the same mascot reuses it; adding the same sticker again does not create a duplicate.

This costs no generation credits and does not require public asset hosting. Anyone with the Telegram pack link can use its stickers. Deleting a sticker in Masko does not remove it from Telegram. WhatsApp, WeChat and Discord versions remain available through their Download actions. Telegram importing happens in Studio; the public v1 API continues to provide sticker creation, exports and file URLs.

Animated chat stickers

The lower-level export endpoint also remains available for individual versions. Use a completed video asset with an existing background-removal result, or the animated sticker asset ID returned by creation:

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 '{"format":"sticker-telegram-v1"}'

Each versioned sticker format selects the codec, canvas size, duration cap and adaptive compression. Omit size. Sticker formats keep 10% size headroom. Files are validated and checksum-verified before they become downloadable. A file that cannot meet the budget fails rather than becoming ready.

Export formatOutputCanvasFile budgetDuration cap
sticker-telegram-v1VP9 WebM, no audio512 × 512230,400 bytes3 seconds
sticker-whatsapp-v1Animated WebP512 × 512450,000 bytes10 seconds
sticker-wechat-v1Looping GIF240 × 240450,000 bytes3 seconds
sticker-discord-v1Looping APNG320 × 320471,859 bytes5 seconds

WeChat’s three-second cap is Masko’s v1 policy. Longer inputs are retimed to retain their complete loop. Adaptive compression preserves at least 12 fps; GIF uses binary transparency. The completed receipt identifies the sticker format and includes sticker_profile, poster_url and validation metadata. Use the same job polling and export-list endpoints as other exports. Profile results are cached separately from generic exports and are invalidated when the source changes. WhatsApp importing requires at least three animated stickers in a pack.

ProRes 4444 for video editing

Choose prores for a MOV file with an alpha channel for After Effects and other video editors. These files are much larger than WebM or HEVC. In an animation's Export dialog, select ProRes 4444 with alpha (.mov). Omit size for the original delivery size.

To automatically export future animations, open the mascot's Get Links → Settings → Video editing exports, enable Automatically export future animations as ProRes 4444 with alpha, and save. This is disabled by default. Background removal must finish before the editing file is queued; dispatch normally starts on the next minute's queue pass.

{
  "publish_params": {
    "prores_exports": { "enabled": true }
  }
}

This creates one original-delivery-size editing file per future animation. Choose Generate missing video exports for existing animations, or call POST /v1/mascots/:id/exports with {"types":["video"]}. This backfill also includes any enabled animation size variants. Download the files from each animation's Export dialog or the asset export-list endpoint. Disabling the setting stops future automatic ProRes exports and keeps existing files available.

Save mascot image defaults

{
  "publish_params": {
    "image_exports": {
      "enabled": true,
      "sources": ["original", "transparent", "sticker"],
      "formats": ["png", "webp"],
      "sizes": [256, 512]
    }
  }
}

Choose one or more versions and formats and up to five sizes. Only versions that exist are exported; selecting transparent does not generate background removal. These settings queue exports when future image assets finish. Dispatch normally begins on the next minute's queue pass. Disabling automatic exports stops future scheduling and leaves existing files available.

Image settings preserve existing video settings. The existing publish_params.animation_sizes video settings and legacy video endpoints keep their current behavior, including video backfill when settings are changed. Image backfill is explicit:

{ "types": ["image", "video"], "force": false }

Omit types for both. Disabled sections are skipped. This returns a batch job; batch completion means individual exports have been scheduled, not that every file is ready. List each source asset's exports to check file jobs and errors.

In the app, use Image exports in mascot publishing settings, save, then choose Generate missing image exports to process existing images.

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. The response contains updated_count and optional backfill jobs. This merges settings into mascots currently in that scope, preserving omitted settings. It does not establish inheritance for mascots created later. apply_to_existing queues both enabled image and video sections. The project/folder publishing dialog provides the same image controls.

Personal keys can access personal workspace assets; organization keys can access their organization workspace assets. A read-only key can list exports but cannot create them or change settings.