whiteboards

editWhiteboardImageRegion

Mask-edit (inpaint) one region of an image element on a whiteboard. Given the target image element id and a paint MASK (a PNG where WHITE marks the area to regenerate and BLACK is kept), it regenerates only the masked region using the prompt and replaces the image IN PLACE (same position + size). This is mainly used by the in-app image-board mask editor for boards designed with designProfile:'image'. It is available to every organisation; the small flat credit charge is the only gate (refunded automatically if the edit fails on our side).

post/tools/editWhiteboardImageRegion

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/editWhiteboardImageRegion
  • Auth: HTTP bearer

Request body

documentIdstring required

The whiteboard document that holds the image element.

elementIdstring required

The id of the image element on the board to edit (from getWhiteboard includeElements=true).

maskBase64string byte required

A PNG mask (base64, with or without a data: prefix) the same shape as the image. WHITE pixels are regenerated; BLACK pixels are preserved.

promptstring required

What to put in the masked area, in plain language (e.g. 'replace the car with a red bicycle').

strengthnumber

Optional 0..1: how far the regenerated area may diverge from the original. The editing model may balance this from the prompt instead, so leave it unset unless you need it.

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.