Deploy New API – Universal AI API Gateway
Unified AI Gateway for OpenAI, Gemini & Claude APIs
new-api
Just deployed
Just deployed
/var/lib/postgresql/data
Redis
Just deployed
/data
Deploy and Host New API | Universal AI Gateway on Railway
New API | Universal AI Gateway is a powerful, OpenAI-compatible API gateway that lets you manage and route requests across multiple AI providers through a single unified endpoint. It includes a modern web dashboard, user and API key management, usage analytics, quotas, model routing, and support for providers such as OpenAI, Anthropic, Google Gemini, DeepSeek, OpenRouter, Groq, xAI, Cohere, Ollama, Azure OpenAI, Mistral, and many more.
About Hosting New API | Universal AI Gateway
Deploying New API on Railway provides a fast, production-ready environment without the complexity of manually managing infrastructure. This template automatically provisions PostgreSQL and Redis, configures the required environment variables, generates a secure session secret, and deploys the application with sensible production defaults.
Once deployed, you'll have a fully functional AI gateway with a web-based administration panel where you can manage AI providers, API keys, users, channels, quotas, usage statistics, and billing. Applications can immediately connect using the standard OpenAI API format, making migration from OpenAI or integration with multiple AI providers seamless. Railway's managed infrastructure also provides HTTPS, automatic deployments, private networking, centralized logs, and easy scaling as your workload grows.
Common Use Cases
- Build your own OpenAI-compatible API gateway for multiple AI providers.
- Centralize API key management, quotas, and billing across teams or customers.
- Create a production-ready backend for AI applications, chatbots, SaaS platforms, or internal developer tools.
Dependencies for New API | Universal AI Gateway Hosting
This template automatically provisions the following Railway services:
- Railway PostgreSQL (Primary Database)
- Railway Redis (Caching & Performance)
The following production-ready environment variables are preconfigured:
TZ=Asia/Shanghai
PORT=3000
SQL_DSN=${{Postgres.DATABASE_URL}}
REDIS_CONN_STRING=${{Redis.REDIS_URL}}
SESSION_SECRET=${{secret(32)}}
ERROR_LOG_ENABLED=true
BATCH_UPDATE_ENABLED=true
Deployment Dependencies
Official New API Project
https://github.com/QuantumNous/New-API
Railway Optimized Template Repository
https://github.com/bilalnawaz072/new-api
Official Documentation
Implementation Details
This Railway template has been optimized for a production deployment and automatically configures:
- Docker-based deployment
- Railway PostgreSQL integration
- Railway Redis integration
- Automatic database migrations
- Secure session secret generation
- Production logging
- Persistent PostgreSQL storage
- OpenAI-compatible API endpoint
- Railway private networking between services
After deployment:
- Open your Railway-generated URL.
- Complete the initial setup wizard.
- Create the administrator account.
- Add your AI provider API keys (OpenAI, Gemini, Claude, OpenRouter, DeepSeek, etc.).
- Generate API tokens.
- Start sending OpenAI-compatible API requests immediately.
Why Deploy New API | Universal AI Gateway on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying New API | Universal AI Gateway on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
This template further simplifies deployment by automatically provisioning PostgreSQL and Redis, securely generating application secrets, and configuring the application with production-ready defaults. Instead of manually configuring databases, networking, or environment variables, you can deploy a fully functional AI gateway in just a few minutes and immediately begin managing multiple LLM providers through a unified OpenAI-compatible API.
Template Content
