⚡ SINGLE SOURCE OF TRUTH (SSOT) API GATEWAY

Sovereign Cognitive Mesh &
Decoupled AI Intelligence API

Official developer gateway connecting sovereign LLM inference, ephemeral JIT prompt synthesis, 52+ specialized MCP tools, and multimodal perception across 330+ global edge nodes.

Explore All 22 Core Endpoints 📖 Developer Tutorials
🔑 Authenticate with Sovereign SSO to unlock your personal API key:
Deterministic JWT authentication with zero password storage.
18ms
Edge Time-To-First-Token
52+
Real-Time MCP Tools
100%
Sovereign Data Privacy
0 ms
Cold Start Overhead
API REFERENCE DIRECTORY

Complete Sovereign Endpoint Matrix

Every core subsystem is exposed through unified prefixes under https://api.floworkos.com.

DECENTRALIZED SWARM FARM

Ternak Cloudflare Edge Nodes

Deploy lightweight worker nodes to secondary Cloudflare accounts. Bypass subrequest limits, distribute heavy AI crawls, and keep execution 100% locked to your Master User ID.

☁️

1. Swarm Worker Template (_worker.js)

A pure, lightweight edge worker script (~80 lines) ready to deploy to any Cloudflare account with built-in JIT Memory pulling and Trajectory auto-sealing.

// swarm/cf-worker/_worker.js
export default {
  async fetch(request, env) {
    const MASTER_USER_ID = (env.MASTER_USER_ID || '<YOUR_USER_ID>').toLowerCase();
    const BRAIN_SSOT = env.BRAIN_SSOT_URL || 'https://api.floworkos.com';
    const authHeader = request.headers.get('Authorization') || '';
    
    // Strict User Lock Guard
    const body = await request.json().catch(() => ({}));
    if (body.userId && body.userId !== MASTER_USER_ID) {
      return new Response('Forbidden: Node locked to @' + MASTER_USER_ID, { status: 403 });
    }

    // Pull 6-Layer Ephemeral JIT Memory from Brain
    const jit = await fetch(BRAIN_SSOT + '/v1/brain/flowork-jit', {
      method: 'POST',
      headers: { 'Authorization': authHeader, 'x-user-id': MASTER_USER_ID },
      body: JSON.stringify({ prompt: body.prompt, userId: MASTER_USER_ID })
    }).then(r => r.json()).catch(() => ({}));

    // Execute via Neural Router and Seal to Trajectory Ledger
    const res = await fetch(BRAIN_SSOT + '/v1/chat/completions', {
      method: 'POST',
      headers: { 'Authorization': authHeader, 'x-user-id': MASTER_USER_ID },
      body: JSON.stringify({ model: 'coder', messages: [{ role: 'user', content: body.prompt }] })
    }).then(r => r.json());

    return new Response(JSON.stringify({ success: true, result: res.choices[0].message.content }));
  }
};

2. 1-Click Deploy Configuration (wrangler.toml)

Configure your target Cloudflare account with your master user ID. The worker automatically registers itself into your Swarm Registry.

# swarm/cf-worker/wrangler.toml
name = "flowork-swarm-node-1"
main = "_worker.js"
compatibility_date = "2024-09-23"

[vars]
BRAIN_SSOT_URL = "https://api.floworkos.com"
MASTER_USER_ID = "<YOUR_USER_ID>"
$ cd /home/mrflow/DRFLOWORK/swarm/cf-worker
$ wrangler deploy
DEVELOPER GUIDES & TUTORIALS

Step-by-Step Integration Tutorials

Follow hands-on walkthroughs to integrate LLM inference, MCP tools, and sensory perception into your stack.

1. 60-Second Quickstart

Learn how to authenticate with your personal key and stream OpenAI-compatible chat completions with zero setup.

Endpoint: POST /v1/chat/completions
🦾

2. Connecting MCP to Claude & Cursor

Configure Claude Desktop or Cursor IDE to stream 52+ specialized MCP tools via live Server-Sent Events (SSE).

Endpoint: GET /v1/mcp/sse?key=...
👀

3. Document & Image Perception

Extract compact semantic markdown from heavy PDFs, Word docs, CSV tables, and images before sending to LLMs.

Endpoint: POST /v1/parse
🧠

4. Ephemeral JIT Memory Injection

Synthesize 6-layer cognitive prompts and retrieve 5W1H user memories dynamically without bloating token windows.

Endpoint: POST /v1/brain/flowork-jit
🛡️

5. 3-Line Sovereign SSO Login

Embed passwordless Flowork SSO into your web or mobile app using our lightweight client JavaScript SDK.

Script: https://auth.floworkos.com/sdk.js
🌐

6. Dynamic Model Catalog Discovery

Query active model capabilities, context limits, and fallback rotators across the global sovereign mesh.

Endpoint: GET /v1/models
SOVEREIGN ARCHITECTURE

Decoupled Organ Design

Built upon biological separation of concerns: Brain, Nervous Router, MCP Tools Fleet, Sensory Perception, and Identity.

🧠

1. Sovereign Brain

Ephemerality-first cognitive synapse handling 6-layer prompt synthesis, 5W1H long-term memories, and trajectory checkpoints.

SSOT: api.floworkos.com/v1/brain

2. Nervous Router

Sub-20ms multi-provider LLM inference engine with monotonic tool call indexing and resilient fallback rotators.

SSOT: api.floworkos.com/v1/chat
🦾

3. MCP Tools Fleet

52+ specialized tools, modular playbooks, and GitOps registry delivering autonomous filesystem, web, and search capabilities.

SSOT: api.floworkos.com/v1/mcp
👀

4. Perception Layer

Multimodal sensory processor extracting structured markdown from heavy PDFs, Word docs, CSV tables, UI images, and audio.

SSOT: api.floworkos.com/v1/parse
🛡️

5. Sovereign Auth SSO

Decentralized identity gateway with instant ready-to-paste SDKs for web and mobile client applications.

SSOT: auth.floworkos.com
🎨

6. Sovereign Web GUI

World-class pair-programming interface with Monaco Code Studio, real-time Canvas, and multi-model chat.

SSOT: chat.floworkos.com