API Reference

Complete documentation for MoltBot Cloud SaaS and Omnisphere Gateway APIs.

MoltBot Cloud SaaS

Base URL: https://moltbot-cloud-saas.vercel.app (production) or http://localhost:3000 (local)

GET/api/statusPublic
Health check. Returns system status, metrics, memory usage, and waitlist count.
curl https://moltbot-cloud-saas.vercel.app/api/status
// Response
{
  "status": "ok",
  "version": "0.3.0",
  "activeInstances": 2,
  "stripeConfigured": true,
  "waitlistCount": 14,
  "metrics": { "totalRequests": 2841, "deployments": 5 },
  "uptime": 86400
}
POST/api/waitlistPublic
Add an email to the waitlist. Rate limited to 5/hour per IP.
ParamTypeRequiredDescription
emailstringrequiredEmail address
tierstringoptionalPlan: base | swarm | enterprise
referralstringoptionalAffiliate referral code
curl -X POST https://moltbot-cloud-saas.vercel.app/api/waitlist \
  -H "Content-Type: application/json" \
  -d '{"email":"dev@company.com","tier":"swarm"}'
// Response
{ "success": true, "message": "You're on the list!", "position": 15, "total": 15 }
GET/api/waitlist/countPublic
Returns the total number of waitlist signups.
// Response
{ "count": 14 }
POST/api/analytics/eventPublic
Track a page view, signup click, or custom event. Rate limited to 60/min per IP.
ParamTypeRequired
eventstringrequired
pagestringoptional
referrerstringoptional
sessionIdstringoptional
metaobjectoptional
GET/api/analytics/summaryPublic
24-hour analytics summary: page views, signup clicks, checkout starts, top pages.
// Response
{ "period": "24h", "pageViews": 142, "signupClicks": 8, "checkoutStarts": 2, "topPages": {"/": 80, "/pricing.html": 30} }
POST/api/email/subscribePublic
Subscribe to newsletter. Triggers 6-step email drip sequence (Day 0→14).
ParamTypeRequired
emailstringrequired
sourcestringoptional
referralstringoptional
// Response
{ "success": true, "message": "Subscribed!", "dripScheduled": 6 }
POST/api/email/unsubscribePublic
GDPR-compliant unsubscribe. Marks subscriber as unsubscribed without deletion.
POST/api/billing/checkoutStripe Required
Create a Stripe Checkout session. Returns a redirect URL to Stripe's hosted payment page.
ParamTypeRequired
emailstringrequired
tierstringrequired
// Response (Stripe configured)
{ "url": "https://checkout.stripe.com/...", "sessionId": "cs_xxx" }
// Response (Stripe not configured)
{ "error": "Stripe not configured", "hint": "stripe_not_configured" }
POST/api/webhooksAPI Key
Register a webhook URL to receive real-time notifications for signups, payments, and downtime events.
ParamTypeRequired
urlstringrequired
eventsstring[]required
secretstringoptional
// Events: waitlist.signup, email.subscribe, billing.checkout, alert.downtime
curl -X POST /api/webhooks \
  -d '{"url":"https://hooks.slack.com/xxx","events":["waitlist.signup","alert.downtime"]}'

Omnisphere Gateway

Base URL: http://localhost:3005. OpenAI-compatible multi-LLM arbitrage router with 12 models and smart routing.

GET/api/statusPublic
Gateway health: loaded models, provider status, cost tiers, uptime.
POST/v1/chat/completionsOpenAI-Compatible
Send a chat completion request. Supports all 12 models with automatic fallback. Drop-in replacement for OpenAI SDK.
curl http://localhost:3005/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4","messages":[{"role":"user","content":"Hello"}]}'
// Response (OpenAI-compatible)
{
  "id": "chatcmpl-xxx",
  "model": "claude-sonnet-4",
  "choices": [{ "message": { "role": "assistant", "content": "..." } }],
  "usage": { "prompt_tokens": 10, "completion_tokens": 50 }
}
GET/api/modelsPublic
List all available models with cost tiers and provider status.
POST/api/comparePublic
Compare responses from multiple models side-by-side with cost and latency metrics.
ParamTypeRequired
promptstringrequired
modelsstring[]required
POST/api/smart-routePublic
Automatically route to the optimal model based on cost tier, complexity, and provider health.
ParamTypeRequired
promptstringrequired
tierstringoptional
// Tiers: premium, balanced, budget, ultraCheap, free