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| Field | Type | Required | What it does |
|---|
url | string | Required | The public http(s) page to read. Private and reserved addresses are refused. |
|---|
viewport_width | integer | Optional | The viewport width to render at. The tokens are what rendered at that width. |
|---|
include_screenshot | boolean | Optional | Also 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| Field | What it holds |
|---|
colors | The colour palette, with where each colour is used. |
|---|
fonts | The font families, weights, sizes and line heights actually rendering. |
|---|
spacing | The spacing steps found, with spacing_base_px as the inferred base. |
|---|
radii | The corner radii in use. |
|---|
shadows | The box shadows in use. |
|---|
custom_properties | CSS custom properties resolved on the root element. |
|---|
containers | Container widths found on the page. |
|---|
dark_mode | Whether the page has a dark mode. |
|---|
stats | What was examined, including stylesheets the browser was not allowed to read. |
|---|
limits | The caps this read applied. |
|---|
final_url | The 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| Code | Status | Meaning |
|---|
render_timeout | 502 | The page did not finish rendering inside the budget. Not charged. |
|---|
render_failed | 502 | The page could not be rendered. Not charged. |
|---|
On every service
Scroll the table horizontally to see all fields.
Code / Status / Meaning| Code | Status | Meaning |
|---|
invalid_api_key | 401 | The authorization header is missing or the key is unknown. |
|---|
insufficient_credits | 402 | The balance is below this call's cost. The response carries credits_required and credits_remaining. |
|---|
rate_limit_exceeded | 429 | Free keys share 10 calls a minute across every service. The response carries limit and window_seconds. |
|---|
services_unavailable | 503 | The 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