Canvases

Refine a canvas edge video mask

Convenience wrapper around POST /v1/assets/{id}/refine-mask for a canvas edge. The route resolves the edge videoAssetId, refines that video asset mask, and re-exports the active derived formats/sizes. The canvas graph keeps the same raw video asset; desktop playback updates because the active linked WebM/HEVC/stacked variants are replaced underneath it. Any State and reverse edges are rejected because they do not own an independent video asset.

post/v1/collections/{id}/canvases/{canvasId}/edges/{edgeId}/refine-mask

Request

  • Base URL: https://api.masko.ai
  • URL: https://api.masko.ai/v1/collections/{id}/canvases/{canvasId}/edges/{edgeId}/refine-mask
  • Auth: HTTP bearer

Path parameters

idstring uuid required
canvasIdstring uuid required
edgeIdstring required

Headers

Idempotency-Keystring

Account-scoped key (1 to 255 characters, ideally a UUID). Retries must preserve the credential workspace, effective API version, URL, content type and exact body bytes, including multipart boundaries; different inputs return 409 idempotency_key_reused. Completed responses, including 500 errors, replay for 24 hours after completion with current resource access checked again. Running or unconfirmed executions return 409 idempotency_request_in_progress and do not expire automatically. A receipt persistence failure returns 503 idempotency_persistence_failed: retry only with the same key and inspect the operation outcome before starting a new request.

Request body

op'add' | 'subtract'

Mask operation. add unions the prompted subject into the active mask; subtract removes it from the active mask.

promptstring required

Text prompt for the mask region to refine, e.g. "the soccer ball".

model'original' | 'pro'

Background mask refinement quality. Defaults to pro.

formatsstring[]

Derived formats to regenerate. Omit to infer the active formats already linked to the video.

sizesinteger[]

Size variants to regenerate. Omit to infer active linked sizes, so all currently used variants are refreshed.

archive_oldboolean

Archive and unlink old matching derived assets after replacement assets are successfully published.

dry_runboolean

Return the exact refinement/export plan without starting the workflow.

Response

Canvas edge mask refinement dry-run plan returned

Changes

No recorded changes to this operation across all 2 revisions of this API.