← gui.new

API Reference

One endpoint. HTML in, shareable link out.

Base URL

https://gui.new/api
POST

/canvas

Create a new canvas. Returns a shareable URL.

Request Body

FieldTypeRequiredDescription
htmlstringYesHTML content (max 2MB)
titlestringNoDisplay name in toolbar & OG image
framesarrayNoMultiple HTML variants as tabs. Each: {html, label?}

Example

curl -X POST https://gui.new/api/canvas \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "My Dashboard",
    "html": "<h1 style=\"color:white\">Hello World</h1>"
  }'

Response

{
  "id": "abc123xyz",
  "url": "https://gui.new/abc123xyz",
  "edit_token": "tok_...",
  "expires_at": "2026-02-28T16:00:00Z"
}
PUT

/canvas/:id

Update an existing canvas. Requires edit_token. All viewers see changes live via SSE.

Headers

HeaderValue
AuthorizationBearer <edit_token>
curl -X PUT https://gui.new/api/canvas/abc123xyz \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer tok_...' \
  -d '{"html": "<h1>Updated!</h1>"}'
GET

/canvas/:id/events

Server-Sent Events stream. Receive real-time updates when canvas HTML changes.

const source = new EventSource(
  'https://gui.new/api/canvas/abc123xyz/events'
);

source.addEventListener('update', (e) => {
  const { html } = JSON.parse(e.data);
  // Re-render with new HTML
});

Built-in Features

Every canvas automatically gets:

Multiplayer cursorsAll viewers see each other's cursors, names, and colors
Input syncAll form inputs, sliders, toggles sync across viewers in real-time
State persistenceForm state saves to database — survives after all viewers leave
Component library<gui-chart>, <gui-table>, <gui-kanban>, <gui-timeline>, <gui-form>, <gui-card>, <gui-grid>, <gui-code> — auto-injected
OG imagesDynamic social preview with canvas title and metadata

Limits

FeatureFreePro
AuthNone — just POSTAPI key via Authorization: Bearer
Rate limit5 creates / hour100 creates / hour
Max size2 MB10 MB
Expiry24 hours14 days
Edits3 per canvasUnlimited
VisibilityPublic onlyPublic or private (password-protected)
Watermarkgui.new badgeNo watermark

Free tier requires no account or API key. Rate limited by IP address.

SDKs

JavaScript / TypeScript

npmjs.com →
npm install gui-new
import GuiNew from 'gui-new'

const gui = new GuiNew()
const canvas = await gui.create({
  title: 'My Dashboard',
  html: '<h1>Hello</h1>'
})
console.log(canvas.url)
pip install gui-new
import gui_new

canvas = gui_new.create(
    "<h1>Hello</h1>",
    title="My Dashboard"
)
print(canvas.url)