Maybe it's time to have your own "ChatGPT"


This article will introduce detailed steps to help you quickly have a privately deployed ChatGPT Web App and explain the proprietary concepts involved.

Quick Start#

OpenAI Account Registration#

  • 🏠 Open the website and register: OpenAI

  • 📮 Use your personal email, preferably Gmail

  • 📱 Phone number verification

    • 🙅 This part does not support domestic phone numbers due to regional restrictions

    • 💰 Use a third-party platform to receive verification codes, such as: SMS-Activate, you can directly refer to the tutorial provided by the website

      • After completing the registration, recharge in the upper right corner, supporting Alipay, 1 USD is enough
      • Choose the 🇮🇳India region to purchase the number (cheaper)
      • Enter the purchased virtual number in the OpenAI registration page (do not paste the area code of the virtual number)
      • SMS-Activate should display the verification code, enter it into OpenAI (didn't receive it? The amount will be automatically refunded to the balance after 20 minutes)
  • 🙆 Successfully verified by the verification code


Generate API Keys#

  • 🔑 After successful registration, click on the upper right corner to enter this page, and new users click Create new secret key


  • ❗️ This key needs to be properly kept and will be used for deploying your own application later

Private Deployment#

  • Related repository: ChatGPT-Vercel

  • Vercel one-click deployment: Link (recommended to log in with your personal Github account)

Click on the first Github icon, Vercel will associate with your personal Github account, enter the name of the new repository and click Create to clone the repository. Enter the API key to start the deployment.



At this point, we have completed the deployment, and Vercel will automatically assign a domain.


  • Configure environment variables

In the previous step, we have set OPENAI_API_KEY before deployment. If you need to change it, there are two options:

  • There is a place on the page itself to set it, just fill it in ( this setting has a higher priority than Vercel ).


  • Go to Vercel for settings, path Settings / Environment Variables, the field name is OPENAI API KEY, and the value is the API key you created on the OpenAI platform.


  • Done

(Optional) Custom Domain#

  • Vercel can add custom domains, path Settings / Domains

  • Go to the service provider to configure CNAME to take effect.


(Optional) Stay Up-to-Date with the Project#

Since the project we are using is constantly being iterated, if you use the method in step 3 above, Vercel will help you establish an independent private repository directly from the original project at the time of submission. If the original project adds new features or bug fixes, your repository will not be aware of them.

If you want to be able to update to new features and deploy new versions of the application in a timely manner after the original repository is updated, it is recommended that you first go to this repository to fork it, and then go to Vercel to import this forked project for deployment.


If there are new commits in the original repository at this time, Github will prompt you to sync the fork, so that you can update your repository to the latest version, and Vercel will automatically deploy it.


Other Methods#

Is API Usage Free and How is it Billed?#

The private deployment mentioned above uses the API service provided by OpenAI, and this is not free. You can see how much quota you have used so far on this page:


The above image shows that our account has a quota of 5 USD, which is valid for 3 months from the registration of the account. The gpt-3.5-turbo model used for API calls is charged at 0.002 USD per 1,000 tokens. That is, it is not charged based on the number of calls. OpenAI will merge the question and answer content of each conversation for calculation. Token calculation can be viewed in this repository or experience the algorithm visually by clicking here.


Are There Other Ways to Use?#

Free! The premise is that you have an OpenAI account. You can also upgrade to ChatGPT Plus for $20 per month. The difference from the free version is that it is more stable, uses updated models, and can guarantee availability even during peak periods. The billing for ChatGPT Plus is separate from API calls.


Billed! Essentially, it still uses the API, so it will consume your quota, and the billing rules are different for different models. The use case is generally for developing specific applications based on the API and can be conveniently used for debugging prompt engineering and providing "examples" (examples of the expected input-output format) in the Playground.


  • Third-party

    • OpenCat - Requires API key, available on the App Store, supports iPhone / iPad / Mac
    • Access Siri - Requires API key Link
    • lencx/ChatGPT - Requires API key, cross-platform application (supports Mac, Windows, and Linux) Repository

From Usage to Development#

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.