check_draft
Check a draft on the GoBanana server when your host has no shell or refused the check scripts. It renders the page, saves its screenshots to the board and runs the floor checks.
| Plan | Quota | Changes data | Hints |
|---|---|---|---|
| All | 60 checks per day (UTC), the same on every plan. Screenshots use the board’s 48 draft screenshot slots, 3 MB each | Yes. It saves the screenshots as draft screenshots and counts the check | not destructive, not idempotent, open world |
Some hosts cannot run the check scripts: a chat app with no shell, or a host that refused gb-measure. Your agent then sends the draft’s whole HTML file to check_draft. The server opens it in a browser (Cloudflare Browser Run), takes a screenshot of the first screen at each size, and runs the same floor checks gb-measure runs: sideways scroll, tap targets, text sizes, contrast, alt text, visible focus, placeholder copy, covered content, no picture and no interaction states. Where gb-measure runs, your agent uses it instead: it is faster and checks more.
What it does not check: mechanic-still, contrast-ground and reduced-motion-hidden (they need pixel sampling, a second motion run or input on the box), and the match with the hero (gb-fidelity). Text on glass, a gradient or a photo comes back as WARN contrast-unmeasured, so your agent checks it by eye.
The draft is served to the browser from a made-up address that never resolves, so nothing about your page is published. Photos and fonts load from their own links in that browser, never through GoBanana. The only thing stored is the screenshot of your own draft, under the same rule as an upload with get_upload_link.
The reply gives a measure to pass unchanged to add_to_canvas as a build, with the imageUrl (and phoneImageUrl when you checked both sizes). After one fix pass your agent checks once more and keeps the first run’s counts.
Slide, social post, logo and brand identity boards. These boards make fixed artboards, so the check renders the whole artboard at its own size, 1920x1080 for a slide, logo sheet or brand sheet and 1080x1350 for a post (checked as shown 368 px wide on a phone). The mechanic, tap target and phone margin checks do not run there; the artboard checks do (text cut by the artboard’s edge, turned labels out of their box, the feed bands of a post, weak hierarchy on slides and posts), as gb-measure v21 runs them. The reply has one screenshot and an artboard entry, and no phoneImageUrl. On other boards artboard is refused; pass phone, desktop or both.
Inputs
Section titled “Inputs”| Name | Type | Required | Limits | What it does |
|---|---|---|---|---|
canvasId |
string | Yes | 1 to 100 characters, one of your boards | The board the draft belongs to |
html |
string | Yes | the whole HTML file, up to 1 MB | The draft. Pictures load from their links (or data: URIs inside the 1 MB); relative files do not load |
viewport |
enum | No | phone (390x844), desktop (1440x900), both, artboard, 1920x1080 or 1080x1350; default both |
The sizes to check. A landing page takes both, a phone app phone. A slide, post, logo or brand board is always checked at its artboard (below) |
subject |
string | No | up to 60 characters | What the pictures should show, for the no-picture check; none when the page needs no picture |
language |
string | No | a language code such as en or ar |
The page’s language. ar turns on the Arabic checks. Default: the page’s own lang |
landing |
boolean | No | true for a landing page, which needs no data-mechanic box |
Example call
Section titled “Example call”{ "name": "check_draft", "arguments": { "canvasId": "c3f1a0d2-6b1e-4d8a-9f4b-0a1b2c3d4e5f", "html": "<!doctype html><html lang=\"en\">…</html>", "viewport": "phone", "subject": "fresh bread" }}Example output
Section titled “Example output”Checked at 390x844 in the server's browser: 1 FAIL, 0 WARN.FAIL target-size (390): 2 control(s) under 44x44px on the phone (tap targets are 44px): button.chip 40x32, a.more 60x36Not run on the server: mechanic-still, contrast-ground, reduced-motion-hidden, and gb-fidelity's match with the hero. Look at the screenshot (get_snapshot shows it) before showing it.Place it: add_to_canvas { type: 'build', imageUrl, directionId, measure (below, unchanged), fidelity, refsUsed }. A host with no shell sends fidelity { blocked: 'host' }.After one fix pass, call check_draft once more and keep the first run's measure.checks.Server checks left today: 59 of 60.{ "canvasId": "c3f1a0d2-6b1e-4d8a-9f4b-0a1b2c3d4e5f", "viewports": ["390x844"], "imageUrl": "https://gobanana.fun/api/draft-shots/…/….jpg", "measure": { "fails": 1, "languages": ["en"], "openFails": ["target-size"], "checks": { "fails": 1, "warns": 0 }, "viewports": ["390x844"] }, "fails": 1, "warns": 0, "failIds": ["target-size"], "warnIds": [], "findings": [{ "level": "FAIL", "id": "target-size", "msg": "2 control(s) under 44x44px …", "runs": ["390"] }], "notRun": ["mechanic-still", "contrast-ground", "reduced-motion-hidden"], "checksLeft": 59}checksLeft is null when the count cannot be read; a count that cannot be read never blocks a check. With both, imageUrl is the 1440 shot and phoneImageUrl the 390 shot.
Messages and limits
Section titled “Messages and limits”| Message | Meaning |
|---|---|
| “html must be the draft’s whole HTML file, up to 1 MB.” | Send the file itself, under 1 MB. Big pictures go in as links, not inlined |
| “That canvas was not found. get_canvas lists your canvases.” | Use one of your own boards |
| “The server check is not available right now. …” | Browser Run is not set up on this server. Check with gb-measure where a shell runs, or place the draft with measure { blocked: 'host' } |
| “You have used today’s 60 server checks. They come back at midnight UTC; …” | The daily count is used up |
| “2 of your checks are already running. Wait for one to finish, then call check_draft again.” | At most 2 checks run at once for you. Wait for one to finish |
| “The check took longer than 20 seconds and stopped. …” | Make the page lighter: fewer or smaller pictures, no script that never ends |
| “The draft sent the browser to another page, so it was not checked. …” | Remove the redirect (a location change or a meta refresh on load) |
| “No screenshot was saved: the board has no room for 2.” | The board’s 48 draft screenshots are nearly used up; the checks still count |
One render per call, at most 2 at once for you. The whole check stops at 20 seconds. A draft that leaves its own page is never measured or shot. The daily count is kept per account and day, and deleted with your account. Screenshots are deleted with the board or with your account. See Plans and the guide Check a draft or a page.
Related: get_upload_link, add_to_canvas, get_snapshot.