Canvases

Generate canvas images, stickers, and animations

Kicks off generation for pending canvas node images, sticker derivatives, and/or edge animations. Pass animation_model=standard (2 credits/sec, 2–15s) or premium (6 credits/sec, 4–30s); both default to 5s. Omit the field for legacy generation (5 credits/sec, 4–10s, default 4s). Model choice is included in plan approval and idempotent replay checks. Requires a write key in the collection workspace and project access, including for dry runs. Cross-workspace collections return 404. Use dry_run=true first to preview planned work, prompts, skipped items, and estimated credits without creating jobs/assets or spending credits. Dry-run returns plan_id and graph_content_hash; send them as approved_plan_id and expected_graph_hash on execution so a changed graph, prompt, option, or selection returns 409 before spending. Use targets="images" to generate poses, targets="stickers" to backfill transparent sticker derivatives for completed node images, targets="animations" for edge videos, or include_stickers=true to create stickers alongside newly generated images.

post/v1/collections/{id}/canvases/{canvasId}/generate-all

Request

  • Base URL: https://api.masko.ai
  • URL: https://api.masko.ai/v1/collections/{id}/canvases/{canvasId}/generate-all
  • Auth: HTTP bearer

Path parameters

idstring uuid required
canvasIdstring uuid 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

animation_model'standard' | 'premium'

Same choices as Studio: standard costs 2 credits/sec (2–15s); premium costs 6 credits/sec (4–30s). Both default to 5s. Omit to preserve legacy generation at 5 credits/sec (4–10s, default 4s).

durationinteger

Whole seconds. Standard: 2–15; Premium: 4–30; default 5 with either explicit model. Without animation_model: 4–10, default 4. An additional image costs 1 credit only when a source image must be generated.

max_creditsnumber

Hard server-side credit ceiling. Execution fails before billing when the current work exceeds this limit.

skip_completedboolean

Deprecated compatibility flag. Canvas generate-all only dispatches missing work and always skips edges that already have assigned generated assets.

include_stickersboolean

When true, generate sticker_image derivatives for generated image nodes.

dry_runboolean

When true, only returns the planned work, prompts, skipped items, and estimated credit cost. Does not deduct credits, create jobs/assets/items, mutate the canvas graph, or start workflows.

targets'all' | 'images' | 'stickers' | 'animations'

Which work to dispatch. "images" only generates skeleton node images. "stickers" backfills sticker_image derivatives for completed node images. "animations" only dispatches edge videos. "all" does both images and animations.

node_idsstring[]

Optional exact node selection. When present, only these nodes are considered for image or sticker work. Omit to consider every node.

edge_idsstring[]

Optional exact edge selection. When present, only these edges are considered for animation work. Omit to consider every edge.

expected_graph_hashstring

Optional graph revision returned by the dry-run plan. Execution returns 409 if the canvas changed after approval.

approved_plan_idstring

Optional generation plan identity returned by dry_run. Execution returns 409 unless the current graph, scope, prompts, duration, and generation options still match that approved plan.

Response

Generation plan returned or jobs started

Changes

No recorded changes to this operation across all 1 revision of this API.