The Design Token Distribution Problem
Design tokens are supposed to be the single source of truth for your brand. Colors, typography, spacing, voice — defined once, used everywhere.
The problem starts the moment you need to get those tokens out of Figma.
Here's what most teams actually do:
- Manual export: Select tokens in Figma → right-click → Copy → paste into a CSS file. Repeat for every color change.
- Format fragmentation: Frontend needs CSS variables. The Tailwind config needs a JSON object. Docs need a markdown table. The AI coding tool needs a system prompt. You end up maintaining 4-5 token representations that all need to stay in sync.
- Drift: A designer updates a color in Figma. The CSS file doesn't update. Three weeks later someone notices the hero section has the wrong brand color in production. Nobody knows when it broke or who was supposed to fix it.
The result is a distribution bottleneck: every token change requires a manual export, a code update, and a review — for each format you support. The more formats, the more tedious the process, the more likely it gets skipped.
What BrandAPI Does Differently
BrandAPI flips the model. Instead of exporting tokens from Figma into multiple formats, you register tokens once through the API — and every downstream tool fetches them in the format it needs.
The brand guide becomes a live API endpoint. Update a token in BrandAPI, and every consumer (CSS, Tailwind, AI tools, docs, your own custom integrations) gets the updated value on their next API call. No manual export. No drift.
3 export endpoints, one API call
BrandAPI exposes three export endpoints for the formats most teams actually need. Each is a dedicated path — no Accept header negotiation, no format query params:
| Format | Use case | Endpoint |
|---|---|---|
css |
CSS custom properties (variables) | /v1/brand/:slug/export/css |
tailwind |
Tailwind config, theme.extend | /v1/brand/:slug/export/tailwind |
w3c |
W3C Design Token Community Group format | /v1/brand/:slug/export/tokens |
Add ?format=file to any endpoint to trigger a file download instead of inline response.
Code Examples: All 3 Formats
Here are curl commands for each format against the demo brand (no auth required for public brands):
CSS Custom Properties
curl https://brandapi-ogk6.polsia.app/v1/brand/brandapi-demo/export/css
Returns:
:root { --color-primary: #7c3aed; --color-background: #0a0a0c; --font-family-heading: 'Space Grotesk', sans-serif; --font-weight-heading: 700; }
Tailwind CSS
curl https://brandapi-ogk6.polsia.app/v1/brand/brandapi-demo/export/tailwind
Returns a theme.extend-compatible JS module — paste the config object directly into your tailwind.config.js:
// module.exports = { theme: { extend: { colors: { "primary": "#7c3aed", "background": "#0a0a0c" }, "fontFamily": { "heading": ["'Space Grotesk'", "sans-serif"], }, "fontWeight": { "heading": "700" } // } } }
W3C Design Tokens (JSON)
curl https://brandapi-ogk6.polsia.app/v1/brand/brandapi-demo/export/tokens
Returns W3C Design Token Community Group spec format:
{
"$schema": "https://tr.designtokens.org/format/",
"$metadata": { "brand": "BrandAPI" },
"color": {
"primary": {
"$value": "#7c3aed",
"$type": "color"
}
},
"typography": {
"heading": {
"fontFamily": { "$value": "Space Grotesk", "$type": "fontFamily" }
}
}
}
JavaScript: Programmatic Fetch
const BRAND = 'brandapi-demo'; const BASE = 'https://brandapi-ogk6.polsia.app/v1/brand';
// Fetch CSS variables and inject into <head> — run once at app init const css = await fetch(`${BASE}/${BRAND}/export/css`) .then(r => r.text()); const style = document.createElement('style'); style.textContent = css; document.head.appendChild);
Integration with AI Workflows
The same endpoint that serves CSS and Tailwind also powers AI tool integration. LLMs and AI coding assistants consume structured JSON via the /v1/brand/:slug/context endpoint — no API key required for public brands:
curl https://brandapi-ogk6.polsia.app/v1/brand/brandapi-demo/context
{
"brand": "BrandAPI",
"tokens": {
"colors": {
"primary": {
"value": "#7c3aed",
"usage": "CTAs, links, active states"
}
},
"typography": {
"heading": {
"family": "Space Grotesk",
"weight": "700"
}
},
"voice": {
"tone": "Direct, confident, no buzzwords",
"avoid": ["passive voice", "exclamation marks"]
}
}
}
Pass this to any LLM as system context and every AI-generated output — code, copy, emails — automatically uses your brand's colors, fonts, and voice. The AI doesn't need a Figma plugin or a design system doc. It just needs one API call.
Keeping Tokens in Sync
The key to making automated distribution work is a clear workflow for when and how tokens get updated. Here's what that looks like in practice:
- Designer updates a token in BrandAPI (web UI, no code needed)
- Build pipeline triggers: GitHub Actions, CI/CD, or a simple cron job fetches the latest export format
- CSS/SCSS/Tailwind config regenerates: The new values land in your codebase as a PR
- AI tools pick up changes automatically: The
/v1/brand/contextendpoint always returns the current token values
No manual export. No "I forgot to update the design system." Changes flow from the source to every consumer automatically.
Stop exporting tokens manually.
Register once. Distribute everywhere. Free tier: 1 brand, 10,000 API calls/month, no credit card.