REST API · SSE · Streamable HTTP MCP

Developer Portal

Every dashboard action maps 1:1 to a Fastify REST endpoint, an Edge Ai tool, or an MCP tool. Authenticate with Firebase OAuth + httpOnly cookies or OAuth 2.0 + PKCE for MCP clients.

01 · Base URLs
Control Plane UI
https://edge.nexoral.in
REST API
https://apiedge.nexoral.in/api
MCP (Streamable HTTP)
https://apiedge.nexoral.in/mcp
02 · Authentication & 2FA

Sign in via Firebase OAuth (Google or GitHub) and exchange the ID token at POST /api/auth/google for a 24h httpOnly SameSite=Strict JWT cookie.

When 2FA is active, login returns twoFactorRequired: true with a 5-min eb_2fa challenge token; complete via TOTP or WebAuthn Passkey.

03 · Contract & Safety
  • • Standard envelope: { success, data, message }
  • • Send Idempotency-Key on POST / PUT mutations
  • • Rate headers: X-RateLimit-Limit, Remaining, Reset
// rest api

Endpoints overview

Default rate limit: 100 req/min per IP (60/min on relaxed auth routes, 5 req/15min on strict auth/mutating checks, 30 req/15min on Edge AI).

Load Balancers & Health Checks

/api/loadbalancers
GET/api/loadbalancers
List deployed load balancers
POST/api/loadbalancers
Create & deploy Worker (Idempotency-Key)
PUT/api/loadbalancers/:id
Update via Worker Versions + rollback
DELETE/api/loadbalancers/:id
Delete Worker & records
POST/api/loadbalancers/:id/pause
Pause (keep-domain or release-domain)
POST/api/loadbalancers/:id/resume
Resume paused load balancer
POST/api/loadbalancers/:id/health-check/restart
Reset origin health state

Edge API Gateways

/api/gateways
GET/api/gateways
List deployed API gateways
POST/api/gateways
Create & deploy gateway Worker
PUT/api/gateways/:id
Update gateway routes & policies
DELETE/api/gateways/:id
Delete gateway Worker
POST/api/gateways/:id/pause
Pause gateway
POST/api/gateways/:id/resume
Resume gateway

Edge AI, Sessions & Public Telemetry

/api/ai · /api/sessions · /api/stats
POST/api/ai/generate
Autonomous Edge AI agent (SSE stream, Pro)
GET/api/ai/runs
List AI execution runs & traces
GET/api/sessions
Immutable deployment history snapshots
GET/api/cloudflare/zones
List connected Cloudflare zones
GET/api/stats/public
Public aggregate platform counts
GET/health
API health check

Authentication & 2FA

/api/auth
POST/api/auth/google
Exchange Firebase ID token (Google/GitHub) for JWT cookie
GET/api/auth/me
Fetch authenticated user & plan state
POST/api/auth/logout
Clear session cookie
POST/api/auth/2fa/verify
Complete TOTP 2FA challenge (90s single-use lock)
POST/api/auth/2fa/passkey/auth/options
Get WebAuthn passkey challenge
POST/api/auth/2fa/passkey/auth/verify
Verify WebAuthn passkey assertion
// edge ai studio api

Natural-language orchestration over SSE

POST /api/ai/generate streams real-time Server-Sent Events as the agent discovers tools, acquires Redis create locks, deploys Workers, or falls back to read-only Root Cause Analysis on failure.

30 ToolsPro Plan30 req / 15 min
Example Request
curl -N -X POST https://apiedge.nexoral.in/api/ai/generate \
  -H "Content-Type: application/json" \
  -b "token=YOUR_JWT_COOKIE" \
  -d '{
    "prompt": "Create a round-robin load balancer for api.example.com with https://a.example.com and https://b.example.com"
  }'
// model context protocol

MCP Server (25 Tools)

Connect AI coding assistants to https://apiedge.nexoral.in/mcp. Secured with OAuth 2.0 + PKCE and Dynamic Client Registration.

OAuth 2.0 + PKCE Discovery Endpoints
Protected Resource
GET /.well-known/oauth-protected-resource
Auth Server
GET /.well-known/oauth-authorization-server
Dynamic Registration
POST /mcp/auth/register
Authorize
GET /mcp/auth/authorize
Token Exchange
POST /mcp/auth/token

mcp:read (14 Tools)

Read-only inspection
●list_load_balancers●get_load_balancer●get_origin_ip●list_gateways●get_gateway●get_analytics●get_health_status●get_current_plan●list_sessions●get_session_script●list_payments●list_zones●validate_hostname●search_knowledge_base

mcp:write (11 Tools)

Redis-locked mutations
●create_load_balancer●update_load_balancer●delete_load_balancer●pause_load_balancer●resume_load_balancer●restart_origin_health●create_gateway●update_gateway●delete_gateway●pause_gateway●resume_gateway

Supported MCP Clients (7)

Claude Code
claude mcp add edgebalancer --transport http https://apiedge.nexoral.in/mcp
Codex
codex mcp add edgebalancer --url https://apiedge.nexoral.in/mcp
codex mcp login edgebalancer
Kiro CLI
kiro-cli mcp add --name edgebalancer --url https://apiedge.nexoral.in/mcp
Cursor
{
  "mcpServers": {
    "edgebalancer": { "url": "https://apiedge.nexoral.in/mcp" }
  }
}
OpenCode
{
  "mcp": {
    "edgebalancer": { "type": "http", "url": "https://apiedge.nexoral.in/mcp" }
  }
}
Antigravity (AGY)
{
  "mcpServers": {
    "edgebalancer": { "serverUrl": "https://apiedge.nexoral.in/mcp" }
  }
}
Cline
{
  "mcpServers": {
    "edgebalancer": { "type": "streamableHttp", "url": "https://apiedge.nexoral.in/mcp" }
  }
}

Specifications & Documentation