The Intelligent AI Gateway
Route, secure, observe, and monetize your AI workloads across 14+ LLM providers. One API endpoint, enterprise-grade infrastructure, zero vendor lock-in.
What is Forge?
Forge is a unified AI gateway that sits between your application and every major LLM provider. Instead of integrating directly with OpenAI, Anthropic, Google, Mistral, and dozens of others, you integrate once with Forge. It handles intelligent routing to pick the best model for each request, persistent memory so conversations carry context across providers, a seven-layer security pipeline to protect against prompt injection and data leakage, built-in observability for cost and quality tracking, and native micropayments so you can monetize your AI features from day one.
Think of it as a smart reverse proxy for LLMs, but with memory, security, billing, and orchestration built directly into the request path. Your existing code works immediately because Forge exposes a fully OpenAI-compatible API. Just change the base URL and API key.
Core Capabilities
Every layer of Forge is purpose-built for production AI workloads. Each capability works independently and compounds when used together.
Intelligent Routing
Route requests across 14+ LLM providers with cascading intent classification, ELO-scored quality routing, and automatic failover. RouteLLM delivers 85% cost reduction at sub-5ms latency via ONNX inference.
Learn moreThree-Layer Memory
Persistent memory across conversations and providers. Vector search via Qdrant, graph relationships via Neo4j and Graphiti, and real-time state via Redis CRDTs. Graceful degradation to Turso when services are unavailable.
Learn moreSeven-Layer Security
ForgeGuard pipeline with SpiceDB authorization, LlamaFirewall input scanning, DeBERTa-v3 semantic analysis, Presidio PII detection, Augustus adversarial probing, and MCP supply chain verification.
Learn morex402 Payments
Native x402 V2 micropayments for per-request billing, plus Stripe bridge for traditional subscriptions. Credit packs with volume bonuses, themed bundles, and 55-module a la carte billing.
Learn moreObservability
Self-hosted Langfuse tracing on every request. OpenTelemetry-compatible telemetry, cost analytics, latency percentiles, and per-agent dashboards. Integrated with Opik for experiment tracking.
Learn moreUniversal Compatibility
Drop-in OpenAI-compatible API that works with LangChain, LlamaIndex, CrewAI, AutoGen, Semantic Kernel, and 14+ other frameworks. Switch providers without changing a single line of application code.
Learn moreOne API call. Every provider.
Forge exposes a fully OpenAI-compatible API. Set model to "auto" and Forge picks the optimal provider based on cost, quality, and latency. Or specify a model directly like "claude-opus-4-20250514" for explicit routing.
The optional forge object lets you enable semantic caching, set security levels, attach memory sessions, and control routing priority. Every parameter is optional and backward-compatible.
curl -X POST https://api.optima-forge.com/v1/chat/completions \-H "Authorization: Bearer $FORGE_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "auto","messages": [{"role": "user", "content": "Analyze this contract"}],"forge": {"cache": true,"security": "strict","memory": { "session": "ctx_abc123" },"priority": "quality"}}'
Explore Forge in Depth
Dive into each subsystem to understand how Forge handles routing, memory, security, payments, observability, and more.
Routing
Cascading classifiers, RouteLLM, quality scoring, failover
Memory
Vector, graph, and state layers with cross-provider continuity
Security
ForgeGuard 7-layer pipeline and OWASP Agentic Top 10
Payments
x402 micropayments, Stripe bridge, credit packs, bundles
Observability
Langfuse tracing, OpenTelemetry, cost and latency analytics
Compatibility
OpenAI-compatible API for 14+ frameworks and all major providers
Enterprise
SSO, Zanzibar permissions, compliance, data residency
Start building with Forge today
Free tier includes 1,000 requests per month, semantic caching, and full security pipeline. No credit card required.