Documentation
Everything you need to integrate SAPI into your application.
Quickstart
Get up and running in 5 minutes with a simple API call.
API Reference
Complete endpoint reference with request/response schemas.
Authentication
Learn about API key authentication and session management.
SDKs & Tools
Python, Node.js, and cURL integration examples.
Architecture Overview
Client → Cloudflare → SAPI
│ Auth Middleware (HMAC API Key Validation)
│ Rate Limiter (Redis Sliding Window)
│ Balance Check (Redis Atomic Counter)
│ Provider Mapper (Model → Provider Lookup)
│ Key Pool Manager (Highest Credits Key)
│ Provider Adapter (Request/Response Normalization)
│ Stream Proxy (SSE + AbortController)
└→ AI Provider API (OpenAI / Anthropic / Groq / ...)