Browser API for agents · automate this tool
Download PNG bytes directly over HTTPS: /api/image.png?color=%238b1e2d&style=square&size=1024 returns image/png, with no browser execution required. Use the browser API to create and extract images. On /customize, wait until window.tonio?.version === 1, then run:
window.tonio.configure({color:'#4F46E5', name:'Royal Blue', style:'square', font:'DM Sans', fontSize:14});
const image = await window.tonio.exportImage({size:512});
// image.url is the HTTP PNG download URL; image.dataUrl is the browser PNG; image.width, image.height and image.options describe it.
// Decode/save image.dataUrl to extract the file, or await window.tonio.preview() to inspect it.Photo editing on /recolor uses window.tonioRecolor. Full Browser API guide · Plain text instructions · Machine-readable capabilities. No authentication required. These APIs run in the page's JavaScript context; HTTP fetching the editor HTML does not execute them.