Developer API

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.com

Format

JSON request/response

Quick Start

  1. Get your API credentials from the dashboard
  2. Authenticate to receive an access token
  3. Make requests using the access token
  4. 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_TOKEN

Security: Never expose your API secret in client-side code. Always make API calls from your backend server.

API Endpoints

POST/v1/auth/token

Authenticate and get access token

POST/v1/generate

Generate a new image

GET/v1/generations/:id

Get generation status and result

GET/v1/brand-dna

List all Brand DNA profiles

POST/v1/brand-dna

Create a new Brand DNA profile

GET/v1/credits

Get current credit balance

GET/v1/library

List generated images

DELETE/v1/library/:id

Delete 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.started

Image generation has begun

{ "generation_id": "gen_abc123", "timestamp": "2024-01-15T10:30:00Z" }
generation.completed

Image generation completed successfully

{ "generation_id": "gen_abc123", "image_url": "https://...", "credits_used": 1 }
generation.failed

Image generation failed

{ "generation_id": "gen_abc123", "error": "Invalid prompt", "credits_refunded": true }
credits.low

Credit 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 window
X-RateLimit-RemainingRequests remaining in window
X-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 token
402 Payment RequiredInsufficient credits
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorServer error, try again