NextChat (ChatGPT Next Web) Custom OpenAI API Base URL Setup Guide (2026)
NextChat (formerly known as ChatGPT Next Web) is one of the most popular open-source, cross-platform ChatGPT web clients available for self-hosting via Docker or Vercel. However, developers and self-hosters frequently encounter rate limit errors (429 Too Many Requests), high token costs, or lack of multi-model support when relying on default API endpoints.
By overriding NextChat's default API endpoint with a unified OpenAI-compatible API gateway like AI Supermarket, you can unlock unthrottled concurrency, access Claude 3.5 Sonnet, DeepSeek V3, GPT-4o, and Gemini 2.5 under a single API key, and eliminate monthly subscription overheads.
Why Custom Base URL with AI Supermarket Gateway?
1. Multi-Model Access in NextChat
NextChat is natively designed around OpenAI REST API specifications. By setting your custom base URL to https://aisupermarket.work/v1, your NextChat instance can seamlessly switch between claude-3-5-sonnet-20241022, deepseek-chat, gpt-4o, and gemini-2.5-pro without needing separate API keys for each provider.
2. Bypass RPM & TPM Rate Limits
Official API endpoints enforce strict Tier 1 rate limits. AI Supermarket routes your requests through high-availability enterprise proxy pools, guaranteeing high throughput even for team-wide NextChat deployments.
Docker Environment Variables (Recommended)
docker run -d \ -p 3000:3000 \ -e OPENAI_API_KEY="sk-your-ai-supermarket-token" \ -e BASE_URL="https://aisupermarket.work/v1" \ --name nextchat \ yidadaa/chatgpt-next-web