API Documentation
Integrate Brandeezy\'s AI image generation into your applications with our RESTful API.
API Overview
Getting Started
The Brandeezy API allows you to programmatically generate brand-aligned images, manage Brand DNA profiles, and integrate our AI capabilities into your workflow. Available on Professional and Enterprise plans.
Base URL
https://api.brandeezy.comFormat
JSON request/response
Quick Start
- Get your API credentials from the dashboard
- Authenticate to receive an access token
- Make requests using the access token
- Handle responses and webhook events
Authentication
The API uses OAuth 2.0 bearer tokens for authentication. First, exchange your API credentials for an access token, then include the token in the Authorization header of subsequent requests.
Get Access Token
curl -X POST https://api.brandeezy.com/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"api_key": "your_api_key", "api_secret": "your_api_secret"}'Response
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600
}Using the Token
Include the access token in the Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKENSecurity: Never expose your API secret in client-side code. Always make API calls from your backend server.
API Endpoints
/v1/auth/tokenAuthenticate and get access token
/v1/generateGenerate a new image
/v1/generations/:idGet generation status and result
/v1/brand-dnaList all Brand DNA profiles
/v1/brand-dnaCreate a new Brand DNA profile
/v1/creditsGet current credit balance
/v1/libraryList generated images
/v1/library/:idDelete an image from library
Example: Generate Image
curl -X POST https://api.brandeezy.com/v1/generate \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Modern tech company logo",
"style": "professional",
"aspect_ratio": "1:1",
"brand_dna_id": "dna_123abc"
}'Generation Parameters
prompt- Text description of the image (required)style- Visual style preset (optional)aspect_ratio- Image dimensions (optional, default: 1:1)brand_dna_id- Brand DNA profile to use (optional)quality- Quality setting: standard or high (optional)
Webhooks
Webhooks allow you to receive real-time notifications about events in your account. Configure webhook endpoints to be notified when images are generated, credits run low, or other events occur.
Setting Up Webhooks
curl -X POST https://api.brandeezy.com/v1/webhooks \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhook",
"events": ["generation.completed", "generation.failed"]
}'Available Events
generation.startedImage generation has begun
{ "generation_id": "gen_abc123", "timestamp": "2024-01-15T10:30:00Z" }generation.completedImage generation completed successfully
{ "generation_id": "gen_abc123", "image_url": "https://...", "credits_used": 1 }generation.failedImage generation failed
{ "generation_id": "gen_abc123", "error": "Invalid prompt", "credits_refunded": true }credits.lowCredit balance is below 10% of monthly allocation
{ "credits_remaining": 10, "percentage_used": 90 }Webhook Security
All webhook payloads include an X-Brandeezy-Signature header containing an HMAC SHA256 signature of the payload using your webhook secret.
Rate Limits
API rate limits vary by plan to ensure fair usage and platform stability. Rate limit information is included in response headers.
Starter Plan
Requests per minute
60
Requests per hour
1000
Concurrent generations
1
Max prompt length
500 characters
Professional Plan
Requests per minute
120
Requests per hour
5000
Concurrent generations
5
Max prompt length
1000 characters
Enterprise Plan
Requests per minute
Unlimited
Requests per hour
Unlimited
Concurrent generations
Unlimited
Max prompt length
2000 characters
Rate Limit Headers
X-RateLimit-LimitMaximum requests per windowX-RateLimit-RemainingRequests remaining in windowX-RateLimit-ResetWindow reset time (Unix timestamp)Rate Limit Exceeded: When you exceed the rate limit, the API returns a 429 status code. Implement exponential backoff in your application to handle this gracefully.
Error Handling
Error Response Format
{
"error": {
"code": "INVALID_PROMPT",
"message": "The provided prompt is invalid or too long",
"details": {
"max_length": 1000,
"provided_length": 1250
}
}
}Common Error Codes
401 UnauthorizedInvalid or expired token402 Payment RequiredInsufficient credits429 Too Many RequestsRate limit exceeded500 Internal Server ErrorServer error, try again