Skip to content
KrevayadocsGet help Open Krevaya

Create drawings, diagrams, and transparent stickers

Use MCP to author editable Draw documents, inspect previews, export PNG/JPEG/WebP, and attach a drawing to a Canvas post.

Updated

Use Draw's MCP tools

Draw documents are editable collections of strokes, geometric shapes, text, and embedded images. list_drawings and get_drawing require read. Creating, editing, deleting, exporting, or saving a drawing to the library requires media. Attaching it to a post requires publish. These are MCP tools, not /v1/drawings routes.

Author a drawing document

create_drawing accepts title, width, height, background, and doc. Dimensions are 320–4,096 pixels. New drawings use the active brand; a copy made with template_id uses the source template's brand. The document uses pixel coordinates from the top-left corner.

json
{
  "title": "Repair intake flow",
  "width": 1080,
  "height": 1080,
  "background": "transparent",
  "doc": {
    "version": 1,
    "background": "transparent",
    "shapes": [
      {"id": "box-a", "kind": "rect", "x": 120, "y": 220, "w": 350, "h": 180, "fill": false, "color": "#244F46", "size": 5, "opacity": 1},
      {"id": "label-a", "kind": "text", "x": 160, "y": 280, "text": "Describe it", "color": "#244F46", "size": 42, "opacity": 1},
      {"id": "arrow-a", "kind": "arrow", "x1": 470, "y1": 310, "x2": 620, "y2": 310, "color": "#244F46", "size": 5, "opacity": 1},
      {"id": "label-b", "kind": "text", "x": 650, "y": 280, "text": "Reproduce it", "color": "#244F46", "size": 42, "opacity": 1}
    ]
  }
}
Shape kindGeometry
pen, marker, highlighterpoints: flat [x0, y0, x1, y1, …] array
line, arrowx1, y1, x2, y2
rect, ellipsex, y, w, h, fill
textx, y, text; size is the font size
imagex, y, w, h, src as a PNG/JPEG/WebP data URL

Give each shape a unique id, a hex color, size, and opacity between 0.05 and 1. The result includes preview_url. Open that preview to check the drawing rather than assuming the coordinates produce the intended appearance.

Read, edit, and preview

Call get_drawing before update_drawing and send a complete replacement doc for an edit. update_drawing can also change title or is_template. Its document write does not accept an expected version, so avoid editing a drawing at the same time as someone in the editor. Keep a copy of the document you read if your integration needs to resolve competing edits.

Choose how to use the result

ToolResult
export_drawingPublic file URL, MIME type, and output dimensions. format: png, jpeg, or webp; scale: 1 or 2; quality: 50–100.
save_drawing_to_libraryAn asset object whose id can be attached to a post
attach_drawing_to_postA movable image layer on an owned image post, then a re-render
delete_drawingDeletes the drawing; previously exported or library copies remain

PNG preserves transparency. JPEG flattens onto white. An attached drawing is one movable layer on the destination post; edit its internal shapes through Draw. After update_drawing, call attach_drawing_to_post with the same drawing_id and post_id to refresh that layer in place while preserving its position.

Frequently asked questions

Will attaching an updated drawing duplicate it?

Attaching the same drawing again to the same post refreshes the existing drawing layer in place and keeps its position.

Can I keep a sticker's transparent background?

Use background: transparent and export PNG or save it to the media library. JPEG uses a white background.