2026-02-03 // READ: 8 MIN

[Tutorial] Zero-Barrier: Building Your Own Gemini AI Assistant with Vercel (Direct Access in China)

广告招租价格好商量 广告招租价格好商量
广告招租价格好商量 广告招租价格好商量
广告招租价格好商量 广告招租价格好商量
广告招租价格好商量 广告招租价格好商量

Introduction

Gemini is the next-generation AI large language model launched by Google. It excels in code comprehension and web development, helping even absolute beginners realize lightweight projects with ease. More importantly, Google’s AI Studio provides a free Gemini API for developers to use.

However, due to network restrictions (the Great Firewall), direct access to Gemini in mainland China remains a challenge. Today, we will use a simple open-source project to show you how to use Gemini freely without needing a persistent VPN connection.

Disclaimer: This tool and tutorial are intended solely for technical exchange and educational purposes. Please ensure compliance with local laws and regulations. Using this tool for illegal profit or unlawful activities is strictly prohibited; the author assumes no legal responsibility for any consequences arising from such use.


Prerequisites

Before starting, ensure you have the following: 1. GitHub Account: To host the code. 2. A Domain Name: Any domain that supports CNAME resolution. If you don't have one, you can get a free subdomain from dpdns.org. 3. Network Access: Only required for the initial step of obtaining your Gemini API Key. 4. Vercel Account: To deploy the backend services.


Step-by-Step Guide

Step 1: Fork the Project Log in to your GitHub account and visit the project address: https://github.com/Cnfte/VERCELGP. Click the Fork button at the top right to save the project to your own repository.

Step 2: Connect to Vercel Go to the Vercel Official Website (vercel.com), click Login, and select Continue with GitHub. After logging in, you will be redirected to your personal dashboard.

Step 3: One-Click Deployment In the Vercel dashboard, click Add New... -> Project. Find the VERCELGP repository you just forked from the list and click Import. On the configuration page, you don't need to change any default parameters—simply click Deploy. The process is very fast and usually completes within 30 seconds.

Step 4: Bind a Custom Domain (Critical Step) Once deployment is finished, do not try to access it immediately. Since Vercel’s default .vercel.app domains are restricted in mainland China, you must bind your own domain: 1. Click Settings -> Domains in the project sidebar. 2. Add your custom domain. 3. Follow the on-screen instructions to add a CNAME record at your DNS provider. - Advanced Tip: To achieve faster access speeds within China, point your CNAME record to cname-china.vercel-dns.com.

Step 5: Start Your Gemini Journey Once the DNS resolution takes effect, open your custom domain link to enter the Web interface. Simply enter your Gemini API Key to start chatting. If you prefer using other AI clients (like NextChat), you can also use this deployed URL as your API proxy address.


Conclusion

Congratulations! You have successfully built your own Gemini API proxy tool. By combining Vercel’s edge computing capabilities with a custom domain, we’ve not only bypassed connection issues but also created a stable, high-performance AI interaction environment.

Technology should be a bridge connecting wisdom, not a barrier. We hope this tool becomes a valuable assistant in your work and studies, helping you explore the endless possibilities of AI. If you encounter any issues during the setup, feel free to leave a comment for discussion.

Enjoy your AI exploration journey!