Upload a picture or font file
canvas_uploadFor a picture that is a file on your side, such as a photo your user attached in the chat: an address to send its bytes to, good for 10 minutes, so you never type the file out as a data: URL. Send it with a shell: curl -sS --data-binary @photo.jpg "". The reply is {img, w, h}: then canvas_edit {reference: {img}} lays it under the painting to paint against (canvas_look sample reads its colors), or {k: "image", img} places it. PNG, JPEG, WebP or GIF, at most 1.5 MB and 12 megapixels: make a larger photo smaller first. Only pictures your user gave you or that you may use. The same address takes a font file (.ttf or .otf, at most 1.5 MB, one weight and style a file; Studio Plus), such as the site's own fonts from its repo: curl -sS --data-binary @fonts/Display.ttf "". The reply is {font, family, weight, style}, font being its id: use it as a kit font (canvas_edit {kit: {fonts: {display: ""}}}) or a text's font, and save it into a brand (canvas_brand save, fonts {display: ""}, canvas: this one) so every design on the brand draws in it. Only fonts whose licence lets your user use them.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "canvas_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| canvas | No |