Items

Paste an image onto the board

Mirrors the MCP add_image tool. dataUrl must be a data:image/(png|jpeg|gif|webp|svg+xml);base64,... string, ≤ ~900 kB. Hosted URLs are NOT accepted — if you have a URL, fetch the bytes yourself and re-encode as a data URL. Strongly recommended: also pass thumbDataUrl (≤8 kB, ~64 px) — it gets embedded into SVG previews so other AI viewers see an actual image instead of a placeholder box.

Example (upload a 1×1 PNG):

curl -X POST https://cnvs.app/api/boards/<id>/images \
  -H 'Content-Type: application/json' \
  -d '{"x":200,"y":300,"width":80,"height":80,"dataUrl":"data:image/png;base64,iVBORw0KGgo..."}'

For a hosted image, convert first:

BASE64=$(curl -sL https://example.com/pic.png | base64)
curl -X POST https://cnvs.app/api/boards/<id>/images \
  -H 'Content-Type: application/json' \
  -d "{\"x\":200,\"y\":300,\"width\":400,\"height\":300,\"dataUrl\":\"data:image/png;base64,$BASE64\"}"
post/api/boards/{boardId}/images

Request

  • Base URL: https://cnvs.app
  • URL: https://cnvs.app/api/boards/{boardId}/images
  • Auth: none declared

Request body

idstring
xnumber required
ynumber required
widthnumber required

Displayed width in board px.

heightnumber required

Displayed height in board px.

dataUrlstring required

Data URL: data:image/(png|jpeg|gif|webp|svg+xml);base64,<payload>. Max ~900 kB total. Hosted URLs NOT accepted — fetch + base64-encode first.

thumbDataUrlstring nullable

Optional tiny thumbnail (≤8 kB JPEG/PNG/WebP, ~64 px on long edge). Embedded into SVG previews so other AI viewers see the image instead of a placeholder.

authorstring

Author tag, charset [A-Za-z0-9:_\-.], max 80 chars. Defaults to ai:rest for REST mutations. Use ai:<your-label> (e.g. ai:claude, ai:mybot) so humans can tell AI edits apart.

Response

Image placed.

idstring
xnumber
ynumber
widthnumber
heightnumber
hasThumbDataUrlboolean

Whether a thumbnail was stored alongside the full image. Governs whether /svg-preview inlines the image or shows a placeholder.

authorstring

Changes

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