Docs / API Reference

API Reference

40+ REST endpoints covering authentication, agent management, AI features, billing, and system health. All endpoints return JSON and require Bearer token authentication in production.

Authentication

API requests in production require a Bearer token set via the API_TOKEN environment variable:

Authorization: Bearer your-api-token

The /api/health endpoint is exempt from authentication. Dashboard access uses session cookies set during login.

Rate Limits

ScopeLimitWindow
General API120 requests1 minute
Heavy operations10 requests1 minute

Heavy rate limiting applies to: clone-url, media/produce, leads/scrape, batch, grok/query, browser/execute, 3d/scenes, vibe-design/projects.

System

GET /api/health

Server health check. Returns uptime, memory usage, version, and environment.

Authentication Endpoints

POST /api/auth/login

Authenticate a user. Sets a session cookie and returns a token.

// Request body
{ "email": "user@example.com", "password": "..." }

// Response
{ "token": "session-token", "plan": "pro" }
GET /api/auth/me

Get current session info. Returns email and subscription plan.

POST /api/auth/logout

Invalidate the current session and clear the cookie.

Agents & Skills

GET /api/agents

List all available agents with metadata (name, model, tier, description).

GET /api/skills

List all available skills with descriptions and input schemas.

POST /api/orchestrate

Send a task to the Orchestrator for intelligent routing and execution.

Design System

GET /api/design-system

Get the current DESIGN.md content with reasoning and token layers.

POST /api/design-system/clone-url

Clone a brand's design system from a URL. Heavy rate limited.

// Request body
{ "url": "https://example.com" }

// Response
{ "design": { "reasoning": {...}, "tokens": {...} } }
GET /api/design-system/export

Export the design system as DESIGN.md, CSS variables, JSON tokens, or Tailwind config.

Media & 3D

POST /api/media/produce

Start a media production job (video, image, audio). Heavy rate limited.

POST /api/3d/scenes

Generate a Blender 3D scene from a text prompt. Heavy rate limited.

POST /api/vibe-design/projects

Create a new Vibe Design Studio project. Heavy rate limited.

Monetization

POST /api/leads/scrape

Start a lead scraping job for a target industry. Heavy rate limited.

POST /api/batch

Submit a batch content generation job. Heavy rate limited.

// Request body
{
  "type": "blog|social|product|email|seo",
  "prompt": "Topic or instructions",
  "count": 10  // max: 100
}

AI Queries

POST /api/grok/query

Send a real-time query to Grok-3 for live data. Heavy rate limited.

POST /api/browser/execute

Execute a headless browser task. Heavy rate limited.

Tenant & Branding

GET /api/tenant/branding

Returns the current tenant's branding (company name, tagline, logo, colors). Public, no auth required.

GET /api/templates

List available industry templates (digital agency, law firm, ecommerce, SaaS, real estate, healthcare, consulting, trades).

Knowledge Graph

GET /api/knowledge

List all knowledge graph entries with metadata.

POST /api/knowledge

Add a new entry to the knowledge graph.

Error Responses

All endpoints return standard error objects:

{
  "error": "Description of what went wrong"
}
StatusMeaning
400Bad Request — Missing or invalid parameters
401Unauthorized — Missing or invalid API token
403Forbidden — Valid token but insufficient permissions
404Not Found — Resource does not exist
429Too Many Requests — Rate limit exceeded
500Server Error — Unexpected failure