Automate brand extraction at scale. POST any URL and receive a complete 15-file AI-native brand kit — DESIGN.md, .cursorrules, llms.txt, CSS, Tailwind v4, Shadcn, Figma tokens, DOCX, PPTX, and PDF.
The StyleExtract API lets you programmatically extract a brand's complete visual identity from any public URL. A single POST request visits the URL with a real Chromium browser, extracts colors, fonts, logo, spacing tokens, and design system data — then generates 15 ready-to-use files for AI coding agents, design tools, and developer workflows.
AI-Native Files
DESIGN.md, AGENTS.md, .cursorrules, brand.mdc, llms.txt, SPEC.md — drop any into your repo root and every AI coding agent is on-brand.
Code Exports
CSS variables, Tailwind v3/v4, Shadcn theme, Figma tokens — paste directly into your codebase.
Documents
Branded DOCX, PPTX, and a 17-page PDF brand book — for agency handoffs and stakeholder presentations.
All API requests require a bearer token. API keys start with sk_style_ and are generated in your API Dashboard after subscribing. Keys are shown only once — store them securely. You can create multiple keys and revoke them individually.
Authorization: Bearer sk_style_4a8f2b9c1d3e7f6a...
Never expose your API key in client-side code. All requests must originate from your server.
Extract a brand in one request. The response includes the extraction data and direct download URLs for all 15 files.
1. Extract a brand
curl -X POST https://styleextract.com/api/v1/extract \
-H "Authorization: Bearer sk_style_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://stripe.com"}'2. Response — extraction + 15 file URLs
{
"id": 142,
"url": "https://stripe.com",
"domain": "stripe.com",
"colors": ["#533afd", "#061b31", "#ff6118", "#50617a"],
"fonts": ["sohne-var", "Inter"],
"logoUrl": "https://...",
"isPaid": true,
"files": {
"DESIGN.md": "https://styleextract.com/api/export/design-md?file=design&id=142",
"AGENTS.md": "https://styleextract.com/api/export/design-md?file=agents&id=142",
".cursorrules": "https://styleextract.com/api/export/design-md?file=cursorrules&id=142",
"brand.mdc": "https://styleextract.com/api/export/design-md?file=mdc&id=142",
"llms.txt": "https://styleextract.com/api/export/design-md?file=llms&id=142",
"SPEC.md": "https://styleextract.com/api/export/design-md?file=spec&id=142",
"scaffold.html": "https://styleextract.com/api/export/design-md?file=html&id=142",
"variables.css": "https://styleextract.com/api/export/css?id=142",
"tailwind.config.js": "https://styleextract.com/api/export/tailwind?id=142",
"tailwind-v4.css": "https://styleextract.com/api/export/tailwind-v4?id=142",
"shadcn.css": "https://styleextract.com/api/export/shadcn?id=142",
"figma-tokens.json": "https://styleextract.com/api/export/tokens?format=figma&id=142",
"tokens.json": "https://styleextract.com/api/export/tokens?format=w3c&id=142",
"brand.docx": "https://styleextract.com/api/export/docx?id=142",
"brand.pptx": "https://styleextract.com/api/export/pptx?id=142",
"brand.pdf": "https://styleextract.com/api/export/pdf?id=142"
},
"createdAt": "2026-06-06T12:00:00.000Z"
}3. Download a file
curl -L -o DESIGN.md \ "https://styleextract.com/api/export/design-md?file=design&id=142" \ -H "Authorization: Bearer sk_style_..."
Scrapes a public URL with a real Chromium browser and generates a complete brand kit. This counts against your daily rate limit. Processing takes 5–20 seconds depending on the site's complexity.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | required | The public URL to extract from. Must be http:// or https://. Protocol optional — will default to https://. |
| selector | string | optional | CSS selector for component-level extraction. When provided, computed styles for the matched element are captured and a component.mdc file URL is added to the files map. |
| Field | Type | Description |
|---|---|---|
| id | number | Extraction ID. Use this to fetch file download URLs. |
| url | string | The URL that was extracted. |
| domain | string | Cleaned hostname (e.g. stripe.com). |
| colors | string[] | Brand colors as hex strings, ranked by visual prominence. |
| fonts | string[] | Font family names detected on the page. |
| logoUrl | string|null | URL of the detected logo image. |
| isPaid | boolean | Always true for API extractions. |
| files | object | Map of filename → download URL. See File Reference. |
| createdAt | string | ISO 8601 timestamp. |
X-RateLimit-Limit: 1 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 2026-06-07
Returns a paginated list of all paid extractions associated with your API key. Does not count against the rate limit.
| Param | Type | Default | Description |
|---|---|---|---|
| limit | number | 20 | Results per page. Max 100. |
| offset | number | 0 | Number of records to skip for pagination. |
curl "https://styleextract.com/api/v1/extractions?limit=10&offset=0" \ -H "Authorization: Bearer sk_style_..."
{
"data": [
{
"id": 142,
"url": "https://stripe.com",
"domain": "stripe.com",
"colors": ["#533afd", "#061b31"],
"fonts": ["sohne-var"],
"logoUrl": "https://...",
"isPaid": true,
"createdAt": "2026-06-06T12:00:00.000Z",
"files": {
"DESIGN.md": "/api/export/design-md?file=design&id=142",
"AGENTS.md": "/api/export/design-md?file=agents&id=142",
".cursorrules": "/api/export/design-md?file=cursorrules&id=142",
"llms.txt": "/api/export/design-md?file=llms&id=142"
}
}
],
"meta": {
"total": 47,
"limit": 10,
"offset": 0,
"hasMore": true
},
"rateLimit": {
"used": 1,
"limit": 1,
"resetDate": "2026-06-07"
}
}Fetch a single extraction by ID. Returns the full extraction including all 15 file download URLs. Does not count against the rate limit.
curl "https://styleextract.com/api/v1/extractions/142" \ -H "Authorization: Bearer sk_style_..."
Response shape is identical to the POST /extract response. File URLs include the full https://styleextract.com prefix.
Every extraction generates 15 files. Download any of them by making a GET request to its URL with your API key as the bearer token.
AI Coding Agent Files
| Filename | Route param | Description |
|---|---|---|
| DESIGN.md | file=design | YAML front-matter brand tokens + structured Markdown design rationale. Built to be read by Claude, Cursor, Copilot, and Bolt.new. |
| AGENTS.md | file=agents | Explicit rules for AI coders: what to do, what to never do, exact color and spacing enforcement. |
| .cursorrules | file=cursorrules | Global workspace behavioral rules for Cursor IDE. Drop in your project root. |
| brand.mdc | file=mdc | Cursor MDC format with file glob patterns — rules scoped to CSS/TSX/HTML files automatically. |
| llms.txt | file=llms | High-density stripped Markdown optimized for LLM context windows. Minimal tokens, maximum design signal. |
| SPEC.md | file=spec | Figma-style component spec: spacing rules, border radius usage, component structure guidelines. |
| scaffold.html | file=html | Semantic HTML scaffold with inline CSS custom properties and pre-wired brand tokens. |
All 7 AI files share the same route: /api/export/design-md?{param}&id={id}
Code Exports
| Filename | Route | Description |
|---|---|---|
| variables.css | /api/export/css?id={id} | CSS custom properties (:root block) with every color and font. |
| tailwind.config.js | /api/export/tailwind?id={id} | Tailwind v3 config extending the brand palette and typography. |
| tailwind-v4.css | /api/export/tailwind-v4?id={id} | Tailwind v4 @theme block with oklch colors, spacing, and radius. |
| shadcn.css | /api/export/shadcn?id={id} | Shadcn UI theme: HSL CSS vars for light and dark mode. |
| figma-tokens.json | /api/export/tokens?format=figma&id={id} | Figma Tokens Studio plugin format with all brand tokens. |
| tokens.json | /api/export/tokens?format=w3c&id={id} | W3C Design Tokens Community Group (DTCG) format. |
Documents
| Filename | Route | Description |
|---|---|---|
| brand.docx | /api/export/docx?id={id} | Branded Microsoft Word document template. |
| brand.pptx | /api/export/pptx?id={id} | 17-slide brand presentation with palette, typography, and Vibe Radar. |
| brand.pdf | /api/export/pdf?id={id} | 17-page whitelabeled brand book — fully styled in your brand colors. |
# Download DESIGN.md curl -L -o DESIGN.md \ "https://styleextract.com/api/export/design-md?file=design&id=142" \ -H "Authorization: Bearer sk_style_..." # Download .cursorrules (note: no file extension in the filename) curl -L -o .cursorrules \ "https://styleextract.com/api/export/design-md?file=cursorrules&id=142" \ -H "Authorization: Bearer sk_style_..." # Download the brand PDF curl -L -o brand.pdf \ "https://styleextract.com/api/export/pdf?id=142" \ -H "Authorization: Bearer sk_style_..."
Each API key is allowed 1 extraction per calendar day (UTC). The limit resets at midnight UTC. Read-only endpoints (GET /extractions and GET /extractions/{id}) and file downloads are not rate-limited.
1
Extractions/day
per API key
Unlimited
Read requests
GET endpoints
Unlimited
File downloads
any format
Every response from POST /extract includes:
| Header | Example | Description |
|---|---|---|
| X-RateLimit-Limit | 1 | Maximum extractions per day. |
| X-RateLimit-Remaining | 0 | Remaining extractions today. |
| X-RateLimit-Reset | 2026-06-07 | Date when the limit resets (UTC, YYYY-MM-DD). |
{
"error": "Daily extraction limit reached. Rate limit: 1 extraction per calendar day (UTC).",
"used": 1,
"limit": 1,
"resetDate": "2026-06-07"
}All errors return JSON with an error field describing what went wrong.
| Status | Meaning | Common cause |
|---|---|---|
| 400 | Bad Request | Missing or invalid url field in the request body. |
| 401 | Unauthorized | Missing, invalid, or revoked API key. |
| 403 | Forbidden | API key found but lacks access to this resource. |
| 404 | Not Found | Extraction ID does not exist or belongs to another user. |
| 422 | Unprocessable Entity | URL was reachable but returned no extractable brand data. The site may block crawlers. |
| 429 | Too Many Requests | Daily extraction limit reached. Check X-RateLimit-Reset for when it resets. |
| 503 | Service Unavailable | Scraper temporarily unavailable. Retry after a few seconds. |
{
"error": "Daily extraction limit reached. Rate limit: 1 extraction per calendar day (UTC)."
}The styleextract CLI writes brand files directly into your working directory. It uses the same API under the hood — no separate package needed.
# No install required — run directly with npx npx styleextract --help
# Interactive setup — saves to ~/.styleextract/config.json npx styleextract auth # Or use an environment variable (CI/CD) STYLEEXTRACT_API_KEY=sk_style_... npx styleextract init stripe.com
npx styleextract init stripe.com # Writes to your current directory: # DESIGN.md # AGENTS.md # .cursorrules # .cursor/rules/brand-stripe.com.mdc # llms.txt # SPEC.md # brand-variables.css # brand-tailwind-v4.css # brand-tailwind.config.js # brand-shadcn.css # brand-figma-tokens.json
| Command | Description |
|---|---|
| npx styleextract init <url> | Extract brand & write files to cwd |
| npx styleextract auth | Set or update your API key interactively |
| npx styleextract whoami | Show current API key and source |
Developer API · $59.99/mo
Subscribe to get your sk_style_... API key, then start extracting brand kits programmatically.