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.
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 withdirectUrl:
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. SetmaxAgeMs=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:- Validate text/background contrast and interactive states.
- Collapse near-duplicate colors into named semantic roles.
- Confirm which font weights exist and whether you may host or use them.
- Add system fallbacks and loading behavior.
- Map sampled spacing and shadows to your product’s token scale.
- Test the extracted button CSS in isolation before reusing it.
- Store reviewer overrides separately so a refresh cannot erase them.
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.