API Reference
v1.0

Overview

The TheBiggestBrain API lets you integrate all 9 AI tools — chat, image generation, documents, research, slides, podcasts, spreadsheets, fact-checking, and code — directly into your own applications.

Base URL: https://api.thebiggestbrain.com/v1

All requests and responses use JSON. The API is RESTful and follows standard HTTP conventions.

Authentication

All API requests require a Bearer token in the Authorization header. Get your API key from My Account → API Keys in the app.

Authorization: Bearer tbb_sk_live_xxxxxxxxxxxxxxxxxxxxxxxx
Keep your key secret. Never expose it in client-side code. Use environment variables on your server.

POST /chat

Send a message and receive an AI response. Supports multi-turn conversation history.

POST /v1/chat Send a chat message

Request Body

ParameterTypeRequiredDescription
messagestringrequiredThe user's message
historyarrayoptionalPrior conversation turns [{role, content}]
systemstringoptionalCustom system prompt override
max_tokensintegeroptionalMax tokens in response (default: 1500)
curl -X POST https://api.thebiggestbrain.com/v1/chat \
  -H "Authorization: Bearer tbb_sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Explain quantum computing in simple terms",
    "max_tokens": 800
  }'
Response
{
  "id": "chat_abc123",
  "content": "Quantum computing uses quantum bits (qubits)...",
  "tokens_used": 312,
  "model": "claude-sonnet-4-20250514",
  "created_at": "2025-01-15T10:23:44Z"
}

POST /generate-image

Generate images using DALL-E 3 with optional AI prompt enhancement.

POST /v1/generate-image Generate an image
ParameterTypeRequiredDescription
promptstringrequiredImage description
stylestringoptionalphotorealistic | illustration | logo | 3d | watercolor | minimalist | anime | pixel
sizestringoptional1024x1024 | 1792x1024 | 1024x1792 (default: 1024x1024)
qualitystringoptionalstandard | hd (default: standard)
enhance_promptbooleanoptionalAuto-enhance prompt with Claude (default: true)
nintegeroptionalNumber of images 1–4 (default: 1)
{
  "images": [
    {
      "url": "https://oaidalleapiprodscus.blob.core.windows.net/...",
      "enhanced_prompt": "A photorealistic minimalist logo for...",
      "revised_prompt": "DALL-E revised prompt..."
    }
  ],
  "credits_used": 1
}

POST /docs/generate

Generate a complete document — article, report, proposal, email, or bio.

POST/v1/docs/generate
ParameterTypeRequiredDescription
promptstringrequiredDocument topic and instructions
typestringoptionalarticle | report | proposal | email | bio | outline
tonestringoptionalprofessional | casual | persuasive | academic
lengthstringoptionalshort | medium | long
formatstringoptionalhtml | markdown | plain (default: html)

GET /projects

List all saved projects for the authenticated user.

GET/v1/projects
Query ParamTypeDescription
toolstringFilter by tool (chat, docs, designer, etc.)
limitintegerMax results (default: 50, max: 200)
offsetintegerPagination offset
curl https://api.thebiggestbrain.com/v1/projects?tool=docs&limit=10 \
  -H "Authorization: Bearer tbb_sk_live_xxx"

Webhooks

TheBiggestBrain sends real-time webhook events to your endpoint for key platform events.

Events

EventDescription
user.signupNew user registered
subscription.createdUser upgraded to Pro or Business
subscription.cancelledUser cancelled their subscription
project.createdNew project saved
affiliate.conversionA referred user converted to Pro
// Example webhook payload
{
  "event": "subscription.created",
  "data": {
    "user_id": "usr_abc123",
    "plan": "pro",
    "amount": 19.00,
    "currency": "usd"
  },
  "created_at": "2025-01-15T10:23:44Z"
}

White-Label Guide

Resell TheBiggestBrain under your own brand. White-label is available on the Business plan. Your customers see your brand, your domain, your pricing — powered by our infrastructure.

What you can customize

White-Label Config

Add a whitelabel.config.js file to your deployment:

// whitelabel.config.js
const WL = {
  // Brand identity
  appName:      "BrainPower AI",
  appTagline:   "Your team's AI platform",
  logoUrl:      "/assets/logo.svg",
  faviconUrl:   "/assets/favicon.ico",
  domain:       "app.brainpowerai.com",

  // Colors (CSS variable overrides)
  colors: {
    primary:    "#3b82f6",  // replaces --gold
    accent:     "#8b5cf6",  // replaces --cyan
    background: "#0f0f1a",
    surface:    "#1a1a2e",
  },

  // Tools — hide any you don't want
  tools: {
    chat:     { enabled: true,  label: "AI Assistant" },
    designer: { enabled: true,  label: "Image Studio" },
    docs:     { enabled: true,  label: "Doc Writer" },
    slides:   { enabled: true,  label: "Slide Builder" },
    pods:     { enabled: false, label: "AI Pods" },
    research: { enabled: true,  label: "Research" },
    code:     { enabled: true,  label: "Code Helper" },
    sheets:   { enabled: true,  label: "Spreadsheets" },
    fact:     { enabled: false, label: "Fact Check" },
  },

  // Custom prompts per tool
  systemPrompts: {
    chat: "You are a helpful assistant for BrainPower AI users. Be professional and concise.",
    docs: "You write in our company's voice: bold, clear, and action-oriented.",
  },

  // Your Stripe keys (Business plan only)
  stripe: {
    publishableKey: "pk_live_your_key",
    priceIdPro:     "price_your_pro_price",
    priceIdBiz:     "price_your_biz_price",
  },

  // Remove TBB branding
  hidePoweredBy:    true,
  hideAffiliateTab: false,
};

export default WL;