I Built an API That Gives LLMs Brand Context — Here's How It Works

Every developer using AI code generation tools has hit this: the output works, but it looks generic. Wrong brand colors. Wrong fonts. Wrong tone of voice. I got tired of copy-pasting guidelines into every prompt, so I built an API to solve it.

The Problem

Design systems were built for humans reading documentation. Figma files, PDFs, Notion pages — all designed for visual consumption.

LLMs can't read your Figma file. They can't reliably parse your 47-page brand PDF. And even if they could, you'd need to paste it into every single prompt.

The result: every AI-generated asset — email copy, landing page code, component markup — comes out looking like it was built by someone who's never seen your brand.

The Solution: A Machine-Readable Brand System

BrandAPI lets you register your design tokens once and serves them as a structured JSON endpoint. Any tool that can make an HTTP request gets your complete brand context.

bash Fetch brand context
curl https://brandapi-ogk6.polsia.app/v1/brand/your-brand \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

json Brand context response
{
  "brand": "Acme Corp",
  "tokens": {
    "colors": {
      "primary": { "value": "#7c3aed", "usage": "CTAs, links, active states" },
      "background": { "value": "#0a0a0c", "usage": "Primary surface" }
    },
    "typography": {
      "heading": { "family": "Space Grotesk", "weight": "700" },
      "body": { "family": "Inter", "size": "1rem" }
    },
    "voice": {
      "tone": "Direct, confident, no buzzwords",
      "avoid": ["passive voice", "exclamation marks", "marketing fluff"]
    }
  }
}
Notice the structure: every token includes usage context, not just raw values. An LLM doesn't just know your primary color is #7c3aed — it knows that color is for CTAs, links, and active states. That's the difference between "brand data" and "brand intelligence."

Integration: 3 Lines

JavaScript Inject brand context into any LLM prompt
// Fetch brand context
const brand = await fetch('https://brandapi-ogk6.polsia.app/v1/brand/context', {
  headers: { 'Authorization': `Bearer YOUR_API_KEY` }
}).then(r => r.json());

// Inject into any AI prompt
const prompt = `Use these brand guidelines:\n${JSON.stringify(brand.tokens, null, 2)}`;

// Every output is on-brand. Done.

Works with any LLM — OpenAI, Anthropic, local models. Works with any AI tool that lets you inject system prompts — Cursor, v0, Bolt, custom agents.

What You Can Store

Each brand also gets a public style guide page — a live, interactive reference that stays in sync with your API. No more outdated brand PDFs.

The Architecture

Simple Express.js API backed by PostgreSQL. Each brand is a set of token groups, each token group contains individual tokens with values and metadata.

The API is designed around one principle: the response should be directly injectable into an LLM prompt without any transformation. No nested structures that need flattening, no references that need resolving. Fetch and inject.

Why This Beats Pasting Guidelines

Copy-pasting brand guidelines into prompts breaks down at scale in three ways:

A brand API endpoint gives you a single live source. Update your primary color in BrandAPI — every prompt, every AI tool, every integration picks it up on the next call. Zero coordination overhead.

The compounding effect: 3 articles drove BrandAPI's traffic from 1.3 to 10 visitors/day. Each article permanently targets a keyword cluster. This one targets "brand api for llms" and "design tokens api" — both high-intent, low-competition searches from developers already looking for this exact solution.

Try It

Free tier: 1 brand, 10,000 API calls/month, no credit card required.

You can see a live brand guide (BrandAPI's own brand, eating our own dogfood): Live demo →

Or just sign up and have your brand API running in 2 minutes: brandapi-ogk6.polsia.app →

Stop copy-pasting brand guidelines into prompts.

Register your brand once. Every LLM, every AI tool, every prompt gets the same current brand context via one API call.