Generative AI is transforming how we create content—from email templates and social media graphics to landing pages and marketing copy. But without brand context, AI outputs are generic and require manual customization to match a company’s visual identity.Brand.dev bridges this gap by providing real-time brand intelligence that your AI can use to generate on-brand content from the start:
Color palettes for themed designs and consistent styling
Typography for correct font choices in generated layouts
Logos for proper brand asset placement
Style guides for design system alignment
Company context for accurate tone and messaging
We’ll walk through how to integrate Brand.dev with foundational AI models to create brand-aware generative experiences.
Users may reference their company in various ways. Use your AI to extract the relevant identifier:
Copy
import Anthropic from "@anthropic-ai/sdk";const anthropic = new Anthropic();async function extractBrandContext(userMessage: string) { const response = await anthropic.messages.create({ model: "claude-sonnet-4-20250514", max_tokens: 256, messages: [{ role: "user", content: `Extract the company domain or name from this request. Return JSON with "domain" or "companyName" field, or null if not found. User request: "${userMessage}"` }] }); return JSON.parse(response.content[0].text);}// Example usageconst context = await extractBrandContext( "Create a welcome email for Acme Corp customers");// Returns: { companyName: "Acme Corp" }
If your users are authenticated, you may already know their company domain from their account profile - skip the extraction step and fetch brand data directly.
Inject the brand context into your AI generation prompt:
Copy
async function generateBrandedContent( userRequest: string, brandContext: string, contentType: 'email' | 'social' | 'landing-page') { const systemPrompt = `You are a brand-aware content generator. You create ${contentType} content that strictly adheres to brand guidelines.${brandContext}When generating content:1. Use the exact hex colors provided for any color specifications2. Reference the specified fonts for typography3. Maintain the brand voice based on company description4. Include logo URLs where appropriate for image placeholders`; const response = await anthropic.messages.create({ model: "claude-sonnet-4-20250514", max_tokens: 4096, system: systemPrompt, messages: [{ role: "user", content: userRequest }] }); return response.content[0].text;}
For design-heavy outputs (landing pages, complex emails), fetch the full styleguide for spacing, shadows, and component styles—not just colors and fonts.