-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Armin RAD edited this page Dec 16, 2025
·
7 revisions
Universal AI Gateway - Complete Documentation Hub
Production-ready AI gateway providing unified access to 100+ AI models across 17+ providers with enterprise security, credit management, and comprehensive monitoring.
| Section | Description |
|---|---|
| Getting Started | New to the project? Start here |
| Features | Feature documentation and guides |
| Deployment | Deploy to production platforms |
| Monitoring | Track errors and performance |
| Security | Security and compliance |
| Integrations | AI provider integrations |
| Development | Developer workflows |
| API Reference | Complete API documentation |
New developers start here:
| Document | Description |
|---|---|
| Quick Start | Get running in 15 minutes |
| Complete Setup Guide | Full development environment setup |
| Environment Setup | Configure environment variables |
| Architecture | System architecture overview |
| Project Structure | Codebase organization |
# 1. Clone and navigate
git clone <repo-url>
cd gatewayz-backend
# 2. Install dependencies
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# 3. Configure environment
cp .env.example .env
# Edit .env with your keys
# 4. Run server
python src/main.py
# 5. Test
curl http://localhost:8000/health| Feature | Documentation |
|---|---|
| Chat Completions | OpenAI-compatible /v1/chat/completions endpoint |
| Messages API | Anthropic-compatible Claude API |
| Image Generation | AI-powered image creation |
| Model Catalog | Browse 100+ models across providers |
| Model Health | Real-time model availability tracking |
| Model Sync | Automated catalog synchronization |
| Feature | Documentation |
|---|---|
| Authentication | Privy integration + custom auth |
| API Keys | Encrypted key management with scopes |
| User Profiles | Account management and settings |
| Activity Logging | Comprehensive activity tracking |
| Audit Logs | Security event logging |
| Roles & Permissions | RBAC implementation |
| Feature | Documentation |
|---|---|
| Pricing System | Token-based pricing across models |
| Credit Management | Real-time credit tracking and deduction |
| Stripe Integration | Payment processing and subscriptions |
| Subscription Plans | Tiered subscription management |
| Free Trials | 3-day trial with $10 credits |
| Coupons | Discount codes and promotions |
| Referral System | User referral rewards |
| Feature | Documentation |
|---|---|
| Rate Limiting | Redis-backed rate limiting |
| Caching | Response and model catalog caching |
| Failover | Automatic provider failover |
| Connection Pooling | Optimized database connections |
| Request Prioritization | Priority queue for critical requests |
| Feature | Documentation |
|---|---|
| Chat History | Persistent conversation management |
| Analytics | Usage analytics with PostHog |
| Feature Flags | A/B testing with Statsig |
| Notifications | Email notifications via Resend |
| Webhooks | Stripe webhook handling |
| Platform | Quick Start | Detailed Guide |
|---|---|---|
| Railway | Railway Quick Start | Railway Setup |
| Vercel | Vercel Quick Start | Vercel Deployment |
| Docker | Docker Quick Start | Docker Guide |
| Topic | Documentation |
|---|---|
| Auto-Deployment | Setup automated deployments |
| Staging Environment | Configure staging |
| Database Migrations | Supabase Migrations CI |
| GitHub Secrets | Configure CI/CD secrets |
| Environment Config | Environment differentiation |
| Tool | Documentation |
|---|---|
| Sentry | Error monitoring setup |
| PostHog | Alternative error tracking |
| Audit Logs | Security event logging |
| Topic | Documentation |
|---|---|
| Metrics | Prometheus metrics |
| Performance Monitoring | Track and optimize performance |
| Health Checks | System health monitoring |
| OpenTelemetry | Distributed tracing |
| Dashboard | Documentation |
|---|---|
| Grafana | Setup Grafana dashboards |
| Monitoring System | Complete Monitoring |
| Topic | Documentation |
|---|---|
| API Key Security | Encryption, rotation, scopes |
| Secrets Management | Managing sensitive data |
| Staging Security | Secure staging environment |
| Incident Response | Handle security incidents |
| Database Security | Secure database access |
| Provider | Type | Documentation |
|---|---|---|
| OpenRouter | Multi-model gateway | Primary provider |
| Google Vertex AI | Enterprise AI | Vertex Setup |
| Alibaba Cloud | Chinese market | Alibaba Integration |
| Cerebras | Fast inference | Native integration |
| DeepInfra | Open models | Native integration |
| Fireworks AI | Optimized inference | Native integration |
| Groq | Ultra-fast LLMs | Native integration |
| HuggingFace | Model hub | HF Integration |
| Together AI | Open source models | Native integration |
| Featherless | Cost-effective | Native integration |
| Chutes | Specialized provider | Native integration |
| +6 more | Various | See Integration Guide |
| Topic | Documentation |
|---|---|
| Add New Provider | Integration guide |
| OneRouter | OneRouter setup |
| Novita SDK | Novita integration |
| Frontend Integration | Connect frontend |
| Topic | Documentation |
|---|---|
| Pre-Push Checklist | Check before pushing |
| Testing Locally | Test GitHub Actions |
| Live API Testing | Test against live APIs |
| Failover Testing | Test failover scenarios |
| Migration Sync | Database migrations |
| Topic | Documentation |
|---|---|
| Test Suite | Running tests |
| Database Testing | Test database |
| API Testing | Apidog runner setup |
| OpenRouter Testing | Automated validation |
| Resource | Documentation |
|---|---|
| Complete API Docs | API Reference |
| OpenAPI Spec | Access at /docs endpoint |
| Chat API | Chat completions |
| Images API | Image generation |
| Admin API | Admin operations |
| Topic | Documentation |
|---|---|
| System Architecture | Architecture |
| Database Schema | Database design |
| Service Layer | Business logic organization |
| Provider Abstraction | Multi-provider pattern |
| Topic | Documentation |
|---|---|
| Auto-Merge PRs | Auto-merge setup |
| Automated Testing | CI/CD testing |
| Model Sync | Automated catalog sync |
| Topic | Documentation |
|---|---|
| Common Issues | Troubleshooting |
| Error Fixes | Recent fixes |
| Auth Timeouts | Fix auth issues |
| Prometheus Fixes | Monitoring fixes |
- Total Features: 25+ major features
- Supported Providers: 17+ AI providers
- API Endpoints: 50+ endpoints
- Available Models: 100+ models
- Test Coverage: 85%+
- Response Time: <100ms avg
- Framework: FastAPI 0.104.1
- Database: Supabase (PostgreSQL)
- Cache: Redis 5.0.1
- Payments: Stripe 13.0.1
- Email: Resend 0.8.0
- Analytics: PostHog, Statsig
- Monitoring: Sentry, Prometheus
When contributing documentation:
- Use clear, concise language
- Include code examples
- Add diagrams for complex flows
- Keep token usage efficient
- Cross-reference related pages
- Update this index when adding pages
| I want to... | Go to... |
|---|---|
| Set up my dev environment | Complete Setup Guide |
| Deploy to production | Railway Quick Start |
| Track errors | Error Monitoring |
| Add a new provider | Integration Guide |
| Understand pricing | Pricing System |
| Secure my API | Security |
| Run tests locally | Testing Workflows |
| Fix a bug | Troubleshooting |
Last Updated: December 2024 Maintained By: Gatewayz Development Team Questions? Check Troubleshooting or open an issue
Reading Path (start here, in order)
- Conceptual Model
- Stability Definition
- Conceptual Model Features
- Features
- Delta Report
- Features-Acceptance-Criteria
Testing
Security & Access
Billing
Monitoring
Features
Providers
Operations
Data References