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.
| Source | Formats | Size |
|---|---|---|
| Image, transparent image, sticker | png, webp | Maximum dimension, 32–2048 pixels |
| Video, WebM, HEVC | webm, hevc, stacked_video, gif, lottie, dotlottie, png_sequence | Width, 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.
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.