API Key Authentication
Brand.dev uses API key authentication to secure all API requests. Every request to the Brand.dev API must include a valid API key in the request headers.Getting Your API Key
Sign Up
Create an account at brand.dev if you haven’t
already.
Access Dashboard
Log in to your Brand.dev dashboard.
Using Your API Key
HTTP Header Authentication
Include your API key in theAuthorization header with the Bearer prefix:
SDK Authentication
All official SDKs handle authentication automatically when you provide your API key:JavaScript/TypeScript
JavaScript/TypeScript
Python
Python
Ruby
Ruby
Storing API Keys Securely
Environment Variables (Recommended)
Store your API key in environment variables, never hardcode it in your source code:.env file (for development):
Production Deployment
For production environments, set environment variables using your platform’s configuration: Vercel:Rate Limiting
Rate limits are applied per API key and vary by plan tier. Below are the current limits and overage rates — see the pricing page for the latest details.| Plan | Requests per Month | Requests per Second | Overage |
|---|---|---|---|
| Trial | 50 one-time trial calls | — | — |
| Basic | 2,000 / month | 2 calls/sec | $19 per 1K calls |
| Pro | 10,000 / month | 5 calls/sec | $9 per 1K calls |
| Scale | 250,000 / month | 20 calls/sec | $6 per 1K calls |
| Enterprise | Custom | Custom | Contact sales |
429 Too Many Requests response with a Retry-After header.
Handling Rate Limits
Implement exponential backoff when you receive rate limit errors:If you consistently hit your limits, consider upgrading your plan on the pricing page or contact support for a custom plan.
Prefetch endpoint is rate-limit free! The Prefetch by
Email endpoint doesn’t
count against your rate limits or credit usage.
Security Best Practices
1. Never Expose Keys in Client-Side Code
❌ Bad: Hardcoding API keys in frontend JavaScript2. Use HTTPS Only
Always make API requests over HTTPS to encrypt your API key in transit. The Brand.dev API only accepts HTTPS requests.3. Don’t Log API Keys
Avoid logging API keys in application logs or error tracking services:Testing & Development
Local Development
For local development, use a.env.local file that’s not committed to version control:
CI/CD Pipelines
Store API keys as secrets in your CI/CD platform:- GitHub Actions: Repository Secrets
- GitLab CI: CI/CD Variables
- CircleCI: Project Environment Variables
Authentication Errors
401 Unauthorized
You’ll receive a401 error if:
- Your API key is missing from the request
- Your API key is invalid or expired
- Your API key has been deleted
403 Forbidden
You’ll receive a403 error if:
- Your API key doesn’t have permission for the requested endpoint
- Your account has been suspended
Related Resources
Quickstart
Get started with your first API call
Core Concepts
Understand Brand.dev fundamentals
Troubleshooting
Common authentication issues
API Reference
Explore all endpoints

