Attest tools · design_tokens

Website design tokens

a task needs the design of a live web page as data: the colour palette with where each colour is used, the font families, weights, sizes and line heights actually rendering, the spacing steps, corner radii, box shadow…

2 credits per successful callPOST /api/v1/design-tokens

Bearer key · JSON

POST /api/v1/design-tokens

curl -s -X POST https://getattest.com.au/api/v1/design-tokens \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

For agents

Use when

Use this when a task needs the design of a live web page as data: the colour palette with where each colour is used, the font families, weights, sizes and line heights actually rendering, the spacing steps, corner radii, box shadows, CSS custom properties on :root, container widths, and whether the page has a dark mode. It reads one page at one viewport width; it does not return the site's stylesheets or a screenshot unless you ask for one.

Not documented yet: a captured example response. This page only shows what the module publishes about itself, so the missing parts are absent rather than guessed at.

3 fields

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
urlstringRequiredThe public http(s) page to read. Private and reserved addresses are refused.
viewport_widthintegerOptionalThe viewport width to render at. The tokens are what rendered at that width.
include_screenshotbooleanOptionalAlso return a screenshot of the rendered page as base64.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
colorsThe colour palette, with where each colour is used.
fontsThe font families, weights, sizes and line heights actually rendering.
spacingThe spacing steps found, with spacing_base_px as the inferred base.
radiiThe corner radii in use.
shadowsThe box shadows in use.
custom_propertiesCSS custom properties resolved on the root element.
containersContainer widths found on the page.
dark_modeWhether the page has a dark mode.
statsWhat was examined, including stylesheets the browser was not allowed to read.
limitsThe caps this read applied.
final_urlThe URL after redirects.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
render_timeout502The page did not finish rendering inside the budget. Not charged.
render_failed502The page could not be rendered. Not charged.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

Computed styles read from the page in a headless Chromium at the requested viewport width. It describes how one page rendered at one width, not the site's design system.

Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All Attest tools · Service list as JSON · OpenAPI

Same key as every Attest tool

One key. One balance. 2 credits a call.

Issue a free key, then use it here, on Attest Capture and on every other tool in the box.

Get a free key