Docs v1.0
Documentation
Platform Architecture
Edge v1.0 Operational

Flexlora Edge AI Gateway & Router

A high-performance edge proxy layer deployed across Cloudflare Workers. Flexlora provides a unified, drop-in compatible API for OpenAI and Anthropic SDKs with dual-currency billing, FIFO credit accounting, and low gateway overhead.

Edge Gateway Architecture

Every request to https://api.flexlora.com/v1/* passes through a multi-stage validation, rate limiting, and credit verification pipeline before reaching upstream model clusters:

1Client Application
HTTP POST /v1/chat/completions (Bearer flx-...)
↓
Flexlora Cloudflare Edge Worker
Global Edge
  • Header validation & SHA-256 API Key verification (flx-...)
  • Per-key daily & monthly spend caps enforced in Upstash Redis
  • Concurrency & rate limit checks (token bucket algorithm)
  • Model alias resolution (e.g. mapping flexlora:fast to optimal engine)
  • Idempotency key cache check to prevent double billing
↓
2Upstream AI Engine Cluster
Streaming SSE Tokens Back to Client (Real-Time)
↓
Post-Execution FIFO Settlement: Exact prompt, completion, and cached tokens are accounted for and deducted chronologically from active credit batches (6-month or 1-year validity window). Tier-2 request metadata is preserved for auditing.

Security & Encryption Standards

SHA-256 Key Hashing

API keys are never stored in plaintext. Flexlora generates keys with flx- prefix and stores only their SHA-256 hash.

AES-256-GCM Upstream

All internal upstream credentials are encrypted at rest with AES-256-GCM encryption keys. Service-role tokens are isolated from client bundles.

Third-Party Processing

Requests are processed by third-party providers. See our Privacy Policy.

Curated Model Aliases

Full Catalog Specs

Instead of hardcoding complex upstream vendor revision strings, Flexlora provides high-stability aliases:

flexlora:fast
Auto-Routed

Optimized for real-time applications, customer chat, coding autocompletion, and high-frequency data extraction.

Context: 128k$0.50 In / $1.50 Out per 1M
flexlora:smart
Deep Reasoning

Advanced reasoning engine designed for full-code refactoring, algorithmic problem solving, and document synthesis.

Context: 200k$2.50 In / $10.00 Out per 1M