Skip to content
KrevayadocsGet help Open Krevaya

Create and edit Canvas designs with the API

Build editable social graphics with native layers, explicit brand ownership, safe versioned edits, and linked designs across platforms.

Updated

Keep every visible object editable

Use native text, image, shape, doodle, or drawing layers for still designs. Each independently movable object belongs in its own layer. A finished graphic uploaded as one image cannot expose its lettering and ornaments as separate editor objects.

Canvas supports 160 layers per page and up to 20 pages. Continuous video designs use a single global list of up to 160 visual layers. Over-limit input is rejected; it is not a request to render only the first objects. A layer's saved frame controls wrapping, cropping, and rotation; its visible selection border can hug a smaller painted area.

Create an image draft with a native layout

POST /v1/posts accepts layout and an optional template (blank by default). This mode creates an image draft. Omit asset_ids and schedule_at, and use a platform that supports image posts. Set brand_id explicitly. The example's title is an editable text layer.

json
{
  "platform": "linkedin",
  "body": "Our repair checklist starts with a clear description of the problem.",
  "brand_id": "YOUR_BRAND_ID",
  "template": "blank",
  "layout": {
    "canvas": {"aspect": "square", "bg": "#F4F0E8"},
    "layers": [
      {"kind": "text", "text": "Start with the problem.", "x": 96, "y": 120, "w": 888, "size": 88, "font": "grotesk", "color": "#183B36"}
    ]
  }
}

Inspect the returned media_paths and render_error. If the draft exists but rendering failed, keep its id and retry PATCH /v1/posts/{id}/design on that draft. Repeating creation would produce a second draft.

Create a standalone design through MCP

Call create_design with brand_uuid and optional canvas, template, and headline. It creates a design master without scheduling a post. Resolve the UUID from a post's brand_uuid or the signed-in brand API; list_brands exposes the numeric ID used for most other tools.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_design",
    "arguments": {"brand_uuid": "YOUR_BRAND_UUID", "canvas": "portrait", "template": "blank"}
  }
}

Use list_design_templates to find valid active templates. It accepts query, shape, niche, offset, and limit (maximum 50). Advance offset by the returned row count until a page is empty. Premium-template and design-count limits still apply.

Read the current version before editing

  • Call get_post for the full layout, or get_layers for a compact layer list and layout_version.
  • For small changes, call edit_layers with that layout_version and up to 40 ordered operations: set, add, delete, or move. Target a current index, cid, or video clip_id.
  • For a full native replacement, call design_post or PATCH /v1/posts/{id}/design with layout and layout_version. A replacement is the whole layout, not a merge of a few fields.
  • If the layout is stale, read it again and reapply the intended edit. Do not resend an older layout with a newer version number.
  • Call preview_design to inspect the result. For a continuous video timeline, supply up to eight times in seconds. These previews show layers at rest and footage poster frames; inspect the exported MP4 for actual motion and footage.
json
{
  "post_id": "YOUR_DESIGN_ID",
  "layout_version": 3,
  "ops": [
    {"op": "set", "index": 0, "fields": {"text": "Repair starts with a good question.", "color": "#244F46"}}
  ]
}

Replace version 3 and index 0 with values from get_layers. Preserve existing cid and clip_id identifiers; layer comments and stable video targets depend on them. For an image or video replacement, use edit_layers asset_id to resolve an owned media asset instead of copying a private URL from another design.

Share one design across several posts

Create the first native post or a standalone design, then create each additional post with design_id set to that returned ID. Captions remain separate; the picture is linked. design_id excludes layout, template, and asset_ids in the same create request. Only use an owned design under the intended brand.

By default, a design_post or REST design edit on a linked post updates the shared design and its unpublished linked posts. Set only_this_post: true to give one post its own copy before editing. Published posts do not change when the master is edited.

Use brand color without flattening the design

Built-in templates expose visible brandable elements. Preserve their layer bindings when editing a materialized design so Brand Kit apply/reset can restore the authored colors. Avoid overwriting every fill with the brand color: type, photos, crop, and layout need to survive the change. Preview with the actual recipient brand and check readable contrast.

Frequently asked questions

How do I change one post without changing its linked copies?

Set only_this_post: true on the design edit. Krevaya gives that post its own copy before applying the change.

What does a layout version conflict mean?

The saved layout changed after your read. Fetch the current layout and version, reapply your intended change, and submit again.