Canvases

Create a canvas

Creates a canvas for the collection. If template_id is provided, items and images are generated for every node (image cost per node, 1 credit each). With no template_id, creates an empty canvas with zero cost. Returns 201.

post/v1/collections/{id}/canvases

Request

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

Path parameters

idstring 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

namestring required

Display name for the canvas.

graphobject

Canvas graph JSON with nodes, edges, and inputs. Omit to create an empty canvas. Mutually exclusive with template_id.

template_idstring

Optional template to apply at creation. Creates items, starts image generation for each node, and returns the populated graph plus job IDs. List templates via GET /v1/canvas-templates.

node_overridesobject

Per-node overrides keyed by node key. Merged into template nodes before creation. Only used when template_id is provided.

edge_overridesobject

Per-edge overrides keyed by "source->target" key. Merged into template edges before creation. Only used when template_id is provided.

Response

Created canvas (populated if template_id provided)

Changes

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