whiteboards

traceImage

Turn a raster image into hand-drawn freedraw strokes on a whiteboard, deterministically. Pass an image (imageUrl OR imageBase64) plus a style; the server fetches and vectorises it server-side and draws the strokes, so you do NOT emit any coordinates yourself (LLMs are poor at that and it wastes tokens). Use this for requests like 'sketch this image onto the board', portraits, or turning a logo into line art. style: 'sketch' (~3 colors, clean line art; default), 'color' (~8 colors), 'poster' (~12 colors). Returns a compact summary (stroke count), never the raw coordinates. Auto-places to the right of existing content unless x/y are given.

post/tools/traceImage

Request

  • Base URL: https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1
  • URL: https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1/tools/traceImage
  • Auth: HTTP bearer

Request body

documentIdstring required

The whiteboard's documentId.

imageUrlstring

URL to fetch the image from (http/https; private and metadata hosts are blocked).

imageBase64string byte

Base64-encoded image bytes (a data: URL prefix is allowed). Use instead of imageUrl.

mimeTypestring

Optional image MIME type hint (e.g. 'image/png'); auto-detected otherwise.

style'sketch' | 'color' | 'poster'

Vectorisation style. 'sketch' = clean line art (default), 'color' = more colors, 'poster' = posterised.

maxColorsnumber

Palette size 2-16 (defaults by style: sketch 3, color 8, poster 12).

maxStrokesnumber

Cap on the number of strokes, 20-1200 (default 600). Lower = simpler and faster.

widthnumber

Target display width in px (default 520); the drawing scales to fit, aspect preserved.

xnumber

Top-left x on the canvas. Omit to auto-place to the right of existing content.

ynumber

Top-left y on the canvas. Omit to auto-place.

Response

Tool result (shape varies per tool — refer to the tool's docs for the exact return value).

object required

Changes

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