Skip to main content
The Styleguide API renders a website and returns an observed design system. Use it to seed a theme, create a reviewable brand brief, or compare a site’s visual treatment over time. The result describes the rendered page, including any cached observations. Review the extracted values before adopting them as product tokens.

Extract a styleguide

Pass either a domain or one exact URL. A domain lookup resolves the site’s representative page; directUrl analyzes only the URL you provide.
Styleguide extraction costs 10 credits.

Understand the result

Use the API reference for the exact nested schema. Do not duplicate that full schema in application code; generate or import types from the current SDK or OpenAPI contract.

Choose a page and theme

Analyze an exact design-system or campaign page with directUrl:
colorScheme emulates prefers-color-scheme and is part of the cache key. Extract light and dark separately when the site supports both; one response is not a combined dual-theme token set. Pass only one of domain and directUrl. The request is rejected if you provide both or neither.

Control freshness

The styleguide cache window defaults to three months. Set maxAgeMs=0 to fetch fresh data, or use a positive value to accept cached data up to that age, including values below one day. Negative values clamp to zero; values above one year clamp to one year. Different pages can render different campaigns, modes, components, fonts, and A/B variants. Use directUrl when page-level fidelity matters, and record the analyzed URL, color scheme, cache metadata, and extraction time with your stored theme.

Extract fonts

Use the Fonts endpoint when you need family usage and discovered files. It costs 5 credits.
fontLinks can be absent when no font family resolves to a discovered Google or custom @font-face URL.

Create product tokens

Do not copy the response directly into a global theme. Add a review layer:
  1. Validate text/background contrast and interactive states.
  2. Collapse near-duplicate colors into named semantic roles.
  3. Confirm which font weights exist and whether you may host or use them.
  4. Add system fallbacks and loading behavior.
  5. Map sampled spacing and shadows to your product’s token scale.
  6. Test the extracted button CSS in isolation before reusing it.
  7. Store reviewer overrides separately so a refresh cannot erase them.
For multi-tenant products, version the approved theme by tenant and source extraction. A new extraction should produce a diff and review request, not silently restyle existing customer interfaces.

Common failures

Next steps

Use the extracted context in a generated website or branded document, with approved tokens and a versioned preview.

Branded onboarding

Use reviewed brand data in a customer onboarding flow.

Branded email templates

Apply company logos and colors to email templates.

Styleguide API reference

Review the full visual-token extraction contract.